:root {
    /* "Friendly" Color Schema */
    --bg-color: #f7f9fc;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --accent-color: #38b2ac;
    /* Teal-400 - Friendly, inviting */
    --accent-hover: #319795;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --white: #ffffff;
    --shadow-soft: 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);

    --font-main: 'Outfit', sans-serif;
    --transition-speed: 0.2s;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
}

.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* Nav Sections */
.nav-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-center {
    justify-content: center;
}

.nav-right {
    justify-content: flex-end;
}

/* Logo */
.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

/* Nav Items */
.nav-item {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-item:hover {
    color: var(--accent-color);
    background: rgba(56, 178, 172, 0.1);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--white);
    min-width: 100%;
    border-radius: 12px;
    padding: 0.5rem;
    z-index: 10;
    flex-direction: column;
    margin-top: 0.5rem;
}

/* Invisible bridge to prevent closing when moving cursor over the gap */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: transparent;
}

.dropdown:hover .dropdown-content {
    display: flex;
}

.dropdown-content a {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: right;
}

.dropdown-content a:hover {
    background: rgba(56, 178, 172, 0.1);
    color: var(--accent-color);
}

/* Buttons */
.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(56, 178, 172, 0.4);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    /* Header height */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.main-content.wide-layout {
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem;
}

.hero-section {
    text-align: center;
    max-width: 800px;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chat-widget.collapsed {
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.chat-toggle-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f0f4f8;
}

.chat-message {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.bot {
    background: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-message.user {
    background: var(--accent-color);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    background: var(--white);
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: var(--accent-color);
}

#chat-send {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

#chat-send:hover {
    transform: scale(1.05);
}

/* Chat Floating Button */
.chat-open-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    color: var(--accent-color);
}

.chat-open-btn:hover {
    transform: scale(1.1);
}

.chat-avatar-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.hidden {
    display: none !important;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
