/* ===============================
   GLOBAL HEADER STYLES
================================ */
:root {
    --primary-red: #FF4B2B;
    --primary-orange: #FF8008;
    --primary-yellow: #FFD93D;
    --text-dark: #333;
    --text-light: #fff;
    --gradient-hot: linear-gradient(45deg, #FF4B2B, #FF8008);
    --gradient-soft: linear-gradient(135deg, rgba(255, 75, 43, 0.95), rgba(255, 128, 8, 0.95));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
}

/* ===============================
   TOP NAV
================================ */
.top-nav {
    background: var(--gradient-hot);
    padding: 12px 24px;
    color: white;
}

.logo-section {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo-section:has(.language-quick-links) {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
}

.language-quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.language-quick-link {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.language-quick-link:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    opacity: 0.95;
}

.language-quick-link--plain {
    background: transparent;
    color: #fff;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none;
}

.language-quick-link--plain:hover {
    color: #ffe8a3;
    box-shadow: none;
    transform: none;
}

.language-quick-link--orange { background: #f58220; }
.language-quick-link--teal { background: #17a2a0; }
.language-quick-link--green { background: #5cb85c; }
.language-quick-link--blue { background: #5bc0de; }
.language-quick-link--red { background: #d9534f; }

.brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 50px;
    width: auto;
    display: block;
}

.brand-name {
    color: white;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
}

.contact-info span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.contact-info span:first-child {
    border-right: 1px solid rgba(255,255,255,0.35);
    padding-right: 16px;
    margin-right: 16px;
}

.contact-info span:last-child {
    margin-right: 0;
}

/* ===============================
   NEWS BAR
================================ */
.news-marquee {
    background: rgba(255, 248, 238, 0.95);
    padding: 10px 24px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.news-marquee span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-right: 30px;
}

/* ===============================
   MAIN NAV
================================ */
.main-nav {
    background: #fff;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: visible;
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
}

.course-dropdown,
.right-buttons,
.navbar-collapse {
    flex-shrink: 0;
}

.navbar-collapse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
}

.course-dropdown {
    position: relative;
}

.course-btn {
    background: var(--gradient-soft);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.course-menu {
    position: absolute;
    top: 110%;
    left: 0;
    display: none;
    background: #fff;
    min-width: 280px;
    border-radius: 15px;
    padding: 12px 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    z-index: 1000;
}

.course-dropdown:hover .course-menu {
    display: block;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    position: relative;
}

.category-item > a {
    display: block;
    color: #333;
    padding: 12px 18px;
    transition: background 0.25s ease, color 0.25s ease;
}

.category-item:hover > a {
    background: var(--gradient-hot);
    color: #fff;
}

.course-list {
    display: none !important;
    position: absolute;
    top: 0;
    left: 100%;
    background: #fff;
    min-width: 240px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-radius: 12px;
    z-index: 1020;
}

.category-item.has-submenu:hover .course-list {
    display: block !important;
}

.course-list li a {
    display: block;
    padding: 12px 18px;
    color: #333;
}

.course-list li a:hover {
    background: rgba(255, 75, 43, 0.08);
}

.navbar-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: visible;
}

.navbar-nav::-webkit-scrollbar {
    display: none;
}

.navbar-nav > .nav-item {
    flex: 0 0 auto;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #333;
    font-weight: 600;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
    color: var(--primary-red);
    transform: translateY(-1px);
}

.nav-item.custom-dropdown {
    position: relative;
}

.nav-item.custom-dropdown:hover,
.nav-item.custom-dropdown.show,
.nav-item.custom-dropdown:focus-within {
    z-index: 1025;
}

/* Invisible bridge so moving pointer from menu link to submenu does not close dropdown */
.nav-item.custom-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    z-index: 1009;
}

.custom-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin: 0;
    list-style: none;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 35px rgba(0,0,0,0.12);
    min-width: 220px;
    padding: 8px 0;
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Right-align last menus so flyout stays on screen */
.navbar-nav > .nav-item.custom-dropdown:nth-last-child(-n+3) .custom-menu {
    left: auto;
    right: 0;
}

.custom-item {
    display: block;
    padding: 10px 16px;
    color: #333;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.custom-item:hover {
    background: rgba(255, 75, 43, 0.1);
    color: var(--primary-red);
}

.custom-menu > li {
    margin: 0;
    padding: 0;
}

.nav-item.custom-dropdown:hover > .custom-menu,
.nav-item.custom-dropdown:focus-within > .custom-menu,
.nav-item.custom-dropdown.show > .custom-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.right-buttons {
    margin-left: auto;
}

.btn-login {
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 10px 22px;
    border-radius: 25px;
    background: #fff;
    font-weight: 600;
    transition: all 0.25s ease;
}

.btn-login:hover {
    background: var(--primary-red);
    color: #fff;
}

/* ===============================
   MODAL
================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    padding: 24px;
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 920px;
    margin: 40px auto;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.18);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.modal-content .close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
}

.left-section,
.right-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.left-section .logo {
    max-width: 140px;
    width: 100%;
    display: block;
}

.welcome-text h2,
.right-section h2 {
    margin: 0;
    font-size: 28px;
    color: #222;
}

.welcome-text p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.phone-input,
.modal-content input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
}

.request-otp-btn {
    border: none;
    background: var(--gradient-hot);
    color: #fff;
    padding: 14px 18px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.request-otp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(255, 75, 43, 0.25);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 992px) {
    .top-nav,
    .main-nav,
    .news-marquee {
        padding-left: 16px;
        padding-right: 16px;
    }

    .logo-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-info {
        justify-content: flex-start;
        gap: 12px;
    }

    .main-nav .container {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-collapse {
        width: 100%;
    }

    .navbar-nav {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-item.custom-dropdown::after {
        display: none;
    }

    .nav-item.custom-dropdown .custom-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border-radius: 0;
        padding-left: 12px;
        margin-top: 4px;
        min-width: 0;
    }

    .nav-item.custom-dropdown.show > .custom-menu {
        display: block;
    }

    .right-buttons {
        width: 100%;
        text-align: left;
        margin-top: 15px;
    }

    .course-dropdown {
        width: 100%;
    }

    .modal-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .logo-section:has(.language-quick-links) {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .language-quick-links {
        justify-content: flex-start;
        order: 3;
        width: 100%;
    }

    .contact-info {
        order: 2;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .top-nav {
        padding: 14px 16px;
    }

    .brand-name {
        font-size: 15px;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .course-btn,
    .btn-login {
        width: 100%;
        justify-content: center;
    }
}
