/**
 * GHVM — mobile / tablet polish
 * Keeps desktop look; tightens spacing, type, and overflow on small screens.
 */

/* ---- Shared ---- */
@media (max-width: 991px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .edu-section-gap {
        padding-top: 56px !important;
        padding-bottom: 56px !important;
    }

    .section-gap-equal {
        padding-top: 56px !important;
        padding-bottom: 56px !important;
    }

    .section-title .title {
        font-size: clamp(22px, 5.2vw, 30px) !important;
        line-height: 1.25 !important;
    }

    .section-title .title br {
        display: none;
    }

    /* Decorative shapes often cause horizontal overflow / clutter on phones */
    .hero-banner .shape-group,
    .hero-banner .shape-7,
    .faq-style-1 .shape-group,
    .counterup-area-2 .shape-group,
    .about-style-1 .shape-group,
    .edu-cta-banner .shape-group {
        display: none !important;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .edu-section-gap,
    .section-gap-equal {
        padding-top: 44px !important;
        padding-bottom: 44px !important;
    }
}

@media (max-width: 400px) {
    .edu-header.header-style-1 .header-action .ghvm-header-quick {
        gap: 6px;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-btn {
        width: 40px;
        padding: 0;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-btn span {
        display: none;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-btn i {
        font-size: 18px;
    }
}

/* ---- Header (mobile) ---- */
@media (max-width: 1199px) {
    .edu-header.header-style-1 .header-top-bar {
        display: none !important;
    }

    .edu-header .header-mainmenu {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .edu-header.header-style-1 .header-navbar {
        min-height: 56px !important;
        align-items: center;
    }

    .edu-header.header-style-1 .header-brand .logo img {
        width: 52px !important;
        height: 52px !important;
        max-height: 52px !important;
        object-fit: contain;
    }

    .edu-header.header-style-1 .header-action .header-btn .edu-btn {
        height: 38px !important;
        padding: 0 14px !important;
        font-size: 12.5px !important;
        border-radius: 10px;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        list-style: none;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        border-radius: 999px;
        font-size: 12.5px;
        font-weight: 700;
        text-decoration: none !important;
        white-space: nowrap;
        transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-btn i {
        font-size: 16px;
        line-height: 1;
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-call {
        background: linear-gradient(135deg, #1ab69d, #0f8f7a);
        color: #fff !important;
        box-shadow: 0 6px 14px rgba(15, 143, 122, 0.28);
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-mail {
        background: #fff;
        color: #14202b !important;
        border: 1px solid rgba(20, 32, 43, 0.12);
        box-shadow: 0 4px 12px rgba(20, 32, 43, 0.06);
    }

    .edu-header.header-style-1 .header-action .ghvm-header-quick-btn:active {
        transform: scale(0.96);
    }

    .edu-header.header-style-1 .header-action .hamberger-button {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(26, 182, 157, 0.1);
        color: var(--color-primary, #1ab69d);
    }

    /* Seamless homepage header + hero */
    body:has(.hero-banner.hero-style-1) .edu-header.header-style-1 .header-mainmenu:not(.edu-sticky) {
        background: var(--bg-color, #eaf0f2) !important;
        box-shadow: none !important;
        border-bottom: none !important;
    }

    body:has(.hero-banner.hero-style-1) .edu-header.header-style-1 .header-mainmenu.edu-sticky {
        background: #fff !important;
        box-shadow: 0 6px 18px rgba(20, 32, 43, 0.08) !important;
    }
}

/* ---- Hero — modern mobile layout ---- */
@media (max-width: 991px) {
    .hero-banner.hero-style-1 {
        min-height: 0 !important;
        padding: 8px 0 32px !important;
        align-items: flex-start !important;
        overflow: hidden;
        background:
            radial-gradient(ellipse 90% 55% at 50% -10%, rgba(26, 182, 157, 0.18), transparent 60%),
            linear-gradient(180deg, #eaf0f2 0%, #f4f8f7 55%, #fff 100%) !important;
    }

    .hero-banner.hero-style-1::before {
        display: none !important;
    }

    .hero-banner.hero-style-1 .container {
        position: relative;
        z-index: 1;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .hero-banner.hero-style-1 .row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        --bs-gutter-y: 0;
        gap: 0;
    }

    /* Content first, photo second — clearer brand → action → visual */
    .hero-banner.hero-style-1 .row > .col-lg-6:first-child {
        order: 1;
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }

    .hero-banner.hero-style-1 .row > .col-lg-6:last-child {
        order: 2;
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        margin-top: 22px;
    }

    .hero-banner.hero-style-1 .banner-content {
        text-align: left;
        margin: 0 !important;
        padding: 8px 4px 0;
    }

    .hero-banner.hero-style-1 .banner-content .title {
        font-size: 26px !important;
        line-height: 1.2 !important;
        margin: 0 0 12px !important;
        letter-spacing: -0.02em;
    }

    .hero-banner.hero-style-1 .banner-content .title br {
        display: none !important;
    }

    .hero-banner.hero-style-1 .banner-content .title .color-secondary {
        display: inline;
        white-space: nowrap;
    }

    .hero-banner.hero-style-1 .banner-content p {
        font-size: 14px !important;
        line-height: 1.55 !important;
        margin: 0 0 18px !important;
        max-width: 36em;
        color: #4a5568 !important;
    }

    .hero-banner.hero-style-1 .banner-content .banner-btn {
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    .hero-banner.hero-style-1 .banner-content .banner-btn .edu-btn {
        min-width: 0;
        height: 48px !important;
        line-height: 48px !important;
        padding: 0 24px !important;
        border-radius: 14px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        box-shadow: 0 10px 24px rgba(15, 143, 122, 0.28);
    }

    /* Framed photo stage — never stretch */
    .hero-banner.hero-style-1 .banner-thumbnail {
        position: relative !important;
        margin: 0 auto !important;
        max-width: 100%;
        width: 100%;
        padding: 0;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .thumbnail {
        position: relative;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
        aspect-ratio: 1 / 1.05;
        border-radius: 28px;
        overflow: hidden;
        background:
            linear-gradient(160deg, rgba(26, 182, 157, 0.16) 0%, rgba(238, 74, 98, 0.08) 100%);
        box-shadow:
            0 18px 40px rgba(20, 32, 43, 0.12),
            inset 0 0 0 1px rgba(255, 255, 255, 0.55);
        text-align: center;
        line-height: 0;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .thumbnail img {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important;
        object-position: center bottom !important;
        display: block !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* Stat chip over the frame */
    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info {
        position: absolute !important;
        left: 50% !important;
        bottom: 14px !important;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100% - 32px);
        margin: 0 !important;
        z-index: 3;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px;
        padding: 7px 14px 7px 7px !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.96) !important;
        border: 1px solid rgba(26, 182, 157, 0.22);
        backdrop-filter: blur(8px);
        box-shadow: 0 10px 24px rgba(20, 32, 43, 0.14) !important;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner .title {
        display: none !important;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner .media {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner .media .thumb {
        margin: 0 !important;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner .media .thumb img {
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        display: block !important;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner .media .content {
        margin: 0 !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.15 !important;
        white-space: nowrap;
        color: #1a1f2c !important;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .instructor-info .inner .media .content span {
        display: inline !important;
        margin-right: 3px;
        font-weight: 800 !important;
        color: var(--color-secondary, #ee4a62) !important;
    }
}

@media (max-width: 575px) {
    .hero-banner.hero-style-1 {
        padding: 4px 0 28px !important;
    }

    .hero-banner.hero-style-1 .banner-content .title {
        font-size: 24px !important;
    }

    .hero-banner.hero-style-1 .banner-content p {
        font-size: 13.5px !important;
        margin-bottom: 16px !important;
    }

    .hero-banner.hero-style-1 .banner-thumbnail .thumbnail {
        max-width: 300px;
        aspect-ratio: 1 / 1.08;
        border-radius: 24px;
    }

    .hero-banner.hero-style-1 .row > .col-lg-6:last-child {
        margin-top: 18px;
    }
}

/* ---- Feature strip (2×2 on phones) ---- */
@media (max-width: 767px) {
    .features-area-2 {
        padding: 8px 0;
    }

    .features-area-2 .features-grid-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0;
    }

    .features-box.features-style-2 {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 18px 10px !important;
        border-right: 1px solid rgba(255, 255, 255, 0.18) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        min-height: 0 !important;
    }

    .features-box.features-style-2:nth-child(2n) {
        border-right: none !important;
    }

    .features-box.features-style-2:nth-child(n + 3) {
        border-bottom: none;
    }

    .features-box.features-style-2 .icon {
        margin: 0 0 8px !important;
    }

    .features-box.features-style-2 .content .title {
        font-size: 13px !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        color: #fff !important;
    }
}

/* ---- About / counters ---- */
@media (max-width: 991px) {
    .about-style-1 {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    .counterup-area-2 {
        padding: 8px 0 36px !important;
    }

    .counterup-area-2 .counterup-box-wrap {
        margin: 0 4px;
    }

    .counterup-area-2 .edu-counterup.counterup-style-2 {
        padding: 18px 10px !important;
    }

    .counterup-area-2 .counter-item.count-number {
        font-size: clamp(28px, 8vw, 40px) !important;
        line-height: 1.1 !important;
    }

    .counterup-area-2 .edu-counterup .title {
        font-size: 11px !important;
        letter-spacing: 0.04em;
        margin-top: 6px !important;
    }
}

@media (max-width: 575px) {
    .counterup-area-2 .counterup-box {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }
}

/* ---- CTA banners ---- */
@media (max-width: 991px) {
    .edu-cta-banner-area-6,
    .modern-schooling-cta-wrapper {
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }

    /* Theme sets height:567px — that stretched the photo when we showed it on mobile */
    .edu-cta-banner-area-6 .thumbnail img,
    .modern-schooling-cta-wrapper .thumbnail img,
    .edu-cta-banner .thumbnail img {
        display: block !important;
        height: auto !important;
        width: auto !important;
        max-width: min(280px, 78vw) !important;
        max-height: 320px !important;
        margin: 0 auto 12px !important;
        object-fit: contain !important;
    }

    .edu-cta-banner-area-6 .section-title {
        text-align: center;
        padding: 12px 0 28px !important;
    }

    .edu-cta-banner .section-title {
        text-align: center;
    }

    .edu-cta-banner .edu-btn {
        margin-top: 12px;
    }
}

/* ---- Spotlight (birthdays / notices) ---- */
@media (max-width: 991px) {
    .ghvm-spotlight {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .ghvm-spotlight .section-title {
        margin-bottom: 24px;
    }

    .ghvm-spotlight-grid {
        gap: 14px;
    }
}

@media (max-width: 575px) {
    .ghvm-spotlight {
        padding-top: 36px;
        padding-bottom: 36px;
    }

    .ghvm-spotlight-chip,
    .ghvm-section-chip {
        margin-bottom: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .ghvm-bday-name {
        font-size: 18px !important;
    }

    .ghvm-bday-photo {
        width: 96px !important;
        height: 96px !important;
    }
}

/* ---- FAQ ---- */
@media (max-width: 991px) {
    .faq-style-1 {
        padding: 48px 0 !important;
    }

    .faq-style-1 .row--45 > .col-lg-5,
    .faq-style-1 .row--45 > .col-lg-7 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .faq-style-1 .edu-faq-gallery {
        max-width: 420px;
        margin: 0 auto 28px;
    }

    .faq-style-1 .edu-faq-gallery img {
        width: 100%;
        height: auto;
    }

    .faq-style-1 .edu-faq-content .section-title {
        text-align: center;
        margin-bottom: 22px;
    }

    .faq-style-1 .ghvm-faq-more {
        text-align: center;
        margin-top: 18px;
    }

    .faq-style-1 .ghvm-faq-list .accordion-item .accordion-button {
        font-size: 15px !important;
        padding: 14px 40px 14px 16px !important;
    }
}

@media (max-width: 575px) {
    .faq-style-1 {
        padding: 40px 0 !important;
    }

    .faq-style-1 .edu-faq-gallery .row.g-5 {
        --bs-gutter-y: 0.75rem;
        --bs-gutter-x: 0.75rem;
    }
}

/* ---- Brand / partners ---- */
@media (max-width: 767px) {
    .brand-area,
    .home-one-brand {
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }

    .brand-grid-wrap {
        gap: 12px !important;
        justify-content: center;
    }

    .brand-grid img {
        max-height: 48px;
        width: auto;
    }
}

/* ---- Buttons / touch ---- */
@media (max-width: 767px) {
    a.edu-btn.btn-medium,
    button.edu-btn.btn-medium {
        height: 46px !important;
        line-height: 46px !important;
        padding: 0 18px !important;
        font-size: 14px !important;
    }
}

/* ---- Footer ---- */
@media (max-width: 767px) {
    .edu-footer {
        padding-top: 48px !important;
    }

    .edu-footer .footer-widget {
        margin-bottom: 28px;
    }

    .copyright-area {
        text-align: center;
        padding: 16px 0 !important;
    }
}

/* ---- Breadcrumbs (inner pages) ---- */
@media (max-width: 767px) {
    .edu-breadcrumb-area {
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }

    .edu-breadcrumb-area .page-title .title {
        font-size: 26px !important;
    }
}

/* ---- Reduce sticky header jump ---- */
@media (max-width: 1199px) {
    .edu-header .header-mainmenu.edu-sticky {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .edu-header .header-mainmenu.edu-sticky .logo img {
        width: 48px !important;
        height: 48px !important;
        max-height: 48px !important;
    }
}
