/* ══════════════════════════════════════════════════════════════════════════
   main.css — Sage Psychology Practice
   Full rebuild: CSS custom properties, WCAG AA, dark/light mode, mobile-first
   Palette: warm sage green (#4a7c59) + terracotta accent (#c17c4a)
   ══════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   1. CSS Custom Properties — Light Mode (default)
   ══════════════════════════════════════════════════════════════════════════ */
:root {
    /* ── Brand ── */
    --c-primary:        #4a7c59;   /* sage green — use on bg/icons */
    --c-primary-dark:   #3a6347;   /* darker — use for text links (5.9:1 on bg) */
    --c-primary-light:  #6a9e78;   /* lighter tint */
    --c-primary-bg:     #eef4f0;   /* very light tint for hover states */
    --c-accent:         #c17c4a;   /* terracotta — stars, highlights */
    --c-accent-dark:    #a36335;

    /* ── Text ── */
    --c-text:           #1e2b22;   /* main text — 15.7:1 on bg */
    --c-text-2:         #4a5e51;   /* secondary text — 6.1:1 on bg */
    --c-text-muted:     #5a7060;   /* muted/meta text — 4.6:1 on bg (WCAG AA) */

    /* ── Backgrounds ── */
    --c-bg:             #f7f5f0;   /* page background */
    --c-bg-card:        #ffffff;   /* card / elevated surfaces */
    --c-bg-alt:         #f0ede6;   /* alternating section bg */
    --c-bg-dark:        #1a2030;   /* intentionally dark (footer, banners) */
    --c-bg-dark-text:   #d8dde2;   /* text on dark backgrounds */

    /* ── Borders ── */
    --c-border:         #d4cfc7;
    --c-border-light:   #e8e4de;

    /* ── Semantic states ── */
    --c-success:        #2a6e3a;
    --c-success-bg:     #eaf4ec;
    --c-error:          #a33030;
    --c-error-bg:       #fceaea;
    --c-warning:        #8a5f10;
    --c-warning-bg:     #fdf3dc;
    --c-info:           #1a5c78;
    --c-info-bg:        #e3f1f8;

    /* ── Gradients ── */
    --gradient-primary: linear-gradient(135deg, #4a7c59 0%, #2d5c42 100%);
    --gradient-hero:    linear-gradient(135deg, #3a6347 0%, #1e3d2b 100%);
    --gradient-warm:    linear-gradient(135deg, #c17c4a 0%, #9a5a30 100%);

    /* ── Shadows ── */
    --shadow-sm:        0 1px 4px rgba(30,43,34,0.08);
    --shadow-md:        0 4px 16px rgba(30,43,34,0.10);
    --shadow-lg:        0 8px 32px rgba(30,43,34,0.12);
    --shadow-card:      0 4px 20px rgba(30,43,34,0.08);

    /* ── Typography ── */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* ── Spacing ── */
    --space-xs:  8px;
    --space-sm:  16px;
    --space-md:  24px;
    --space-lg:  40px;
    --space-xl:  64px;

    /* ── Radius ── */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* ── Focus ring (visible to keyboard users, meets WCAG 2.1) ── */
    --focus-ring: 0 0 0 3px rgba(74, 124, 89, 0.50);

    /* ── Transitions ── */
    --transition:      0.2s ease;
    --transition-slow: 0.35s ease;
}

/* ══════════════════════════════════════════════════════════════════════════
   2. Dark Mode Variables
   Applied automatically via prefers-color-scheme; also via [data-theme="dark"]
   for the manual JS toggle.
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --c-primary:        #6a9e78;
        --c-primary-dark:   #85b894;
        --c-primary-light:  #4a7c59;
        --c-primary-bg:     #1a2e20;
        --c-accent:         #d4936a;
        --c-accent-dark:    #e8aa84;
        --c-text:           #e2e8f0;
        --c-text-2:         #a0aec0;
        --c-text-muted:     #718096;
        --c-bg:             #0e1117;
        --c-bg-card:        #1a1d24;
        --c-bg-alt:         #13161e;
        --c-bg-dark:        #080a10;
        --c-bg-dark-text:   #e2e8f0;
        --c-border:         #2a2f3e;
        --c-border-light:   #22263a;
        --c-success-bg:     #0f2e18;
        --c-error-bg:       #2e0f0f;
        --c-warning-bg:     #2e1f08;
        --c-info-bg:        #0a1f2a;
        --shadow-sm:        0 1px 4px rgba(0,0,0,0.30);
        --shadow-md:        0 4px 16px rgba(0,0,0,0.40);
        --shadow-lg:        0 8px 32px rgba(0,0,0,0.55);
        --shadow-card:      0 4px 20px rgba(0,0,0,0.35);
    }
}

/* Manual dark override (set by JS toggle → localStorage) */
[data-theme="dark"] {
    --c-primary:        #6a9e78;
    --c-primary-dark:   #85b894;
    --c-primary-light:  #4a7c59;
    --c-primary-bg:     #1a2e20;
    --c-accent:         #d4936a;
    --c-accent-dark:    #e8aa84;
    --c-text:           #e2e8f0;
    --c-text-2:         #a0aec0;
    --c-text-muted:     #718096;
    --c-bg:             #0e1117;
    --c-bg-card:        #1a1d24;
    --c-bg-alt:         #13161e;
    --c-bg-dark:        #080a10;
    --c-bg-dark-text:   #e2e8f0;
    --c-border:         #2a2f3e;
    --c-border-light:   #22263a;
    --c-success-bg:     #0f2e18;
    --c-error-bg:       #2e0f0f;
    --c-warning-bg:     #2e1f08;
    --c-info-bg:        #0a1f2a;
    --shadow-sm:        0 1px 4px rgba(0,0,0,0.30);
    --shadow-md:        0 4px 16px rgba(0,0,0,0.40);
    --shadow-lg:        0 8px 32px rgba(0,0,0,0.55);
    --shadow-card:      0 4px 20px rgba(0,0,0,0.35);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    transition: background-color var(--transition), color var(--transition);
    /* Sticky footer: body fills full viewport height; main grows to fill gap */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Flex grow so short pages still push footer to bottom of viewport */
main#main-content {
    flex: 1 0 auto;
}

img {
    max-width: 100%;
    height: auto;
}

/* Global link baseline — links always underlined for color-blind users */
a {
    color: var(--c-primary-dark);
    text-underline-offset: 3px;
}
a:hover {
    color: var(--c-primary);
}

/* ══════════════════════════════════════════════════════════════════════════
   4. Skip Navigation (WCAG 2.4.1)
   Visually hidden until focused by keyboard; jumps to #main-content
   ══════════════════════════════════════════════════════════════════════════ */
.skip-nav {
    position: absolute;
    top: -9999px;   /* large fixed value — reliable across all browsers/heights */
    left: 0;
    padding: 12px 20px;
    background: var(--c-primary);
    color: white;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--radius-sm) 0;
    transition: top 0s;
}
.skip-nav:focus {
    top: 0;
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════
   5. Header & Navigation
   ══════════════════════════════════════════════════════════════════════════ */
.header {
    background: var(--c-bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: background-color var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 16px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--c-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.logo:hover { color: var(--c-primary-dark); }

/* Navigation list */
.nav-menu {
    display: flex;
    gap: 28px;
    list-style: none;
}
.nav-menu a {
    text-decoration: none;
    color: var(--c-text-2);
    font-weight: 500;
    transition: color var(--transition);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--c-primary);
    border-bottom-color: var(--c-primary);
    outline: none;
}

/* CTA button in nav ("Login" / "Admin Panel") */
.nav-btn {
    background: var(--c-primary);
    color: white !important;
    padding: 9px 22px;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
    border-bottom: none !important;
    display: inline-block;
    min-height: 44px;
    line-height: 26px;
}
.nav-btn:hover {
    background: var(--c-primary-dark);
    transform: translateY(-1px);
    color: white !important;
}

/* User auth area (shown when logged in) */
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.nav-user-name {
    color: var(--c-text-muted);
    font-size: 14px;
}
.nav-logout {
    color: var(--c-error) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}
.nav-logout:hover { text-decoration: underline; }

/* Dark mode toggle button */
.dark-mode-btn {
    background: var(--c-bg-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.dark-mode-btn:hover { background: var(--c-border); }

/* Hamburger toggle (visible only on mobile) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--c-text);
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* Mobile backdrop overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity var(--transition);
}
.nav-overlay.active { opacity: 1; }

/* ── Mobile navigation ─────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle  { display: flex; }
    .nav-overlay { display: block; }

    #site-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: var(--c-bg-card);
        box-shadow: var(--shadow-lg);
        z-index: 300;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
    }
    #site-nav.nav-open { right: 0; }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 8px 12px;
    }
    .nav-menu li a {
        display: block;
        padding: 14px 16px;
        border-radius: var(--radius-sm);
        border-bottom: none;
        font-size: 16px;
    }
    .nav-menu a:hover,
    .nav-menu a:focus-visible {
        background: var(--c-primary-bg);
        border-bottom: none;
        color: var(--c-primary);
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   6. Hero & Page Header
   ══════════════════════════════════════════════════════════════════════════ */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: 80px 20px;
    text-align: center;
}
.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    line-height: 1.2;
}
.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page header — used on all sub-pages */
.page-header {
    background: var(--gradient-hero);
    color: white;
    padding: 80px 20px;
    text-align: center;
}
.page-header h1 { font-size: 42px; margin-bottom: 15px; line-height: 1.2; }
.page-header p  { font-size: 18px; opacity: 0.95; max-width: 700px; margin: 0 auto; }
.page-header + .container { padding-top: 40px; }

/* ══════════════════════════════════════════════════════════════════════════
   7. Layout Utilities
   ══════════════════════════════════════════════════════════════════════════ */
.section        { padding: 80px 20px; }
.container      { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title  { text-align: center; font-size: 36px; margin-bottom: 50px; color: var(--c-text); }
.section-subtitle {
    text-align: center;
    color: var(--c-text-muted);
    font-size: 18px;
    max-width: 650px;
    margin: -30px auto 60px;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════════════
   8. Buttons
   ══════════════════════════════════════════════════════════════════════════ */

/* Hero primary button (white on hero gradient) */
.btn-primary {
    background: white;
    color: var(--c-primary-dark);
    padding: 15px 40px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 2px solid white;
    min-height: 44px;
    line-height: 1.4;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--c-primary);
}

/* Hero ghost button */
.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 15px 40px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.6);
    display: inline-block;
    transition: background var(--transition);
    min-height: 44px;
    line-height: 1.4;
}
.btn-secondary:hover { background: rgba(255,255,255,0.28); color: white; }

/* CTA section button (white on gradient) */
.cta-btn {
    background: white;
    color: var(--c-primary-dark);
    padding: 15px 40px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: transform var(--transition), box-shadow var(--transition);
    min-height: 44px;
    line-height: 1.4;
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--c-primary);
}

/* ══════════════════════════════════════════════════════════════════════════
   9. Forms
   ══════════════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--c-text-2);
    font-size: 15px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: var(--c-bg-card);
    color: var(--c-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: var(--focus-ring);
}
.form-group textarea { min-height: 120px; resize: vertical; }

.submit-btn {
    background: var(--c-primary);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    transition: background var(--transition), transform var(--transition);
    min-height: 44px;
    min-width: 44px;
}
.submit-btn:hover { background: var(--c-primary-dark); transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════════════════════════
   10. Cards
   ══════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--c-bg-card);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}

/* ══════════════════════════════════════════════════════════════════════════
   11. Services
   ══════════════════════════════════════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.service-card {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.service-card-image  { width: 100%; height: 220px; object-fit: cover; display: block; }
.service-card-body   { padding: 30px 35px 35px; }
.service-card h3     { font-size: 22px; margin-bottom: 15px; color: var(--c-text); }
.service-card p      { color: var(--c-text-muted); line-height: 1.7; }

.read-more-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--c-primary-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}
.read-more-link:hover { color: var(--c-primary); }

/* Services page */
.services-section    { margin-bottom: 80px; }
.service-features    { list-style: none; margin-top: 20px; }
.service-features li {
    padding: 8px 0;
    color: var(--c-text-2);
    display: flex;
    align-items: center;
    gap: 10px;
}
.service-features li::before {
    content: "✓";
    color: var(--c-primary);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   12. Team
   ══════════════════════════════════════════════════════════════════════════ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.team-card {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 30px;
    text-align: center;
    transition: transform var(--transition);
}
.team-card:hover { transform: translateY(-5px); }
.team-card-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
    box-shadow: var(--shadow-sm);
}
.team-card-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: 700;
    margin: 0 auto 15px;
}
.team-card h3    { font-size: 22px; margin: 0 0 8px; color: var(--c-text); }
.team-card .title { color: var(--c-primary); font-weight: 600; margin-bottom: 12px; }
.team-card p     { color: var(--c-text-muted); line-height: 1.7; margin-bottom: 15px; }

/* About page team members */
.team-section { padding: 80px 20px; }
.team-member {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 40px;
    text-align: center;
    transition: transform var(--transition);
}
.team-member:hover { transform: translateY(-5px); }
.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto 20px;
}
.team-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    box-shadow: var(--shadow-md);
}
.team-member h3 { font-size: 24px; margin-bottom: 10px; color: var(--c-text); }
.team-title     { color: var(--c-primary); font-weight: 600; margin-bottom: 15px; }
.team-bio       { color: var(--c-text-muted); line-height: 1.7; }

/* ══════════════════════════════════════════════════════════════════════════
   13. Blog
   ══════════════════════════════════════════════════════════════════════════ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.blog-card {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.blog-card-placeholder {
    width: 100%;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 48px;
}
.blog-card-content { padding: 25px; }
.blog-category  { color: var(--c-primary); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.blog-card h3   { font-size: 20px; margin-bottom: 15px; color: var(--c-text); }
.blog-card p    { color: var(--c-text-muted); margin-bottom: 15px; line-height: 1.6; }
.blog-meta      { color: var(--c-text-muted); font-size: 14px; }

/* Post cards (blog listing page) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.post-card {
    background: var(--c-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    display: block;
    color: inherit;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gradient-primary);
    display: block;
}
.post-card-content { padding: 25px; }
.post-category  { color: var(--c-primary); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.post-card h2   { font-size: 22px; margin-bottom: 15px; color: var(--c-text); }
.post-card p    { color: var(--c-text-muted); margin-bottom: 15px; line-height: 1.6; }
.post-meta      { color: var(--c-text-muted); font-size: 14px; }

/* Blog post page layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 60px;
}
@media (max-width: 768px) { .blog-layout { grid-template-columns: 1fr; } }
.container.post-container { max-width: 1200px; }

/* Sidebar */
.sidebar-widget {
    background: var(--c-bg-card);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}
.sidebar-widget h3 { font-size: 20px; margin-bottom: 20px; color: var(--c-text); }
.category-list     { list-style: none; }
.category-list li  { margin-bottom: 8px; }
.category-list a {
    text-decoration: none;
    color: var(--c-text-2);
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.category-list a:hover,
.category-list a.active { background: var(--c-primary-bg); color: var(--c-primary); }
.category-count {
    background: var(--c-bg-alt);
    color: var(--c-text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

/* Post header */
.post-header {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}
.post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
}
.post-category {
    color: var(--c-primary);
    font-weight: 600;
    margin-bottom: 15px;
    text-decoration: none;
    display: inline-block;
}
.post-category:hover { text-decoration: underline; }
.post-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--c-text);
    line-height: 1.3;
}
.post-meta { color: var(--c-text-muted); font-size: 15px; }

/* Post content body */
.post-content {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}
.post-content p    { margin-bottom: 20px; line-height: 1.8; }
.post-content h2   { margin: 30px 0 15px; color: var(--c-text); }
.post-content h3   { margin: 25px 0 12px; color: var(--c-text); }
.post-content ul,
.post-content ol   { margin: 20px 0 20px 30px; }
.post-content li   { margin-bottom: 10px; }
.post-content a    { color: var(--c-primary-dark); text-decoration: underline; }
.post-content a:hover { color: var(--c-primary); }

/* Images inside TinyMCE-generated post content */
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 1.5em auto; display: block; }
.post-content img[style*="float: left"],
.post-content img[style*="float:left"]  { float: left;  margin: 0.25em 1.75em 1em 0;  display: inline; }
.post-content img[style*="float: right"],
.post-content img[style*="float:right"] { float: right; margin: 0.25em 0 1em 1.75em; display: inline; }
.post-content figure                    { margin: 1.5em 0; max-width: 100%; }
.post-content figure.image-left         { float: left;  margin: 0.25em 1.75em 1em 0; }
.post-content figure.image-right        { float: right; margin: 0.25em 0 1em 1.75em; }
.post-content figure img                { margin: 0; border-radius: var(--radius-sm); display: block; }
.post-content figcaption { font-size: 13px; color: var(--c-text-muted); text-align: center; margin-top: 6px; font-style: italic; }

/* Comments */
.comments-section {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}
.comments-section h2 { font-size: 28px; margin-bottom: 30px; color: var(--c-text); }
.comment {
    padding: 20px;
    border-left: 3px solid var(--c-primary);
    background: var(--c-bg-alt);
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
}
.comment-author  { font-weight: 600; color: var(--c-text); margin-bottom: 5px; }
.comment-date    { color: var(--c-text-muted); font-size: 14px; margin-bottom: 10px; }
.comment-content { color: var(--c-text-2); line-height: 1.7; }
.comment-form    { margin-top: 40px; padding-top: 40px; border-top: 2px solid var(--c-border-light); }
.comment-form h3 { font-size: 24px; margin-bottom: 20px; color: var(--c-text); }

/* Related posts */
.related-posts {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.related-posts h2   { font-size: 28px; margin-bottom: 25px; color: var(--c-text); }
.related-post       { padding: 15px; border-bottom: 1px solid var(--c-border-light); transition: background var(--transition); border-radius: var(--radius-sm); }
.related-post:last-child { border-bottom: none; }
.related-post:hover      { background: var(--c-bg-alt); }
.related-post a          { text-decoration: none; color: var(--c-text); font-weight: 600; }
.related-post a:hover    { color: var(--c-primary); }
.related-post-meta       { color: var(--c-text-muted); font-size: 14px; margin-top: 5px; }

/* ══════════════════════════════════════════════════════════════════════════
   14. Pricing
   ══════════════════════════════════════════════════════════════════════════ */
.pricing-section { background: var(--c-bg-alt); padding: 80px 20px; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.pricing-card.featured { border: 2px solid var(--c-primary); }
.pricing-card.featured::before {
    content: "POPULAR";
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--c-primary);
    color: white;
    padding: 4px 18px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.pricing-service     { color: var(--c-primary); font-weight: 600; margin-bottom: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.pricing-card h3     { font-size: 24px; margin-bottom: 20px; color: var(--c-text); }
.pricing-amount      { font-size: 48px; font-weight: 700; color: var(--c-primary); margin-bottom: 8px; }
.pricing-amount span { font-size: 20px; color: var(--c-text-muted); }
.pricing-duration    { color: var(--c-text-muted); margin-bottom: 25px; }
.pricing-description { color: var(--c-text-muted); margin-bottom: 28px; line-height: 1.7; }
.pricing-btn {
    background: var(--c-primary);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: background var(--transition), transform var(--transition);
    min-height: 44px;
    line-height: 1.4;
}
.pricing-btn:hover { background: var(--c-primary-dark); transform: translateY(-1px); color: white; }

/* ══════════════════════════════════════════════════════════════════════════
   15. About Page
   ══════════════════════════════════════════════════════════════════════════ */
.stats-section { padding: 80px 20px; background: var(--c-bg-alt); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.stat-number { font-size: 56px; font-weight: 700; color: var(--c-primary); margin-bottom: 10px; }
.stat-label  { font-size: 18px; color: var(--c-text-muted); }

.story-section { padding: 80px 20px; }
.story-content { max-width: 900px; margin: 0 auto; }
.story-content p  { font-size: 18px; line-height: 1.8; color: var(--c-text-2); margin-bottom: 20px; }
.story-content h3 { font-size: 24px; margin: 40px 0 20px; color: var(--c-text); }

.values-section { padding: 80px 20px; background: var(--c-bg-alt); }
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.value-card {
    background: var(--c-bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon    { font-size: 48px; margin-bottom: 20px; display: block; }
.value-card h3 { font-size: 22px; margin-bottom: 15px; color: var(--c-text); }
.value-card p  { color: var(--c-text-muted); line-height: 1.8; }

.mission-section {
    background: var(--gradient-hero);
    color: white;
    padding: 80px 20px;
    text-align: center;
}
.mission-content    { max-width: 800px; margin: 0 auto; }
.mission-section h2 { font-size: 36px; margin-bottom: 30px; }
.mission-section p  { font-size: 20px; line-height: 1.8; opacity: 0.95; }

/* ══════════════════════════════════════════════════════════════════════════
   16. CTA Section
   ══════════════════════════════════════════════════════════════════════════ */
.cta-section {
    background: var(--gradient-hero);
    color: white;
    padding: 80px 20px;
    text-align: center;
}
.cta-section h2 { font-size: 36px; margin-bottom: 20px; }
.cta-section p  { font-size: 18px; margin-bottom: 30px; opacity: 0.95; }

/* ══════════════════════════════════════════════════════════════════════════
   17. Alert Messages
   Color + icon + border for color-blind safe feedback
   ══════════════════════════════════════════════════════════════════════════ */
.success {
    background: var(--c-success-bg);
    color: var(--c-success);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--c-success);
}
.error {
    background: var(--c-error-bg);
    color: var(--c-error);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--c-error);
}
.info {
    background: var(--c-info-bg);
    color: var(--c-info);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--c-info);
}
.warning {
    background: var(--c-warning-bg);
    color: var(--c-warning);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border-left: 4px solid var(--c-warning);
}

/* Empty state */
.empty-state    { text-align: center; padding: 60px 20px; }
.empty-state h2 { font-size: 24px; color: var(--c-text-muted); margin-bottom: 10px; }
.empty-state p  { color: var(--c-text-muted); }

/* ══════════════════════════════════════════════════════════════════════════
   18. Pagination
   ══════════════════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--c-text);
    background: var(--c-bg-card);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination a:hover      { background: var(--c-primary); color: white; }
.pagination .active      { background: var(--c-primary); color: white; }

/* ══════════════════════════════════════════════════════════════════════════
   19. Footer
   ══════════════════════════════════════════════════════════════════════════ */
.footer {
    background: var(--c-bg-dark);
    color: var(--c-bg-dark-text);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition);
}
.footer-links a:hover { color: white; text-decoration: underline; }
.footer p { color: rgba(255,255,255,0.45); font-size: 13px; }

/* Crisis strip — always visible above footer */
.crisis-banner {
    background: #2e1a1a;
    border-top: 2px solid #8b3030;
    color: #f0c0c0;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
}
.crisis-banner a {
    color: #f4a0a0;
    font-weight: 600;
    text-decoration: underline;
    margin-left: 8px;
}
.crisis-banner a:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════════════════
   20. Scroll-to-Top Button
   ══════════════════════════════════════════════════════════════════════════ */
.stt-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--c-primary);
    color: white;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
}
.stt-btn.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.stt-btn:hover   { background: var(--c-primary-dark); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════════════════
   21. Focus Styles (WCAG 2.4.7)
   Visible focus ring for all interactive elements, keyboard-only
   ══════════════════════════════════════════════════════════════════════════ */
:focus-visible {
    outline: 3px solid var(--c-primary);
    outline-offset: 3px;
    border-radius: 2px;
}
/* Remove default outline for pointer users only */
:focus:not(:focus-visible) { outline: none; }

/* ══════════════════════════════════════════════════════════════════════════
   22. Reduced Motion (prefers-reduced-motion: reduce)
   Disables all transitions and animations for users who prefer it
   ══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration:  0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════════════════════
   23. Global Responsive
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero h1,
    .page-header h1     { font-size: 30px; }
    .hero,
    .page-header        { padding: 60px 20px; }
    .section            { padding: 60px 20px; }
    .section-title      { font-size: 28px; margin-bottom: 36px; }
    .section-subtitle   { font-size: 16px; }
    .services-grid,
    .team-grid,
    .blog-grid,
    .values-grid        { grid-template-columns: 1fr; }
    .pricing-grid       { grid-template-columns: 1fr; }
    .stats-grid         { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .mission-section h2 { font-size: 28px; }
    .cta-section h2     { font-size: 28px; }
    .post-header h1     { font-size: 26px; }
    .post-header,
    .post-content,
    .comments-section,
    .related-posts      { padding: 24px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}
