﻿/* =========================================================
   Large Tablet / Small Desktop
   ========================================================= */

@media (max-width: 1100px) {

    .site-container {
        width: min(100% - 36px, var(--container-width));
    }

    .site-header__navigation {
        gap: 13px;
    }

        .site-header__navigation > a:not(.site-button) {
            font-size: 0.62rem;
        }

    .home-hero__copy {
        width: min(430px, 48%);
        margin-left: 0;
    }
}


/* =========================================================
   Mobile Navigation
   ========================================================= */

@media (max-width: 900px) {

    .site-header__menu-button {
        display: block;
    }

    .site-header__navigation {
        position: absolute;
        top: var(--header-height);
        right: 0;
        left: 0;
        display: none;
        padding: 22px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--color-navy-deep);
        border-bottom: 1px solid rgba(214, 163, 61, 0.42);
    }

        .site-header__navigation.is-open {
            display: flex;
        }

        .site-header__navigation > a:not(.site-button) {
            padding: 13px 7px;
            font-size: 0.76rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        }

    .site-header__donation {
        align-self: flex-start;
        margin-top: 12px;
    }

    .home-hero {
        height: calc(100svh - var(--header-height));
        min-height: 540px;
        max-height: none;
    }

    .home-hero__content {
        align-items: flex-end;
        padding: 80px 0 85px;
    }

    .home-hero__copy {
        width: min(540px, 72%);
    }

    .discipline-strip {
        height: 100px;
    }
}


/* =========================================================
   Tablet Portrait
   ========================================================= */

@media (max-width: 768px) {

    .site-container {
        width: min(100% - 28px, var(--container-width));
    }

    .home-hero__copy {
        width: min(520px, 84%);
    }

    .home-hero__title {
        font-size: 2.55rem;
    }

    .home-hero__overlay {
        background: linear-gradient( 180deg, rgba(1, 8, 15, 0.18) 0%, rgba(1, 8, 15, 0.34) 38%, rgba(1, 8, 15, 0.95) 100% );
    }

    .hero-player {
        right: 16px;
        left: 16px;
    }

    .discipline-strip__inner {
        width: 100%;
    }

    .discipline-strip__icon {
        width: 38px;
        height: 38px;
    }

    .discipline-strip__label {
        font-size: 0.82rem;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 620px) {

    .home-hero {
        min-height: 560px;
    }

    .home-hero__content {
        padding: 74px 0 86px;
    }

    .home-hero__copy {
        width: 100%;
    }

    .home-hero__title {
        font-size: 2.15rem;
    }

    .home-hero__subtitle {
        font-size: 0.88rem;
    }

    .home-hero__description {
        font-size: 0.82rem;
    }

    .home-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

        .home-hero__actions .site-button {
            width: 100%;
        }

    .hero-player {
        grid-template-columns: 28px minmax(100px, 1fr) 28px 28px;
        gap: 7px;
    }

    .hero-player__time {
        display: none;
    }

    .discipline-strip {
        height: auto;
    }

    .discipline-strip__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .discipline-strip__item {
        min-height: 92px;
        border-bottom: 1px solid rgba(214, 163, 61, 0.16);
    }

        .discipline-strip__item:nth-child(even)::after {
            display: none;
        }

        .discipline-strip__item:last-child {
            grid-column: 1 / -1;
        }
}


/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 420px) {

    .home-hero__heading {
        font-size: 1.22rem;
    }

    .home-hero__description {
        line-height: 1.58;
    }

    .hero-player {
        right: 9px;
        bottom: 8px;
        left: 9px;
    }
}
@media (max-width: 760px) {
    .home-about__content {
        max-width: none;
    }

    .home-about__visual {
        width: min(100%, 620px);
        justify-self: center;
    }
}



/* =========================================================
   Courses Section Responsive
   ========================================================= */

@media (max-width: 980px) {

    .courses-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .course-card__media {
        height: 185px;
    }
}

@media (max-width: 700px) {

    .courses-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-card__media {
        height: 220px;
    }
}
/* =========================================================
   FINAL MOBILE LAYOUT FIX
   Home + Services
   ========================================================= */

@media (max-width: 768px) {

    /* =====================================================
       HOME PAGE
       Stack Events and Gallery vertically
       ===================================================== */

    .home-showcase__grid {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }

    .events-section,
    .gallery-highlights {
        width: 100%;
        min-width: 0;
    }


    /* Events must not remain as three narrow columns */

    .events-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }

    .event-card {
        width: 100%;
        min-width: 0;
    }


    /* Keep Gallery Highlights as a useful 2 × 2 grid */

    .gallery-highlights__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    .gallery-highlight {
        width: 100%;
        min-width: 0;
    }


    /* =====================================================
       SERVICES PAGE
       Convert every service card to vertical mobile card
       ===================================================== */

    .service-showcase,
    .service-showcase--reverse {
        grid-template-columns: 1fr !important;
        min-height: 0;
    }


        /* Image always appears first */

        .service-showcase .service-showcase__artwork,
        .service-showcase--reverse .service-showcase__artwork {
            order: 1 !important;
            width: 100%;
            height: 220px;
            padding: 14px 18px;
        }


        /* Text always appears below image */

        .service-showcase .service-showcase__content,
        .service-showcase--reverse .service-showcase__content {
            order: 2 !important;
            width: 100%;
            min-width: 0;
            padding: 26px 24px 28px 72px;
        }


    /* Keep icon correctly positioned */

    .service-showcase__icon {
        top: 27px;
        left: 20px;
        width: 40px;
        height: 40px;
    }


    /* Prevent text from being restricted by desktop widths */

    .service-showcase__text {
        width: 100%;
        max-width: none;
    }

    .service-showcase__highlights {
        width: 100%;
    }


    /* Remove desktop reverse-column behaviour */

    .service-showcase--reverse .service-showcase__artwork,
    .service-showcase--reverse .service-showcase__content {
        grid-column: auto;
    }
}
@media (max-width: 480px) {

    /* =====================================================
       HOME
       ===================================================== */

    .home-showcase__grid {
        gap: 26px;
    }

    .events-grid {
        gap: 15px;
    }

    .gallery-highlights__grid {
        gap: 10px;
    }


    /* =====================================================
       SERVICES
       ===================================================== */

    .service-showcase .service-showcase__artwork,
    .service-showcase--reverse .service-showcase__artwork {
        height: 190px;
    }

    .service-showcase .service-showcase__content,
    .service-showcase--reverse .service-showcase__content {
        padding: 24px 20px 26px 68px;
    }

    .service-showcase__title {
        font-size: 1.55rem;
    }

    .service-showcase__text {
        font-size: .86rem;
        line-height: 1.6;
    }

    .service-showcase__highlights {
        font-size: .68rem;
        line-height: 1.55;
    }
}
/* =========================================================
   SERVICES - FINAL MOBILE GRID FIXES
   ========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------
       WHO WE SERVE
       ----------------------------------------- */

    .services-audience__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .audience-item {
        padding: 22px 14px 20px;
    }

        .audience-item:not(:last-child)::after {
            display: none;
        }

    .audience-item {
        border-bottom: 1px solid rgba(214, 163, 61, .18);
    }

        .audience-item:nth-last-child(-n+2) {
            border-bottom: none;
        }


    /* -----------------------------------------
       WHY SANSKRITIGRAM
       ----------------------------------------- */

    .services-strengths__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px;
    }

    .service-strength {
        padding: 24px 18px 22px;
    }
}


@media (max-width: 480px) {

    /* Who We Serve */

    .services-audience__grid {
        grid-template-columns: 1fr !important;
    }

    .audience-item {
        padding: 22px 18px;
    }

        .audience-item:nth-last-child(-n+2) {
            border-bottom: 1px solid rgba(214, 163, 61, .18);
        }

        .audience-item:last-child {
            border-bottom: none;
        }


    /* Why Sanskritigram */

    .services-strengths__grid {
        grid-template-columns: 1fr !important;
    }

    .service-strength {
        width: 100%;
        min-width: 0;
    }
}
/* =========================================================
   HEADER - MOBILE LOGO SIZE
   ========================================================= */

@media (max-width: 768px) {

    .site-header {
        min-height: 78px;
    }

    .site-header__inner {
        min-height: 78px;
    }

    .site-header__logo {
        height: 84px;
        width: auto;
    }
}


@media (max-width: 480px) {

    .site-header {
        min-height: 72px;
    }

    .site-header__inner {
        min-height: 72px;
    }

    .site-header__logo {
        height: 78px;
    }
}
/* =========================================================
   FINAL HOME HERO MOBILE OVERRIDE
   ========================================================= */

@media (max-width: 768px) {

    .home-hero {
        height: auto !important;
        min-height: 620px !important;
        max-height: none !important;
    }

    .home-hero__media picture {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
    }

    .home-hero__image {
        display: block !important;
        width: 100%;
        height: 100%;
        object-fit: cover;
        /*
           Portrait source already matches mobile geometry,
           so very little enlargement/cropping is required.
        */
        object-position: center top;
        transform: none !important;
    }

    .home-hero__heading {
        color: #F1E6D2 !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, .65) !important;
    }
  
    /* Mobile-friendly vertical readability wash */
    .home-hero__overlay {
        background: linear-gradient( 180deg, rgba(2, 10, 22, .05) 0%, rgba(2, 10, 22, .16) 30%, rgba(2, 10, 22, .52) 58%, rgba(2, 10, 22, .93) 100% ) !important;
    }

    .home-hero__content {
        min-height: 620px !important;
        align-items: flex-end !important;
        padding: 42px 0 46px !important;
    }

    .home-hero__copy {
        width: 94% !important;
        max-width: 440px;
        margin-left: 0 !important;
    }

   

    .home-hero__tree {
        width: 82px !important;
    }
}


@media (max-width: 480px) {

    .home-hero {
        min-height: 600px !important;
    }

    .home-hero__content {
        min-height: 600px !important;
        padding: 34px 0 40px !important;
    }

    .home-hero__copy {
        width: 94% !important;
    }

    .home-hero__tree {
        width: 76px !important;
    }
}