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

:root {
    --brand-primary: #2d5a27;
    --brand-secondary: #4a7c43;
    --brand-accent: #6b9b37;
    --brand-light: #e8f0e6;
    --brand-dark: #1e3d1a;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Site Body - for main website pages */
.site-body {
    background: var(--white);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--gray-200);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--brand-primary);
}

.header-cta {
    display: inline-block;
    background: var(--brand-primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s;
}

.header-cta:hover {
    background: var(--brand-secondary);
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 24px;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav .mobile-cta {
    background: var(--brand-primary);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 6px;
    text-align: center;
    margin-top: 8px;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    color: var(--white);
    padding: 160px 0 100px;
    text-align: center;
}

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

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

.section-light {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-item {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== SERVICES SECTION ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--brand-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    color: var(--brand-primary);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--brand-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-item h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.section-cta {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-cta .btn-primary {
    background: var(--white);
    color: var(--brand-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.section-cta .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--brand-dark);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    height: 48px;
    width: auto;
}

.footer-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-brand p {
    opacity: 0.7;
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.footer-column a {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-column a:hover {
    opacity: 1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.6;
}

.staff-login {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.staff-login:hover {
    opacity: 0.8;
}

/* ===== LEGAL PAGES ===== */
.legal-page {
    padding-top: 100px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 12px;
}

.legal-content .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.legal-content ul {
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav,
    .header-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

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

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-item {
        padding: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }
}

/* ===== LEGACY LANDING PAGE (for backwards compatibility) ===== */
.landing-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
}

.landing-content {
    background: white;
    border-radius: 16px;
    padding: 48px;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.logo-container {
    margin-bottom: 16px;
}

.logo {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.landing-content h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--brand-primary);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 24px;
}

.description {
    font-size: 1rem;
    color: #555;
    margin-bottom: 32px;
    line-height: 1.8;
}

.info-section {
    margin-top: 48px;
    text-align: left;
    padding: 24px;
    background: var(--brand-light);
    border-radius: 8px;
}

.info-section h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--brand-primary);
}

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

.info-section li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 0.95rem;
}

.info-section li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--brand-accent);
    font-weight: bold;
}

.admin-link {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.admin-link a {
    color: #999;
    text-decoration: none;
    font-size: 0.85rem;
}

.admin-link a:hover {
    color: var(--brand-primary);
}

/* ===== CHAT PAGE STYLES ===== */
.chat-body {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    min-height: 100vh;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

.chat-header {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-header-info h1 {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.chat-header-info .status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
}

.back-link:hover {
    background: rgba(255,255,255,0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f8f9fa;
}

.message {
    margin-bottom: 16px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.message.assistant .message-content p {
    margin: 0;
}

/* System messages for phone number prompt etc */
.message.system {
    justify-content: center;
}

.message.system .message-content {
    background: var(--brand-light);
    color: var(--brand-dark);
    border: 1px solid var(--brand-accent);
    text-align: center;
    max-width: 90%;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-accent);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chat Input */
.chat-input-container {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--brand-secondary);
}

.send-button {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-primary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.4);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error message */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

/* Responsive Design for Chat */
@media (max-width: 768px) {
    .landing-content {
        padding: 32px 24px;
    }

    .landing-content h1 {
        font-size: 2rem;
    }

    .chat-container {
        box-shadow: none;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-header-info h1 {
        font-size: 1rem;
    }
}
