* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #ffffff;
    line-height: 1.6;
}

a {
    text-decoration: none;
}


/* =========================
   HEADER
========================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 6%;
    background: #0b1d6e;
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 85px;
}

.logo {
    display: flex;
    align-items: center;
    width: 280px;
    height: 80px;
}

.logo img {
    width: 280px;
    height: 80px;
    object-fit: contain;
    object-position: left center;
    display: block;
}

.header nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.header nav a {
    color: white;
    font-weight: 500;
}

.header nav a:hover {
    color: #e0a526;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    background:
        linear-gradient(
            rgba(11, 29, 110, 0.88),
            rgba(11, 29, 110, 0.88)
        ),
        #0b1d6e;
    color: white;
}


/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
}

.primary-btn {
    background: #d91e18;
    color: white;
}

.primary-btn:hover {
    background: #b81713;
}

.whatsapp-btn {
    background: #e0a526;
    color: #111;
}

.whatsapp-btn:hover {
    background: #c8901d;
}

.large-btn {
    margin-top: 30px;
}


/* =========================
   SECTIONS
========================= */

.section {
    padding: 90px 6%;
}

.section-heading {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 50px;
}

.section-heading > span,
.about-content > span {
    color: #d91e18;
    font-weight: bold;
    letter-spacing: 2px;
}

.section-heading h2 {
    font-size: 40px;
    color: #0b1d6e;
    margin: 10px 0;
}


/* =========================
   COURSES
========================= */

#courses {
    background: #f8f9fc;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: auto;
}

.course-card {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
}

.course-card:hover {
    transform: translateY(-6px);
}

.course-icon {
    font-size: 40px;
}

.course-card h3 {
    color: #0b1d6e;
    font-size: 22px;
}

.course-card p {
    color: #666;
}

.course-card a {
    color: #d91e18;
    font-weight: bold;
}


/* =========================
   WHY US
========================= */

.why-us {
    padding: 90px 6%;
}

.features-grid {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 55px;
    height: 55px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0b1d6e;
    color: white;
    font-size: 25px;
    font-weight: bold;
}

.feature h3 {
    color: #0b1d6e;
}


/* =========================
   LESSONS
========================= */

.lessons-grid {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.lesson {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: #f5f6fa;
    border-radius: 8px;
}

.lesson strong {
    color: #d91e18;
}


/* =========================
   HOW IT WORKS
========================= */

.how-it-works {
    padding: 90px 6%;
    background: #0b1d6e;
    color: white;
}

.how-it-works .section-heading h2 {
    color: white;
}

.steps {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.step-number {
    width: 55px;
    height: 55px;
    margin: auto;
    border-radius: 50%;
    background: #e0a526;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
}


/* =========================
   ABOUT
========================= */

.about {
    background: #f8f9fc;
}

.about-content {
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.about-content h2 {
    font-size: 40px;
    color: #0b1d6e;
}


/* =========================
   FAQ
========================= */

.faq-container {
    max-width: 850px;
    margin: auto;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-question {
    width: 100%;
    padding: 20px 5px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    text-align: left;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.faq-answer {
    display: none;
    padding: 0 5px 15px;
    color: #666;
}

.faq-item.active .faq-answer {
    display: block;
}


/* =========================
   CONTACT
========================= */

.contact-section {
    padding: 90px 6%;
    text-align: center;
    background: #f8f9fc;
}

.contact-grid {
    max-width: 1000px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.contact-card h3 {
    color: #0b1d6e;
}

.contact-card a {
    color: #0b1d6e;
    font-weight: 700;
}

.contact-card a:hover {
    color: #d4a017;
}

.contact-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.contact-whatsapp {
    text-align: center;
    margin-top: 35px;
}


/* =========================
   BOOKING FORM
========================= */

.booking-section {
    background: white;
}

.booking-container {
    max-width: 900px;
    margin: 0 auto;
}

.booking-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 35px;
    background: #f8f9fc;
    border-radius: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 700;
    color: #0b1d6e;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #d9dce5;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    background: white;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0b1d6e;
}

.form-submit {
    grid-column: 1 / -1;
    text-align: center;
}

.form-submit button {
    border: none;
    cursor: pointer;
}


/* =========================
   FOOTER
========================= */

.footer {
    width: 100%;
    background: #07164f;
    color: white;
    padding: 65px 20px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 50px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}


/* FOOTER LOGO */

.footer-brand-logo {
    display: block !important;
    width: 180px !important;
    height: 55px !important;
    max-width: 180px !important;
    max-height: 55px !important;
    object-fit: contain !important;
    object-position: left center !important;
    margin: 0 0 18px 0 !important;
}

.footer-column p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    margin: 0 0 12px;
}

.footer-column h3 {
    color: #f1c40f;
    font-size: 20px;
    margin: 0 0 22px;
}

.footer-column a {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-bottom: 12px;
    transition: 0.3s ease;
}

.footer-column a:hover {
    color: #f1c40f;
    transform: translateX(3px);
}

.footer-whatsapp {
    display: inline-block;
    width: fit-content;
    margin-top: 10px;
    padding: 11px 20px;
    background: #25d366;
    color: white !important;
    border-radius: 6px;
    font-weight: 700;
}

.footer-whatsapp:hover {
    background: #1ebe5d;
}


/* =========================
   FOOTER BOTTOM
========================= */

.footer-bottom {
    max-width: 1200px;
    margin: 55px auto 0;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    font-weight: 600;
}


/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

}


/* =========================
   MAIN MOBILE
========================= */

@media (max-width: 768px) {

    .header {
        padding: 8px 20px;
        min-height: 75px;
    }

    .logo {
        width: 220px;
        height: 65px;
    }

    .logo img {
        width: 220px;
        height: 65px;
    }

    .menu-toggle {
        display: block;
    }

    .header nav {
        display: none;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: #0b1d6e;
        padding: 20px;
        gap: 15px;
    }

    .header nav.active {
        display: flex;
    }

    .hero {
        min-height: 550px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 17px;
    }

    .courses-grid,
    .features-grid,
    .steps,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .lessons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-heading h2,
    .about-content h2 {
        font-size: 32px;
    }

    .course-card {
        padding: 25px;
    }
}


/* =========================
   BOOKING MOBILE
========================= */

@media (max-width: 700px) {

    .booking-form {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    .form-group.full-width,
    .form-submit {
        grid-column: auto;
    }
}


/* =========================
   FOOTER MOBILE
========================= */

@media (max-width: 600px) {

    .footer {
        padding: 50px 20px 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center;
    }

    .footer-column {
        align-items: center;
    }

    .footer-brand-logo {
        width: 170px !important;
        height: 50px !important;
        max-width: 170px !important;
        max-height: 50px !important;
        object-position: center !important;
        margin: 0 auto 18px !important;
    }

    .footer-column p {
        font-size: 16px;
    }

    .footer-column h3 {
        font-size: 20px;
    }

    .footer-column a {
        font-size: 16px;
    }

    .footer-bottom {
        margin-top: 40px;
        padding: 25px 10px;
    }

    .footer-bottom p {
        font-size: 17px;
        text-align: center;
    }
}

/* =====================================================
   FIXES & DESIGN IMPROVEMENTS
===================================================== */

:root {
    --navy: #0b1d6e;
    --red: #d91e18;
    --gold: #e0a526;
    --soft: #f8f9fc;
}

/* Anchors no longer hide under the sticky header */
section[id] { scroll-margin-top: 90px; }

body { font-size: 17px; }
h1, h2, h3 { line-height: 1.2; }

/* Logo link + readable alt text if the image is missing */
.logo { text-decoration: none; }
.logo img { color: #fff; font-weight: 700; font-size: 20px; }

/* Visible keyboard focus */
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ---------- HERO (these classes had no styles) ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(11,29,110,.90), rgba(11,29,110,.94)),
        var(--navy);
}
/* road centre-line along the bottom edge */
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 28px;
    height: 6px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 60px, transparent 60px 110px);
    opacity: .85;
}
.hero-content { max-width: 760px; position: relative; z-index: 1; }
.hero-label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border: 1px solid rgba(224,165,38,.6);
    border-radius: 999px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
}
.hero h1 { font-size: clamp(38px, 6vw, 64px); margin: 0 0 20px; }
.hero h1 span { display: block; color: var(--gold); }
.hero p { font-size: 19px; max-width: 600px; margin: 0 auto 32px; color: rgba(255,255,255,.9); }
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- SECTION RHYTHM ---------- */
.additional-training, .branches-section { background: #fff; }
.vehicles-section, .booking-section { background: var(--soft); }
.booking-form { background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.section-heading p { color: #555; margin: 0; }

/* ---------- CARDS: equal height, link pinned to bottom ---------- */
.course-card { display: flex; flex-direction: column; }
.course-card p { flex: 1; margin: 0 0 18px; }
.course-card a { margin-top: auto; }
.course-card a:hover { text-decoration: underline; }
.branches-section .courses-grid { grid-template-columns: repeat(2, 1fr); max-width: 780px; }
.additional-training .courses-grid { max-width: 1100px; }

/* ---------- HOW IT WORKS ---------- */
.step h3 { margin: 16px 0 8px; }
.step p { margin: 0; color: rgba(255,255,255,.85); }

/* ---------- BUTTONS ---------- */
.btn:hover { transform: translateY(-2px); }
.form-submit button { font-size: 16px; }

/* ---------- FOOTER ---------- */
.footer-bottom { flex-direction: column; gap: 6px; }
.footer-bottom p:last-child { color: var(--gold); font-weight: 500; font-size: 15px; }

/* ---------- FAQ ---------- */
.faq-question { color: var(--navy); gap: 16px; }
.faq-question span { color: var(--red); font-size: 22px; line-height: 1; }

/* ---------- RESPONSIVE: the 10-link menu overflowed on small laptops/tablets ---------- */
@media (max-width: 1150px) {
    .menu-toggle { display: block; }
    .header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background: var(--navy);
        padding: 20px 6%;
        gap: 14px;
        border-top: 1px solid rgba(255,255,255,.15);
    }
    .header nav.active { display: flex; }
}
@media (max-width: 1000px) {
    .courses-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid, .steps, .lessons-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .branches-section .courses-grid { grid-template-columns: 1fr; }
    .section { padding: 65px 6%; }
    .hero::after { bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Let the collapsed navigation scroll on short screens. */
@media (max-width: 1150px) {
    .header nav {
        max-height: calc(100vh - 110px);
        max-height: calc(100dvh - 110px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

@media (max-width: 768px) {
    .header nav {
        position: fixed;
        top: 75px;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
}


/* =====================================================
   LOGO (circular badge + wordmark)
===================================================== */
.logo {
    width: auto;
    height: auto;
    gap: 12px;
    color: #fff;
}
.logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}
.logo-text {
    display: flex;
    flex-direction: column;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--gold);
}
.logo-text small {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: .5px;
}
.hero-badge {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
}
.footer-brand-logo {
    width: 110px !important;
    height: 110px !important;
    max-width: 110px !important;
    max-height: 110px !important;
    object-position: center !important;
}
@media (max-width: 768px) {
    .logo img { width: 52px; height: 52px; }
    .logo-text { font-size: 19px; }
    .hero-badge { width: 120px; height: 120px; }
}
@media (max-width: 600px) {
    .footer-brand-logo { margin: 0 auto 18px !important; }
}


/* =====================================================
   LARGER HEADER (logo + text)
===================================================== */
.header {
    min-height: 110px;
    padding: 10px 4%;
}
.logo img {
    width: 92px;
    height: 92px;
}
.logo-text {
    font-size: 30px;
}
.logo-text small {
    font-size: 16px;
}
.header nav {
    gap: 22px;
}
.header nav a {
    font-size: 18px;
    font-weight: 600;
}
.menu-toggle {
    font-size: 38px;
    padding: 6px 10px;
}

/* bigger text needs the hamburger menu a little earlier */
@media (max-width: 1320px) {
    .menu-toggle { display: block; }
    .header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background: var(--navy);
        padding: 20px 4%;
        gap: 16px;
        border-top: 1px solid rgba(255,255,255,.15);
    }
    .header nav.active { display: flex; }
    .header nav a { font-size: 20px; }
}

@media (max-width: 768px) {
    .header {
        min-height: 90px;
        padding: 8px 20px;
    }
    .logo img { width: 68px; height: 68px; }
    .logo-text { font-size: 23px; }
    .logo-text small { font-size: 14px; }
    section[id] { scroll-margin-top: 100px; }
}


/* =====================================================
   HERO NAME LOGO (wide banner)
===================================================== */
.hero-logo {
    display: block;
    width: min(620px, 92%);
    height: auto;
    margin: 0 auto 28px;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .4));
}
@media (max-width: 768px) {
    .hero-logo { width: min(440px, 92%); margin-bottom: 22px; }
}


/* =====================================================
   PORTAL (register / login / dashboards)
===================================================== */
.nav-cta { background: var(--red); padding: 8px 18px; border-radius: 6px; }
.nav-cta:hover { background: #b81713; color: #fff !important; }
.portal-bar { background: var(--navy); padding: 14px 4%; display: flex; justify-content: space-between; align-items: center; }
.portal-bar a, .portal-bar button { color: #fff; font-weight: 600; background: none; border: 0; font-size: 16px; cursor: pointer; font-family: inherit; }
.portal-bar .logo img { width: 56px; height: 56px; }
.portal { min-height: 100vh; background: var(--soft); }
.portal main { max-width: 900px; margin: 0 auto; padding: 40px 20px 70px; }
.portal h1 { color: var(--navy); margin: 0 0 6px; font-size: 34px; }
.portal .lead { color: #555; margin: 0 0 26px; }
.portal .auth-card { max-width: 440px; margin: 0 auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.portal .booking-form { background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.form-msg { grid-column: 1 / -1; padding: 12px 14px; border-radius: 6px; background: #fdeaea; color: #8c1410; font-weight: 600; }
.form-msg[hidden] { display: none; }
.form-group small { color: #666; margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 22px; }
.dash-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.dash-card h2 { margin: 0 0 12px; font-size: 18px; color: var(--navy); }
.dash-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.dash-card dt { color: #666; } .dash-card dd { margin: 0; font-weight: 600; }
.progress { height: 14px; background: #e6e9f2; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > i { display: block; height: 100%; background: var(--gold); }
.big { font-size: 28px; font-weight: 800; color: var(--navy); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-actions .btn { padding: 12px 20px; }
.btn[aria-disabled="true"] { background: #d7dbe8; color: #666; cursor: not-allowed; }
@media (max-width: 700px) { .dash-grid { grid-template-columns: 1fr; } }


/* =====================================================
   STAFF DASHBOARDS
===================================================== */
.portal main.wide { max-width: 1150px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 22px; border-bottom: 2px solid #e1e5f0; }
.tabs button { background: none; border: 0; padding: 12px 18px; font: inherit; font-weight: 700; color: #555; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--gold); }
.tbl { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.06); margin-bottom: 22px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; padding: 12px 14px; background: #eef0f8; color: var(--navy); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-top: 1px solid #edeff6; vertical-align: middle; }
.muted { color: #666; }
.tbl input, .tbl select, .inline input, .inline select { padding: 8px; border: 1px solid #d0d5e3; border-radius: 6px; font: inherit; max-width: 170px; }
.sbtn { padding: 8px 14px; border: 0; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; background: var(--navy); color: #fff; margin: 2px; }
.sbtn.ok { background: #1a7f3c; } .sbtn.no { background: var(--red); } .sbtn.gold { background: var(--gold); color: #111; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; background: #e6e9f2; }
.badge.good { background: #dff3e5; color: #1a7f3c; } .badge.warn { background: #fdeccd; color: #8a5a00; } .badge.bad { background: #fdeaea; color: #8c1410; }
.panel { margin-bottom: 24px; } .panel h2 { color: var(--navy); font-size: 20px; }
.panel .booking-form { padding: 24px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: #1a7f3c; color: #fff; padding: 12px 22px; border-radius: 8px; font-weight: 700; transition: transform .25s; z-index: 3000; max-width: 92vw; }
#toast.bad { background: var(--red); } #toast.show { transform: translateX(-50%); }
.who { color: #fff; margin-right: 14px; font-size: 15px; opacity: .9; }

/* =====================================================
   HERO PRACTICE TEST ICON — 3X SIZE, BOTTOM-RIGHT
   Uses style(1).css as the base. The hero content remains
   centered; only the Practice Tests visual is positioned.
===================================================== */
.hero {
    position: relative;
}

.hero-visual {
    position: absolute;
    right: 22px;
    bottom: 20px;
    width: 240px;
    height: 240px;
    min-height: 0;
    z-index: 2;
    display: block;
    pointer-events: none;
}

.hero-visual .hero-glow,
.hero-visual .hero-orbit {
    display: none;
}

.hero-test-link {
    display: block;
    width: 240px;
    height: 240px;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    pointer-events: auto;
}

.hero-practice-icon {
    width: 240px;
    height: 240px;
    transform-origin: center;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.30));
    transition: transform .25s ease, filter .25s ease;
}

.hero-practice-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-test-link:hover .hero-practice-icon {
    transform: translateY(-4px) scale(1.03);
    filter: drop-shadow(0 13px 18px rgba(0,0,0,.36));
}

.hero-test-link .hero-icon-badge,
.hero-test-link::after {
    display: none;
}

/* Keep the icon from crowding the centered hero on narrower desktops. */
@media (max-width: 1100px) {
    .hero-visual,
    .hero-test-link,
    .hero-practice-icon {
        width: 220px;
        height: 220px;
    }
    .hero-visual { right: 16px; bottom: 16px; }
}

@media (max-width: 768px) {
    .hero-visual,
    .hero-test-link,
    .hero-practice-icon {
        width: 150px;
        height: 150px;
    }
    .hero-visual { right: 10px; bottom: 12px; }
}


/* HERO REQUESTED REFINEMENTS — keep all other hero content unchanged */
.hero .hero-logo {
    transform: scale(2);
    transform-origin: top center;
    position: relative;
    margin-bottom: 172px;
    z-index: 0;
}

.hero .hero-content {
    position: relative;
    z-index: 1;
}

.hero .whatsapp-btn {
    background: #25d366 !important;
    color: #ffffff !important;
}

.hero .whatsapp-btn:hover {
    background: #1ebe5d !important;
    color: #ffffff !important;
}

/* Center hero Practice Tests button */
.hero .secondary-btn {
    background: #000000 !important;
    color: #ffffff !important;
}

.hero .secondary-btn:hover {
    background: #1f1f1f !important;
    color: #ffffff !important;
}


@media (max-width: 768px) {
    .hero {
        min-height: 640px;
        padding: 32px 16px 24px;
    }

    .hero .hero-logo {
        width: min(340px, 90%);
        transform: none;
        margin-bottom: 22px;
    }

    .hero h1 {
        font-size: clamp(31px, 8.4vw, 34px);
        line-height: 1.15;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 22px;
    }

    .hero-buttons {
        gap: 10px;
    }

    .hero .hero-content {
        padding-bottom: 112px;
    }

    .hero-visual,
    .hero-test-link,
    .hero-practice-icon {
        width: 112px;
        height: 112px;
    }

    .hero-visual {
        right: 8px;
        bottom: 8px;
    }
}

/* HERO NOTES ICON — balanced with the practice icon and kept clear of hero content. */
.hero-notes-link{position:absolute!important;left:18px!important;right:auto!important;top:auto!important;bottom:18px!important;transform:none!important;width:240px!important;height:240px!important;max-width:240px!important;max-height:240px!important;z-index:5;display:block;text-decoration:none;overflow:hidden}
.hero-notes-icon{width:240px!important;height:240px!important;max-width:240px!important;max-height:240px!important;position:relative;filter:drop-shadow(0 8px 12px rgba(0,0,0,.28));transition:transform .25s ease,filter .25s ease;overflow:hidden}
.hero-notes-icon img{display:block!important;width:240px!important;height:240px!important;max-width:240px!important;max-height:240px!important;object-fit:cover;object-position:center}
.hero-notes-link:hover .hero-notes-icon{transform:translateY(-3px) scale(1.02);filter:drop-shadow(0 10px 14px rgba(0,0,0,.34))}
@media(max-width:1100px){.hero-notes-link{width:180px!important;height:180px!important;left:12px!important;bottom:14px!important;max-width:180px!important;max-height:180px!important}.hero-notes-icon,.hero-notes-icon img{width:180px!important;height:180px!important;max-width:180px!important;max-height:180px!important}}
@media(max-width:768px){.hero-notes-link{width:112px!important;height:112px!important;left:8px!important;bottom:8px!important;max-width:112px!important;max-height:112px!important}.hero-notes-icon,.hero-notes-icon img{width:112px!important;height:112px!important;max-width:112px!important;max-height:112px!important}}

/* Keep the full navigation reachable on short phone screens. */
@media (max-width: 768px) {
    .header nav {
        position: fixed;
        top: 90px;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    .header nav a {
        flex: 0 0 auto;
    }
}

/* Keep course cards and contact details comfortable on narrow screens. */
@media (max-width: 900px) {
    .courses-grid,
    #courses .courses-grid,
    #courses + .additional-training .courses-grid,
    #fees .courses-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
    }

    .courses-grid > *,
    #contact .contact-grid,
    #contact .contact-card {
        min-width: 0;
    }

    #contact .contact-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
        box-sizing: border-box;
    }

    #contact .contact-card {
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    #contact .contact-icon {
        align-self: center;
        justify-self: center;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Fit the hero logo and keep its floating icons clear at reduced desktop widths. */
@media (min-width: 769px) and (max-width: 1100px) {
    .hero {
        min-height: 760px;
    }

    .hero .hero-content {
        padding-bottom: 150px;
    }

    .hero .hero-logo {
        width: min(600px, 78vw);
        transform: none;
        margin-bottom: 28px;
    }

    .hero-visual,
    .hero-test-link,
    .hero-practice-icon {
        width: 148px;
        height: 148px;
    }

    .hero-visual { right: 14px; bottom: 14px; }

    .hero-notes-link {
        width: 148px !important;
        height: 148px !important;
        left: 14px !important;
        bottom: 14px !important;
        max-width: 148px !important;
        max-height: 148px !important;
    }

    .hero-notes-icon,
    .hero-notes-icon img {
        width: 148px !important;
        height: 148px !important;
        max-width: 148px !important;
        max-height: 148px !important;
    }

}

@media (min-width: 769px) and (max-width: 900px) {
    .hero .hero-logo { width: min(540px, 72vw); }
    .hero h1 { font-size: clamp(36px, 5vw, 48px); }
    .hero p { font-size: 17px; }
    .hero .hero-content { padding-left: 24px; padding-right: 24px; }
}
/* Floating Join Now 3D call-to-action */
.floating-join-3d{position:fixed;left:14px;top:50%;z-index:90;display:flex;align-items:center;gap:10px;padding:13px 18px;border-radius:999px;border:2px solid #ffdf73;background:linear-gradient(145deg,#f8d34f,#d6a51d 70%,#b57d05);color:#071d36;font-weight:900;text-decoration:none;box-shadow:0 5px 0 #784f04,0 12px 24px #0005,inset 0 2px 0 #fff9;transform:translate(-150%,-50%);animation:joinNowLoop 8s ease-in-out infinite;transition:filter .2s,box-shadow .2s}
.floating-join-3d span{font-size:22px;line-height:16px}.floating-join-3d:hover{filter:brightness(1.08);box-shadow:0 6px 0 #784f04,0 16px 28px #0006,inset 0 2px 0 #fff9}
@keyframes joinNowLoop{0%,8%{transform:translate(-150%,-50%)}16%,65%{transform:translate(0,-50%)}72%,100%{transform:translate(-150%,-50%)}}
@media(max-width:600px){.floating-join-3d{left:10px;top:auto;bottom:82px;padding:10px 13px;font-size:13px;transform:translateX(-150%);animation-name:joinNowLoopMobile}@keyframes joinNowLoopMobile{0%,8%{transform:translateX(-150%)}16%,65%{transform:translateX(0)}72%,100%{transform:translateX(-150%)}}}
@media(prefers-reduced-motion:reduce){.floating-join-3d{animation:none;transform:translate(0,-50%)}}@media(max-width:600px) and (prefers-reduced-motion:reduce){.floating-join-3d{transform:none}}
