/* Global responsive hardening for all public pages */
:root {
    --fluid-gutter: clamp(1rem, 2.2vw, 2rem);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.container,
.cg-container,
.hero-content {
    width: 100%;
    max-width: 1260px;
}

main,
section,
.footer {
    max-width: 100%;
}

h1,
h2,
h3,
p,
.section-title,
.ct-title,
.fh-title {
    overflow-wrap: anywhere;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

@media (min-width: 1700px) {
    .container,
    .hero-content,
    .cg-container {
        max-width: 1380px;
    }

    .title-line:first-child {
        font-size: clamp(5.8rem, 10vw, 11rem);
    }
}

@media (max-width: 1200px) {
    .container,
    .hero-content,
    .cg-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 6.75rem;
    }

    .featured-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }

    .fh-display {
        max-width: 680px;
        margin: 0 auto;
    }

    .about-main-grid {
        grid-template-columns: 1fr;
        gap: 2.75rem;
    }

    .about-bottom-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cc-grid {
        grid-template-columns: 1fr;
        max-width: 760px;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .hero-subtitle {
        max-width: 44ch;
        margin-bottom: 1.75rem;
    }

    .hero-cta {
        margin-bottom: 2.25rem;
    }

    .hero-stats {
        gap: 1.1rem;
    }

    .glance-cards,
    .placement-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase-grid,
    .gallery-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase-item.large,
    .gallery-item.g-wide {
        grid-column: span 2;
    }

    .faculty-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    section {
        padding: clamp(3.5rem, 8vw, 5rem) 0;
    }

    .container,
    .hero-content,
    .cg-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero {
        min-height: 100svh;
        align-items: flex-start;
    }

    .hero-content {
        padding-top: clamp(6.25rem, 18vw, 7.5rem);
    }

    .hero-title {
        margin-bottom: 1rem;
        overflow: visible;
    }

    .title-line:first-child {
        font-size: clamp(2.75rem, 13.5vw, 4.25rem) !important;
        letter-spacing: -0.01em;
    }

    .title-sub-brand {
        font-size: clamp(0.95rem, 4.8vw, 1.25rem) !important;
        letter-spacing: 0.14em !important;
    }

    .hero-subtitle {
        font-size: 0.94rem;
        max-width: 36ch;
        line-height: 1.65;
    }

    .hero-badge {
        margin-bottom: 1rem;
    }

    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 0.7rem;
        align-items: stretch;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .stat-item {
        text-align: left;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .scroll-indicator {
        display: none;
    }

    .courses-grid,
    .showcase-grid,
    .gallery-masonry,
    .faculty-grid,
    .footer-grid,
    .placement-stats {
        grid-template-columns: 1fr !important;
    }

    .showcase-item.large,
    .gallery-item.g-wide {
        grid-column: span 1 !important;
    }

    .featured-hero {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .fh-title {
        font-size: clamp(1.9rem, 9vw, 2.8rem);
    }

    .fh-desc {
        max-width: none;
    }

    .cs-scroll-track {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .cs-card {
        flex: 0 0 82vw !important;
        min-width: 82vw !important;
        width: 82vw !important;
    }

    .cs-arrow,
    .cs-edge {
        display: none !important;
    }

    .glance-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cc-form-panel,
    .cc-info-panel {
        padding: 1.5rem !important;
    }

    .cc-social-row {
        justify-content: flex-start;
    }

    .footer-bottom .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .floating-contact {
        left: 1rem !important;
        bottom: 1rem !important;
        gap: 0.6rem !important;
    }

    .float-btn {
        width: 46px !important;
        height: 46px !important;
        font-size: 1.2rem !important;
    }

    .floating-apply {
        right: 1rem !important;
        bottom: 1rem !important;
        border-radius: 999px !important;
        padding: 0.85rem 1rem !important;
    }

    .floating-apply span {
        display: none;
    }

    .lightbox img,
    #lightbox-video {
        max-width: 95vw !important;
        max-height: 70vh !important;
    }

    .cg-filter-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }

    .cg-filter-bar::-webkit-scrollbar {
        display: none;
    }

    .cf-btn {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .cg-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .ct,
    .ct-master {
        grid-column: span 1 !important;
        aspect-ratio: auto !important;
        min-height: 350px;
    }

    .ct-body {
        padding: 1rem;
    }

    .ct-hover-content {
        max-height: 500px !important;
        opacity: 1 !important;
        margin-top: 0.75rem !important;
    }

    .cm-hero {
        height: 168px !important;
    }

    .cm-body {
        padding: 1.25rem;
    }

    .cm-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .cm-cta .btn-primary,
    .cm-cta .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding-top: 6.25rem !important;
    }

    .title-line:first-child {
        font-size: clamp(2.35rem, 13vw, 3.2rem) !important;
    }

    .title-sub-brand {
        font-size: 0.9rem !important;
        letter-spacing: 0.11em !important;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.7rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.78rem;
    }

    .section-title {
        font-size: clamp(1.75rem, 9vw, 2.3rem);
    }

    .glance-cards {
        grid-template-columns: 1fr;
    }

    .cc-detail {
        flex-direction: column;
        gap: 0.45rem;
    }

    .cc-captcha-code,
    .captcha-code {
        min-width: 108px;
        font-size: 1.2rem;
    }

    .modal-box,
    .enquiry-popup-box {
        padding: 1rem;
        border-radius: 14px;
    }

    .modal-header h3 {
        font-size: 1.45rem;
    }

    .footer-top {
        padding: 3rem 0;
    }
}

@media (max-width: 360px) {
    .container,
    .hero-content,
    .cg-container {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .title-line:first-child {
        font-size: clamp(2rem, 12vw, 2.75rem) !important;
    }

    .title-sub-brand {
        letter-spacing: 0.09em !important;
    }

    .cs-card {
        flex: 0 0 88vw !important;
        min-width: 88vw !important;
        width: 88vw !important;
    }
}
