/* --- 1. Variables & Base --- */
:root {
    --primary: #EA580C; /* orange-600 */
    --primary-dark: #C2410C; /* orange-700 */
    --secondary: #111827; /* gray-900 */
    --dark: #111827; 
    --light: #F9FAFB;
    --danger: #EF4444;
    --gray: #8D99AE;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.hero-gradient {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('https://images.unsplash.com/photo-1590059536037-77298650f96d?auto=format&fit=crop&q=80&w=1920');
    background-size: cover;
    background-position: center;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- 2. Header & Navigation --- */
header {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: 0.3s;
}

header .container {
    display: flex;
}

header nav ul {
    display: flex;
    gap: 1.5rem;
}

header nav ul li a.active {
    color: var(--primary);
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* --- 3. Hero Section --- */
.hero {
    background: linear-gradient(rgba(38, 70, 83, 0.8), rgba(38, 70, 83, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.highlight { color: var(--secondary); }
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2rem; }

/* --- 4. Section Spacing --- */
section { padding: 4rem 0; }

/* --- 3. Layout Components --- */
.service-grid, .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.category-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    padding: 1.5rem;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.service-badge {
    background: var(--primary);
    color: white;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

/* --- 5. Forms & Alerts --- */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- 6. Footer --- */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4, .footer-col h3 { margin-bottom: 1.2rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Buttons --- */
.btn-primary, .btn-submit {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
}

#chatMessages {
    height: 250px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
}
/* Chatbot typing indicator */
.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* --- 5. Forms & Tables --- */
input, select, textarea, button {
    font-family: inherit;
    padding: 0.6rem;
    margin: 0.3rem 0;
    border-radius: 8px;
    border: 1px solid #ccc;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: var(--primary-dark);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: var(--dark);
    color: white;
}

/* --- 6. Admin Layout --- */
.admin-container {
    display: flex;
}

.sidebar {
    width: 250px;
    background: var(--dark);
    color: white;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.sidebar a {
    color: white;
    display: block;
    padding: 0.8rem;
    text-decoration: none;
    border-radius: 8px;
}

.sidebar a:hover {
    background: var(--primary);
}

.admin-content {
    flex: 1;
    padding: 2rem;
}

/* --- 7. Responsive --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }

    header nav.nav-active {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }
    .admin-container {
        flex-direction: column;
    }
}