/* FAQ Template - Mobile-First Accordion Index */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #10b981;
    --secondary: #059669;
    --accent: #14b8a6;
    --text: #111827;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --border: #e5e7eb;
}

body { 
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6; 
    background: var(--bg);
    min-height: 100vh; 
    padding: 0;
}

/* Gradient header background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40vh;
    background: linear-gradient(180deg, 
        rgba(16, 185, 129, 0.08) 0%, 
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.container { 
    max-width: 800px; 
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Compact mobile header */
header {
    padding: 20px 16px 24px;
    text-align: center;
    position: relative;
}

h1 { 
    font-size: 1.875rem;
    margin-bottom: 8px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

h1::before {
    content: "💬";
    font-size: 2rem;
}

.subtitle {
    font-size: 0.9375rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 20px;
}

/* Inline stats */
.stats {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border-radius: 20px;
    font-size: 0.875rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.stat-value {
    font-weight: 800;
    color: var(--primary);
    font-size: 1rem;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

/* Search-style nav container */
nav {
    padding: 0 16px 20px;
}

/* Sticky search bar (decorative) */
.search-bar {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 12px;
    z-index: 10;
}

.search-bar::before {
    content: "🔍";
    font-size: 1.25rem;
}

.search-bar::after {
    content: "Search questions...";
    color: var(--text-light);
    font-size: 0.9375rem;
    flex: 1;
}

ul { 
    list-style: none; 
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

li { 
    margin: 0;
}

/* Accordion-style question cards */
a { 
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    text-decoration: none; 
    color: var(--text); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    font-size: 0.9375rem;
    font-weight: 500;
    min-height: 68px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Number badge */
.number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.875rem;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Expand indicator */
a::after {
    content: "›";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
    color: var(--text-light);
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
}

/* Touch feedback */
a:active {
    transform: scale(0.98);
}

/* Hover/Focus states */
a:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    background: linear-gradient(90deg, 
        white 0%, 
        rgba(16, 185, 129, 0.02) 100%);
}

a:hover .number {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

a:hover::after {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-50%) translateX(2px);
}

/* Bottom safe area */
footer {
    margin: 20px 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8125rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

footer p {
    margin-bottom: 8px;
    line-height: 1.5;
}

footer strong {
    color: var(--text);
}

.disclaimer {
    margin-top: 16px;
    padding: 12px;
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    text-align: left;
    color: var(--text-light);
    line-height: 1.5;
}

/* Staggered entrance animation */
li {
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

li:nth-child(1) { animation-delay: 0.05s; }
li:nth-child(2) { animation-delay: 0.1s; }
li:nth-child(3) { animation-delay: 0.15s; }
li:nth-child(4) { animation-delay: 0.2s; }
li:nth-child(5) { animation-delay: 0.25s; }
li:nth-child(6) { animation-delay: 0.3s; }

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

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* iOS safe area support */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Desktop enhancements */
@media (min-width: 768px) {
    header {
        padding: 40px 24px 32px;
    }
    
    h1 {
        font-size: 2.75rem;
        margin-bottom: 12px;
    }
    
    .subtitle {
        font-size: 1.125rem;
        margin-bottom: 28px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat {
        padding: 10px 18px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    nav {
        padding: 0 24px 24px;
    }
    
    .search-bar {
        padding: 14px 20px;
        margin-bottom: 20px;
        top: 20px;
    }
    
    ul {
        gap: 12px;
    }
    
    a {
        padding: 20px;
        font-size: 1rem;
        min-height: 76px;
    }
    
    .number {
        min-width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    a::after {
        right: 20px;
        width: 32px;
        height: 32px;
        font-size: 2rem;
    }
    
    footer {
        margin: 24px 24px 40px;
        padding: 28px;
        font-size: 0.9375rem;
    }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f9fafb;
        --text-light: #d1d5db;
        --bg: #111827;
        --border: #374151;
    }
    
    body::before {
        background: linear-gradient(180deg, 
            rgba(16, 185, 129, 0.1) 0%, 
            transparent 100%);
    }
    
    a, .stat, .search-bar, footer {
        background: #1f2937;
        border-color: var(--border);
    }
    
    a:hover {
        background: linear-gradient(90deg, 
            #1f2937 0%, 
            rgba(16, 185, 129, 0.08) 100%);
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
