/*
Theme Name: Africa Science
Theme URI: https://africascience.org
Author: Africa Science
Author URI: https://africascience.org
Description: A professional, governmental-style news and publication theme for Africa Science. Mobile-first, accessible (WCAG 2.1 AA), SEO-optimised with schema markup, GA4 support, Mailchimp newsletter, and POPIA-compliant cookie consent. Inspired by leading publications such as the Financial Times and research bodies like the CSIR.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: africa-science
Tags: news, magazine, blog, custom-colors, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, accessibility-ready, right-sidebar, full-width-template
*/

/* =========================================================================
   1. CSS Custom Properties (Design Tokens)
   Colour palette derived from the Africa Science logo.
   ========================================================================= */
:root {
    /* Brand colours */
    --as-navy: #162a53;          /* Primary - navy blue from logo */
    --as-navy-dark: #0f1d3a;     /* Darker navy for hovers/footer */
    --as-navy-light: #233d73;    /* Lighter navy */
    --as-teal: #12828d;          /* Secondary accent - teal */
    --as-teal-dark: #0d6671;
    --as-gold: #daa436;          /* Tertiary accent - gold */
    --as-gold-dark: #b9871f;

    /* Neutrals */
    --as-white: #ffffff;
    --as-off-white: #f7f8fa;
    --as-grey-100: #eef1f5;
    --as-grey-200: #dde2ea;
    --as-grey-300: #c3cad6;
    --as-grey-500: #6b7385;
    --as-grey-700: #3c4252;
    --as-ink: #1a1d26;           /* Body text */

    /* Semantic */
    --as-link: #12828d;
    --as-link-hover: #0d6671;

    /* Typography */
    --as-font-heading: Georgia, "Times New Roman", "Noto Serif", serif;
    --as-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

    /* Layout */
    --as-container: 1200px;
    --as-container-narrow: 760px;
    --as-radius: 4px;
    --as-shadow: 0 1px 3px rgba(22, 42, 83, 0.08), 0 1px 2px rgba(22, 42, 83, 0.06);
    --as-shadow-lg: 0 8px 24px rgba(22, 42, 83, 0.12);
    --as-gutter: 1.5rem;
    --as-transition: 0.2s ease-in-out;
}

/* =========================================================================
   2. Reset & Base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--as-font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--as-ink);
    background: var(--as-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
    color: var(--as-link);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--as-transition);
}
a:hover, a:focus { color: var(--as-link-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--as-font-heading);
    color: var(--as-navy);
    line-height: 1.2;
    margin: 0 0 0.5em;
    font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.25rem; }

ul, ol { padding-left: 1.25rem; }

blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.5rem;
    border-left: 4px solid var(--as-gold);
    background: var(--as-off-white);
    font-style: italic;
    color: var(--as-grey-700);
}

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: var(--as-grey-100);
    border-radius: var(--as-radius);
}
code { padding: 0.15em 0.4em; font-size: 0.9em; }
pre { padding: 1rem; overflow-x: auto; }

hr { border: 0; border-top: 1px solid var(--as-grey-200); margin: 2rem 0; }

/* =========================================================================
   3. Accessibility helpers
   ========================================================================= */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px; width: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    position: absolute !important;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: var(--as-white);
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow-lg);
    clip: auto !important;
    clip-path: none;
    color: var(--as-navy);
    display: block;
    font-size: 1rem;
    font-weight: 700;
    height: auto;
    left: 6px; top: 6px;
    line-height: normal;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    width: auto;
    z-index: 100000;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 100000;
}
.skip-link:focus {
    left: 6px; top: 6px;
    background: var(--as-navy);
    color: var(--as-white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--as-radius);
}

/* Visible focus outline for keyboard users (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--as-gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   4. Layout
   ========================================================================= */
.container {
    width: 100%;
    max-width: var(--as-container);
    margin-inline: auto;
    padding-inline: var(--as-gutter);
}
.container--narrow { max-width: var(--as-container-narrow); }

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1 0 auto; padding-block: 2.5rem; }

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 992px) {
    .content-with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* =========================================================================
   5. Header & Navigation
   ========================================================================= */
.site-header { background: var(--as-white); border-bottom: 1px solid var(--as-grey-200); }

.topbar { background: var(--as-navy-dark); color: var(--as-grey-100); font-size: 0.8rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 1rem; }
.topbar a { color: var(--as-grey-100); text-decoration: none; }
.topbar a:hover { color: var(--as-gold); }
.topbar__date { opacity: 0.85; }
.topbar__links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
@media (max-width: 600px) { .topbar__date { display: none; } }

.header-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }

.site-branding { display: flex; align-items: center; gap: 0.75rem; }
.site-branding img, .custom-logo { width: 56px; height: 56px; }
.site-title { font-size: 1.6rem; margin: 0; line-height: 1.1; }
.site-title a { color: var(--as-navy); text-decoration: none; }
.site-description { margin: 0; font-size: 0.8rem; color: var(--as-grey-500); font-family: var(--as-font-body); letter-spacing: 0.02em; }

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

/* Search toggle */
.search-toggle, .menu-toggle {
    background: none;
    border: 1px solid var(--as-grey-300);
    border-radius: var(--as-radius);
    color: var(--as-navy);
    cursor: pointer;
    padding: 0.5rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}
.search-toggle:hover, .menu-toggle:hover { background: var(--as-off-white); }
.search-toggle svg, .menu-toggle svg { width: 20px; height: 20px; }

.header-search {
    display: none;
    border-top: 1px solid var(--as-grey-200);
    background: var(--as-off-white);
    padding-block: 1rem;
}
.header-search.is-open { display: block; }

/* Primary navigation */
.primary-nav { background: var(--as-navy); }
.primary-nav .container { padding-inline: var(--as-gutter); }
.primary-menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.primary-menu li { position: relative; }
.primary-menu a {
    display: block;
    color: var(--as-white);
    text-decoration: none;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a {
    color: var(--as-gold);
    border-bottom-color: var(--as-gold);
}
/* Sub-menus */
.primary-menu ul.sub-menu {
    position: absolute;
    left: 0; top: 100%;
    background: var(--as-navy-dark);
    list-style: none;
    margin: 0; padding: 0.25rem 0;
    min-width: 220px;
    box-shadow: var(--as-shadow-lg);
    z-index: 50;
    display: none;
}
.primary-menu li:hover > ul.sub-menu,
.primary-menu li:focus-within > ul.sub-menu { display: block; }
.primary-menu ul.sub-menu a { text-transform: none; padding: 0.6rem 1.25rem; border-bottom: none; }

/* Mobile navigation */
.menu-toggle { display: none; }
@media (max-width: 900px) {
    .menu-toggle { display: inline-flex; }
    .primary-nav { display: none; }
    .primary-nav.is-open { display: block; }
    .primary-menu { flex-direction: column; }
    .primary-menu a { padding: 0.9rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .primary-menu ul.sub-menu { position: static; display: block; box-shadow: none; background: rgba(0,0,0,0.2); }
}

/* =========================================================================
   6. Buttons & Forms
   ========================================================================= */
.btn, button, input[type="submit"], .wp-block-button__link {
    display: inline-block;
    background: var(--as-navy);
    color: var(--as-white);
    border: 2px solid var(--as-navy);
    border-radius: var(--as-radius);
    padding: 0.65rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--as-transition), border-color var(--as-transition);
    line-height: 1.3;
}
.btn:hover, button:hover, input[type="submit"]:hover { background: var(--as-navy-dark); border-color: var(--as-navy-dark); color: var(--as-white); }
.btn--gold { background: var(--as-gold); border-color: var(--as-gold); color: var(--as-navy); }
.btn--gold:hover { background: var(--as-gold-dark); border-color: var(--as-gold-dark); color: var(--as-navy); }
.btn--teal { background: var(--as-teal); border-color: var(--as-teal); color: var(--as-white); }
.btn--outline { background: transparent; color: var(--as-navy); }
.btn--outline:hover { background: var(--as-navy); color: var(--as-white); }

input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="tel"], textarea, select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--as-grey-300);
    border-radius: var(--as-radius);
    font-family: inherit;
    font-size: 1rem;
    color: var(--as-ink);
    background: var(--as-white);
}
input:focus, textarea:focus, select:focus { border-color: var(--as-teal); outline: none; box-shadow: 0 0 0 3px rgba(18,130,141,0.15); }
label { font-weight: 600; display: block; margin-bottom: 0.35rem; }

/* Search form */
.search-form { display: flex; gap: 0.5rem; }
.search-form .search-field { flex: 1; }
.search-form .search-submit { white-space: nowrap; }

/* =========================================================================
   7. Article cards & lists
   ========================================================================= */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--as-navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}
.section-heading h2 {
    margin: 0;
    font-size: 1.35rem;
    position: relative;
}
.section-heading .section-link { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

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

.article-card {
    background: var(--as-white);
    border: 1px solid var(--as-grey-200);
    border-radius: var(--as-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--as-transition), transform var(--as-transition);
}
.article-card:hover { box-shadow: var(--as-shadow-lg); transform: translateY(-2px); }
.article-card__thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--as-grey-100); }
.article-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { padding: 1.1rem 1.2rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.article-card__title { font-size: 1.15rem; margin: 0.4rem 0 0.5rem; }
.article-card__title a { color: var(--as-navy); text-decoration: none; }
.article-card__title a:hover { color: var(--as-teal); }
.article-card__excerpt { font-size: 0.95rem; color: var(--as-grey-700); margin: 0 0 1rem; }
.article-card__meta { margin-top: auto; font-size: 0.8rem; color: var(--as-grey-500); }

.cat-badge {
    display: inline-block;
    background: var(--as-teal);
    color: var(--as-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    text-decoration: none;
}
.cat-badge:hover { background: var(--as-teal-dark); color: var(--as-white); }

/* Hero / lead story */
.hero { margin-bottom: 2.5rem; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 2fr 1fr; } }
.hero-lead {
    position: relative;
    border-radius: var(--as-radius);
    overflow: hidden;
    display: block;
    min-height: 420px;
    background: var(--as-navy);
}
.hero-lead__thumb {
    display: block;
    position: absolute;
    inset: 0;
    margin: 0;
}
.hero-lead__thumb img,
.hero-lead__thumb svg,
.hero-lead__thumb .placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Dark gradient overlay so text stays readable on any image */
.hero-lead__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 29, 58, 0.92) 0%, rgba(15, 29, 58, 0.55) 38%, rgba(15, 29, 58, 0.12) 65%, rgba(15, 29, 58, 0) 100%);
    pointer-events: none;
}
.hero-lead__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.5rem 1.75rem 1.6rem;
    color: var(--as-white);
}
.hero-lead__body .cat-badge { background: var(--as-gold); color: var(--as-navy); }
.hero-lead__body .cat-badge:hover { background: var(--as-gold-dark); }
.hero-lead__title { font-size: clamp(1.45rem, 2.8vw, 2.1rem); margin: 0.6rem 0 0.5rem; color: var(--as-white); text-shadow: 0 1px 3px rgba(0,0,0,0.45); }
.hero-lead__title a { color: var(--as-white); text-decoration: none; }
.hero-lead__title a:hover, .hero-lead__title a:focus { color: var(--as-gold); }
.hero-lead__excerpt {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 1rem;
    max-width: 60ch;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    /* Clamp to keep the overlay tidy */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-lead__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}
.hero-lead__meta { color: rgba(255, 255, 255, 0.85); margin: 0; }
.hero-lead__meta a, .hero-lead__meta .author-name { color: rgba(255, 255, 255, 0.95); }
.hero-lead__more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--as-gold);
    color: var(--as-navy);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: var(--as-radius);
    white-space: nowrap;
}
.hero-lead__more:hover, .hero-lead__more:focus { background: var(--as-gold-dark); color: var(--as-navy); }
@media (max-width: 767px) {
    .hero-lead { min-height: 340px; }
    .hero-lead__body { padding: 1.1rem 1.1rem 1.2rem; }
}
.hero-secondary { display: flex; flex-direction: column; gap: 1.25rem; }
.hero-secondary .article-card { flex-direction: row; }
.hero-secondary .article-card__thumb { width: 110px; flex-shrink: 0; aspect-ratio: 1; }
.hero-secondary .article-card__body { padding: 0.75rem 0.9rem; }
.hero-secondary .article-card__title { font-size: 1rem; }

/* Category section blocks on homepage */
.cat-section { margin-bottom: 3rem; }

/* List view (archive) */
.post-list { display: flex; flex-direction: column; gap: 1.75rem; }
.post-list .article-card { flex-direction: row; }
@media (max-width: 560px) { .post-list .article-card { flex-direction: column; } }
.post-list .article-card__thumb { width: 240px; flex-shrink: 0; aspect-ratio: 4/3; }
@media (max-width: 560px) { .post-list .article-card__thumb { width: 100%; aspect-ratio: 16/9; } }

/* =========================================================================
   8. Single post / page
   ========================================================================= */
.entry-header { margin-bottom: 1.75rem; }
.entry-title { margin: 0.5rem 0; }
.entry-meta { font-size: 0.9rem; color: var(--as-grey-500); display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; }
.entry-meta a { color: var(--as-grey-700); }
.entry-meta .author-name { font-weight: 600; }

.featured-media { margin: 0 0 1.75rem; border-radius: var(--as-radius); overflow: hidden; }
.featured-media img { width: 100%; }
.featured-media figcaption { font-size: 0.8rem; color: var(--as-grey-500); padding: 0.5rem 0; }

.entry-content { font-size: 1.12rem; line-height: 1.75; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; }
.entry-content img { border-radius: var(--as-radius); margin-block: 1.5rem; }
.entry-content a { color: var(--as-teal); }

.entry-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--as-grey-200); }
.tag-links a {
    display: inline-block;
    background: var(--as-grey-100);
    color: var(--as-grey-700);
    padding: 0.25rem 0.7rem;
    border-radius: 2px;
    font-size: 0.82rem;
    text-decoration: none;
    margin: 0 0.35rem 0.35rem 0;
}
.tag-links a:hover { background: var(--as-navy); color: var(--as-white); }

/* Share buttons */
.share-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.share-buttons a { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; padding: 0.4rem 0.8rem; background: var(--as-navy); color: #fff; border-radius: var(--as-radius); text-decoration: none; }
.share-buttons a:hover { background: var(--as-navy-dark); color: #fff; }

/* Author bio */
.author-bio { display: flex; gap: 1.25rem; background: var(--as-off-white); border-radius: var(--as-radius); padding: 1.5rem; margin-top: 2rem; }
.author-bio img { width: 72px; height: 72px; border-radius: 50%; }

/* Post navigation */
.post-navigation { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-navigation a { text-decoration: none; display: block; padding: 1rem; border: 1px solid var(--as-grey-200); border-radius: var(--as-radius); }
.post-navigation .nav-subtitle { font-size: 0.75rem; text-transform: uppercase; color: var(--as-grey-500); letter-spacing: 0.05em; }
.post-navigation .nav-title { color: var(--as-navy); font-weight: 600; }
.post-navigation .nav-next { text-align: right; }

/* Related posts */
.related-posts { margin-top: 3rem; }

/* =========================================================================
   9. Sidebar & Widgets
   ========================================================================= */
.widget { margin-bottom: 2rem; background: var(--as-white); border: 1px solid var(--as-grey-200); border-radius: var(--as-radius); padding: 1.25rem; }
.widget-title { font-size: 1.05rem; margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--as-gold); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--as-grey-100); }
.widget li:last-child { border-bottom: none; }
.widget a { text-decoration: none; color: var(--as-grey-700); }
.widget a:hover { color: var(--as-teal); }

/* =========================================================================
   10. Newsletter (Mailchimp)
   ========================================================================= */
.newsletter {
    background: linear-gradient(135deg, var(--as-navy) 0%, var(--as-navy-light) 100%);
    color: var(--as-white);
    border-radius: var(--as-radius);
    padding: 2rem 1.75rem;
}
.newsletter--banner { margin-block: 3rem; }
.newsletter h2, .newsletter h3 { color: var(--as-white); margin-top: 0; }
.newsletter p { color: var(--as-grey-100); margin-bottom: 1.25rem; }
.newsletter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] { flex: 1 1 240px; }
.newsletter-form .btn { flex-shrink: 0; }
.newsletter__consent { font-size: 0.78rem; color: var(--as-grey-200); margin-top: 0.75rem; margin-bottom: 0; }
.newsletter__consent a { color: var(--as-gold); }
.newsletter-message { margin-top: 0.75rem; font-size: 0.9rem; font-weight: 600; }
.newsletter-message.success { color: #8ef0b0; }
.newsletter-message.error { color: #ffb3b3; }

/* =========================================================================
   11. Footer
   ========================================================================= */
.site-footer { background: var(--as-navy-dark); color: var(--as-grey-100); margin-top: 3rem; }
.footer-top { padding-block: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }
.footer-brand img { width: 64px; height: 64px; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; color: var(--as-grey-200); }
.footer-col h3 { color: var(--as-white); font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: var(--as-grey-100); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--as-gold); }
.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-links a { color: var(--as-grey-100); }
.social-links svg { width: 22px; height: 22px; }
.social-links a:hover { color: var(--as-gold); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-block: 1.25rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.footer-legal a { color: var(--as-grey-100); text-decoration: none; }
.footer-legal a:hover { color: var(--as-gold); }
.footer-copyright { font-size: 0.82rem; color: var(--as-grey-300); margin: 0; }

/* =========================================================================
   12. Cookie consent banner
   ========================================================================= */
.cookie-consent {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    max-width: 760px;
    margin-inline: auto;
    background: var(--as-white);
    color: var(--as-ink);
    border: 1px solid var(--as-grey-200);
    box-shadow: var(--as-shadow-lg);
    border-radius: var(--as-radius);
    padding: 1.25rem 1.5rem;
    z-index: 9999;
    display: none;
}
.cookie-consent.is-visible { display: block; }
.cookie-consent p { margin: 0 0 1rem; font-size: 0.9rem; }
.cookie-consent a { color: var(--as-teal); }
.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-consent__actions .btn { padding: 0.5rem 1.1rem; font-size: 0.88rem; }

/* =========================================================================
   13. Pagination & misc
   ========================================================================= */
.pagination { margin-top: 2.5rem; display: flex; justify-content: center; }
.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    margin: 0 0.2rem;
    border: 1px solid var(--as-grey-200);
    border-radius: var(--as-radius);
    text-decoration: none;
    color: var(--as-navy);
}
.pagination .page-numbers.current { background: var(--as-navy); color: var(--as-white); border-color: var(--as-navy); }
.pagination .page-numbers:hover:not(.current) { background: var(--as-off-white); }

.breadcrumbs { font-size: 0.85rem; color: var(--as-grey-500); margin-bottom: 1.25rem; }
.breadcrumbs a { color: var(--as-teal); text-decoration: none; }
.breadcrumbs span[aria-current] { color: var(--as-grey-700); }

.page-title-block { background: var(--as-off-white); border-bottom: 1px solid var(--as-grey-200); padding-block: 2rem; }
.page-title-block h1 { margin: 0; }
.page-title-block .archive-description { margin-top: 0.5rem; color: var(--as-grey-700); }

/* Comments */
.comments-area { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1.25rem; border: 1px solid var(--as-grey-200); border-radius: var(--as-radius); margin-bottom: 1rem; }
.comment-list .children { list-style: none; margin-left: 1.5rem; }
.comment-author { font-weight: 600; color: var(--as-navy); }
.comment-metadata { font-size: 0.8rem; color: var(--as-grey-500); }

/* 404 */
.error-404 { text-align: center; padding-block: 3rem; }
.error-404 .error-code { font-size: clamp(4rem, 12vw, 8rem); color: var(--as-grey-200); line-height: 1; margin: 0; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
