/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --primary-color: #1a4d80;
    --secondary-color: #333333;
    --accent-color: #ff6b35;
    --text-color: #1f2937;
    --light-bg: #f8f9fa;
    --white: #ffffff;
}

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

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.header-content {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.logo {
    display: block;
    height: 35px;
    width: 162px;
}

.logo svg {
    height: 100%;
    width: 100%;
}

/* ==========================================================================
   Account Section
   ========================================================================== */
.account-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-menu {
    display: none;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.user-menu.active {
    display: flex;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: var(--light-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.user-info.open .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    display: none;
    margin-top: 0.5rem;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-color);
}

.dropdown-item:hover {
    background-color: var(--light-bg);
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.logout-item {
    color: #dc3545;
}

.logout-item:hover {
    background-color: #fef2f2;
}

.sign-in-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sign-in-btn:hover {
    background-color: #0f3a66;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 77, 128, 0.1);
}

.login-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #0f3a66;
}

.login-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(162, 166, 171, 0.8), rgba(174, 185, 196, 0.8)),
                url('https://www.relieffactor.com/_next/static/media/homepage-hero-1.2e91ecef.webp');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--white);
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero-content {
    margin: 0 auto;
    max-width: 800px;
}

.hero h1 {
    color: var(--primary-color);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero p {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Support Info Section
   ========================================================================== */
.support-info {
    background-color: var(--white);
    padding: 4rem 0;
}

.info-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-top: 3rem;
}

.info-card {
    background-color: var(--light-bg);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Chat Section
   ========================================================================== */
.chat-section {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

.chat-container {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 800px;
    min-height: 500px;
    padding: 2rem;
}

.chat-header {
    align-items: center;
    border-bottom: 1px solid var(--light-bg);
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.chat-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.powered-by {
    align-items: center;
    color: var(--secondary-color);
    display: flex;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.powered-by img {
    height: 24px;
    width: auto;
}

.chat-placeholder {
    align-items: center;
    color: #6b7280;
    display: flex;
    font-size: 1.1rem;
    height: calc(100% - 60px);
    justify-content: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .logo {
        width: 150px;
    }

    .account-section {
        display: none;
    }

    .user-menu {
        display: none !important;
    }

    .user-menu.active {
        display: none !important;
    }
}