/* =====================================================================
   Terna hero banner: rounded card with equal left/right gaps (desktop)
   and a clean stacked layout (mobile). Loaded last so it wins over the
   older hero rules in terna-landing.css.
   ===================================================================== */

/* ---- desktop / tablet: floating rounded banner, same gap on both sides ---- */
body .th-hero {
    width: calc(100% - 56px) !important;
    max-width: 1800px;
    margin: 18px auto 0 !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    box-shadow: 0 16px 40px rgba(16, 53, 80, .22);
}
body .th-hero .th-banner,
body .th-hero .th-banner img { border-radius: inherit; }

/* ---- tablet + mobile ---- */
@media (max-width: 991px) {
    body .th-hero {
        width: calc(100% - 28px) !important;
        margin: 12px auto 0 !important;
        border-radius: 20px !important;
        background: #0d2a44 !important;
    }

    /* banner image covers the card; a gradient fades it into solid navy so the form sits on a clean background */
    body .th-hero .th-banner {
        position: absolute !important;
        inset: 0 !important;
        height: 100% !important;
        display: block !important;
    }
    body .th-hero .th-banner img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
    }
    body .th-hero::before {
        z-index: 1 !important;
        background: linear-gradient(180deg,
            rgba(10, 30, 50, .72) 0%,
            rgba(13, 42, 68, .90) 34%,
            #0d2a44 58%,
            #0d2a44 100%) !important;
    }

    /* one column: text first, enquiry form under it */
    body .th-hero .th-inner {
        position: relative !important;
        z-index: 2 !important;
        display: block !important;
        min-height: 0 !important;
        padding: 26px 16px 28px !important;
    }
    body .th-hero .th-left { width: 100% !important; margin: 0 0 22px !important; }
    body .th-hero .th-btns { display: none !important; }

    body .th-hero .th-inline-form {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 100% !important;
        max-width: 560px !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    body .th-hero .th-inline-form .th-form-card {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 20px 18px 22px !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 575px) {
    body .th-hero { width: calc(100% - 20px) !important; margin-top: 10px !important; border-radius: 16px !important; }
    body .th-hero .th-inner { padding: 22px 14px 24px !important; }
    body .th-hero .th-inline-form .th-form-card { padding: 16px 14px 18px !important; border-radius: 14px !important; }
}

/* ---- submit button (hero form AND popup): solid colours in every state ---- */
body .th-form.th-stack .th-submit,
body .th-form .th-submit { background: #17466B !important; color: #fff !important; border: 0 !important; }
body .th-form.th-stack .th-submit:hover:not(:disabled),
body .th-form .th-submit:hover:not(:disabled),
body .th-form .th-submit:focus-visible { background: #F58220 !important; color: #fff !important; box-shadow: 0 8px 18px rgba(245, 130, 32, .35) !important; }
body .th-form .th-submit svg { fill: #fff !important; background: none !important; }
body .th-form .th-submit:hover:not(:disabled) svg { background: none !important; }

/* ---- white page background around the rounded banner (banner sits right below the header) ---- */
body, body .boxed_wrapper { background: #fff !important; }

/* =====================================================================
   Compact banner height (desktop / tablet landscape)
   ===================================================================== */
@media (min-width: 992px) {
    body .th-hero .th-inner { min-height: 0 !important; padding: 26px 28px !important; gap: 34px !important; }

    /* left text */
    body .th-hero .th-title { font-size: clamp(28px, 3vw, 42px) !important; margin-top: 8px !important; }
    body .th-hero .th-at { margin: 6px 0 12px !important; font-size: clamp(13.5px, 1.1vw, 15.5px) !important; }
    body .th-hero .th-open-tag { padding: 6px 16px !important; }
    body .th-hero .th-early { margin-bottom: 12px !important; }
    body .th-hero .th-early-label { padding: 7px 16px !important; }
    body .th-hero .th-early-date { padding: 7px 18px !important; }
    body .th-hero .th-plist { gap: 8px 12px !important; }
    body .th-hero .th-plist li { padding: 7px 12px !important; }
    body .th-hero .th-plist li .th-pic { width: 30px !important; height: 30px !important; }
    body .th-hero .th-plist li .th-pic svg { width: 17px !important; height: 17px !important; }

    /* enquiry form */
    body .th-hero .th-inline-form .th-form-card { padding: 16px 20px 18px !important; }
    body .th-hero .th-form .th-fh { margin: 0 0 10px !important; }
    body .th-hero .th-form .th-fh h3 { font-size: 19px !important; }
    body .th-hero .th-form .th-fsub { display: none !important; }
    body .th-hero .th-form.th-stack .th-row { gap: 8px !important; margin: 0 0 12px !important; }
    body .th-hero .th-form.th-stack .th-f input:not([type=checkbox]):not([type=hidden]),
    body .th-hero .th-form.th-stack .th-f select { height: 40px !important; }
    body .th-hero .th-form.th-stack .th-f.ph,
    body .th-hero .th-form .th-country-selected,
    body .th-hero .th-form .th-f.ph input.th-phone-input { height: 40px !important; }
    body .th-hero .th-form .th-submit { height: 42px !important; }
}

/* =====================================================================
   Banner height = fits the first screen, so the "MBA & PGDM Admissions /
   Open for 2027-29 Batch" highlight strip shows right below the banner
   without scrolling. (screen height - header - strip, never below the
   height the form needs, never taller than 700px)
   ===================================================================== */
@media (min-width: 992px) {
    body .th-hero .th-inner {
        min-height: 520px !important;
        min-height: clamp(520px, calc(100vh - var(--terna-header-h, 190px) - 150px), 700px) !important;
        align-items: center !important;
    }
}

/* =====================================================================
   Taller banner (overrides the compact / fit-to-screen rules above)
   ===================================================================== */
@media (min-width: 992px) {
    body .th-hero .th-inner {
        min-height: 640px !important;
        min-height: clamp(640px, calc(100vh - var(--terna-header-h, 190px) + 40px), 820px) !important;
        padding: 44px 32px !important;
        align-items: center !important;
    }
    body .th-hero .th-title { font-size: clamp(32px, 3.5vw, 50px) !important; }
    body .th-hero .th-at { margin: 10px 0 16px !important; }
    body .th-hero .th-early { margin-bottom: 18px !important; }
    body .th-hero .th-plist { gap: 10px 14px !important; }
    body .th-hero .th-plist li { padding: 10px 14px !important; }
    body .th-hero .th-plist li .th-pic { width: 34px !important; height: 34px !important; }
    body .th-hero .th-plist li .th-pic svg { width: 19px !important; height: 19px !important; }

    body .th-hero .th-inline-form .th-form-card { padding: 22px 24px 24px !important; }
    body .th-hero .th-form .th-fh { margin: 0 0 14px !important; }
    body .th-hero .th-form .th-fsub { display: block !important; }
    body .th-hero .th-form.th-stack .th-row { gap: 10px !important; margin: 0 0 14px !important; }
    body .th-hero .th-form.th-stack .th-f input:not([type=checkbox]):not([type=hidden]),
    body .th-hero .th-form.th-stack .th-f select,
    body .th-hero .th-form.th-stack .th-f.ph,
    body .th-hero .th-form .th-country-selected,
    body .th-hero .th-form .th-f.ph input.th-phone-input { height: 44px !important; }
    body .th-hero .th-form .th-submit { height: 48px !important; }
}
