/* ═══════════════════════════════════════════════════
   DermoBrain.com Design System
   Medical-grade dermatology encyclopedia
   ═══════════════════════════════════════════════════ */

/* ─── CSS Custom Properties (Light Mode) ─────────── */
:root {
    /* Primary - Medical Teal */
    --primary: #1A6B54;
    --primary-light: #238C6E;
    --primary-dark: #145543;
    --primary-50: #E8F5F0;
    --primary-100: #C6E8DC;

    /* Accent - Warm Coral for CTAs */
    --accent: #E8734A;
    --accent-light: #F09070;
    --accent-dark: #D45E35;
    --accent-hover: #D45E35;

    /* Pillar Colors */
    --pillar-medical: #1A6B54;
    --pillar-surgical: #2E5090;
    --pillar-cosmetic: #9B4DCA;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #059669;
    --warning: #D97706;
    --error: #DC2626;
    --info: #2563EB;

    /* Layout */
    --bg: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-card: var(--white);
    --text: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border: var(--gray-200);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --container-narrow: 800px;
    --header-height: 72px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: 0.2s ease;
}

/* ─── Dark Mode ──────────────────────────────────── */
[data-theme="dark"] {
    --bg: #0F1419;
    --bg-secondary: #1A1F2E;
    --bg-card: #1E2433;
    --text: #E8ECF1;
    --text-secondary: #A0AAB8;
    --text-muted: #6B7A8D;
    --border: #2A3142;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.35);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
    --primary-50: #0E2A22;
    --primary-100: #133D30;
    --gray-100: #1A1F2E;
    --gray-200: #2A3142;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}
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); }

/* ─── Layout ─────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Header & Navigation ────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.92);
    height: var(--header-height);
}
[data-theme="dark"] .site-header {
    background: rgba(15,20,25,0.92);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    color: var(--text);
    font-weight: 400;
}
.logo:hover { color: var(--primary); }
.logo-icon { font-size: 1.6rem; }
.logo-text strong { color: var(--primary); font-weight: 800; }

.main-nav { display: flex; align-items: center; }
.nav-list {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}
.nav-item { position: relative; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--primary);
    background: var(--primary-50);
}
.cta-link {
    color: var(--accent) !important;
    font-weight: 600;
}
.cta-link:hover { color: var(--accent-dark) !important; background: rgba(232,115,74,0.08) !important; }

.dropdown-arrow { transition: transform var(--transition); }
.has-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.5rem;
    z-index: 100;
}
.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}
.dropdown-menu a:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Dark Mode Toggle */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.dark-mode-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background: var(--primary-light); color: var(--white); }

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* ─── Hero Section ───────────────────────────────── */
.hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg) 60%);
    text-align: center;
}
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg) 60%);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 800;
}
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-search {
    display: flex;
    max-width: 560px;
    margin: 0 auto 2.5rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    outline: none;
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font-sans);
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 1rem 1.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.hero-stats .stat {
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.hero-stats .stat strong {
    color: var(--primary);
    font-size: 1.1rem;
}

/* ─── Section Styles ─────────────────────────────── */
.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

/* ─── Three Pillars ──────────────────────────────── */
.pillars-section {
    padding: 5rem 0;
}
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.pillar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    color: var(--text);
}
.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.pillar-medical:hover { border-color: var(--pillar-medical); }
.pillar-surgical:hover { border-color: var(--pillar-surgical); }
.pillar-cosmetic:hover { border-color: var(--pillar-cosmetic); }

.pillar-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.pillar-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.pillar-card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; }
.pillar-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* ─── Article Cards ──────────────────────────────── */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
}
.article-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.article-card-body {
    padding: 1.25rem;
}
.article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.article-card-body h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.article-card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.featured-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

/* ─── CTA Banners ────────────────────────────────── */
.cta-banner {
    padding: 4rem 0;
    text-align: center;
}
.cta-quiz {
    background: linear-gradient(135deg, var(--accent) 0%, #E85D3A 100%);
    color: var(--white);
}
.cta-quiz h2, .cta-quiz p { color: var(--white); }
.cta-quiz .btn-accent {
    background: var(--white);
    color: var(--accent);
}
.cta-quiz .btn-accent:hover { background: var(--gray-100); color: var(--accent-dark); }

.cta-directory {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}
.cta-directory h2, .cta-directory p { color: var(--white); }
.cta-directory .btn-primary {
    background: var(--white);
    color: var(--primary);
}
.cta-directory .btn-primary:hover { background: var(--gray-100); color: var(--primary-dark); }

.cta-content p { max-width: 500px; margin: 0.75rem auto 1.5rem; opacity: 0.92; }

/* ─── Categories Grid ────────────────────────────── */
.categories-section { padding: 5rem 0; }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
}
.category-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}
.cat-icon { font-size: 1.3rem; }

/* ─── Content Pages ──────────────────────────────── */
.content-page { padding: 3rem 0 5rem; }
.content-page h1 { margin-bottom: 2rem; }
.content-page h2 { margin: 2rem 0 1rem; font-size: 1.5rem; }
.content-body p { margin-bottom: 1rem; }
.content-body .lead { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; }
.content-body ul { margin: 1rem 0; padding-left: 1.5rem; }
.content-body li { margin-bottom: 0.5rem; }

.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}
.standard-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.standard-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.standard-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* ─── Breadcrumbs ────────────────────────────────── */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* ─── Footer ─────────────────────────────────────── */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}
[data-theme="dark"] .site-footer { background: #0A0E14; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-about p { margin-top: 1rem; font-size: 0.9rem; line-height: 1.6; color: var(--gray-400); }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.3rem; color: var(--gray-100); }
.footer-logo strong { color: var(--primary-light); }

.footer-links h4 {
    color: var(--gray-100);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--gray-400); font-size: 0.88rem; }
.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    font-size: 0.85rem;
}
.footer-disclaimer {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ─── Pillar Pages ───────────────────────────────── */
.pillar-page { padding: 3rem 0 5rem; }

.pillar-header {
    margin-bottom: 3rem;
    text-align: center;
}

.pillar-header h1 {
    margin-bottom: 1rem;
}

.pillar-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-item {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.category-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.category-item h3 a {
    color: var(--text);
    text-decoration: none;
}

.category-item h3 a:hover {
    color: var(--primary);
}

.category-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-count {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    align-self: flex-start;
}

/* ─── Category Pages ─────────────────────────────── */
.category-page { padding: 3rem 0 5rem; }

.category-header {
    margin-bottom: 2.5rem;
}

.category-header h1 {
    margin-bottom: 1rem;
}

.category-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.filter-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ─── Directory Pages ────────────────────────────── */
.py-5 { padding: 3rem 0; }

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.search-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.form-control {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font-sans);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 107, 84, 0.1);
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
}

.state-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.state-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.state-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.city-item {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.city-item:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.city-item a {
    color: var(--text);
    text-decoration: none;
    display: block;
}

.city-item:hover a {
    color: var(--primary);
}

/* ─── Cost Pages ─────────────────────────────────── */
.cost-page { padding: 3rem 0 5rem; }

.cost-header {
    margin-bottom: 2.5rem;
}

.cost-header h1 {
    margin-bottom: 1rem;
}

.cost-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.cost-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.cost-range {
    grid-column: 1 / -1;
}

.cost-range h2,
.cost-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.cost-box {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--gray-100) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    text-align: center;
}

[data-theme="dark"] .cost-box {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--gray-200) 100%);
}

.cost-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.cost-note {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.cost-section {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

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

.cost-section li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.cost-section li:last-child {
    border-bottom: none;
}

.cost-cta {
    padding: 2.5rem;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--primary);
}

[data-theme="dark"] .cost-cta {
    background: var(--primary-100);
}

.cost-cta h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.cost-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.costs-index { padding: 3rem 0 5rem; }

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.procedures-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.procedure-item {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.procedure-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.procedure-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.procedure-item h3 a {
    color: var(--text);
    text-decoration: none;
}

.procedure-item h3 a:hover {
    color: var(--primary);
}

.procedure-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cities-count {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    align-self: flex-start;
}

/* ─── Article Pages ─────────────────────────────── */
.article-page { padding: 3rem 0 5rem; }

.article-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.article-header .article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--primary-50);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.article-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.byline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: var(--success);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge::before {
    content: "✓";
    display: inline-block;
}

.article-body {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.article-body h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.social-share {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    text-align: center;
}

.social-share p {
    margin-bottom: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    margin-right: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.share-btn.twitter:hover { color: #1DA1F2; }
.share-btn.facebook:hover { color: #1877F2; }

.related-articles {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.related-articles h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.related-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.related-card:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.related-card a {
    color: var(--text);
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.related-card:hover a {
    color: var(--primary);
}

/* ─── Practice Pages ──────────────────────────────── */
.practice-page {
    background: var(--bg);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.breadcrumb-list a {
    color: var(--primary);
    font-size: 0.95rem;
}

.breadcrumb-list a:hover {
    color: var(--primary-light);
}

.breadcrumb-list li.active {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Practice Header */
.practice-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.left-section {
    flex: 1;
}

.practice-name {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--text);
    margin-bottom: 0.5rem;
}

.doctor-name {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.badge-gold {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #FFB84D 0%, #FFA500 100%);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Practice Info Row */
.practice-info-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.practice-address {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.practice-address .icon {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.practice-address p {
    margin: 0;
    line-height: 1.5;
}

/* Specialties */
.practice-specialties {
    margin-top: 1.5rem;
}

.practice-specialties strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--text);
}

.specialties-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.service-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-50);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--primary);
}

/* Action Buttons */
.practice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.action-btn .icon {
    width: 18px;
    height: 18px;
}

.btn-phone {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-directions {
    border-color: var(--accent);
    color: var(--accent);
}

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

.btn-appointment {
    border-color: var(--accent);
    color: var(--accent);
}

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

/* Practice Content Grid */
.practice-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    margin-bottom: 3rem;
}

.practice-main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Sections */
.practice-about,
.practice-services,
.practice-community {
    background: var(--bg-card);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.practice-about h2,
.practice-services h2,
.practice-community h2 {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.practice-about p,
.practice-community p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.practice-about p:last-child,
.practice-community p:last-child {
    margin-bottom: 0;
}

/* Services Grid */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Sidebar */
.practice-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
}

.practice-location {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-box,
.contact-box {
    background: var(--bg-card);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.location-box:hover,
.contact-box:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.location-box h3,
.contact-box h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text);
}

.location-box .addr {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-phone a {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-phone a:hover {
    color: var(--primary-light);
}

/* Practice Footer */
.practice-footer {
    padding: 2rem 0;
    border-top: 2px solid var(--border);
    margin-top: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    transition: all var(--transition);
}

.back-link:hover {
    gap: 0.75rem;
    color: var(--primary-light);
}

.back-link span {
    font-size: 1.2rem;
}

/* View Profile Link on Cards */
.view-profile-link {
    display: inline-block;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--primary);
    font-weight: 600;
    transition: color var(--transition);
}

.view-profile-link:hover {
    color: var(--primary-light);
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .cost-body { grid-template-columns: 1fr; }
    .practice-content { grid-template-columns: 1fr; }
    .practice-sidebar { position: static; }
    .practice-actions { gap: 0.75rem; }
    .action-btn { padding: 0.65rem 1.25rem; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
    }
    .main-nav.active { display: block; }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-link { padding: 0.75rem 1rem; width: 100%; }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: transparent;
    }
    .has-dropdown:hover .dropdown-menu { display: block; }

    .pillars-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero { padding: 3rem 0 2.5rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-search { flex-direction: column; border-radius: var(--radius); }
    .search-input { border-right: 2px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
    .search-btn { border-radius: 0 0 var(--radius) var(--radius); }

    .categories-list { grid-template-columns: 1fr; }
    .states-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .filter-tabs { gap: 0.5rem; }
    .filter-tab { font-size: 0.85rem; padding: 0.5rem 1rem; }
    .cost-body { grid-template-columns: 1fr; }
    .article-body h2 { font-size: 1.2rem; }
    .article-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
    .search-form { grid-template-columns: 1fr; }

    /* Practice Pages */
    .practice-name { font-size: 1.75rem; }
    .practice-actions { flex-direction: column; }
    .action-btn { width: 100%; justify-content: center; }
    .practice-info-row { gap: 1rem; }
    .header-top { flex-direction: column; }
    .specialties-list { gap: 0.5rem; }
    .breadcrumb-list { gap: 0.25rem; }
}

@media (max-width: 480px) {
    .hero-stats .stat { font-size: 0.85rem; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .states-grid { grid-template-columns: 1fr; }
    .article-meta { flex-direction: column; gap: 0.75rem; }
    .share-btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }
    .related-grid { grid-template-columns: 1fr; }
    .procedures-list { grid-template-columns: 1fr; }
    .cost-amount { font-size: 2rem; }

    /* Practice Pages */
    .practice-name { font-size: 1.5rem; }
    .practice-address { flex-direction: column; }
    .service-tag { font-size: 0.85rem; padding: 0.4rem 0.75rem; }
    .practice-about,
    .practice-services,
    .practice-community { padding: 1.5rem; }
    .breadcrumb { padding: 0.75rem 0; }
}
