/* ==========================================================================
   EDZIO GLOBAL — SERVICES PAGES RESPONSIVE LAYER
   Range covered: 300px  ->  2560px
   Applies to (root only):
     university-shortlisting.php, applications-and-sops.php, visa-guidance.php,
     accommodation-support.php, language-test-preparation-and-guidance.php,
     education-loans-and-financial-assistance.php, career-oriented-counseling.php

   This file is linked LAST on the page (just before footer.php), so ordinary
   rules already beat the page's own <style> blocks. !important appears only
   where the markup carries a style="" attribute that cannot be beaten
   otherwise.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL GUARDS — nothing may push a horizontal scrollbar
   -------------------------------------------------------------------------- */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

.srv-main-wrapper {
    width: 100%;
    max-width: 100%;
}

.srv-main-wrapper img,
.srv-main-wrapper video,
.srv-main-wrapper iframe {
    max-width: 100%;
}

.srv-main-wrapper h1,
.srv-main-wrapper h2,
.srv-main-wrapper h3,
.srv-main-wrapper h4,
.srv-main-wrapper p,
.srv-main-wrapper li {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Tap targets on the FAQ toggles */
.srv-faq-container [onclick] {
    min-height: 48px;
    gap: 12px;
}


/* --------------------------------------------------------------------------
   2. FLUID TYPE — replaces the fixed px/rem sizes in the style="" attributes
   -------------------------------------------------------------------------- */

.srv-hero-banner {
    padding-top: clamp(140px, 12vw, 175px) !important;
    align-items: flex-start !important;
    min-height: 100vh !important;
    height: auto !important;
    padding-bottom: 60px !important;
    box-sizing: border-box !important;
}

/* Hero */
.srv-hero-banner h1 {
    font-size: clamp(1.75rem, 7.2vw, 4.5rem) !important;
    letter-spacing: clamp(-2px, -0.35vw, -0.5px) !important;
}

.srv-hero-banner > div > p {
    font-size: clamp(0.7rem, 2.4vw, 0.9rem) !important;
    letter-spacing: clamp(1px, 0.5vw, 3px) !important;
}

.srv-hero-banner > div > div {
    font-size: clamp(0.85rem, 2.6vw, 1rem) !important;
    margin-top: clamp(18px, 4vw, 40px) !important;
}

/* Horizontal panel */
.srv-h-panel.title p {
    font-size: clamp(0.9rem, 2.8vw, 1.2rem) !important;
}

.srv-h-panel.title h2 {
    font-size: clamp(1.5rem, 6.5vw, 4.5rem);
    letter-spacing: clamp(-2px, -0.35vw, -0.5px);
}

.srv-h-panel.card h3 {
    font-size: clamp(0.95rem, 2.6vw, 1.6rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.srv-h-panel.card p {
    font-size: clamp(0.78rem, 2.1vw, 0.95rem);
}

/* Quote card (4th panel) */
.srv-h-panel.card .srv-card-text-box p[style*="1.8rem"] {
    font-size: clamp(1rem, 3.4vw, 1.8rem) !important;
}

/* "How it works" */
.srv-works-left h2 {
    font-size: clamp(1.5rem, 6.5vw, 3rem) !important;
}

.srv-works-left p {
    font-size: clamp(0.85rem, 2.6vw, 1.1rem) !important;
    margin-top: clamp(14px, 3.5vw, 40px) !important;
}

.srv-step-card h3 {
    font-size: clamp(1.3rem, 5vw, 3rem);
}

.srv-step-card p {
    font-size: clamp(0.82rem, 2.4vw, 1.1rem);
    margin-top: clamp(0.75rem, 2.5vw, 1.5rem);
}

.srv-step-card p[style*="0.95rem"] {
    font-size: clamp(0.75rem, 2.2vw, 0.95rem) !important;
    margin-top: clamp(12px, 2.5vw, 20px) !important;
    padding-top: clamp(12px, 2.5vw, 20px) !important;
}

/* "Why choose us" + FAQ sections (both are style="height:auto") */
.srv-section[style*="height: auto"] > h2,
.srv-section[style*="height: auto"] > div > h2 {
    font-size: clamp(1.5rem, 6vw, 3rem) !important;
    margin-bottom: clamp(28px, 5vw, 60px) !important;
    padding: 0 16px;
}

.srv-section[style*="--srv-bg"] > div > div h4 {
    font-size: clamp(0.95rem, 2.6vw, 1.2rem) !important;
}

.srv-section[style*="--srv-bg"] > div > div p {
    font-size: clamp(0.82rem, 2.3vw, 0.95rem) !important;
}

.srv-faq-container h4 {
    font-size: clamp(0.85rem, 2.4vw, 1.05rem) !important;
}

.srv-faq-container p {
    font-size: clamp(0.82rem, 2.3vw, 1rem) !important;
}

/* Closing video section */
.srv-footer-mock h2 {
    font-size: clamp(1.5rem, 6.2vw, 3.5rem) !important;
    margin-bottom: clamp(16px, 3vw, 30px) !important;
}

.srv-footer-mock p {
    font-size: clamp(0.85rem, 2.6vw, 1.2rem) !important;
}


/* --------------------------------------------------------------------------
   3. FLUID BOXES — grids and paddings that were hard-coded in px
   -------------------------------------------------------------------------- */

/* auto-fit grids must never demand more than the container has */
.srv-section[style*="--srv-bg"] > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important;
    gap: clamp(16px, 2.5vw, 30px) !important;
    width: min(92%, 1200px) !important;
}

.srv-section[style*="--srv-bg"] > div > div {
    padding: clamp(20px, 3.5vw, 40px) !important;
}

.srv-section[style*="height: auto"] {
    padding-top: clamp(56px, 9vw, 120px) !important;
    padding-bottom: clamp(56px, 9vw, 120px) !important;
}

.srv-section[style*="#fff"] > div {
    width: min(94%, 1150px) !important;
}

.srv-why-matter > div,
.srv-why-matters-section > div {
    width: min(94%, 1150px) !important;
    max-width: 1150px !important;
}

.srv-faq-container [onclick] {
    padding: clamp(14px, 3vw, 24px) !important;
}

.srv-faq-container [onclick] + div {
    padding: clamp(14px, 3vw, 24px) !important;
}

.srv-card-text-box {
    padding: clamp(1rem, 3vw, 2.5rem);
}

.srv-h-panel.card .srv-card-text-box[style*="4rem"] {
    padding: clamp(1.25rem, 4vw, 4rem) !important;
}

.srv-footer-content {
    padding: 0 clamp(16px, 6vw, 10%);
}

.srv-footer-mock p {
    max-width: min(100%, 850px) !important;
}


/* --------------------------------------------------------------------------
   4. LARGE SCREENS — 1600px / 1920px / 2560px
   Without these the layout keeps a 1200px core and looks stranded.
   -------------------------------------------------------------------------- */
@media (min-width: 1600px) {
    .srv-hero-banner > div {
        max-width: 1000px !important;
    }

    .srv-hero-banner > div > div {
        max-width: 900px !important;
    }

    .srv-h-panel.card {
        width: 34vw;
        max-width: 620px;
        height: 72vh;
        max-height: 780px;
    }

    .srv-h-panel.title {
        width: 50vw;
        max-width: 1000px;
    }

    .srv-step-card p {
        max-width: 700px;
    }

    .srv-section[style*="--srv-bg"] > div[style*="grid-template-columns"] {
        width: min(88%, 1500px) !important;
        max-width: none !important;
    }

    .srv-section[style*="#fff"] > div {
        width: min(88%, 1100px) !important;
        max-width: none !important;
    }
}

@media (min-width: 1920px) {
    .srv-hero-banner {
        padding-left: 12%;
    }

    .srv-h-panel.card {
        width: 30vw;
        max-width: 660px;
    }

    .srv-h-panel.title {
        width: 46vw;
        max-width: 1150px;
    }

    .srv-section[style*="--srv-bg"] > div[style*="grid-template-columns"] {
        width: min(86%, 1700px) !important;
        max-width: none !important;
        grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)) !important;
    }

    .srv-section[style*="#fff"] > div {
        width: min(86%, 1200px) !important;
        max-width: none !important;
    }

    .srv-footer-mock p {
        max-width: min(100%, 1050px) !important;
    }
}

@media (min-width: 2400px) {
    .srv-hero-banner > div {
        max-width: 1200px !important;
    }

    .srv-h-panel.card {
        max-width: 720px;
    }

    .srv-h-panel.title {
        max-width: 1350px;
    }

    .srv-section[style*="--srv-bg"] > div[style*="grid-template-columns"] {
        width: min(84%, 2000px) !important;
        max-width: none !important;
    }

    .srv-section[style*="#fff"] > div {
        width: min(84%, 1350px) !important;
        max-width: none !important;
    }
}


/* --------------------------------------------------------------------------
   5. TABLETS AND BELOW — <= 992px
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    /* Parallax backgrounds are unreliable on touch devices */
    .srv-hero-banner {
        background-attachment: scroll;
    }

    /* The hero copy is long: let it grow instead of being clipped by
       .srv-section { height:100vh; overflow:hidden }.
       The top padding also clears the ~96px fixed site header.
       !important is required because css/style.css forces
       `section { padding-top/bottom: 35px !important }` below 992px. */
    .srv-hero-banner {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 150px 6% 80px !important;
    }

    /* The site header is position:fixed and ~96px tall, so the top of every
       pinned 100vh section sits underneath it. Give the stacked "How it
       works" block explicit flex sizing: the intro takes what it needs
       (including nav clearance) and the step stack fills the remainder. */
    .srv-works {
        overflow: hidden;
    }

    .srv-works-left {
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        padding: 108px 6% 18px;
    }

    .srv-works-right {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }

    .srv-step-card {
        padding: 8% 8%;
    }

    .srv-h-panel {
        padding: 0 6vw;
    }

    .srv-h-panel.title {
        width: 88vw;
    }

    .srv-h-panel.card {
        width: 78vw;
        max-width: 460px;
        height: 64vh;
        min-height: 400px;
        margin: 0 3vw;
    }

    .srv-footer-mock {
        height: auto;
        min-height: 100vh;
        padding: 110px 0 90px !important;
    }
}

/* Modern viewport units: keeps pinned sections stable while the mobile
   browser chrome collapses. Ignored by browsers that lack svh support,
   which then keep the 100vh already declared on the page. */
@media (max-width: 992px) {
    .srv-horizontal-wrap,
    .srv-h-container,
    .srv-works {
        height: 100svh;
    }

    .srv-hero-banner,
    .srv-footer-mock {
        min-height: 100svh;
    }
}


/* --------------------------------------------------------------------------
   6. PHONES — <= 768px
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .srv-hero-banner {
        padding: 146px 5% 70px !important;
    }

    .srv-h-panel {
        padding: 0 5vw;
    }

    .srv-h-panel.title {
        width: 90vw;
    }

    .srv-h-panel.card {
        width: 82vw;
        height: 64vh;
        min-height: 340px;
        margin: 0 2.5vw;
    }

    .srv-card-img-box {
        height: 50%;
    }

    .srv-works-left {
        padding: 104px 6% 16px;
    }

    .srv-step-card {
        padding: 7%;
        border-top-width: 1px;
    }
}


/* --------------------------------------------------------------------------
   7. SMALL PHONES — <= 576px
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
    .srv-hero-banner {
        padding: 142px 5% 60px !important;
    }

    .srv-h-panel {
        padding: 0 4vw;
    }

    .srv-h-panel.card {
        width: 86vw;
        height: 66vh;
        min-height: 320px;
        margin: 0 2vw;
        border-radius: 10px;
    }

    .srv-card-img-box {
        height: 46%;
    }
}


/* --------------------------------------------------------------------------
   8. VERY SMALL PHONES — <= 400px (down to the 300px floor)
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
    .srv-hero-banner {
        padding: 140px 16px 50px !important;
    }

    .srv-h-panel {
        padding: 0 12px;
    }

    .srv-h-panel.title {
        width: 92vw;
    }

    .srv-h-panel.card {
        width: 90vw;
        height: 66vh;
        min-height: 300px;
        margin: 0 8px;
    }

    .srv-card-img-box {
        height: 42%;
    }

    .srv-works-left {
        padding: 102px 16px 14px;
    }

    .srv-step-card {
        padding: 24px 18px;
    }

    .srv-section[style*="--srv-bg"] > div[style*="grid-template-columns"] {
        width: 92% !important;
        gap: 14px !important;
    }

    .srv-section[style*="--srv-bg"] > div > div {
        padding: 18px 16px !important;
    }

    .srv-section[style*="#fff"] > div {
        width: 94% !important;
    }

    .srv-faq-container [onclick] {
        padding: 14px !important;
    }

    .srv-faq-container [onclick] + div {
        padding: 14px !important;
    }

    .srv-footer-content {
        padding: 0 14px;
    }
}


/* --------------------------------------------------------------------------
   9. SHORT LANDSCAPE PHONES
   100vh panels have almost no room here, so let the sections breathe.
   -------------------------------------------------------------------------- */
@media (max-height: 520px) and (max-width: 992px) {
    .srv-hero-banner,
    .srv-footer-mock {
        min-height: 0;
        height: auto;
        padding-top: 140px !important;
        padding-bottom: 60px !important;
    }

    .srv-h-panel.card {
        height: 76vh;
        min-height: 0;
    }

    .srv-works-left {
        min-height: 0;
        padding: 100px 16px 8px;
    }
}


/* --------------------------------------------------------------------------
   10. EDUCATION LOANS PAGE — partner logo marquee
   -------------------------------------------------------------------------- */
.scroller-container {
    max-width: 100%;
}

@media (max-width: 400px) {
    .scroller-container {
        padding: 28px 0;
    }

    .scroller-container::before,
    .scroller-container::after {
        width: 36px;
    }

    .logo-item {
        width: 118px;
        height: 66px;
        padding: 0 10px;
    }

    .header-section h2 {
        font-size: clamp(1.05rem, 5.5vw, 1.5rem);
        padding: 0 12px;
    }

    .footer-text {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
    }
}

@media (min-width: 1920px) {
    .logo-item {
        width: 280px;
        height: 150px;
        padding: 0 50px;
    }
}


/* --------------------------------------------------------------------------
   11. ACCESSIBILITY — respect reduced-motion for the marquee/parallax
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .logo-track,
    .logo-item {
        animation: none !important;
    }

    .srv-hero-banner {
        background-attachment: scroll;
    }
}


/* --------------------------------------------------------------------------
   12. "HOW IT WORKS" TIMELINE (slide 3) — stack to a single column on phones
   The desktop layout alternates cards left/right of a centre line. Below
   768px each card would be squeezed into half the screen, so the line moves
   to the left edge and every card takes the full width beside it.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .timeline-line {
        left: 20px !important;
        transform: none !important;
    }

    .timeline-item {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 0 30px 50px !important;
    }

    .timeline-left .timeline-dot,
    .timeline-right .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
}
