/* Custom Animations for Molecular Background */

.molecule-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: var(--bg-primary);
    transition: background 0.5s ease;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.5;
    animation: float infinite ease-in-out;
}

/* Unified page section background used across about/manufacturing/platform/pipeline/news */
.bg-page {
    background-color: var(--bg-primary) !important;
}

/* Apply to each top-level section to keep patterns and transitions consistent */
.page-section {
    background-color: var(--bg-primary) !important;
    background-image: linear-gradient(180deg, rgba(246,248,251,0.7) 0%, rgba(246,248,251,0.9) 100%);
    transition: background-color 0.45s ease, background-image 0.45s ease;
    border-color: rgba(10,26,63,0.04) !important;
}

/* Allow explicitly dark sections to opt out */
.page-section.section-dark {
    background-image: none !important;
}

/* Subtle section connector to smooth borders between stacked sections */
.page-section + .page-section {
    margin-top: 0;
    border-top: 1px solid rgba(10,26,63,0.03);
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--orb-1);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--orb-2);
    bottom: 5%;
    right: -5%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--orb-3);
    top: 40%;
    left: 40%;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, -60px); }
    66% { transform: translate(-30px, 30px); }
}

/* Typography Enhancements */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.5s ease;
}

:lang(cn) body {
    font-family: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
}

/* Theme Variables */
:root {
    /* Default Light Theme (Clinical Tech) */
    --bg-primary: #f6f8fb; /* Cool pale grey-blue */
    --text-primary: #0a1a3f; /* Deep Navy */
    --card-bg: #FFFFFF;
    --card-border: #e2e8f0;
    --card-text: #4b5563;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-border: rgba(10, 26, 63, 0.05);
    
    /* Orb Colors for Light (Adjusted for light bg) */
    --orb-1: #e5efff; 
    --orb-2: #dbeafe;
    --orb-3: #f0f9ff;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Utilities */
.glass-panel {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.theme-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    border-radius: 16px; /* Rounded 2xl equivalent */
}

/* Deep Theme Overrides Removed */

/* Dropdown Menu Styles */
.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--card-bg);
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.5rem 0;
    z-index: 100;
}

.theme-deep .dropdown-menu {
    background: #002280; /* Slightly darker than main bg for dropdown */
    border: 1px solid rgba(255,255,255,0.2);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.15s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--text-primary); 
}

.theme-deep .dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Mobile Menu Transitions */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.open {
    max-height: 100vh; /* Adjust as needed */
    border-top: 1px solid var(--nav-border);
    background: var(--bg-primary);
}

/* --- Hero Section Slider Animation --- */
.slider-track {
    width: 400%; /* 4 slides, so 400% width */
    animation: slider-scroll 20s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-item {
    width: 25%; /* 100% / 4 slides = 25% */
}

@keyframes slider-scroll {
    0%, 20% { transform: translateX(0); }
    25%, 45% { transform: translateX(-25%); }
    50%, 70% { transform: translateX(-50%); }
    75%, 95% { transform: translateX(-75%); }
    100% { transform: translateX(0); } /* Jump back to start */
}

/* Roadmap stage states */
.stage-completed {
    background-color: #ADD8E6 !important; /* Completed: light blue */
    color: #0a1a3f !important; /* Dark text on light blue */
    border-color: #ADD8E6 !important;
}
.stage-completed .text-slate-400,
.stage-completed .text-slate-500,
.stage-completed .text-clinical-600 {
    color: #0a1a3f !important;
}
.stage-current {
    background-color: #ADD8E6 !important; /* Current: same light blue */
    color: #0a1a3f !important; /* Dark text on light blue */
    border-color: #ADD8E6 !important;
    font-weight: 700 !important; /* Bold current stage label */
}
.stage-current .text-sm,
.stage-current .text-xs,
.stage-current .text-slate-400,
.stage-current .text-slate-500,
.stage-current .text-clinical-600 {
    color: #0a1a3f !important;
    font-size: inherit !important; /* Ensure font inherits correctly */
}
.stage-upcoming {
    background-color: #f0f2f5 !important; /* Grey-white background */
    color: #0a1a3f !important; /* Dark blue text */
    border-color: #e5e7eb !important;
}
.stage-upcoming .text-slate-400,
.stage-upcoming .text-slate-500,
.stage-upcoming .text-clinical-600 {
    color: #0a1a3f !important;
}
