/* Custom Design Tokens & Variables */
:root {
    --primary-navy: #800D17; /* Logo Maroon Red */
    --primary-navy-rgb: 128, 13, 23;
    --accent-gold: #E0A96D; /* Gold */
    --accent-gold-dark: #D49B5B;
    --bg-ice: #FAF2EA; /* Warm golden cream background */
    --text-slate: #4A3E3D; /* Warm dark grey */
    --text-muted: #8A7877; /* Warm muted grey */
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --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);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

/* Global Reset & Body Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-slate);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-navy);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.text-center { text-align: center; }

/* Buttons */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-gold);
    color: var(--primary-navy);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-premium:hover {
    background-color: var(--accent-gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-navy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-navy);
    color: var(--white);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-navy:hover {
    background-color: #5E060F;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Header & Glassmorphism */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sticky-header.scrolled,
.sticky-header.mobile-open {
    background: #ffffff;
    border-bottom: 1px solid rgba(11, 37, 69, 0.08);
    box-shadow: var(--shadow-md);
}

.sticky-header .container {
    max-width: 100%;
    padding: 0 40px;
}

/* Offset top padding for all pages with dark subpage headers */
.subpage-header, 
section[style*="background-color: var(--primary-navy)"] {
    padding-top: 160px !important; /* Adjusted for taller header */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px; /* Taller header for a bigger logo */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sticky-header.scrolled .header-container,
.sticky-header.mobile-open .header-container {
    height: 95px; /* Shrinks slightly on scroll but remains spacious */
}

.logo-block {
    display: flex;
    align-items: center;
    padding: 0;
}

.logo-img-responsive {
    height: 90px; /* Larger logo height for clear visibility */
    width: auto;
    max-width: 380px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sticky-header.scrolled .logo-img-responsive,
.sticky-header.mobile-open .logo-img-responsive {
    height: 80px; /* Remains big when sticky for readability */
}

@media (max-width: 1024px) {
    .sticky-header .container {
        padding: 0 20px !important;
    }
    .header-container {
        height: 80px !important;
    }
    .logo-img-responsive {
        height: 54px !important;
        max-width: 230px !important;
    }
    .mobile-nav {
        top: 80px !important; /* Align mobile nav top with new mobile header height */
        height: calc(100vh - 80px) !important;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .sticky-header .container {
        padding: 0 24px;
    }
    .logo-img-responsive {
        max-width: 260px;
        height: 75px;
    }
    .sticky-header.scrolled .logo-img-responsive,
    .sticky-header.mobile-open .logo-img-responsive {
        height: 65px;
    }
    .header-container {
        height: 90px;
    }
    .sticky-header.scrolled .header-container,
    .sticky-header.mobile-open .header-container {
        height: 80px;
    }
    .nav-menu {
        gap: 16px;
    }
    .nav-link {
        font-size: 14px;
    }
    .btn-premium {
        padding: 8px 18px;
        font-size: 13px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    height: 100%;
}

.nav-menu > li {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    font-weight: 600;
    font-size: 15px;
    color: var(--white);
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    transition: var(--transition);
    white-space: nowrap;
}

.sticky-header.scrolled .nav-link,
.sticky-header.mobile-open .nav-link {
    color: var(--text-slate);
}

.sticky-header.scrolled .nav-link:hover,
.sticky-header.mobile-open .nav-link:hover {
    color: var(--primary-navy);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Body scroll lock when mobile menu is active */
body.no-scroll {
    overflow: hidden;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    width: 28px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sticky-header.scrolled .mobile-menu-btn span,
.sticky-header.mobile-open .mobile-menu-btn span {
    background-color: var(--primary-navy);
}

/* Active / Open state of the hamburger menu */
.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.mobile-nav {
    position: fixed;
    top: 110px; /* Aligns with header height in normal state */
    left: 0;
    width: 100%;
    height: calc(100vh - 110px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--bg-ice);
    padding: 30px 24px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    
    /* Animation settings */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.sticky-header.scrolled .mobile-nav,
.sticky-header.mobile-open.scrolled .mobile-nav {
    top: 95px; /* Aligns with header height in sticky state */
    height: calc(100vh - 95px);
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(128, 13, 23, 0.06);
}

.mobile-nav-link {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-slate);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px;
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    color: var(--primary-navy);
    padding-left: 14px;
}

/* Hero Section */
.hero-sec {
    position: relative;
    color: var(--white);
    padding: 120px 0 160px;
    text-align: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(rgba(11, 37, 69, 0.78), rgba(7, 18, 33, 0.94));
}

.hero-sec .container {
    position: relative;
    z-index: 3;
}

.hero-sec::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--white);
    clip-path: ellipse(60% 80% at 50% 100%);
    z-index: 4;
}

.hero-subtitle {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 48px;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto 24px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Quick Action Grid (Feature Cards) */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.action-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(11, 37, 69, 0.05);
    transition: var(--transition);
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border-color: var(--accent-gold);
}

.action-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(11, 37, 69, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: var(--primary-navy);
    transition: var(--transition);
}

.action-card:hover .action-icon {
    background-color: var(--accent-gold);
    color: var(--primary-navy);
}

.action-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.action-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.action-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-ice);
    color: var(--primary-navy);
    transition: var(--transition);
}

.action-card:hover .action-arrow {
    background-color: var(--primary-navy);
    color: var(--white);
}

/* Floating Statistics Banner */
.stats-banner {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 48px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-item h3 {
    font-size: 40px;
    color: var(--accent-gold);
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Custom Interactive Tabs / Toggles */
.tab-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.tab-btn {
    padding: 12px 28px;
    border-radius: 50px;
    background-color: var(--bg-ice);
    color: var(--text-slate);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--primary-navy);
    color: var(--white);
}

@media (max-width: 768px) {
    .tab-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 4px 8px 12px;
        margin-left: -24px;
        margin-right: -24px;
        padding-left: 24px;
        padding-right: 24px;
        margin-bottom: 32px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .tab-container::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        flex-shrink: 0;
        padding: 10px 22px;
        font-size: 14px;
    }
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Program Grid card custom layout */
.program-card {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(11, 37, 69, 0.05);
    margin-bottom: 40px;
}

.program-img {
    flex: 1;
    background-size: cover;
    background-position: center;
    min-height: 320px;
}

.program-content {
    flex: 1.2;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.program-title {
    font-size: 28px;
    margin-bottom: 16px;
}

.program-desc {
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* Footer Section */
.footer {
    background-color: #300307; /* Maroon burgundy footer matching brand colors */
    color: var(--white);
    padding: 80px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-secondary-grid {
    display: grid;
    grid-template-columns: 1.2fr 2.8fr;
    gap: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-secondary-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.footer-compliance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 576px) {
    .footer-compliance-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.footer-widget-title {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 8px;
}

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

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-link:hover {
    color: var(--accent-gold);
    padding-left: 4px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-info i {
    color: var(--accent-gold);
    margin-right: 8px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-input {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--white);
    padding: 12px 16px;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.newsletter-input:focus {
    border-color: var(--accent-gold);
    background-color: rgba(255,255,255,0.08);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-navy);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(11, 37, 69, 0.1);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 600;
}
.alert-success {
    background-color: #DEF7EC;
    color: #03543F;
}
.alert-danger {
    background-color: #FDE8E8;
    color: #9B1C1C;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: -40px;
        padding: 0 12px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .nav-menu { display: none; }
    .mobile-menu-btn { display: flex; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 36px; }
    .program-card { flex-direction: column; }
    .program-img { min-height: 240px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
    .action-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; }
}

/* Syllabus Grid and Container Custom Styles */
.syllabus-container {
    padding: 60px 48px;
}
.syllabus-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .syllabus-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .syllabus-container {
        padding: 40px 20px !important;
    }
    .syllabus-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Megamenu Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.megamenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 600px;
    background-color: var(--primary-navy);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition);
    z-index: 999;
    border: 1px solid rgba(255,255,255,0.05);
}

.nav-dropdown:hover .megamenu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}

.megamenu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.nav-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.megamenu-row {
    display: flex;
    gap: 32px;
}

.megamenu-col {
    flex: 1;
}

.megamenu-intro {
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 28px;
}

.megamenu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.megamenu-links a {
    display: block;
    color: var(--white);
    transition: var(--transition);
}

.megamenu-links a strong {
    display: block;
    font-size: 15px;
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.megamenu-links a span {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

.megamenu-links a:hover strong {
    color: var(--white);
}

.megamenu-links a:hover span {
    color: rgba(255,255,255,0.9);
}

/* Mobile Submenu & Dropdown Styles */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    padding-left: 0;
    background-color: var(--bg-ice);
    border-radius: 8px;
    margin: 0;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.3s ease, margin 0.3s ease;
}

.mobile-dropdown.open .mobile-submenu {
    max-height: 350px;
    margin: 4px 8px 16px 8px;
    padding: 8px 0;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-slate);
    padding: 12px 16px;
    border-radius: 6px;
    transition: var(--transition);
}

.mobile-submenu-link:hover,
.mobile-submenu-link:active {
    color: var(--primary-navy);
    background-color: rgba(128, 13, 23, 0.05);
}

.mobile-submenu-link i {
    font-size: 14px;
    color: var(--accent-gold);
    width: 16px;
    text-align: center;
}

.mobile-dropdown.open .mobile-dropdown-toggle i {
    transform: rotate(180deg);
    color: var(--primary-navy);
}

/* Mobile Touch & Safe Areas Optimization */
a, button, select, input, .mobile-nav-link, .mobile-submenu-link {
    -webkit-tap-highlight-color: transparent;
}

button, a, .mobile-dropdown-toggle {
    touch-action: manipulation;
}

body {
    padding-bottom: env(safe-area-inset-bottom);
}
