/* Critical CSS for immediate rendering */
:root {
    --primary-color: #00B4D8;
    --primary-dark: #0077B6;
    --secondary-color: #FF6B35;
    --background-primary: #0A1929;
    --background-secondary: #132F4C;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: min(95%, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background: var(--background-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.site-logo {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
}

/* Navigation Container */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.hero {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 2rem;
}

.chat-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
}

.chat-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-logo {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background: #ffffff; /* FIX: Explicitly set background to white */
    color: #0A1929; /* FIX: Set text to a dark color for visibility */
    font-size: 1rem;
}

.chat-form button {
    padding: 0.75rem;
    background: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chat-form button:hover {
    background: var(--primary-dark);
}

/* Loading animation */
.loading-molecule {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    opacity: 0; /* Start hidden */
    pointer-events: none; /* Start non-interactive */
}

.loading-molecule.show {
    opacity: 1;
    pointer-events: auto;
}

.loading-molecule.hidden {
    opacity: 0;
    pointer-events: none;
}

.molecule {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container { 
        padding: 0 1rem; 
        width: 100%;
    }
    
    .hero { 
        padding: 100px 0 60px; 
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .hero-logo { 
        height: 60px; 
        margin-bottom: 1.5rem;
    }
    
    .site-logo { 
        height: 32px; 
    }
    
    .chatbot-logo { 
        height: 32px; 
    }

    .chat-container {
        margin: 0 1rem;
        max-width: calc(100% - 2rem);
    }

    .chat-messages {
        max-height: 300px;
        padding: 0.75rem;
    }

    .chat-input-container {
        padding: 0.75rem;
    }

    .chat-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .chat-form input {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 0.75rem;
    }

    .chat-form button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 0.75rem;
    }

    /* FIX: START MOBILE NAVIGATION STYLES */
    /* All mobile navigation styles have been moved to navigation.css to avoid conflicts. */
    /* FIX: END MOBILE NAVIGATION STYLES */
}

/* Small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 90px 0 50px;
    }

    .hero-text h1 {
        font-size: clamp(1.5rem, 10vw, 2rem);
    }

    .hero-text p {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    .chat-container {
        margin: 0 0.5rem;
        border-radius: 0.75rem;
    }

    .chat-header {
        padding: 0.75rem;
    }

    .chat-messages {
        max-height: 250px;
        padding: 0.5rem;
    }

    .chat-input-container {
        padding: 0.5rem;
    }

    /* FIX: All hamburger navigation styles moved to navigation.css */
    /* No mobile navigation styles in main.css to avoid conflicts */
}

@media (min-width: 769px) {
  header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .nav-container { /* ensure inner container also spaced */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
  }
  .logo { flex: 0 0 auto; }
  .desktop-nav { flex: 1 1 auto; }
  .desktop-nav ul { justify-content: flex-end; flex-wrap: wrap; }
}
