/* =========================================
   MENTAL HEALTH CLUB - MASTER THEME & PROFILES
========================================= */

/* 1. DEFAULT THEME (Calm Slate & Light Blue) */
:root {
    --bg-light: #F8FAFC;       
    --text-dark: #334155;      
    --text-muted: #64748B;
    --primary-blue: #0EA5E9;   
    --primary-hover: #0284C7;
    --safe-green: #10B981;     
    --urgent-red: #E11D48;     
    --card-bg: #FFFFFF;
    --border-color: #F1F5F9;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* 2. NIGHT/DARK THEME (Safe, low-glare dark mode) */
[data-theme="night"] {
    --bg-light: #0F172A;       
    --text-dark: #F8FAFC;      
    --text-muted: #94A3B8;     
    --primary-blue: #38BDF8;   
    --primary-hover: #7DD3FC;
    --card-bg: #1E293B;        
    --border-color: #334155;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* 3. WARM/COZY THEME (Earthy, grounding tones) */
[data-theme="warm"] {
    --bg-light: #FAF8F5;       
    --text-dark: #4338CA;      
    --text-muted: #78716C;     
    --primary-blue: #D97706;   
    --primary-hover: #B45309;
    --card-bg: #FFFFFF;
    --border-color: #E7E5E4;
}

/* --- BASE STYLING (Applies to all themes) --- */
body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease; /* Makes theme switching smooth */
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.2s ease;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- NAVIGATION --- */
nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-links a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* Specific button for urgent help */
.btn-urgent {
    background-color: var(--urgent-red);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.btn-urgent:hover {
    background-color: #BE123C;
}

/* --- MAIN SECTIONS --- */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    /* Removed the hard-coded white gradient so themes work properly */
    background-color: transparent; 
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* --- CARDS & CONTENT --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card h3 {
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.card p {
    color: var(--text-dark);
}

/* --- HELP SECTION SPECIFIC --- */
.crisis-box {
    /* Using a subtle opacity trick so it matches any theme */
    background-color: rgba(225, 29, 72, 0.05); 
    border-left: 4px solid var(--urgent-red);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
}

.crisis-box h2 {
    color: var(--urgent-red);
    margin-bottom: 0.5rem;
}

.crisis-box p, .crisis-box ul {
    color: var(--text-dark);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}