/* Global Styles for Barnacure WCIS iGEM 2025 */

/* Root Variables */
:root {
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--slate-950);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px; /* Account for fixed navbar */
}

html {
    scroll-behavior: smooth;
}

/* Fixed Immersive Liquid Glass Navigation */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: rgba(2, 6, 23, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 8px 32px rgba(2, 6, 23, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0.75rem 0 !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

.navbar.scrolled {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(200%) !important;
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.6) !important;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    pointer-events: auto;
}

/* Brand Section */
.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    pointer-events: auto;
    z-index: 10000;
}

.brand-text {
    color: #34d399;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

.school-logo {
    height: 2.5rem;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    transition: transform 0.3s ease;
}

.school-logo:hover {
    transform: scale(1.05);
}

/* Navigation Content */
.nav-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateX(0);
    max-height: 200px;
    overflow: visible;
    pointer-events: auto;
}

.nav-content.hidden {
    opacity: 0;
    transform: translateX(20px);
    max-height: 0;
    pointer-events: none;
    overflow: hidden;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin-bottom: 0;
    padding-left: 0;
}

.nav-item {
    position: relative;
}

/* Navigation Links */
.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    
    /* Enhanced individual tab liquid glass effect */
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.3) 0%, 
        rgba(52, 211, 153, 0.08) 50%, 
        rgba(30, 41, 59, 0.25) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(52, 211, 153, 0.2);
    box-shadow: 
        0 6px 25px rgba(15, 23, 42, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(52, 211, 153, 0.1);
    
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10000;
}

.nav-link:hover {
    color: var(--emerald-300) !important;
    background: linear-gradient(135deg, 
        rgba(52, 211, 153, 0.2) 0%, 
        rgba(16, 185, 129, 0.15) 50%, 
        rgba(52, 211, 153, 0.18) 100%);
    border-color: rgba(52, 211, 153, 0.35);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 35px rgba(52, 211, 153, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(52, 211, 153, 0.15),
        0 0 25px rgba(52, 211, 153, 0.2);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    filter: drop-shadow(0 2px 4px rgba(52, 211, 153, 0.4));
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
    filter: drop-shadow(0 3px 6px rgba(52, 211, 153, 0.6));
}

/* Pure Liquid Glass Dropdowns */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: rgba(2, 6, 23, 0.1) !important;
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
    border-radius: 15px !important;
    box-shadow: 
        0 25px 80px rgba(2, 6, 23, 0.9),
        0 12px 40px rgba(52, 211, 153, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(52, 211, 153, 0.1) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.75rem;
    overflow: hidden;
    padding: 0.75rem 0;
    z-index: 10002;
    pointer-events: none;
}

/* Dropdown hover with delay */
.nav-item:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 0.1s;
}

/* Add delay before hiding dropdown */
.nav-item:not(:hover) .dropdown-menu {
    transition-delay: 0.3s;
}

.dropdown-item {
    display: block;
    padding: 0.875rem 1.5rem !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin: 0.25rem 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent !important;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.1), transparent);
    transition: left 0.6s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(16, 185, 129, 0.15)) !important;
    color: #34d399 !important;
    transform: translateX(6px) scale(1.02);
    box-shadow: 
        0 8px 30px rgba(52, 211, 153, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.4);
    backdrop-filter: blur(20px) saturate(150%);
}

.dropdown-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, #34d399, #10b981);
    border-radius: 2px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover::after {
    height: 70%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(135deg, 
        rgba(52, 211, 153, 0.2) 0%, 
        rgba(16, 185, 129, 0.15) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 25px rgba(52, 211, 153, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    pointer-events: auto;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, 
        rgba(52, 211, 153, 0.3) 0%, 
        rgba(16, 185, 129, 0.25) 100%);
    border-color: rgba(52, 211, 153, 0.4);
    transform: scale(1.05);
    box-shadow: 
        0 8px 30px rgba(52, 211, 153, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 4rem 0 2rem 0;
    margin-top: 4rem;
    border-top: 2px solid #10b981;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #10b981;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid #10b981;
    padding-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: #10b981;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.footer-bottom a {
    color: #10b981;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .navbar {
        padding: 1rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .brand-section {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .school-logo {
        height: 2rem;
    }

    .navbar-toggler {
        display: block !important;
        background: transparent !important;
        border: 1px solid rgba(52, 211, 153, 0.3) !important;
        padding: 0.5rem 0.75rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-collapse {
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 0.95) 0%, 
            rgba(30, 41, 59, 0.9) 50%, 
            rgba(15, 23, 42, 0.98) 100%);
        backdrop-filter: blur(30px) saturate(220%);
        -webkit-backdrop-filter: blur(30px) saturate(220%);
        border: 1px solid rgba(52, 211, 153, 0.25);
        border-radius: 15px;
        margin-top: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        margin: 0.25rem 0;
    }

    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-top: 0.5rem;
        margin-left: 1rem;
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 0.8) 0%, 
            rgba(30, 41, 59, 0.75) 100%) !important;
        box-shadow: 
            0 8px 25px rgba(15, 23, 42, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
        z-index: 9999;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Ensure all links are clickable */
a {
    pointer-events: auto;
    cursor: pointer;
}