/* =========================================
   main.css - Global Styles & Reusable Components
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@500;700;800;900&display=swap');

:root {
    /* Brand Colors */
    --primary-blue: #2E6FB6;
    --accent-blue: #3F8FD8;
    
    /* UI Colors */
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-soft-blue: #F0F6FC;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --footer-dark: #0B1120;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* UI Elements */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px -5px rgba(46, 111, 182, 0.15);
    --shadow-blue: 0 20px 40px -5px rgba(46, 111, 182, 0.4);
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
}

/* =========================================
   BASE RESET & TYPOGRAPHY
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text-muted);
    background-color: var(--bg-light);
    overflow-x: hidden !important;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: -0.02em;
}
section { padding: 100px 0; }

.text-primary-brand { color: var(--primary-blue) !important; }
.text-accent-brand { color: var(--accent-blue) !important; }

/* =========================================
   ULTRA-MODERN PRELOADER
   ========================================= */
#preloader {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: var(--bg-white); 
    z-index: 9999;
    display: flex; 
    align-items: center; 
    justify-content: center;
    /* Buttery smooth fade out */
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.loader-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center Logo */
.loader-logo {
    height: 35px; /* Scales the 458px logo down perfectly */
    width: auto;
    position: absolute;
    z-index: 2;
    animation: logoPulse 2s ease-in-out infinite alternate;
}

/* Spinning Rings Container */
.spinner-rings {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

/* Primary Blue Outer Ring */
.outer-ring {
    width: 100%;
    height: 100%;
    border-top-color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    /* Spring-like rotation for a tech feel */
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Accent Blue Inner Ring */
.inner-ring {
    width: 70%;
    height: 70%;
    border-left-color: var(--accent-blue);
    border-right-color: var(--accent-blue);
    /* Reverse rotation */
    animation: spinReverse 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes logoPulse {
    0% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* =========================================
   BUTTONS (Reusable)
   ========================================= */
.btn-brand {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: var(--bg-white); 
    border: none; 
    padding: 14px 32px; 
    font-family: var(--font-heading); 
    font-weight: 700;
    border-radius: var(--radius-pill); 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; 
    overflow: hidden; 
    display: inline-flex; 
    align-items: center; 
    gap: 10px;
    text-decoration: none; 
    box-shadow: 0 10px 20px rgba(46, 111, 182, 0.2); 
    z-index: 1;
}
.btn-brand::before {
    content: ''; 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-blue));
    border-radius: var(--radius-pill); 
    z-index: -1; 
    opacity: 0; 
    transition: 0.4s;
}
.btn-brand:hover { 
    transform: translateY(-3px); 
    box-shadow: var(--shadow-blue); 
    color: var(--bg-white); 
}
.btn-brand:hover::before { opacity: 1; }

.btn-outline-white {
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.4); 
    color: var(--bg-white);
    padding: 14px 32px; 
    font-family: var(--font-heading); 
    font-weight: 700; 
    border-radius: var(--radius-pill);
    backdrop-filter: blur(10px); 
    transition: 0.4s; 
    text-decoration: none;
}
.btn-outline-white:hover { 
    background: var(--bg-white); 
    color: var(--primary-blue); 
    transform: translateY(-3px); 
}

/* =========================================
   STICKY MORPHING NAV PILL
   ========================================= */
.navbar-wrapper {
    position: fixed; 
    top: 25px; 
    left: 0; 
    width: 100%; 
    z-index: 1040; 
    display: flex; 
    justify-content: center;
    padding: 0 20px; 
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-modern {
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8); 
    border-radius: var(--radius-pill);
    padding: 15px 40px; 
    width: 100%; 
    max-width: 1200px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- SCROLLED STATE (Sticky & Shrinking) --- */
.navbar-wrapper.scrolled { 
    top: 15px; 
}

.navbar-wrapper.scrolled .navbar-modern {
    background: rgba(255, 255, 255, 0.98); 
    max-width: 950px; 
    padding: 10px 30px; 
    box-shadow: 0 15px 40px rgba(46, 111, 182, 0.15);
    border-color: rgba(46, 111, 182, 0.15);
}

.navbar-brand { 
    display: flex;
    align-items: center;
    text-decoration: none; 
    transition: all 0.4s ease;
}

/* --- RESPONSIVE IMAGE LOGO --- */
.navbar-brand img {
    height: 45px; 
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
}

/* Shrink the logo smoothly when the navbar docks to the top */
.navbar-wrapper.scrolled .navbar-brand img {
    height: 36px;
}

/* --- NAV LINKS --- */
.nav-links { 
    display: flex; 
    gap: 30px; 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    align-items: center; 
    transition: gap 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-wrapper.scrolled .nav-links {
    gap: 15px; 
}

.nav-link { 
    color: var(--text-dark) !important; 
    font-weight: 600; 
    font-size: 0.95rem; 
    padding: 8px 12px; 
    transition: all 0.3s ease; 
    opacity: 0.7; 
    text-decoration: none; 
    border-radius: 50px;
}
.nav-link:hover, .nav-link.active { 
    opacity: 1; 
    color: var(--primary-blue) !important;
    background: rgba(46, 111, 182, 0.05); 
}

/* =========================================
   SMOOTH SIDEBAR (MOBILE)
   ========================================= */
.mobile-menu-btn { 
    display: none; 
    background: transparent; 
    border: none; 
    font-size: 1.5rem; 
    color: var(--text-dark); 
    cursor: pointer; 
    transition: 0.3s; 
}
.mobile-menu-btn:hover { color: var(--primary-blue); }

.sidebar-overlay {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(5px);
    z-index: 1050; 
    opacity: 0; 
    visibility: hidden; 
    transition: 0.4s ease;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed; 
    top: 0; right: -350px; 
    width: 320px; max-width: 85vw; height: 100vh;
    background: var(--bg-white); 
    z-index: 1060; 
    transform: translateX(100%);
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15); 
    display: flex; flex-direction: column; padding: 40px 30px;
}
.sidebar.active { right: 0; transform: translateX(0); }

.sidebar-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 50px; 
}
.sidebar-close { 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    color: var(--text-dark); 
    cursor: pointer; 
    transition: 0.3s; 
}
.sidebar-close:hover { color: var(--primary-blue); transform: rotate(90deg); }

.sidebar-links { display: flex; flex-direction: column; gap: 20px; list-style: none; padding: 0; }
.sidebar-links a { 
    color: var(--text-dark); 
    font-family: var(--font-heading); 
    font-weight: 700; 
    font-size: 1.2rem; 
    text-decoration: none; 
    transition: 0.3s; 
}
.sidebar-links a:hover { color: var(--primary-blue); padding-left: 10px; }

/* =========================================
   ULTRA-MODERN FOOTER
   ========================================= */
.footer-modern {
    background-color: var(--footer-dark);
    padding: 80px 0 0 0; 
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

/* Subtle Ambient Glow Effect */
.footer-modern::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(46, 111, 182, 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.footer-modern .container { position: relative; z-index: 1; }

/* Typography & Links */
.footer-brand { 
    font-family: var(--font-heading); 
    font-size: 2.2rem; 
    font-weight: 900; 
    color: var(--bg-white); 
    text-decoration: none; 
    letter-spacing: -1px; 
    display: inline-block;
}
.footer-brand span { color: var(--primary-blue); }
.footer-text { font-size: 0.95rem; line-height: 1.8; color: rgba(255, 255, 255, 0.5); }
.footer-heading { 
    color: var(--bg-white); 
    font-weight: 800; 
    margin-bottom: 25px; 
    font-family: var(--font-heading); 
    font-size: 1.15rem; 
    letter-spacing: 0.5px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { 
    color: rgba(255, 255, 255, 0.55); 
    text-decoration: none; 
    font-weight: 500; 
    transition: 0.3s; 
    display: inline-block; 
}
.footer-links a:hover { 
    color: var(--accent-blue); 
    transform: translateX(6px); 
}

/* Glowing Social Pills */
.social-wrapper { display: flex; gap: 15px; flex-wrap: wrap; }
.social-pill {
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    text-decoration: none; font-size: 1.1rem;
}
.social-pill:hover { 
    background: var(--primary-blue); 
    border-color: var(--primary-blue); 
    transform: translateY(-4px) scale(1.05); 
    color: var(--bg-white); 
    box-shadow: 0 10px 20px rgba(46, 111, 182, 0.4); 
}

/* Bottom Bar */
.footer-bottom {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}
.legal-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 25px; justify-content: flex-end; }
.legal-links a { color: rgba(255, 255, 255, 0.4); text-decoration: none; transition: 0.3s; font-weight: 500; }
.legal-links a:hover { color: var(--bg-white); }

/* =========================================
   RESPONSIVE OVERRIDES (GLOBAL, HEADER & FOOTER)
   ========================================= */

/* --- TABLETS & SMALL DESKTOPS (991px and below) --- */
@media (max-width: 991px) {
    /* Navbar Adjustments */
    .nav-links, .nav-btn-desktop { display: none !important; }
    .mobile-menu-btn { display: block; }
    
    .navbar-wrapper { padding: 0 10px; }
    .navbar-modern { padding: 10px 15px; border-radius: 16px; }
    .navbar-wrapper.scrolled .navbar-modern { max-width: 100%; padding: 8px 15px; }
    
    /* Logo scaling */
    .navbar-brand img { height: 32px; }
    .sidebar-header .navbar-brand img { height: 36px; }

    /* Shrink Section Spacing */
    section { padding: 70px 0; }
}

/* --- MOBILE PHONES (768px and below) --- */
@media (max-width: 768px) {
    /* Further Shrink Section Spacing for tiny screens */
    section { padding: 50px 0; }

    /* Universal Typography Scaling */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }

    /* Button Adjustments (Makes them easier to tap) */
    .btn-brand, .btn-outline-white {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    /* Footer Centering & Stacking */
    .footer-modern { 
        padding: 50px 0 0 0; 
        text-align: center; 
    }
    .footer-heading { 
        margin-top: 30px; 
        margin-bottom: 15px; 
    }
    .social-wrapper { 
        justify-content: center; 
        margin-top: 20px; 
    }
    .legal-links { 
        flex-direction: column; 
        gap: 12px; 
        align-items: center; 
    }
    .footer-bottom { 
        padding: 20px 0; 
    }
}

/* --- EXTRA SMALL DEVICES (480px and below) --- */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .footer-brand { font-size: 1.8rem; }
}