/* ==========================================================================
   GLOBAL STYLES: Header, Footer & Typography (Shiksha Prashar)
   ========================================================================== */

:root {
    --primary-navy: #002244;
    --primary-navy-dark: #00172e;
    --primary-navy-light: #0b3464;
    --accent-gold: #ffb703;
    --accent-gold-hover: #e09f00;
    --text-white: #ffffff;
    --text-heading: #1e293b;
    --text-body: #475569;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-heading: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

.main-content {
    min-height: calc(100vh - 450px);
}

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

.site-header {
    background-color: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #edf2f7;
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 34, 68, 0.15);
    flex-shrink: 0;
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.42rem;
    letter-spacing: 0.5px;
    color: var(--primary-navy);
    line-height: 1.15;
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #475569;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Navbar Links */
.site-navbar {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    color: #334155;
    position: relative;
    padding: 8px 4px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-navy);
}

.nav-link.active::after,
.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-gold);
    border-radius: 2px;
}

/* Nav Dropdown */
.nav-item-dropdown {
    position: relative;
    padding: 6px 0;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 4px;
}

.dropdown-chevron {
    transition: transform 0.25s ease;
}

.nav-item-dropdown:hover .dropdown-chevron,
.nav-item-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 34, 68, 0.15), 0 8px 10px -6px rgba(0, 34, 68, 0.1);
    border: 1px solid #e2e8f0;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

/* Invisible hover bridge to prevent mouse-leave when moving cursor down */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

.dropdown-item svg {
    color: #0284c7;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--primary-navy);
    padding-left: 22px;
}

.dropdown-item:hover svg {
    transform: scale(1.15);
    color: var(--accent-gold);
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 6px 0;
}

.dropdown-logout-form {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.dropdown-item-danger {
    color: #dc2626 !important;
}

.dropdown-item-danger svg {
    color: #dc2626 !important;
}

.dropdown-item-danger:hover {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
}

.dropdown-item-danger:hover svg {
    color: #b91c1c !important;
}

/* User Avatar In Dropdown Toggle */
.user-avatar-tiny {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
    margin-right: 2px;
}

/* Register Now Button */
.btn-register-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background-color: var(--accent-gold);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(255, 183, 3, 0.25);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-register-now:hover {
    background-color: var(--accent-gold-hover);
    box-shadow: 0 4px 10px rgba(255, 183, 3, 0.35);
    transform: translateY(-1px);
    color: #0f172a;
}

/* User Header Action Dropdown (replaces My Dashboard button) */
.user-header-dropdown {
    position: relative;
}

.btn-user-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: var(--radius-sm, 8px);
    box-shadow: 0 3px 8px rgba(255, 183, 3, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-user-dropdown:hover {
    background: linear-gradient(135deg, #fb8500 0%, #d97706 100%);
    box-shadow: 0 5px 14px rgba(255, 183, 3, 0.4);
    transform: translateY(-1px);
}

.btn-user-dropdown .user-avatar-tiny {
    background: #002244;
    color: #ffb703;
    width: 24px;
    height: 24px;
    font-size: 0.76rem;
}

.user-header-dropdown .dropdown-menu {
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.nav-bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.site-footer {
    background-color: var(--primary-navy);
    color: #cbd5e1;
    padding-top: 55px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col-brand {
    padding-right: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.footer-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.footer-brand-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.footer-brand-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.footer-brief {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-col-title {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 6px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 26px;
    height: 2px;
    background-color: var(--accent-gold);
    border-radius: 2px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 0.88rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-gold);
    transform: translateX(3px);
}

/* Social Buttons */
.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.social-btn.facebook {
    background-color: #1877f2;
}

.social-btn.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.social-btn.youtube {
    background-color: #ff0000;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Bottom Bar */
.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 0;
    text-align: left;
}

.copyright-text {
    font-size: 0.82rem;
    color: #94a3b8;
}

/* ==========================================================================
   RESPONSIVE DESIGN (GLOBAL)
   ========================================================================== */

@media (max-width: 992px) {
    .site-navbar {
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: none;
        gap: 20px;
    }

    .site-navbar.open {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .nav-link {
        font-size: 1rem;
        padding: 8px 0;
        width: 100%;
    }

    .nav-item-dropdown {
        width: 100%;
    }

    .nav-item-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: 1px solid #f1f5f9;
        background-color: #f8fafc;
        border-radius: var(--radius-sm);
        margin-top: 6px;
        width: 100%;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .mobile-nav-toggle.open .nav-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-nav-toggle.open .nav-bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle.open .nav-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .footer-top-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 10px 16px;
    }

    .brand-title {
        font-size: 1.15rem;
    }

    .brand-subtitle {
        font-size: 0.62rem;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer-col-brand {
        padding-right: 0;
    }
}
