/* ============================================
   Civic.ly Help Centre — style.css
   Matches www.civic.ly marketing site style guide
   ============================================ */

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

/* 2. CSS Custom Properties */
:root {
    --primary: #008096;
    --primary-dark: #006675;
    --light-accent: #80BFCB;
    --blue: #0066FF;
    --inspection: #00D6B7;
    --defect: #FF5130;
    --dark: #1a1a2e;
    --text: #2d3748;
    --text-light: #4a5568;
    --white: #ffffff;
    --off-white: #f8fafb;
    --border: #e2e8f0;
    --font-family: 'Poppins', sans-serif;
    --max-width: 1200px;
    --article-width: 740px;
    --sidebar-width: 280px;
    --nav-height: 80px;
    --border-radius: 16px;
    --border-radius-btn: 8px;
}

/* 3. Focus indicators */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
.btn:focus-visible, .btn-primary:focus-visible, .btn-nav:focus-visible {
    outline-color: var(--primary-dark);
    outline-offset: 3px;
}
.footer *:focus-visible,
.cta-callout *:focus-visible,
.home-hero *:focus-visible {
    outline-color: var(--white);
}

/* 4. Base body styles */
body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

/* 5. Links */
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* 6. Typography */
h1 {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin: 0 0 16px;
}
h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark);
    margin: 32px 0 16px;
    line-height: 1.3;
}
h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin: 24px 0 8px;
}
p { margin: 0 0 16px; }
.section-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 8px;
}
.section-title {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
    max-width: 640px;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* 7. Skip link */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    padding: 8px 16px;
    background: var(--primary); color: var(--white);
    z-index: 10001; border-radius: 0 0 var(--border-radius-btn) var(--border-radius-btn);
    font-weight: 600;
}
.skip-link:focus { left: 8px; color: var(--white); }

/* 8. Navigation */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}
.nav-logo img { height: 48px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* 9. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius-btn);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.25s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,128,150,0.3);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}
.btn-white {
    background: var(--white);
    color: var(--primary);
}
.btn-white:hover {
    background: var(--off-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-large { padding: 16px 36px; font-size: 17px; border-radius: 10px; }
.btn-nav { padding: 10px 24px; font-size: 14px; }
.btn-login {
    background: rgba(0, 128, 150, 0.08);
    color: var(--primary);
    border: 1.5px solid rgba(0, 128, 150, 0.2);
}
.btn-login:hover {
    background: rgba(0, 128, 150, 0.15);
    border-color: rgba(0, 128, 150, 0.35);
    color: var(--primary);
}

/* 10. Layout / Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
main {
    padding-top: var(--nav-height);
    min-height: 60vh;
}

/* 11. Home Hero */
.home-hero {
    background: linear-gradient(165deg, var(--dark) 0%, #0d2137 50%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 24px 64px;
    text-align: center;
}
.home-hero h1 {
    color: var(--white);
    font-size: clamp(32px, 4vw, 48px);
}
.home-hero .section-label { color: var(--inspection); }
.home-hero .section-subtitle {
    color: rgba(255,255,255,0.8);
    margin: 0 auto 32px;
}
.hero-search {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    position: relative;
}
.hero-search input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius-btn);
    font-family: var(--font-family);
    font-size: 16px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    transition: border-color 0.2s;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.5); }
.hero-search input:focus {
    outline: none;
    border-color: var(--inspection);
    background: rgba(255,255,255,0.15);
}

/* 12. Section patterns */
.home-popular {
    padding: 80px 24px;
    background: var(--off-white);
}
.home-categories {
    padding: 80px 24px;
}
.home-categories .section-title { text-align: center; }
.home-categories .section-label { text-align: center; }

/* 13. Cards */
.card {
    display: block;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
}
.card h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin: 0 0 8px; }
.card p { font-size: 15px; color: var(--text-light); line-height: 1.6; margin: 0; }

/* Popular articles cards */
.popular-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.popular-grid .card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
}
.card-icon-wrap { flex-shrink: 0; }
.card-icon { width: 36px; height: 36px; }
.popular-grid .card h3 { color: var(--primary); }

/* Category grid */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
}
.category-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.category-count {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* Article list cards */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}
.article-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--primary);
}
.article-card p { margin: 0 0 12px; }
.article-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* 14. Breadcrumb */
.breadcrumb {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
    padding-top: 32px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { margin: 0 6px; color: var(--text-light); }

/* 15. Tags & Badges */
.tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-light);
}
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    background: var(--light-accent);
}
.badge-inspections { background: var(--inspection); }
.badge-jobs-maintenance { background: var(--primary); }
.badge-defects { background: var(--defect); }

/* 16. Search */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}
.search-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-btn);
    font-family: var(--font-family);
    font-size: 16px;
    transition: border-color 0.2s;
}
.search-form input:focus { outline: none; border-color: var(--primary); }
.search-results { margin-top: 24px; }
.search-result-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    transition: all 0.2s;
}
.search-result-card:hover { border-color: var(--light-accent); }
.search-result-card h3 { margin: 0 0 4px; font-size: 18px; }
.search-result-card h3 a { color: var(--primary); }
.search-result-card p { margin: 0; font-size: 15px; color: var(--text-light); }
.search-result-category { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.no-results { text-align: center; padding: 48px; color: var(--text-light); }

/* 17. Autosuggest dropdown */
.autosuggest-dropdown {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--border-radius-btn) var(--border-radius-btn);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 360px;
    overflow-y: auto;
}
.autosuggest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.autosuggest-item:last-child { border-bottom: none; }
.autosuggest-item.active,
.autosuggest-item:hover { background: var(--off-white); }
.autosuggest-icon { flex-shrink: 0; font-size: 14px; }
.autosuggest-text { flex: 1; color: var(--text); }
.autosuggest-meta { font-size: 12px; color: var(--text-light); margin-left: auto; white-space: nowrap; }

/* 18. Article layout */
.article-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 64px;
}
.kb-article { flex: 1; min-width: 0; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-light);
}

/* Article body — long-form content */
.article-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
    max-width: var(--article-width);
}
.article-body h2 { margin-top: 40px; }
.article-body h3 { margin-top: 32px; }
.article-body ol, .article-body ul { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--dark); }
.article-body blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--off-white);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--border-radius-btn) var(--border-radius-btn) 0;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--primary-dark); }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* Screenshots */
.kb-screenshot {
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--off-white);
}
.screenshot-img { width: 100%; display: block; }
.kb-screenshot figcaption {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
}

/* Grouped screenshots — side by side */
.screenshot-group {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    align-items: flex-end;
}
.screenshot-group .kb-screenshot {
    flex: 1;
    min-width: 0;
    margin: 0;
}
.screenshot-group .kb-screenshot .screenshot-img {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}
@media (max-width: 600px) {
    .screenshot-group {
        flex-direction: column;
    }
}

/* Video */
.video-embed { margin: 24px 0; }
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Callout boxes (legacy) */
.callout-box {
    background: var(--off-white);
    border-radius: var(--border-radius);
    padding: 32px;
    margin: 32px 0;
    border: 1px solid var(--border);
}
.callout-box h3 { color: var(--primary); margin-top: 0; }
.cta-callout {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 48px 0;
}
.cta-callout h3 { color: var(--white); margin-top: 0; margin-bottom: 16px; font-size: 20px; }
.cta-callout p { color: rgba(255,255,255,0.9); font-size: 16px; margin-bottom: 16px; }

/* ---- Styled article callouts ---- */
.callout {
    display: flex;
    gap: 16px;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 28px 0;
    line-height: 1.7;
    font-size: 15px;
}
.callout-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-top: 1px;
}
.callout-content { flex: 1; min-width: 0; }
.callout-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}
.callout-content p { margin: 0 0 8px; }
.callout-content p:last-child { margin-bottom: 0; }
.callout-content ul { padding-left: 20px; margin: 8px 0 0; }
.callout-content li { margin-bottom: 6px; }
.callout-content a { text-decoration: underline; text-underline-offset: 2px; }

/* Prerequisite — amber */
.callout-prerequisite {
    background: #FFF8ED;
    border: 1px solid #F5D990;
}
.callout-prerequisite .callout-icon {
    background: #FCEFC7;
    color: #B45309;
}
.callout-prerequisite .callout-label { color: #92400E; }
.callout-prerequisite a { color: #B45309; }

/* Tips — teal/green */
.callout-tips {
    background: #F0FDFB;
    border: 1px solid #99E6D6;
}
.callout-tips .callout-icon {
    background: #CCFBF1;
    color: #0F766E;
}
.callout-tips .callout-label { color: #0F766E; }

/* What's Next — brand gradient card */
.callout-next {
    background: linear-gradient(135deg, #F0F9FB 0%, #E6F4F7 100%);
    border: 1px solid var(--light-accent);
}
.callout-next .callout-icon {
    background: var(--primary);
    color: var(--white);
}
.callout-next .callout-label { color: var(--primary-dark); }
.callout-next a {
    color: var(--primary);
    font-weight: 600;
}

/* Warning — red */
.callout-warning {
    background: #FFF5F5;
    border: 1px solid #FCA5A5;
}
.callout-warning .callout-icon {
    background: #FEE2E2;
    color: #B91C1C;
}
.callout-warning .callout-label { color: #991B1B; }

/* Note — blue */
.callout-note {
    background: #EFF6FF;
    border: 1px solid #93C5FD;
}
.callout-note .callout-icon {
    background: #DBEAFE;
    color: #1D4ED8;
}
.callout-note .callout-label { color: #1E40AF; }

/* Info — blue (alias for note) */
.callout-info {
    background: #EFF6FF;
    border: 1px solid #93C5FD;
}
.callout-info .callout-icon {
    background: #DBEAFE;
    color: #1D4ED8;
}
.callout-info .callout-label { color: #1E40AF; }

/* ---- Styled step list (ordered lists in article body) ---- */
.article-body ol.step-list {
    list-style: none;
    padding-left: 0;
    counter-reset: step-counter;
}
.article-body ol.step-list > li {
    counter-increment: step-counter;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.article-body ol.step-list > li .step-content {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}
.article-body ol.step-list > li::before {
    content: counter(step-counter);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
}

/* Article tags & footer */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.article-footer-meta {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    font-size: 14px;
    color: var(--text-light);
}
.helpful-text { margin-top: 8px; }

/* 19. FAQ accordion */
.article-faq { margin: 32px 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    padding: 4px 0;
    transition: color 0.2s;
}
.faq-question:hover { color: var(--primary); }
.faq-arrow { transition: transform 0.3s; flex-shrink: 0; margin-left: 16px; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s; }
.faq-answer p { font-size: 15px; color: var(--text-light); line-height: 1.7; padding-top: 12px; margin-bottom: 0; }
.faq-item.open .faq-answer { max-height: 800px; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

/* 20. Sidebar */
.article-sidebar {
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 24px;
}
.sidebar-toc h3, .sidebar-related h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px;
}
.sidebar-toc ul, .sidebar-related ul { list-style: none; padding: 0; margin: 0; }
.sidebar-toc li, .sidebar-related li { margin-bottom: 6px; }
.sidebar-toc a, .sidebar-related a { font-size: 14px; color: var(--primary); }
.sidebar-related { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }

/* 21. Glossary */
.glossary-intro { color: var(--text-light); margin-bottom: 24px; font-size: 17px; }
.glossary-jumpbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    position: sticky;
    top: var(--nav-height);
    background: var(--white);
    z-index: 10;
}
.glossary-jumpbar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--border-radius-btn);
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.glossary-jumpbar a:hover { background: var(--off-white); }
.glossary-body h2 {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* 22. Page content container */
.page-content {
    max-width: 800px;
    padding-top: 32px;
    padding-bottom: 64px;
}
.category-desc { color: var(--text-light); font-size: 17px; margin-bottom: 8px; }

/* Error page */
.error-page { text-align: center; padding: 80px 24px; }

/* 23. Footer */
.footer {
    background: #0a0a1a;
    color: rgba(255,255,255,0.85);
    padding: 64px 24px 32px;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}
.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 16px;
}
.footer-brand img { height: 40px; filter: brightness(0) invert(1); }
.footer-strapline {
    color: var(--inspection) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    margin-top: 12px !important;
}
.footer h3 {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer a:hover { color: var(--inspection); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.cookie-settings-link {
    color: rgba(255,255,255,0.5) !important;
    font-size: 12px;
    text-decoration: underline !important;
}

/* 24. Cookie consent banner */
#cookie-consent {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 10000;
    background: rgba(26, 26, 46, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 24px;
    font-family: var(--font-family);
}
.cc-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cc-text {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}
.cc-buttons { display: flex; gap: 12px; flex-shrink: 0; }
.cc-btn {
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--border-radius-btn);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.cc-btn-accept { background: var(--primary); color: var(--white); }
.cc-btn-accept:hover { background: var(--primary-dark); }
.cc-btn-reject {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}
.cc-btn-reject:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.9);
}
#cookie-consent *:focus-visible { outline-color: var(--white); }

/* 25. Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s, transform 0.7s;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 26. Utility */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 27. Media query: 968px (tablet) */
@media (min-width: 968px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout {
        flex-direction: row;
    }
    .article-sidebar {
        width: var(--sidebar-width);
        flex-shrink: 0;
        position: sticky;
        top: calc(var(--nav-height) + 24px);
        align-self: flex-start;
        max-height: calc(100vh - var(--nav-height) - 48px);
        overflow-y: auto;
    }
}

/* 28. Media query: desktop (above 968px for 3-col) */
@media (min-width: 1100px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 29. Media query: 640px (mobile) */
@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--white);
        padding: 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        gap: 16px;
    }
    .nav-toggle { display: flex; }

    .home-hero { padding: 64px 20px 48px; }
    .home-popular, .home-categories { padding: 48px 20px; }
    .hero-search { flex-direction: column; }

    .footer-inner { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    .cc-inner { flex-direction: column; text-align: center; }
    .cc-buttons { width: 100%; }
    .cc-btn { flex: 1; }

    .callout { padding: 16px; gap: 12px; }
    .callout-icon { width: 30px; height: 30px; }
    .callout-icon svg { width: 18px; height: 18px; }
    .article-body ol.step-list > li { gap: 10px; }
    .article-body ol.step-list > li::before { width: 24px; height: 24px; font-size: 12px; }
}

/* 30. Reduced motion (MUST be last) */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
