/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
   :root {
    --primary-color: #040814;      /* Deep navy/black */
    --secondary-color: #d4af37;    /* Vibrant gold */
    --accent-color: #eab308;       /* Warm yellow/orange */
    --text-main: #cbd5e1;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #040814;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --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);
    --container-width: 1200px;
}

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

html, body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: clip; /* clip allows position:sticky to work unlike hidden */
    width: 100%;
    max-width: 100vw;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Mobile Responsiveness for Section Headers */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        padding: 0 15px;
    }
}

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

.section-padding {
    padding: 5rem 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(to right, #eab308, #d4af37);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(to right, #facc15, #eab308);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.main-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease-in-out;
}

.main-header.nav-up {
    transform: translateY(-100%);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    padding: 0 24px;
    transition: all 0.3s ease;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo, .logo img {
    height: 70px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--primary-color);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--secondary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    position: relative;
    background-color: var(--bg-white);
    color: var(--primary-color);
    padding-top: 4rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../World_map_blank_without_borders.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8; /* Increased opacity */
    z-index: 0;
    pointer-events: none;
}

.footer-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-links a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.social-links a.facebook { background-color: #1877F2; }
.social-links a.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-links a.linkedin { background-color: #0A66C2; }
.social-links a.youtube { background-color: #FF0000; }
.social-links a.twitter { background-color: #000000; }
.social-links a.pinterest { background-color: #E60023; }
.social-links a.other-social { background-color: #64748b; }

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-col ul a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-top: 4px;
}

.footer-bottom {
    position: relative;
    z-index: 10;
    background-color: #f8f9fa;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ==========================================================================
   Footer Logo Wrap
   ========================================================================== */
.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Admissions Ticker Bar
   ========================================================================== */
.admissions-ticker {
    background: linear-gradient(to right, #d4af37, #eab308);
    color: #000;
    padding: 10px 20px;
    margin: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3), 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.ticker-content {
    display: flex;
    animation: tickerScroll 15s linear infinite;
    white-space: nowrap;
}

.ticker-content span {
    padding: 0 30px;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Countries Dropdown
   ========================================================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    min-width: 450px;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    margin-top: 15px;
}

@media (min-width: 1025px) {
    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }
}

.nav-dropdown.force-show .dropdown-menu {
    display: block !important;
}

/* Invisible bridge to fix the hover gap issue */
.nav-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--text-white) !important;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--secondary-color) !important;
}

.dropdown-item img {
    width: 20px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ==========================================================================
   Contact Info Alignment Fix
   ========================================================================== */
.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.5;
}

.contact-info li i {
    margin-top: 4px;
    flex-shrink: 0;
}

/* Intermediate Laptop / Desktop (1025px - 1240px) */
@media (min-width: 1025px) and (max-width: 1240px) {
    .header-container {
        height: 80px;
        padding: 0 16px;
    }

    .site-logo, .logo img {
        height: 60px;
        max-width: 210px;
    }

    .main-nav ul {
        gap: 0.75rem;
    }

    .main-nav a {
        font-size: 0.76rem;
        letter-spacing: 0.2px;
    }

    .header-action {
        gap: 10px !important;
    }

    .header-action .btn-primary {
        padding: 8px 16px !important;
        font-size: 0.8rem;
    }
}

/* Tablet & iPad Navigation (<= 1024px) */
@media (max-width: 1024px) {
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    /* Mobile / Tablet Header */
    .header-container {
        height: 75px !important;
        padding: 0 20px !important;
        position: relative;
    }

    .site-logo, .logo img {
        height: 55px !important;
        max-width: 190px !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 8px;
        background: rgba(11, 29, 58, 0.05);
        color: var(--primary-color);
        font-size: 1.4rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-menu-btn:hover {
        background: rgba(11, 29, 58, 0.1);
        color: var(--secondary-color);
    }

    .header-action {
        gap: 12px !important;
    }

    .header-action .btn-primary {
        display: inline-flex !important;
        padding: 8px 18px !important;
        font-size: 0.82rem;
        border-radius: 6px;
    }

    /* Mobile & iPad Nav Drawer */
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff !important;
        padding: 12px 20px 24px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        gap: 0;
        z-index: 1000;
        max-height: calc(100vh - 85px);
        overflow-y: auto;
    }

    .main-nav ul.active {
        display: flex !important;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 8px;
        font-size: 0.92rem;
        font-weight: 600;
        color: var(--primary-color);
        width: 100%;
        letter-spacing: 0.3px;
    }

    .main-nav a::after {
        display: none !important;
    }

    .main-nav a:hover, .main-nav a.active {
        color: var(--secondary-color);
        background-color: rgba(212, 175, 55, 0.06);
        border-radius: 6px;
    }

    /* Countries Dropdown in Drawer */
    .nav-dropdown .dropdown-menu {
        display: none;
        position: static !important;
        transform: none !important;
        width: 100% !important;
        min-width: 100% !important;
        box-shadow: none !important;
        margin: 8px 0 12px 0 !important;
        background-color: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        padding: 12px !important;
    }

    .nav-dropdown.force-show .dropdown-menu {
        display: block !important;
    }

    .dropdown-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .dropdown-item {
        color: var(--primary-color) !important;
        background: #ffffff;
        border: 1px solid #edf2f7;
        font-size: 0.85rem;
        padding: 8px 10px;
        border-radius: 6px;
    }

    .dropdown-item:hover {
        background: rgba(212, 175, 55, 0.15) !important;
        color: var(--secondary-color) !important;
    }
}

/* Mobile Screens (<= 576px) */
@media (max-width: 576px) {
    .header-container {
        padding: 0 14px !important;
    }

    .site-logo, .logo img {
        height: 48px !important;
        max-width: 160px !important;
    }

    .header-action .btn-primary {
        display: none !important;
    }

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

/* ==========================================================================
   Newsletter Section (Global)
   ========================================================================== */
.newsletter-section {
    background-color: var(--primary-color);
    padding: 4rem 0;
    color: var(--text-white);
}

.newsletter-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.newsletter-text {
    flex: 1;
    min-width: 300px;
}

.newsletter-text h2 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.newsletter-text p {
    color: var(--text-light);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    width: 100%;
    flex: 1;
    max-width: 500px;
    min-width: 300px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border-radius: 5px;
    border: none;
    outline: none;
    font-family: inherit;
}

.newsletter-form button {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-family: inherit;
}

.newsletter-form button:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   Preloader Animation
   ========================================================================== */
body.loading {
    overflow: hidden;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.preloader-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animation-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.earth-container {
    position: absolute;
    width: 150px;
    height: 150px;
    z-index: 5; /* In front of text */
}

.premium-earth {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2563eb 0%, #1e3a8a 50%, #020617 100%);
    box-shadow: inset -15px -15px 30px rgba(0,0,0,0.9), 
                inset 5px 5px 20px rgba(255,255,255,0.4), 
                0 0 30px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.earth-grid {
    position: absolute;
    width: 200%;
    height: 100%;
    background-image: url('../images/world-map.svg');
    background-size: 50% 100%;
    background-repeat: repeat-x;
    opacity: 0.7;
    animation: scrollGrid 15s linear infinite;
}

@keyframes scrollGrid {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.airplane-container {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 6; /* In front of earth */
    opacity: 0;
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.6));
}

.airplane-svg {
    width: 100%;
    height: 100%;
}

.preloader-text-wrapper {
    position: absolute;
    z-index: 4; /* BEHIND the earth */
    white-space: nowrap;
    opacity: 0;
    text-align: left;
    /* Will be positioned via GSAP */
}

.preloader-text-wrapper h2 {
    font-size: 2rem;
    letter-spacing: 2px;
    margin: 0;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
    text-transform: uppercase;
}

.preloader-text-wrapper span {
    color: var(--secondary-color);
    font-size: 1.2rem;
    letter-spacing: 5px;
    font-weight: 500;
    display: block;
    margin-top: 5px;
}

@media (min-width: 992px) {
    .footer-map-col {
        grid-column: span 2;
    }
}

.footer-flags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    max-width: 320px;
}
.flag-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}
.flag-item img {
    width: 45px;
    height: 35px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.1);
}
.flag-item:hover img {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}
.flag-item .flag-name {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.flag-item .flag-name::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
}
.flag-item:hover .flag-name {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Floating Action Buttons */
.floating-btn {
    position: fixed;
    bottom: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.floating-btn i {
    line-height: 1;
    margin: 0;
}
.floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    color: #fff;
}
.floating-whatsapp {
    left: 30px;
    background-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    animation: pulse-whatsapp 2s infinite;
}
.floating-whatsapp:hover {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}
.floating-phone {
    right: 30px;
    background-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    animation: pulse-phone 2s infinite;
}
.floating-phone:hover {
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6);
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes pulse-phone {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); /* Assuming secondary color is gold-ish */
    }
    70% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}
