/* ============================================================
   AnxietyClinics.com — Main Stylesheet
   Aesthetic: Calm, professional, trustworthy. Warm neutrals
   with a deep teal accent. Editorial typography.
   ============================================================ */

/* --- Variables --- */
:root {
    /* Primary palette — calming teal */
    --teal-900: #0a3d3d;
    --teal-800: #0d4f4f;
    --teal-700: #116666;
    --teal-600: #158080;
    --teal-500: #1a9a9a;
    --teal-400: #3dbdbd;
    --teal-100: #d4f1f1;
    --teal-50:  #edf9f9;

    /* Warm neutrals */
    --sand-50:  #faf9f7;
    --sand-100: #f3f1ed;
    --sand-200: #e8e4dd;
    --sand-300: #d5cfc4;
    --sand-400: #b5ad9e;
    --sand-500: #8f8577;
    --sand-600: #6b6358;
    --sand-700: #4a4439;
    --sand-800: #2e2a23;
    --sand-900: #1a1714;

    /* Accent */
    --coral: #d4755a;
    --coral-light: #f0c4b8;

    /* Functional */
    --success: #2d7a4f;
    --success-bg: #e8f5ed;
    --warning: #b8860b;
    --warning-bg: #fef9e7;
    --error: #c0392b;
    --error-bg: #fde8e6;
    --info: #2471a3;
    --info-bg: #e8f0f8;

    /* Typography */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-xl: 0 16px 50px rgba(0,0,0,0.12);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--sand-800);
    background: var(--sand-50);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal-500); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--sand-900);
    line-height: 1.2;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: var(--space-md); }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Header --- */
.site-header {
    background: white;
    border-bottom: 1px solid var(--sand-200);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--sand-900);
}
.logo-mark {
    background: var(--teal-700);
    color: white;
    font-family: var(--font-display);
    font-weight: 800;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}
.logo-text {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--sand-800);
}
.logo-accent { color: var(--teal-700); }

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sand-600);
    transition: color 0.2s;
}
.main-nav a:hover { color: var(--sand-900); }
.nav-cta-subtle { color: var(--teal-700) !important; }
.nav-cta {
    background: var(--teal-700);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.nav-cta:hover { background: var(--teal-600); color: white !important; }

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--sand-800);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary {
    background: var(--teal-700);
    color: white;
}
.btn-primary:hover { background: var(--teal-600); color: white; }
.btn-secondary {
    background: white;
    color: var(--teal-700);
    border: 2px solid var(--teal-700);
}
.btn-secondary:hover { background: var(--teal-50); color: var(--teal-700); }
.btn-coral {
    background: var(--coral);
    color: white;
}
.btn-coral:hover { background: #c06a52; color: white; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* --- Forms --- */
.form-group {
    margin-bottom: var(--space-lg);
}
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
    color: var(--sand-700);
}
.form-group .hint {
    font-size: 0.8rem;
    color: var(--sand-500);
    margin-top: var(--space-xs);
}
.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--sand-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--sand-800);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px var(--teal-100);
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 400;
    cursor: pointer;
    padding: var(--space-xs) 0;
}

/* --- Flash Messages --- */
.flash {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    margin: var(--space-md) auto;
    max-width: var(--container-max);
    font-weight: 500;
    font-size: 0.9rem;
}
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error { background: var(--error-bg); color: var(--error); }
.flash-warning { background: var(--warning-bg); color: var(--warning); }
.flash-info { background: var(--info-bg); color: var(--info); }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 60%, var(--teal-600) 100%);
    color: white;
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
}
.hero h1 {
    color: white;
    margin-bottom: var(--space-md);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
}
.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

/* --- Search Box --- */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    max-width: 700px;
    margin: 0 auto;
}
.search-box-row {
    display: flex;
    gap: var(--space-sm);
}
.search-box-row .form-control {
    flex: 1;
    border-color: var(--sand-200);
}
.search-box-row .btn {
    white-space: nowrap;
}
.search-options {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}
.search-options label {
    font-size: 0.85rem;
    color: var(--sand-600);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.search-options select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--sand-700);
}

/* --- Section Patterns --- */
.section {
    padding: var(--space-4xl) 0;
}
.section-alt {
    background: white;
}
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto var(--space-2xl);
}
.section-header p {
    color: var(--sand-500);
    font-size: 1.05rem;
    margin-top: var(--space-sm);
}

/* --- Listing Cards --- */
.listings-grid {
    display: grid;
    gap: var(--space-lg);
}
.listing-card {
    background: white;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    gap: var(--space-lg);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.listing-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--sand-300);
}
.listing-card-photo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--sand-100);
    flex-shrink: 0;
}
.listing-card-body { flex: 1; }
.listing-card-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}
.listing-card-name a { color: var(--sand-900); }
.listing-card-name a:hover { color: var(--teal-700); }
.listing-card-credentials {
    color: var(--sand-500);
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}
.listing-card-location {
    color: var(--sand-600);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.listing-card-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}
.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--teal-50);
    color: var(--teal-700);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}
.tag-unclaimed {
    background: var(--warning-bg);
    color: var(--warning);
    font-size: 0.7rem;
}
.listing-card-bio {
    color: var(--sand-600);
    font-size: 0.9rem;
    line-height: 1.5;
}
.listing-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--sand-100);
}
.listing-card-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.8rem;
    color: var(--sand-500);
}
.listing-card-distance {
    font-size: 0.85rem;
    color: var(--teal-700);
    font-weight: 500;
}

/* --- Individual Listing Page --- */
.listing-hero {
    background: white;
    border-bottom: 1px solid var(--sand-200);
    padding: var(--space-2xl) 0;
}
.listing-hero-inner {
    display: flex;
    gap: var(--space-2xl);
    align-items: flex-start;
}
.listing-photo-large {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background: var(--sand-100);
    flex-shrink: 0;
}
.listing-hero-info h1 {
    margin-bottom: var(--space-xs);
}
.listing-hero-info .credentials {
    font-size: 1.1rem;
    color: var(--sand-500);
    margin-bottom: var(--space-md);
}
.listing-contact-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}
.listing-body {
    padding: var(--space-2xl) 0;
}
.listing-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-2xl);
}
.listing-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}
.sidebar-card {
    background: white;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}
.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--sand-100);
}

/* --- State / City Browse --- */
.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
}
.states-grid a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: white;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-sm);
    color: var(--sand-700);
    font-size: 0.9rem;
    transition: all 0.15s;
}
.states-grid a:hover {
    border-color: var(--teal-400);
    background: var(--teal-50);
    color: var(--teal-700);
}
.states-grid .count {
    font-size: 0.75rem;
    color: var(--sand-400);
    font-weight: 500;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-sm);
}

/* --- Map --- */
.map-container {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--sand-200);
    margin-bottom: var(--space-lg);
}

/* --- Dashboard --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-2xl);
    padding: var(--space-2xl) 0;
}
.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.dashboard-nav a {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--sand-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}
.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: var(--teal-50);
    color: var(--teal-700);
}
.dashboard-content {
    background: white;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--sand-100);
}

/* --- Stat Cards --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}
.stat-card {
    background: var(--sand-50);
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}
.stat-card .stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--teal-700);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--sand-500);
    margin-top: var(--space-xs);
}

/* --- Auth Pages --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: var(--space-2xl) var(--space-lg);
}
.auth-card {
    background: white;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-md);
}
.auth-card h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: var(--space-xs);
}
.auth-card .subtitle {
    text-align: center;
    color: var(--sand-500);
    margin-bottom: var(--space-2xl);
}
.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--sand-100);
    font-size: 0.9rem;
    color: var(--sand-500);
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    max-width: 750px;
    margin: 0 auto;
}
.pricing-card {
    background: white;
    border: 2px solid var(--sand-200);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    transition: border-color 0.2s;
}
.pricing-card.featured {
    border-color: var(--teal-500);
    position: relative;
}
.pricing-card.featured::before {
    content: 'Best Value';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal-700);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
.pricing-amount {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--sand-900);
    margin: var(--space-md) 0;
}
.pricing-amount span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--sand-500);
}
.pricing-features {
    text-align: left;
    list-style: none;
    margin: var(--space-xl) 0;
}
.pricing-features li {
    padding: var(--space-sm) 0;
    font-size: 0.9rem;
    color: var(--sand-600);
    border-bottom: 1px solid var(--sand-100);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: 0.85rem;
    color: var(--sand-500);
}
.breadcrumbs a { color: var(--sand-500); }
.breadcrumbs a:hover { color: var(--teal-700); }
.breadcrumbs .sep { margin: 0 var(--space-sm); }

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-2xl);
}
.page-link {
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--sand-300);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--sand-600);
    background: white;
}
.page-link:hover { background: var(--sand-100); color: var(--sand-800); }
.page-link.active {
    background: var(--teal-700);
    color: white;
    border-color: var(--teal-700);
}
.page-ellipsis {
    padding: 0.45rem 0.4rem;
    color: var(--sand-400);
}

/* --- Footer --- */
.site-footer {
    background: var(--sand-900);
    color: var(--sand-400);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-4xl);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}
.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: var(--space-md);
    color: var(--sand-500);
}
.footer-brand .logo-mark { background: var(--teal-600); }
.footer-brand .logo-text { color: var(--sand-300); }
.footer-brand .logo-accent { color: var(--teal-400); }
.footer-links h4 {
    color: var(--sand-200);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}
.footer-links a {
    display: block;
    color: var(--sand-500);
    font-size: 0.85rem;
    padding: var(--space-xs) 0;
}
.footer-links a:hover { color: var(--teal-400); }
.footer-crisis {
    background: rgba(255,255,255,0.05);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2xl);
    font-size: 0.85rem;
    text-align: center;
}
.footer-crisis strong { color: var(--sand-200); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: var(--space-lg);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}
.footer-disclaimer { color: var(--sand-600); }

/* --- Responsive --- */
@media (max-width: 900px) {
    .listing-layout { grid-template-columns: 1fr; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .listing-hero-inner { flex-direction: column; align-items: center; text-align: center; }
    .listing-contact-actions { justify-content: center; }
}

@media (max-width: 700px) {
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--sand-200);
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
    }
    .mobile-toggle { display: flex; }
    
    .search-box-row { flex-direction: column; }
    .search-options { flex-direction: column; align-items: stretch; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .listing-card { flex-direction: column; }
    .listing-card-photo { width: 80px; height: 80px; }
    .hero { padding: var(--space-2xl) 0; }
    .pricing-grid { grid-template-columns: 1fr; }
}
