/* --- Premium Elite Variables --- */
:root {
    --oxford-navy: #0A192F;
    --navy-light: #112240;
    --champagne-gold: #C5A059;
    --gold-light: #f4e8d3;
    --gold-hover: #D4AF37;
    --pearl-white: #F8F9FA;
    --pure-white: #FFFFFF;
    --text-dark: #2D3748;
    --text-gray: #718096;
    --header-height: 90px;
    --topbar-height: 45px;
}

/* --- Base & Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html { scroll-padding-top: 130px; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--pearl-white);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, .serif { font-family: 'Playfair Display', serif; }

/* --- Scroll Reveal Animations --- */
.fade-up, .reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-up.visible, .reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   TOP BAR (Student Portal Links)
   ========================================= */
.top-bar {
    position: absolute; top: 0; left: 0; width: 100%; height: var(--topbar-height);
    background-color: var(--oxford-navy) !important; 
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; font-size: 0.8rem; z-index: 1001;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 15px; }
.top-bar a {
    color: rgba(255, 255, 255, 0.9); text-decoration: none; font-weight: 500;
    transition: color 0.3s ease; display: flex; align-items: center; gap: 8px;
    letter-spacing: 0.5px;
}
.top-bar a:hover { color: var(--champagne-gold); }
.top-bar i { color: var(--champagne-gold); }
.top-bar-divider { color: rgba(255,255,255,0.2); }

/* =========================================
   GLOBAL HEADER & NAVIGATION FIX
   ========================================= */
header {
    position: fixed; top: var(--topbar-height); width: 100%; z-index: 1000;
    padding: 20px 5%; display: flex; justify-content: space-between; align-items: center;
    background: transparent; transition: all 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled {
    top: 0; background: var(--pure-white); padding: 12px 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); border-bottom: 1px solid #eee;
}

/* Fixes the overlap bug if solid-bg is ever used */
header.solid-bg {
    background: var(--pure-white); padding: 12px 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); border-bottom: 1px solid #eee;
}
header.solid-bg.scrolled { top: 0; }

.logo-container { display: flex; align-items: center; gap: 12px; text-decoration: none; transition: transform 0.3s ease; }
.logo-container:hover { transform: scale(1.02); }
.logo-img { height: 55px; width: auto; object-fit: contain; }
.logo-text-wrapper { display: flex; flex-direction: column; justify-content: center; }

.logo-title {
    font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--pure-white);
    line-height: 1.1; letter-spacing: 0.5px; transition: color 0.3s ease;
}
.logo-subtitle {
    font-family: 'Inter', sans-serif; font-size: 0.65rem; font-weight: 600; color: var(--champagne-gold);
    letter-spacing: 1px; text-transform: uppercase; margin-top: 2px;
}
header.scrolled .logo-title, header.solid-bg .logo-title { color: var(--oxford-navy); }

nav ul { list-style: none; display: flex; gap: 30px; }
nav ul li a {
    color: var(--pure-white); text-decoration: none; font-weight: 500;
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s ease;
}
header.scrolled nav ul li a, header.solid-bg nav ul li a { color: var(--oxford-navy); }
nav ul li a:hover, nav ul li a.active { color: var(--champagne-gold); }

/* =========================================
   DESKTOP DROPDOWN STYLES
   ========================================= */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0;
    background: var(--pure-white); min-width: 260px;
    list-style: none; display: flex; flex-direction: column; gap: 0;
    opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: all 0.3s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 3px solid var(--champagne-gold); border-radius: 0 0 8px 8px; padding: 10px 0;
    height: auto !important;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { width: 100%; }
.dropdown-menu li a {
    color: var(--oxford-navy) !important; padding: 12px 20px; text-transform: capitalize;
    font-weight: 500; font-size: 0.9rem; display: block; transition: all 0.3s ease;
}
.dropdown-menu li a:hover { background: var(--pearl-white); color: var(--champagne-gold) !important; padding-left: 28px; }

/* =========================================
   ANIMATED HAMBURGER ICON
   ========================================= */
.menu-toggle {
    display: none; /* Fixes hamburger showing on PC */
    flex-direction: column; justify-content: space-between;
    width: 28px; height: 20px; cursor: pointer; z-index: 1006; position: relative;
}
.menu-toggle .bar {
    height: 3px; width: 100%; background-color: var(--pure-white); border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: left center;
}
header.scrolled .menu-toggle .bar, header.solid-bg .menu-toggle .bar { background-color: var(--oxford-navy); }

/* =========================================
   SUB-PAGE HERO UPGRADE
   ========================================= */
.page-hero {
    min-height: 50vh; /* Makes the hero image nice and big */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 120px 5% 40px; /* Pushes text down safely below the transparent header */
    text-align: center; 
    color: var(--pure-white);
    position: relative;
}
.page-hero h1 { font-size: 3.5rem; margin-bottom: 15px; color: var(--champagne-gold); }
.page-hero p { font-size: 1.2rem; color: rgba(255,255,255,0.8); max-width: 700px; margin: 0 auto; }

/* Turn into X */
.menu-toggle.active .bar { background-color: var(--pure-white) !important; }
.menu-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(0px, -2px); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(0px, 2px); }


/* =========================================
   GLOBAL COMPONENTS
   ========================================= */
.btn-gold {
    display: inline-block; padding: 16px 40px; background: var(--champagne-gold);
    color: var(--pure-white); text-decoration: none; text-transform: uppercase;
    letter-spacing: 1.5px; font-weight: 600; font-size: 0.9rem;
    border: 1px solid var(--champagne-gold); transition: all 0.4s ease; text-align: center;
}
.btn-gold:hover { background: transparent; color: var(--champagne-gold); }

footer { background: var(--oxford-navy); color: var(--pure-white); padding: 80px 10% 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 50px; margin-bottom: 60px; }
.footer-section h4 { font-size: 1.3rem; color: var(--champagne-gold); margin-bottom: 25px; letter-spacing: 1px; }
.footer-section p, .footer-section a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.95rem; margin-bottom: 15px; display: block; transition: color 0.3s ease; }
.footer-section a:hover { color: var(--champagne-gold); }
.social-links { display: flex; gap: 20px; margin-top: 20px; }
.social-links a { font-size: 1.5rem; color: rgba(255, 255, 255, 0.7); transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; }
.social-links a:hover { color: var(--champagne-gold); transform: translateY(-3px); }
.copyright { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; }
/* --- Agency Credit Line --- */
.agency-credit { 
    margin-top: 8px; 
    font-size: 0.75rem; 
    letter-spacing: 0.5px; 
    color: rgba(255, 255, 255, 0.5); 
}
.agency-credit a { 
    color: var(--champagne-gold); 
    font-weight: 600; 
    text-decoration: none; 
    letter-spacing: 1.5px; 
    transition: all 0.3s ease; 
}
.agency-credit a:hover { 
    color: var(--pure-white); 
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.5); 
}

/* =========================================
   HOME & SPECIFIC PAGES
   ========================================= */
.hero {
    height: 100vh; background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex; align-items: center; padding: 0 10%; position: relative;
}
.hero-content { max-width: 800px; color: var(--pure-white); animation: slowFade 1.5s ease-out forwards; }
@keyframes slowFade { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
.hero h1 { font-size: 4.5rem; font-weight: 700; line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--champagne-gold); font-style: italic; }
.hero p { font-size: 1.2rem; margin-bottom: 40px; font-weight: 300; letter-spacing: 0.5px; color: rgba(255, 255, 255, 0.8); }

section.home-section { padding: 100px 10%; }
.section-title { text-align: center; font-size: 2.5rem; color: var(--oxford-navy); margin-bottom: 20px; }
.section-divider { width: 60px; height: 3px; background: var(--champagne-gold); margin: 0 auto 60px auto; }

.leadership { background: var(--pure-white); }
.leader-wrap {
    display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 800px; margin: 0 auto;
    padding: 50px; border: 1px solid #eee; background: var(--pearl-white); position: relative;
}
.leader-wrap::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--champagne-gold); }
.leader-wrap h2 { font-size: 2rem; color: var(--oxford-navy); margin-bottom: 5px; }
.leader-wrap h3 { font-family: 'Inter', sans-serif; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; color: var(--champagne-gold); margin-bottom: 20px; }
.leader-wrap p { color: var(--text-gray); font-size: 1rem; }

.faculties { background: var(--pearl-white); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.faculty-card { background: var(--pure-white); padding: 40px 30px; text-align: center; border: 1px solid #eaeaea; transition: all 0.4s ease; position: relative; overflow: hidden; }
.faculty-card::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background: var(--champagne-gold); transition: width 0.4s ease; }
.faculty-card:hover { box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); transform: translateY(-5px); }
.faculty-card:hover::after { width: 100%; }
.faculty-card h3 { font-size: 1.5rem; color: var(--oxford-navy); }

/* =========================================
   PROGRAMS PAGE SPECIFIC STYLES
   ========================================= */
.programs-container { display: flex; gap: 50px; padding: 60px 5%; max-width: 1400px; margin: 0 auto; align-items: flex-start; }
.programs-nav {
    flex: 0 0 300px; position: sticky; top: 120px; background: var(--pure-white); padding: 30px;
    border-radius: 10px; border: 1px solid #eaeaea; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.programs-nav h3 { font-size: 1.3rem; color: var(--oxford-navy); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--champagne-gold); }
.programs-nav ul { list-style: none; }
.programs-nav ul li { margin-bottom: 12px; }
.programs-nav ul li a {
    text-decoration: none; color: var(--text-gray); font-size: 0.95rem; font-weight: 500;
    display: flex; align-items: center; gap: 10px; transition: all 0.3s ease; padding: 8px 12px; border-radius: 6px;
}
.programs-nav ul li a:hover { background: var(--gold-light); color: var(--oxford-navy); padding-left: 18px; }
.programs-nav ul li a i { color: var(--champagne-gold); font-size: 0.8rem; }

.programs-content { flex: 1; }
.program-section {
    background: var(--pure-white); padding: 50px; border-radius: 15px; border: 1px solid #eaeaea;
    margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}
.program-section h2 { font-size: 2.2rem; color: var(--oxford-navy); margin-bottom: 30px; display: flex; align-items: center; gap: 15px; }
.program-section h2 i { color: var(--champagne-gold); font-size: 1.8rem; }
.program-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.program-list li {
    background: var(--pearl-white); padding: 15px 20px; border-left: 3px solid var(--champagne-gold); border-radius: 4px;
    font-size: 0.95rem; font-weight: 500; color: var(--text-dark); transition: all 0.3s ease; display: flex; align-items: center; gap: 10px;
}
.program-list li::before { content: '\f19d'; font-family: 'FontAwesome'; color: var(--champagne-gold); opacity: 0.6; }
.program-list li:hover { transform: translateX(5px); background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* =========================================
   FACULTIES PAGE SPECIFIC STYLES
   ========================================= */
.faculties-page { padding: 80px 5%; max-width: 1400px; margin: 0 auto; }
.faculty-card i { font-size: 3rem; color: var(--champagne-gold); margin-bottom: 20px; transition: transform 0.4s ease; }
.faculty-card:hover i { transform: scale(1.1); }
.faculty-card p { color: var(--text-gray); font-size: 0.95rem; margin: 15px 0 25px; line-height: 1.6; }
.faculty-card .btn-gold { padding: 10px 25px; font-size: 0.8rem; }
/* =========================================
   MOBILE RESPONSIVE (SIDEBAR UPDATE)
   ========================================= */
@media (max-width: 1024px) {
    .top-bar { flex-direction: column; justify-content: center; height: auto; padding: 10px 5%; gap: 10px; }
    .top-bar-left, .top-bar-right { justify-content: center; flex-wrap: wrap; gap: 10px; }
    header { top: 80px; } 

    /* THIS PART FIXES THE PROGRAMS PAGE ON IPADS/TABLETS */
    .programs-container { flex-direction: column; }
    .programs-nav { flex: none; position: static; width: 100%; margin-bottom: 30px; }
    .program-section { padding: 30px 20px; }
}

@media (max-width: 900px) {
    .top-bar { display: none !important; }
    header { top: 0 !important; }

    /* Fix display flex for hamburger to draw 3 lines */
    .menu-toggle { display: flex; z-index: 1006; position: relative; }

    .logo-img { height: 45px; }
    .logo-title { font-size: 1.2rem; }
    .logo-subtitle { font-size: 0.55rem; }
    
    .hero-content { padding: 20px; }
    .hero h1 { font-size: 2.8rem; }
    .hero-content .btn-gold { display: block; width: 100%; margin: 0 0 15px 0 !important; }

    /* THE NAVY SIDEBAR */
    nav ul {
        position: fixed; top: 0; right: -100%;
        width: 320px; max-width: 85vw; height: 100vh;
        background: var(--oxford-navy); 
        display: block; 
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        padding-top: 80px; padding-bottom: 40px;
        overflow-y: auto; overflow-x: hidden; z-index: 1005; border: none;
    }
    nav ul.active { right: 0; }
    
    nav ul li { display: block; width: 100%; margin: 0; padding: 0; }
    nav ul li a { 
        display: block; padding: 16px 25px; 
        color: var(--pure-white) !important; 
        border-bottom: 1px solid rgba(255,255,255,0.05); 
        font-size: 0.95rem; font-weight: 500; margin: 0;
    }
    nav ul li a:hover, nav ul li a.active { color: var(--champagne-gold) !important; }

    /* SMOOTH SLIDING MOBILE DROPDOWNS */
    .dropdown-menu { 
        position: static; 
        opacity: 0; 
        visibility: hidden; 
        max-height: 0; 
        transform: none; 
        box-shadow: none; border: none; 
        background: rgba(0,0,0,0.2); 
        display: block; 
        width: 100%; padding: 0; margin: 0;
        overflow: hidden; 
        transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .dropdown:hover .dropdown-menu { max-height: 0; opacity: 0; visibility: hidden; } 
    
    .dropdown.mobile-expanded .dropdown-menu { 
        max-height: 800px; 
        opacity: 1; 
        visibility: visible; 
    }
    
    .dropdown-menu li { display: block; }
    .dropdown-menu li a { 
        padding: 12px 25px 12px 40px; 
        font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.02); 
        color: rgba(255,255,255,0.7) !important; margin: 0;
    }

    /* Contacts & Socials */
    .mobile-only { display: block; }
    .mobile-only-divider { display: block; height: 8px; background: rgba(0,0,0,0.2); border: none; margin: 10px 0; }
    .sidebar-contact { padding: 20px 25px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .sidebar-contact h4 { color: var(--champagne-gold); font-size: 0.9rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px;}
    .sidebar-contact a { padding: 6px 0; border: none; font-size: 0.85rem; color: rgba(255,255,255,0.8) !important; }
    .sidebar-contact i { width: 20px; color: var(--champagne-gold); }
    
    .sidebar-socials { display: flex; flex-wrap: wrap; gap: 15px; padding: 20px 25px; }
    .sidebar-socials a { 
        padding: 0; border: none; display: inline-flex; width: 40px; height: 40px; 
        border-radius: 50%; background: rgba(255,255,255,0.05); 
        align-items: center; justify-content: center; 
    }
    .sidebar-socials a i { margin: 0; font-size: 1.1rem; color: var(--pure-white); }
}

@media (max-width: 480px) {
    .floating-portal { bottom: 20px; right: 20px; }
    .floating-btn { width: 55px; height: 55px; font-size: 1.5rem; }
    nav ul { width: 280px; } 
}

/* =========================================
   FLOATING STUDENT PORTAL BUTTON
   ========================================= */
.floating-portal {
    position: fixed; bottom: 30px; right: 30px; z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end; gap: 15px;
}
.floating-menu {
    display: flex; flex-direction: column; gap: 10px;
    opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease;
}
.floating-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.floating-menu a {
    background: var(--pure-white); color: var(--oxford-navy);
    padding: 12px 25px; border-radius: 50px; text-decoration: none;
    font-weight: 600; font-size: 0.95rem; box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px; border: 1px solid var(--champagne-gold); transition: all 0.3s ease;
}
.floating-menu a:hover { background: var(--champagne-gold); color: var(--pure-white); }
.floating-btn {
    width: 65px; height: 65px; border-radius: 50%;
    background: var(--champagne-gold); color: var(--pure-white);
    border: none; font-size: 1.8rem; cursor: pointer; box-shadow: 0 5px 20px rgba(197, 160, 89, 0.4);
    transition: transform 0.3s ease, background 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.floating-btn:hover { transform: scale(1.1); background: var(--gold-hover); }

/* Hide Mobile Links on Desktop */
.mobile-only, .mobile-only-divider { display: none; }