/*
Theme Name:  CGB Theme Advertising Italia
Theme URI:   https://github.com/GiuseppeLecis/cgb-theme-adv-italia
Author:      Giuseppe Lecis
Author URI:  https://github.com/GiuseppeLecis
Description: Tema magazine / news ispirato a Wired, Il Post e The Mow Times. Architettura Classic Theme + Custom Gutenberg Blocks. Supporto mega-menu, dark mode, performance-first.
Version:     0.3.12
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cgb-adv-italia
Tags:        magazine, news, gutenberg, custom-blocks, megamenu, dark-mode
*/

/* ================================================================
   0. RESET & BASE
   ================================================================ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

:root {
    /* ── Typography ── */
    --adv-ff-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --adv-ff-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --adv-ff-display: 'Didot', 'Playfair Display', 'Bodoni 72', Georgia, 'Times New Roman', serif;
    --adv-ff-mono:    'JetBrains Mono', 'Fira Code', monospace;

    --adv-fs-xs:   0.75rem;    /* 12px */
    --adv-fs-sm:   0.8125rem;  /* 13px */
    --adv-fs-base: 1rem;       /* 16px */
    --adv-fs-md:   1.125rem;   /* 18px */
    --adv-fs-lg:   1.25rem;    /* 20px */
    --adv-fs-xl:   1.5rem;     /* 24px */
    --adv-fs-2xl:  2rem;       /* 32px */
    --adv-fs-3xl:  2.5rem;     /* 40px */
    --adv-fs-4xl:  3rem;       /* 48px */

    --adv-fw-normal:   400;
    --adv-fw-medium:   500;
    --adv-fw-semibold: 600;
    --adv-fw-bold:     700;
    --adv-fw-black:    900;

    --adv-lh-tight:  1.2;
    --adv-lh-normal: 1.5;
    --adv-lh-loose:  1.75;

    /* ── Colors — Light Mode ── */
    --adv-bg:          #ffffff;
    --adv-bg-alt:      #f5f5f5;
    --adv-bg-elevated: #ffffff;
    --adv-text:        #1a1a1a;
    --adv-text-muted:  #6b6b6b;
    --adv-text-light:  #767676;
    --adv-border:      #e5e5e5;
    --adv-border-dark: #cccccc;
    --adv-accent:      #f04438;   /* rosso corallo editoriale */
    --adv-accent-hover:#d92d20;
    --adv-accent-soft: #fff1f0;
    --adv-breaking:    #f04438;   /* badge LIVE/BREAKING */
    --adv-strip-bg:    #eef0f8;   /* lavender soft per la strip ticker */
    --adv-link:        #1a1a1a;
    --adv-link-hover:  #f04438;

    /* ── Layout ── */
    --adv-content-width:  1320px;
    --adv-content-narrow: 780px;
    --adv-gutter:         24px;
    --adv-gutter-lg:      40px;
    --adv-sidebar-width:  80px;
    --adv-header-height:  60px;

    /* ── Spacing ── */
    --adv-sp-xs:  4px;
    --adv-sp-sm:  8px;
    --adv-sp-md:  16px;
    --adv-sp-lg:  24px;
    --adv-sp-xl:  40px;
    --adv-sp-2xl: 64px;
    --adv-sp-3xl: 96px;

    /* ── Radius ── */
    --adv-radius-sm: 4px;
    --adv-radius:    8px;
    --adv-radius-lg: 12px;
    --adv-radius-xl: 16px;
    --adv-radius-full: 9999px;

    /* ── Shadows ── */
    --adv-shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
    --adv-shadow:     0 2px 8px rgba(0,0,0,0.08);
    --adv-shadow-lg:  0 8px 24px rgba(0,0,0,0.12);

    /* ── Transitions ── */
    --adv-ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --adv-duration: 200ms;

    /* ── Header/Mega ── */
    --adv-mega-bg:         #ffffff;
    --adv-mega-shadow:     0 8px 32px rgba(0,0,0,0.12);
    --adv-mega-anim-dur:   280ms;
}

/* ── Dark mode ── */
[data-theme="dark"] {
    --adv-bg:          #0d0d0d;
    --adv-bg-alt:      #1a1a1a;
    --adv-bg-elevated: #262626;
    --adv-text:        #e5e5e5;
    --adv-text-muted:  #999999;
    --adv-text-light:  #666666;
    --adv-border:      #333333;
    --adv-border-dark: #444444;
    --adv-strip-bg:    #1a1a22;
    --adv-link:        #e5e5e5;
    --adv-link-hover:  #ff6b5f;
    --adv-mega-bg:     #1a1a1a;
    --adv-mega-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ── Screen-reader only utility ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================================================
   1. TYPOGRAPHY
   ================================================================ */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--adv-ff-body);
    font-size: var(--adv-fs-base);
    font-weight: var(--adv-fw-normal);
    line-height: var(--adv-lh-normal);
    color: var(--adv-text);
    background-color: var(--adv-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--adv-ff-heading);
    font-weight: var(--adv-fw-bold);
    line-height: var(--adv-lh-tight);
    color: var(--adv-text);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, var(--adv-fs-4xl)); }
h2 { font-size: clamp(1.5rem, 3vw, var(--adv-fs-3xl)); }
h3 { font-size: clamp(1.25rem, 2.5vw, var(--adv-fs-2xl)); }
h4 { font-size: var(--adv-fs-xl); }
h5 { font-size: var(--adv-fs-lg); }
h6 { font-size: var(--adv-fs-md); }

a {
    color: var(--adv-link);
    text-decoration: none;
    transition: color var(--adv-duration) var(--adv-ease);
}
a:hover { color: var(--adv-link-hover); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* Category / meta labels */
.adv-label {
    font-family: var(--adv-ff-body);
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--adv-text-muted);
}
.adv-label--accent { color: var(--adv-accent); }

/* Date / time ago */
.adv-meta {
    font-size: var(--adv-fs-xs);
    color: var(--adv-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.adv-meta::before {
    content: '✦';
    font-size: 8px;
}

/* ================================================================
   2. LAYOUT
   ================================================================ */
.adv-container {
    max-width: var(--adv-content-width);
    margin-inline: auto;
    padding-inline: var(--adv-gutter);
}

.adv-container--narrow {
    max-width: var(--adv-content-narrow);
}

.adv-section {
    padding-block: var(--adv-sp-xl);
}

.adv-divider {
    border: none;
    border-top: 1px solid var(--adv-border);
    margin-block: var(--adv-sp-xl);
}

/* ================================================================
   3. HEADER
   ================================================================ */
.adv-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--adv-bg);
    border-bottom: 1px solid var(--adv-border);
    transition: box-shadow var(--adv-duration) var(--adv-ease);
}

.adv-site-header.adv-header-scrolled {
    box-shadow: var(--adv-shadow);
}

/* ═══════════════════════════════════════════
   Row 1 — Logo (center) + Actions (right)
   ═══════════════════════════════════════════ */
.adv-header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--adv-sp-lg) 0 var(--adv-sp-md);
}
.adv-header-top__left {
    flex: 1;
}

/* ── Logo — centered, big ── */
.adv-site-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 0;
    gap: 0;
}
.adv-logo {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}
.adv-logo--white { display: none; }
.adv-logo--dark  { display: block; }
[data-theme="dark"] .adv-logo--dark  { display: none; }
[data-theme="dark"] .adv-logo--white { display: block; }

/* ── Brand tagline — sotto il logo ── */
.adv-brand-tagline {
    display: block;
    margin-top: 6px;
    font-family: var(--adv-ff-body);
    font-size: 11px;
    font-weight: var(--adv-fw-medium);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--adv-text-muted);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

/* ── Right actions (absolute-right of top bar) ── */
.adv-header-actions {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* Theme toggle — small icon button */
.adv-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius-full);
    background: var(--adv-bg-alt);
    cursor: pointer;
    color: var(--adv-text-muted);
    transition: all var(--adv-duration) var(--adv-ease);
}
.adv-theme-toggle:hover {
    color: var(--adv-text);
    border-color: var(--adv-border-dark);
}
.adv-theme-toggle__icon { display: block; }
.adv-theme-toggle__moon { display: none; }
[data-theme="dark"] .adv-theme-toggle__sun  { display: none; }
[data-theme="dark"] .adv-theme-toggle__moon { display: block; }

/* Search toggle */
.adv-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--adv-radius-full);
    background: none;
    cursor: pointer;
    color: var(--adv-text-muted);
    transition: color var(--adv-duration) var(--adv-ease);
}
.adv-search-toggle:hover { color: var(--adv-text); }

/* Hamburger (mobile only) */
.adv-hamburger {
    display: none;
    width: 34px;
    height: 34px;
    border: none;
    background: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--adv-text);
}
.adv-hamburger svg { width: 22px; height: 22px; }
.adv-hamburger .icon-close { display: none; }
.adv-nav-open .adv-hamburger .icon-open  { display: none; }
.adv-nav-open .adv-hamburger .icon-close { display: block; }

/* ═══════════════════════════════════════════
   Row 2 — Navigation bar (categories, centered)
   ═══════════════════════════════════════════ */
.adv-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--adv-sp-sm) 0;
    border-top: none;
    border-bottom: 1px solid var(--adv-border);
    position: relative;  /* anchor for mega panel */
}
.adv-primary-nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--adv-sp-xl);
    flex-wrap: nowrap;
}
.adv-primary-nav > li > a {
    font-size: var(--adv-fs-md);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-text);
    text-decoration: none;
    padding: 8px 0;
    white-space: nowrap;
    position: relative;
    transition: color var(--adv-duration) var(--adv-ease);
}
.adv-primary-nav > li > a:hover,
.adv-primary-nav > li.current-cat > a,
.adv-primary-nav > li.current-menu-item > a {
    color: var(--adv-accent);
}

/* Dropdown caret */
.adv-primary-nav > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    margin-left: 5px;
    transition: transform var(--adv-duration) var(--adv-ease);
}

/* ═══════════════════════════════════════════
   Responsive: Small header tweaks ≤ 768px
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .adv-header-top__left { display: none; }
    .adv-header-top { justify-content: space-between; }
    .adv-logo { height: 42px; }
    .adv-brand-tagline { font-size: 8px; letter-spacing: 0.18em; margin-top: 4px; }
}

/* ================================================================
   4. MEGA MENU — Column-based, driven by WP Menu + "mega-menu" CSS class
   ================================================================ */

/* ── Backdrop overlay: darkens + blurs the page ── */
.adv-mega-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--adv-mega-anim-dur) var(--adv-ease),
        visibility 0s var(--adv-mega-anim-dur);
    pointer-events: none;
}
.adv-mega-backdrop.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity var(--adv-mega-anim-dur) var(--adv-ease),
        visibility 0s 0s;
}

/* ── Trigger: item with class "mega-menu" ── */
.adv-has-megamenu {
    position: static;
}
.adv-has-megamenu > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    margin-left: 6px;
    transition: transform var(--adv-duration) var(--adv-ease);
}
.adv-has-megamenu.is-open > a::after {
    transform: rotate(-135deg) translateY(-1px);
}

/* ── Panel ── */
.adv-mega-panel {
    position: absolute;
    left: 50%;
    right: auto;
    width: 100vw;
    top: 100%;
    background: var(--adv-mega-bg);
    box-shadow: var(--adv-mega-shadow);
    border-top: 1px solid var(--adv-border);
    padding: var(--adv-sp-xl) 0 var(--adv-sp-2xl);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    transition:
        opacity var(--adv-mega-anim-dur) var(--adv-ease),
        transform var(--adv-mega-anim-dur) var(--adv-ease),
        visibility 0s var(--adv-mega-anim-dur);
    z-index: 999;
}
.adv-mega-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition:
        opacity var(--adv-mega-anim-dur) var(--adv-ease),
        transform var(--adv-mega-anim-dur) var(--adv-ease),
        visibility 0s 0s;
}

/* ── Inner container ── */
.adv-mega-panel__inner {
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-lg);
}

/* ── Columns grid ── */
.adv-mega-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--adv-sp-xl);
}

/* ── Single column ── */
.adv-mega-col {
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-sm);
}

/* Column heading */
.adv-mega-col__title {
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 var(--adv-sp-sm);
    padding-bottom: var(--adv-sp-xs);
    border-bottom: 2px solid var(--adv-accent);
}
.adv-mega-col__title a {
    color: var(--adv-text);
    text-decoration: none;
}
.adv-mega-col__title a:hover {
    color: var(--adv-accent);
}

/* Sub-links list */
.adv-mega-col__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.adv-mega-col__link-item a {
    font-size: var(--adv-fs-sm);
    color: var(--adv-text-muted);
    text-decoration: none;
    transition: color var(--adv-duration) var(--adv-ease);
}
.adv-mega-col__link-item a:hover {
    color: var(--adv-accent);
}

/* ── Mini-cards: 2 recent posts per category column ── */
.adv-mega-col__cards {
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-sm);
    margin-top: var(--adv-sp-xs);
}

.adv-mega-minicard {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: var(--adv-text);
    transition: opacity var(--adv-duration) var(--adv-ease);
}
.adv-mega-minicard:hover {
    opacity: 0.75;
}

.adv-mega-minicard__img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
}

.adv-mega-minicard__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.adv-mega-minicard__title {
    font-size: 13px;
    font-weight: var(--adv-fw-semibold);
    line-height: var(--adv-lh-tight);
    color: var(--adv-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adv-mega-minicard__time {
    font-size: 11px;
    color: var(--adv-text-muted);
}

/* "Vedi tutti →" link */
.adv-mega-col__view-all {
    display: inline-block;
    margin-top: var(--adv-sp-xs);
    font-size: 12px;
    font-weight: var(--adv-fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--adv-accent);
    text-decoration: none;
    transition: opacity var(--adv-duration) var(--adv-ease);
}
.adv-mega-col__view-all:hover {
    opacity: 0.7;
}

/* ── Mobile: stack columns vertically ── */
@media (max-width: 1023px) {
    .adv-mega-panel {
        position: static;
        box-shadow: none;
        border-top: none;
        padding: var(--adv-sp-md) 0;
        background: var(--adv-bg-alt);
    }
    .adv-mega-columns {
        grid-template-columns: 1fr;
        gap: var(--adv-sp-lg);
    }
    .adv-mega-col__cards {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .adv-mega-minicard {
        min-width: 200px;
    }
}

/* ================================================================
   5. RIGHT SIDEBAR — Tool icons (user, menu, search, flash)
   ================================================================ */
.adv-sidebar-right {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.adv-sidebar-right__btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--adv-bg);
    border: 1px solid var(--adv-border);
    border-right: none;
    cursor: pointer;
    color: var(--adv-text);
    transition: background var(--adv-duration) var(--adv-ease);
}
.adv-sidebar-right__btn:first-child { border-radius: var(--adv-radius) 0 0 0; }
.adv-sidebar-right__btn:last-child  { border-radius: 0 0 0 var(--adv-radius); }
.adv-sidebar-right__btn:hover { background: var(--adv-bg-alt); }
.adv-sidebar-right__btn svg { width: 20px; height: 20px; }

/* ================================================================
   5b. OFF-CANVAS MENU — Full-screen overlay (desktop)
   ================================================================ */
.adv-offcanvas {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
}
.adv-offcanvas.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.adv-offcanvas__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s var(--adv-ease);
}
.adv-offcanvas.is-open .adv-offcanvas__backdrop {
    opacity: 1;
}

/* Panel — slides in from right */
.adv-offcanvas__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(520px, 90vw);
    background: var(--adv-surface, #1a1a1a);
    color: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
[data-theme="light"] .adv-offcanvas__panel {
    background: #1a1a1a;
    color: #fff;
}
.adv-offcanvas.is-open .adv-offcanvas__panel {
    transform: translateX(0);
}

/* Header: logo + close */
.adv-offcanvas__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--adv-sp-lg) var(--adv-sp-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.adv-offcanvas__brand img {
    height: 36px;
    width: auto;
    display: block;
    aspect-ratio: 501 / 70;
    object-fit: contain;
}
.adv-offcanvas__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.adv-offcanvas__close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Body: navigation sections */
.adv-offcanvas__body {
    flex: 1;
    padding: var(--adv-sp-xl);
    overflow-y: auto;
}
.adv-offcanvas__section {
    margin-bottom: var(--adv-sp-xl);
}
.adv-offcanvas__section:last-child {
    margin-bottom: 0;
}
.adv-offcanvas__section-title {
    font-size: 11px;
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 var(--adv-sp-md);
    padding-bottom: var(--adv-sp-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Columns layout for categories */
.adv-offcanvas__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--adv-sp-xl);
}

/* Nav links */
.adv-offcanvas__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.adv-offcanvas__nav li {
    margin: 0;
}
.adv-offcanvas__nav a {
    display: block;
    padding: 10px 0;
    font-size: var(--adv-fs-md);
    font-weight: var(--adv-fw-medium);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.adv-offcanvas__nav a:hover {
    color: var(--adv-accent);
    padding-left: 6px;
}

/* Sub-menu inside offcanvas (depth 2) */
.adv-offcanvas__nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 var(--adv-sp-md);
}
.adv-offcanvas__nav .sub-menu a {
    font-size: var(--adv-fs-sm);
    color: rgba(255, 255, 255, 0.6);
}
.adv-offcanvas__nav .sub-menu a:hover {
    color: var(--adv-accent);
}

/* Footer: social links */
.adv-offcanvas__footer {
    display: flex;
    align-items: center;
    gap: var(--adv-sp-md);
    padding: var(--adv-sp-lg) var(--adv-sp-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.adv-offcanvas__social {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.adv-offcanvas__social:hover {
    color: #fff;
    border-color: var(--adv-accent);
    background: var(--adv-accent);
}

/* ================================================================
   5c. SEARCH OVERLAY — Full-screen search panel
   ================================================================ */
.adv-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    visibility: hidden;
    pointer-events: none;
}
.adv-search-overlay.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.adv-search-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.35s var(--adv-ease);
}
.adv-search-overlay.is-open .adv-search-overlay__backdrop {
    opacity: 1;
}

/* Container — centered, max-width card */
.adv-search-overlay__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    opacity: 0;
    width: min(680px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--adv-bg);
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius-lg, 12px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s var(--adv-ease);
    overflow: hidden;
}
.adv-search-overlay.is-open .adv-search-overlay__container {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Close button (top-right) */
.adv-search-overlay__close {
    position: absolute;
    top: var(--adv-sp-md);
    right: var(--adv-sp-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--adv-border);
    border-radius: 50%;
    color: var(--adv-text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    z-index: 2;
}
.adv-search-overlay__close:hover {
    color: var(--adv-text);
    background: var(--adv-bg-alt);
    border-color: var(--adv-text-muted);
}

/* Search form */
.adv-search-overlay__form {
    padding: var(--adv-sp-xl) var(--adv-sp-xl) var(--adv-sp-md);
    flex-shrink: 0;
}
.adv-search-overlay__label {
    display: block;
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--adv-accent);
    margin-bottom: var(--adv-sp-sm);
}
.adv-search-overlay__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--adv-sp-sm);
    border-bottom: 2px solid var(--adv-border);
    padding-bottom: var(--adv-sp-sm);
    transition: border-color 0.2s ease;
}
.adv-search-overlay__input-wrap:focus-within {
    border-color: var(--adv-accent);
}
.adv-search-overlay__input-wrap svg {
    flex-shrink: 0;
    color: var(--adv-text-muted);
    transition: color 0.2s ease;
}
.adv-search-overlay__input-wrap:focus-within svg {
    color: var(--adv-accent);
}
.adv-search-overlay__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-text);
    padding: var(--adv-sp-xs) 0;
}
.adv-search-overlay__input::placeholder {
    color: var(--adv-text-muted);
    font-weight: var(--adv-fw-regular);
}

/* Spinner */
.adv-search-overlay__spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--adv-border);
    border-top-color: var(--adv-accent);
    border-radius: 50%;
    animation: adv-spin 0.6s linear infinite;
    flex-shrink: 0;
}
.adv-search-overlay__spinner.is-active {
    display: block;
}
@keyframes adv-spin {
    to { transform: rotate(360deg); }
}

/* Results container */
.adv-search-overlay__results {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--adv-sp-xl) var(--adv-sp-md);
    -webkit-overflow-scrolling: touch;
}

/* Single result card */
.adv-search-result {
    display: flex;
    align-items: flex-start;
    gap: var(--adv-sp-md);
    padding: var(--adv-sp-md) 0;
    border-bottom: 1px solid var(--adv-border);
    text-decoration: none;
    color: var(--adv-text);
    transition: background 0.15s ease;
    border-radius: var(--adv-radius);
}
.adv-search-result:last-child {
    border-bottom: none;
}
.adv-search-result:hover {
    background: var(--adv-bg-alt);
}

/* Thumbnail */
.adv-search-result__thumb {
    width: 72px;
    height: 56px;
    border-radius: var(--adv-radius);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--adv-bg-alt);
}
.adv-search-result__thumb--placeholder {
    width: 72px;
    height: 56px;
    border-radius: var(--adv-radius);
    flex-shrink: 0;
    background: var(--adv-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--adv-text-muted);
    font-size: var(--adv-fs-xs);
}

/* Body */
.adv-search-result__body {
    flex: 1;
    min-width: 0;
}
.adv-search-result__cat {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--adv-accent);
    display: block;
    margin-bottom: 2px;
}
.adv-search-result__title {
    font-size: var(--adv-fs-base);
    font-weight: var(--adv-fw-semibold);
    line-height: 1.3;
    margin: 0 0 4px;
    color: var(--adv-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.adv-search-result__excerpt {
    font-size: var(--adv-fs-xs);
    color: var(--adv-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Totale risultati */
.adv-search-overlay__total {
    font-size: var(--adv-fs-xs);
    color: var(--adv-text-muted);
    padding: var(--adv-sp-sm) 0 var(--adv-sp-xs);
    margin: 0;
}
.adv-search-overlay__total strong {
    color: var(--adv-text);
}

/* Load more button */
.adv-search-overlay__more {
    display: block;
    width: 100%;
    padding: var(--adv-sp-sm) var(--adv-sp-md);
    margin-top: var(--adv-sp-sm);
    background: var(--adv-bg-alt);
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius);
    color: var(--adv-text);
    font-family: inherit;
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-semibold);
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.adv-search-overlay__more:hover {
    background: var(--adv-accent);
    border-color: var(--adv-accent);
    color: #fff;
}

/* No results */
.adv-search-overlay__empty {
    text-align: center;
    padding: var(--adv-sp-xl) 0;
    color: var(--adv-text-muted);
    font-size: var(--adv-fs-sm);
}
.adv-search-overlay__empty svg {
    display: block;
    margin: 0 auto var(--adv-sp-md);
    opacity: 0.4;
}

/* Hint text */
.adv-search-overlay__hint {
    text-align: center;
    padding: var(--adv-sp-md) var(--adv-sp-xl) var(--adv-sp-lg);
    color: var(--adv-text-muted);
    font-size: var(--adv-fs-xs);
    margin: 0;
    flex-shrink: 0;
}

/* Keyboard shortcut badge */
.adv-search-overlay__kbd {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 4px;
    font-size: 0.7rem;
    font-family: inherit;
    background: var(--adv-bg-alt);
    border: 1px solid var(--adv-border);
    border-radius: 4px;
    color: var(--adv-text-muted);
    vertical-align: middle;
}

/* ================================================================
   6. LEFT SIDEBAR — Popular Now + Scroll to Top
   ================================================================ */
.adv-sidebar-left {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--adv-sp-md);
    gap: var(--adv-sp-md);
}

.adv-popular-label {
    font-size: 10px;
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    line-height: 1.3;
}
.adv-popular-label::after {
    content: '↓';
    display: block;
    font-size: 14px;
    margin-top: 4px;
    animation: adv-bounce 1.5s ease infinite;
}

@keyframes adv-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

.adv-popular-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--adv-border);
    transition: border-color var(--adv-duration) var(--adv-ease);
}
.adv-popular-avatar:hover { border-color: var(--adv-text); }

.adv-popular-more {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--adv-bg-alt);
    border: 1px solid var(--adv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--adv-text);
    transition: transform .25s ease, background .15s;
}
.adv-popular-more:hover { background: var(--adv-border); }
.adv-popular-more.is-open {
    transform: rotate(45deg);
}

/* Extra avatars — hidden by default */
.adv-popular-extra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--adv-sp-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
}
.adv-popular-extra.is-open {
    max-height: 400px;
    opacity: 1;
}

.adv-scroll-top {
    writing-mode: vertical-rl;
    font-size: 10px;
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--adv-text-muted);
    cursor: pointer;
    margin-top: var(--adv-sp-md);
    border-left: 2px solid var(--adv-text);
    padding-left: 8px;
    transition: color var(--adv-duration) var(--adv-ease);
}
.adv-scroll-top:hover { color: var(--adv-text); }

/* ================================================================
   7. NEWSLETTER OFF-CANVAS (Right slide-in panel)
   ================================================================ */
.adv-offcanvas-nl {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
}
.adv-offcanvas-nl.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.adv-offcanvas-nl__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.4s var(--adv-ease);
}
.adv-offcanvas-nl.is-open .adv-offcanvas-nl__backdrop {
    opacity: 1;
}

/* Panel — slides in from right */
.adv-offcanvas-nl__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 90vw);
    background: #1a1a1a;
    color: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.adv-offcanvas-nl.is-open .adv-offcanvas-nl__panel {
    transform: translateX(0);
}

/* Header */
.adv-offcanvas-nl__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--adv-sp-lg) var(--adv-sp-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.adv-offcanvas-nl__title {
    font-family: var(--adv-ff-heading);
    font-size: 20px;
    font-weight: var(--adv-fw-bold);
    margin: 0;
    color: #fff;
}
.adv-offcanvas-nl__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.adv-offcanvas-nl__close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Body */
.adv-offcanvas-nl__body {
    flex: 1;
    padding: var(--adv-sp-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Brand logo */
.adv-offcanvas-nl__brand {
    margin-bottom: var(--adv-sp-xl);
}
.adv-offcanvas-nl__brand img {
    height: 32px;
    width: auto;
    display: block;
    opacity: 0.85;
}

/* Motivational headline */
.adv-offcanvas-nl__headline {
    font-family: var(--adv-ff-heading);
    font-size: clamp(22px, 3vw, 28px);
    font-weight: var(--adv-fw-black);
    line-height: 1.2;
    color: #fff;
    margin: 0 0 var(--adv-sp-sm);
}
.adv-offcanvas-nl__subheadline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 var(--adv-sp-xl);
}

/* Override newsletter widget colors inside off-canvas */
.adv-offcanvas-nl .rsb-sw-newsletter {
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.adv-offcanvas-nl .rsb-sw-newsletter__desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: var(--adv-sp-lg);
}
.adv-offcanvas-nl .rsb-newsletter-cta__input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}
.adv-offcanvas-nl .rsb-newsletter-cta__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.adv-offcanvas-nl .rsb-newsletter-cta__input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
}
.adv-offcanvas-nl .rsb-newsletter-cta__btn {
    background: var(--adv-accent, #c0392b);
    color: #fff;
}
.adv-offcanvas-nl .rsb-newsletter-cta__btn:hover {
    opacity: 0.9;
}
.adv-offcanvas-nl .rsb-newsletter-cta__consent {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}
.adv-offcanvas-nl .rsb-newsletter-cta__checkbox {
    accent-color: var(--adv-accent, #c0392b);
}

/* ================================================================
   8. SINGLE POST / ARTICLE
   ================================================================ */

/* ── Variables ── */
.adv-single-post {
    --adv-article-width: 860px;       /* body text max-width          */
    --adv-article-wide: 1080px;       /* hero / breakout images        */
    --adv-article-sidebar-w: 300px;   /* sidebar width when active     */
    --adv-article-gap: var(--adv-sp-2xl);
}

/* ── Container modifier ── */
.adv-container--article {
    max-width: calc(var(--adv-article-width) + var(--adv-gutter) * 2);
    margin-inline: auto;
}
.adv-single-layout--sidebar .adv-container--article,
.adv-single-post:has(.adv-single-layout--sidebar) .adv-container--article {
    max-width: calc(var(--adv-article-width) + var(--adv-article-sidebar-w) + var(--adv-article-gap) + var(--adv-gutter) * 2);
}

/* Wide container for hero */
.adv-container--wide {
    max-width: var(--adv-article-wide);
    margin-inline: auto;
    padding-inline: var(--adv-gutter);
}

/* ── Breadcrumb (article-level) ── */
.adv-single-post .adv-breadcrumb {
    border-bottom: 1px solid var(--adv-border);
    padding: var(--adv-sp-sm) 0;
}
.adv-single-post .adv-breadcrumb .adv-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: var(--adv-fw-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.adv-single-post .adv-breadcrumb a {
    color: var(--adv-text);
    text-decoration: none;
}
.adv-single-post .adv-breadcrumb a:hover {
    color: var(--adv-accent);
}
.adv-single-post .adv-breadcrumb__sep { color: var(--adv-text-muted); }
.adv-single-post .adv-breadcrumb__current {
    color: var(--adv-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

/* ── Hero image ── */
.adv-single-post__intro {
    padding-bottom: 0;
}
.adv-single-post__intro .adv-single-post__header {
    margin-bottom: 0;
}
.adv-single-post__hero {
    margin-top: var(--adv-sp-lg);
    margin-bottom: var(--adv-sp-xl);
}
.adv-single-post__main {
    padding-bottom: var(--adv-sp-xl);
}
.adv-single-post:not(:has(.adv-single-post__hero)) .adv-single-post__main {
    padding-top: var(--adv-sp-xl);
}
.adv-single-post__image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--adv-radius);
    display: block;
}

/* ── Header ── */
.adv-single-post__header {
    margin-bottom: var(--adv-sp-xl);
    padding-bottom: var(--adv-sp-lg);
    border-bottom: 1px solid var(--adv-border);
}
.adv-single-post__meta {
    margin-top: var(--adv-sp-sm);
    margin-bottom: var(--adv-sp-sm);
}
.adv-single-post__title {
    font-family: var(--adv-ff-heading, var(--adv-font-heading));
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: var(--adv-fw-bold);
    line-height: 1.15;
    color: var(--adv-text);
    margin: 0;
}
.adv-single-post__excerpt {
    font-size: var(--adv-fs-lg);
    color: var(--adv-text-muted);
    line-height: var(--adv-lh-normal);
    margin-top: var(--adv-sp-md);
    max-width: 640px;
}

/* ── Content layout grid (body + sidebar) ── */
.adv-single-layout {
    display: block;
}
.adv-single-layout--sidebar {
    display: grid;
    grid-template-columns: 1fr var(--adv-article-sidebar-w);
    gap: var(--adv-article-gap);
    align-items: start;
}
.adv-single-layout--left {
    grid-template-columns: var(--adv-article-sidebar-w) 1fr;
}
.adv-single-layout--left .adv-single-sidebar {
    order: -1;
}

/* ── Sidebar ── */
.adv-single-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.adv-single-sidebar .widget {
    padding: var(--adv-sp-lg);
    background: var(--adv-bg-alt);
    border-radius: var(--adv-radius);
}
.adv-single-sidebar .widget-title {
    font-size: 0.75rem;
    font-weight: var(--adv-fw-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--adv-sp-md);
    padding-bottom: var(--adv-sp-sm);
    border-bottom: 2px solid var(--adv-accent);
}

/* ── Footer (tags) ── */
.adv-single-post__footer {
    margin-top: var(--adv-sp-xl);
    padding-top: var(--adv-sp-lg);
    border-top: 1px solid var(--adv-border);
}
.adv-single-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.adv-single-post__tags .adv-label {
    background: var(--adv-bg-alt);
    padding: 4px 12px;
    border-radius: var(--adv-radius-full);
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-text);
    transition: background var(--adv-duration) var(--adv-ease);
}
.adv-single-post__tags .adv-label:hover {
    background: var(--adv-border);
}

/* ── Author box ── */
.adv-single-post__author-box {
    margin-top: var(--adv-sp-xl);
    padding-top: var(--adv-sp-lg);
    border-top: 1px solid var(--adv-border);
}
.adv-author-box {
    display: flex;
    gap: var(--adv-sp-md);
    align-items: flex-start;
}
.adv-author-box__avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--adv-radius-full);
    flex-shrink: 0;
    object-fit: cover;
}
.adv-author-box__avatar-link {
    flex-shrink: 0;
    display: block;
    line-height: 0;
}
.adv-author-box__label {
    display: block;
    font-size: var(--adv-fs-xs);
    color: var(--adv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: var(--adv-fw-semibold);
    margin-bottom: 2px;
}
.adv-author-box__name {
    font-size: var(--adv-fs-lg);
    font-weight: var(--adv-fw-bold);
    color: var(--adv-text);
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}
.adv-author-box__name:hover {
    color: var(--adv-accent);
}
.adv-author-box__job {
    display: block;
    font-size: var(--adv-fs-sm);
    color: var(--adv-accent);
    font-weight: var(--adv-fw-medium);
    margin-top: 2px;
}
.adv-author-box__bio {
    font-size: var(--adv-fs-sm);
    color: var(--adv-text-muted);
    line-height: var(--adv-lh-normal);
    margin-top: var(--adv-sp-xs);
}
.adv-author-box__social {
    display: flex;
    align-items: center;
    gap: var(--adv-sp-sm);
    margin-top: var(--adv-sp-sm);
    flex-wrap: wrap;
}
.adv-author-box__social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius-full);
    color: var(--adv-text-muted);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.adv-author-box__social-link:hover {
    color: var(--adv-accent);
    border-color: var(--adv-accent);
    background: color-mix(in srgb, var(--adv-accent) 10%, transparent);
}
.adv-author-box__all-posts {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-accent);
    text-decoration: none;
    margin-left: auto;
    transition: opacity 0.2s ease;
}
.adv-author-box__all-posts:hover {
    opacity: 0.8;
}

/* ── Related posts ── */
.adv-related-posts {
    margin-top: var(--adv-sp-2xl);
    padding-top: var(--adv-sp-xl);
    border-top: 2px solid var(--adv-border);
}
.adv-related-posts__title {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-black);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--adv-sp-lg);
}
.adv-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--adv-sp-lg);
}
.adv-related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--adv-text);
    transition: opacity var(--adv-duration) var(--adv-ease);
}
.adv-related-card:hover { opacity: 0.8; }
.adv-related-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--adv-radius);
    display: block;
}
.adv-related-card__cat {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--adv-accent);
    margin-top: var(--adv-sp-sm);
}
.adv-related-card__title {
    font-size: var(--adv-fs-base);
    font-weight: var(--adv-fw-bold);
    line-height: var(--adv-lh-tight);
    margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════════════
   8a. PROSE — Rich content typography (.adv-prose)
   ════════════════════════════════════════════════════════════════════ */
.adv-prose {
    font-size: var(--adv-fs-md);
    line-height: 1.8;
    color: var(--adv-text);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── Paragraphs ── */
.adv-prose p {
    margin-bottom: 1.5em;
}

/* ── Headings ── */
.adv-prose h2,
.adv-prose h3,
.adv-prose h4,
.adv-prose h5,
.adv-prose h6 {
    font-family: var(--adv-ff-heading, var(--adv-font-heading));
    font-weight: var(--adv-fw-bold);
    line-height: 1.25;
    color: var(--adv-text);
    margin-top: 2em;
    margin-bottom: 0.75em;
}
.adv-prose h2 {
    font-size: 1.65rem;
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--adv-border);
}
.adv-prose h3 { font-size: 1.35rem; }
.adv-prose h4 { font-size: 1.15rem; }
.adv-prose h5 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.adv-prose h6 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--adv-text-muted);
}

/* First heading after hero should have less top margin */
.adv-prose > h2:first-child,
.adv-prose > h3:first-child {
    margin-top: 0;
}

/* ── Links ── */
.adv-prose a {
    color: var(--adv-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color var(--adv-duration) var(--adv-ease);
}
.adv-prose a:hover {
    color: var(--adv-text);
}

/* ── Bold / Italic ── */
.adv-prose strong,
.adv-prose b {
    font-weight: var(--adv-fw-bold);
}

/* ── Unordered lists ── */
.adv-prose ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5em;
}
.adv-prose ul > li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.7;
}
.adv-prose ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--adv-accent);
}

/* Nested unordered */
.adv-prose ul ul {
    margin-top: 0.5em;
    margin-bottom: 0;
}
.adv-prose ul ul > li::before {
    background: transparent;
    border: 1.5px solid var(--adv-accent);
}
.adv-prose ul ul ul > li::before {
    border-radius: 0;
    width: 5px;
    height: 5px;
    border: none;
    background: var(--adv-text-muted);
}

/* ── Ordered lists ── */
.adv-prose ol {
    list-style: none;
    padding-left: 0;
    counter-reset: adv-ol;
    margin-bottom: 1.5em;
}
.adv-prose ol > li {
    position: relative;
    padding-left: 2.2em;
    margin-bottom: 0.5em;
    line-height: 1.7;
    counter-increment: adv-ol;
}
.adv-prose ol > li::before {
    content: counter(adv-ol, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8em;
    font-weight: var(--adv-fw-bold);
    color: var(--adv-accent);
    font-variant-numeric: tabular-nums;
    min-width: 1.6em;
}

/* Nested ordered */
.adv-prose ol ol {
    margin-top: 0.5em;
    margin-bottom: 0;
    counter-reset: adv-ol-nested;
}
.adv-prose ol ol > li {
    counter-increment: adv-ol-nested;
}
.adv-prose ol ol > li::before {
    content: counter(adv-ol-nested, lower-alpha) '.';
    color: var(--adv-text-muted);
}

/* ── Definition lists ── */
.adv-prose dl {
    margin-bottom: 1.5em;
}
.adv-prose dt {
    font-weight: var(--adv-fw-bold);
    margin-bottom: 0.25em;
}
.adv-prose dd {
    margin-left: 1.5em;
    margin-bottom: 1em;
    color: var(--adv-text-muted);
}

/* ── Blockquote ── */
.adv-prose blockquote {
    margin: 2em 0;
    padding: var(--adv-sp-lg) var(--adv-sp-xl);
    border-left: 4px solid var(--adv-accent);
    background: var(--adv-bg-alt);
    border-radius: 0 var(--adv-radius) var(--adv-radius) 0;
    font-size: 1.05em;
    font-style: italic;
    color: var(--adv-text);
}
.adv-prose blockquote p:last-child { margin-bottom: 0; }
.adv-prose blockquote cite {
    display: block;
    font-style: normal;
    font-size: var(--adv-fs-sm);
    color: var(--adv-text-muted);
    margin-top: var(--adv-sp-sm);
    font-weight: var(--adv-fw-semibold);
}
.adv-prose blockquote cite::before { content: '— '; }

/* ── Pull-quote (wp:pullquote) ── */
.adv-prose .wp-block-pullquote {
    border-top: 3px solid var(--adv-text);
    border-bottom: 3px solid var(--adv-text);
    border-left: none;
    background: transparent;
    padding: var(--adv-sp-xl) 0;
    margin: 2.5em 0;
    text-align: center;
    font-style: normal;
}
.adv-prose .wp-block-pullquote blockquote {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
}
.adv-prose .wp-block-pullquote p {
    font-family: var(--adv-ff-display, var(--adv-font-display));
    font-size: 1.5rem;
    font-weight: var(--adv-fw-medium);
    line-height: 1.4;
    font-style: italic;
}

/* ── Tables ── */
.adv-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: var(--adv-fs-sm);
    line-height: 1.5;
}
.adv-prose thead {
    background: var(--adv-text);
    color: var(--adv-bg);
}
.adv-prose thead th {
    padding: 12px 16px;
    font-weight: var(--adv-fw-bold);
    text-align: left;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.adv-prose tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--adv-border);
    vertical-align: top;
}
.adv-prose tbody tr:nth-child(even) {
    background: var(--adv-bg-alt);
}
.adv-prose tbody tr:hover {
    background: color-mix(in srgb, var(--adv-accent) 5%, var(--adv-bg));
}
.adv-prose tfoot td {
    padding: 12px 16px;
    font-weight: var(--adv-fw-semibold);
    border-top: 2px solid var(--adv-border);
}
/* Responsive table wrapper */
.adv-prose .adv-table-wrap,
.adv-prose .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2em 0;
}
.adv-prose .wp-block-table table {
    margin: 0;
}
/* Striped variant */
.adv-prose table.adv-table--striped tbody tr:nth-child(odd) {
    background: var(--adv-bg-alt);
}
.adv-prose table.adv-table--striped tbody tr:nth-child(even) {
    background: transparent;
}

/* ── Code ── */
.adv-prose code {
    font-family: var(--adv-ff-mono, 'JetBrains Mono', monospace);
    font-size: 0.85em;
    background: var(--adv-bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--adv-accent);
    word-break: break-word;
}
.adv-prose pre {
    background: var(--adv-text);
    color: #e0e0e0;
    padding: var(--adv-sp-lg);
    border-radius: var(--adv-radius);
    overflow-x: auto;
    margin: 2em 0;
    line-height: 1.6;
    font-size: 0.85em;
}
.adv-prose pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ── Horizontal Rule ── */
.adv-prose hr {
    border: none;
    height: 2px;
    background: var(--adv-border);
    margin: 2.5em 0;
}
.adv-prose hr.wp-block-separator.is-style-dots {
    background: none;
    height: auto;
    text-align: center;
}
.adv-prose hr.wp-block-separator.is-style-dots::before {
    content: '···';
    font-size: 1.5em;
    letter-spacing: 1em;
    color: var(--adv-text-muted);
}

/* ── Images & Figures ── */
.adv-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--adv-radius);
    display: block;
}
.adv-prose figure {
    margin: 2em 0;
}
.adv-prose figcaption,
.adv-prose .wp-element-caption {
    font-size: var(--adv-fs-xs);
    color: var(--adv-text-muted);
    text-align: center;
    margin-top: var(--adv-sp-sm);
    font-style: italic;
}

/* Gutenberg alignment support */
.adv-prose .alignwide {
    margin-left: -60px;
    margin-right: -60px;
    max-width: calc(100% + 120px);
}
.adv-prose .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
    border-radius: 0;
}
.adv-prose .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.adv-prose .alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
    max-width: 50%;
}
.adv-prose .alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
    max-width: 50%;
}

/* ── Embeds / Videos ── */
.adv-prose .wp-block-embed {
    margin: 2em 0;
}
.adv-prose .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.adv-prose .wp-block-embed__wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--adv-radius);
}

/* ── Galleries ── */
.adv-prose .wp-block-gallery {
    margin: 2em 0;
}
.adv-prose .wp-block-gallery .wp-block-image img {
    border-radius: var(--adv-radius);
}

/* ── Buttons (Gutenberg) ── */
.adv-prose .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: var(--adv-fw-bold);
    font-size: var(--adv-fs-sm);
    border-radius: var(--adv-radius-full);
    transition: all var(--adv-duration) var(--adv-ease);
    text-decoration: none;
}

/* ── Mark / Highlight ── */
.adv-prose mark {
    background: linear-gradient(120deg, #fef08a 0%, #fde047 100%);
    padding: 1px 4px;
    border-radius: 2px;
}
[data-theme="dark"] .adv-prose mark {
    background: linear-gradient(120deg, #854d0e 0%, #a16207 100%);
    color: #fef9c3;
}

/* ── Details / Accordion ── */
.adv-prose details {
    margin: 1.5em 0;
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius);
    padding: var(--adv-sp-md) var(--adv-sp-lg);
}
.adv-prose details[open] {
    padding-bottom: var(--adv-sp-lg);
}
.adv-prose summary {
    font-weight: var(--adv-fw-bold);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.adv-prose summary::after {
    content: '+';
    font-size: 1.2em;
    font-weight: 300;
    transition: transform var(--adv-duration) var(--adv-ease);
}
.adv-prose details[open] summary::after {
    content: '−';
}

/* ── Footnotes ── */
.adv-prose .wp-block-footnotes {
    font-size: var(--adv-fs-sm);
    color: var(--adv-text-muted);
    border-top: 1px solid var(--adv-border);
    margin-top: 2em;
    padding-top: var(--adv-sp-md);
}

/* ── Clear floats after content ── */
.adv-prose::after {
    content: '';
    display: table;
    clear: both;
}

/* ================================================================
   8. FOOTER
   ================================================================ */
.adv-site-footer {
    background: #1a1a1a;
    color: #e5e5e5;
    padding: var(--adv-sp-3xl) 0 var(--adv-sp-xl);
}

.adv-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--adv-sp-xl);
    margin-bottom: var(--adv-sp-2xl);
}

.adv-footer-brand {
    display: block;
    margin-bottom: var(--adv-sp-md);
}
.adv-footer-brand img {
    height: 48px;
    width: auto;
    display: block;
    aspect-ratio: 501 / 70;
    object-fit: contain;
}

.adv-footer-desc {
    font-size: var(--adv-fs-sm);
    color: rgba(255,255,255,0.6);
    line-height: var(--adv-lh-loose);
}

.adv-footer-col__title {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #e5e5e5;
    margin-bottom: var(--adv-sp-lg);
    position: relative;
}
.adv-footer-col__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.3);
}

.adv-footer-links {
    list-style: none;
}
.adv-footer-links li { margin-bottom: var(--adv-sp-sm); }
.adv-footer-links a {
    font-size: var(--adv-fs-sm);
    color: rgba(255,255,255,0.6);
    transition: color var(--adv-duration) var(--adv-ease);
}
.adv-footer-links a:hover { color: #ffffff; }

/* Newsletter CTA */
.adv-footer-col--newsletter { }
.adv-newsletter-subheading {
    font-size: var(--adv-fs-sm);
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin: 0 0 var(--adv-sp-md);
}
.adv-newsletter-cta { position: relative; }

/* Form fields row */
.adv-newsletter-form__fields {
    display: flex;
    gap: 0;
}

/* Inputs */
.adv-newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-right: none;
    background: transparent;
    color: #e5e5e5;
    font-size: var(--adv-fs-sm);
    border-radius: var(--adv-radius-full) 0 0 var(--adv-radius-full);
    outline: none;
    transition: border-color var(--adv-duration) var(--adv-ease);
}
.adv-newsletter-input:focus {
    border-color: rgba(255,255,255,0.5);
}
.adv-newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.adv-newsletter-input--name {
    flex: 0 0 38%;
    min-width: 100px;
    border-radius: var(--adv-radius-full) 0 0 var(--adv-radius-full);
}
.adv-newsletter-input--name ~ .adv-newsletter-input {
    border-radius: 0;
}

/* Button */
.adv-newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 12px 24px;
    border: 1px solid rgba(255,255,255,0.2);
    background: #e5e5e5;
    color: #1a1a1a;
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    border-radius: 0 var(--adv-radius-full) var(--adv-radius-full) 0;
    white-space: nowrap;
    transition: opacity var(--adv-duration) var(--adv-ease), transform var(--adv-duration) var(--adv-ease);
    text-decoration: none;
    line-height: 1;
}
.adv-newsletter-btn:hover { opacity: 0.88; transform: scale(1.02); }
.adv-newsletter-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* CTA link button (standalone, no form) */
.adv-newsletter-btn--cta {
    border-radius: var(--adv-radius-full);
    padding: 14px 32px;
    display: inline-block;
    text-align: center;
}

/* Spinner */
.adv-newsletter-btn__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26,26,26,0.2);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: adv-nl-spin 0.6s linear infinite;
    position: absolute;
}
@keyframes adv-nl-spin { to { transform: rotate(360deg); } }

/* Feedback message */
.adv-newsletter-feedback {
    margin-top: var(--adv-sp-xs);
    font-size: 12px;
    line-height: 1.4;
    min-height: 0;
    transition: min-height var(--adv-duration) var(--adv-ease);
}
.adv-newsletter-feedback:empty { display: none; }
.adv-newsletter-feedback--error { color: #f87171; }
.adv-newsletter-feedback--success { color: #4ade80; }

/* Consent */
.adv-newsletter-consent {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-top: var(--adv-sp-sm);
    line-height: 1.4;
}
.adv-newsletter-consent a { color: rgba(255,255,255,0.75); text-decoration: underline; }
.adv-newsletter-consent a:hover { color: #ffffff; }

/* Success state */
.adv-newsletter-success {
    display: none;
    align-items: center;
    gap: var(--adv-sp-sm);
    padding: var(--adv-sp-md) 0;
    color: #4ade80;
    font-weight: var(--adv-fw-bold);
    font-size: var(--adv-fs-sm);
}
.adv-newsletter-success.is-visible { display: flex; }
.adv-newsletter-success__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(74,222,128,0.15);
    font-size: 14px;
    flex-shrink: 0;
}

/* Embed containers */
.adv-newsletter-embed { max-width: 100%; }
.adv-newsletter-embed--custom iframe { max-width: 100%; border: none; }

/* Footer bottom */
.adv-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--adv-sp-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--adv-sp-md);
}

.adv-footer-bottom-nav {
    list-style: none;
    display: flex;
    gap: var(--adv-sp-lg);
}
.adv-footer-bottom-nav a {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.6);
}
.adv-footer-bottom-nav a:hover { color: #ffffff; }

.adv-footer-copy {
    font-size: var(--adv-fs-xs);
    color: rgba(255,255,255,0.65);
}

/* ================================================================
   9. SOCIAL BAR (sopra footer, 4 colonne)
   ================================================================ */
.adv-social-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--adv-border);
    border-bottom: 1px solid var(--adv-border);
}

.adv-social-bar__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--adv-sp-sm);
    padding: var(--adv-sp-md) var(--adv-sp-lg);
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-medium);
    color: var(--adv-text);
    border-right: 1px solid var(--adv-border);
    transition: background var(--adv-duration) var(--adv-ease);
}
.adv-social-bar__item:last-child { border-right: none; }
.adv-social-bar__item:hover { background: var(--adv-bg-alt); }
.adv-social-bar__item svg { width: 18px; height: 18px; }

/* ================================================================
   10. READ MORE BUTTON (customizable via block inspector)
   ================================================================ */
.adv-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: var(--rsb-rm-py, 10px) var(--rsb-rm-px, 24px);
    border: 1.5px solid var(--rsb-rm-color, var(--adv-text));
    border-radius: var(--rsb-rm-radius, var(--adv-radius-full));
    font-size: var(--rsb-rm-fs, var(--adv-fs-xs));
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rsb-rm-color, var(--adv-text));
    background: transparent;
    cursor: pointer;
    transition: all var(--adv-duration) var(--adv-ease);
}
.adv-read-more:hover {
    background: var(--rsb-rm-color, var(--adv-text));
    color: var(--rsb-rm-bg, var(--adv-bg));
}
.adv-read-more svg {
    width: 14px;
    height: 14px;
}

/* Style: filled */
.adv-read-more--filled {
    background: var(--rsb-rm-bg, var(--adv-text));
    color: var(--rsb-rm-color, var(--adv-bg));
    border-color: var(--rsb-rm-bg, var(--adv-text));
}
.adv-read-more--filled:hover {
    opacity: 0.85;
    background: var(--rsb-rm-bg, var(--adv-text));
    color: var(--rsb-rm-color, var(--adv-bg));
}

/* Style: text only */
.adv-read-more--text {
    border: none;
    padding: 0;
    color: var(--rsb-rm-color, var(--adv-accent));
    border-bottom: 2px solid var(--rsb-rm-color, var(--adv-accent));
    border-radius: 0;
    background: transparent;
}
.adv-read-more--text:hover {
    background: transparent;
    color: var(--rsb-rm-color, var(--adv-accent));
    opacity: 0.7;
}

/* ================================================================
   11. POST CARD UTILITIES
   ================================================================ */
.adv-post-card { display: flex; flex-direction: column; }
.adv-post-card__image {
    aspect-ratio: 16/10;
    object-fit: cover;
    width: 100%;
    border-radius: 0;
}
.adv-post-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--adv-sp-sm);
}
.adv-post-card__title {
    font-size: var(--adv-fs-lg);
    font-weight: var(--adv-fw-bold);
    line-height: var(--adv-lh-tight);
    margin-top: var(--adv-sp-sm);
}
.adv-post-card__title a {
    color: var(--adv-text);
    text-decoration: none;
}
.adv-post-card__title a:hover { color: var(--adv-text-muted); }
.adv-post-card__excerpt {
    font-size: var(--adv-fs-sm);
    color: var(--adv-text-muted);
    line-height: var(--adv-lh-normal);
    margin-top: var(--adv-sp-sm);
}

/* Small horizontal card */
.adv-post-card--horizontal {
    flex-direction: row;
    gap: var(--adv-sp-md);
    align-items: flex-start;
}
.adv-post-card--horizontal .adv-post-card__image {
    width: 80px;
    height: 80px;
    aspect-ratio: 1;
    flex-shrink: 0;
}
.adv-post-card--horizontal .adv-post-card__title {
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-semibold);
}

/* Title-only list item */
.adv-post-title-item {
    padding: var(--adv-sp-sm) 0;
    border-bottom: 1px solid var(--adv-border);
}
.adv-post-title-item:last-child { border-bottom: none; }
.adv-post-title-item a {
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-text);
    line-height: var(--adv-lh-tight);
}
.adv-post-title-item a:hover { color: var(--adv-text-muted); }

/* ================================================================
   12. ARCHIVE PAGE  (The Mow Times style)
   ================================================================ */

/* ── Hero ── */
.adv-archive-hero {
    border-bottom: none;
    padding: var(--adv-sp-2xl) 0 var(--adv-sp-xl);
}
.adv-archive-hero__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--adv-sp-xl);
    padding-bottom: var(--adv-sp-xl);
    border-bottom: 1px solid var(--adv-border);
}
.adv-archive-hero__title {
    font-family: var(--adv-font-heading);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: var(--adv-fw-bold);
    line-height: 1.1;
}
.adv-archive-hero__title--author {
    color: var(--adv-accent);
}
.adv-archive-hero__desc {
    color: var(--adv-text-muted);
    font-size: var(--adv-fs-md);
    line-height: var(--adv-lh-normal);
    margin-top: var(--adv-sp-md);
    max-width: 50%;
}
.adv-archive-hero__count {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: var(--adv-bg-alt, #f5f5f5);
    border-radius: 4px;
}
.adv-archive-hero__number {
    font-family: var(--adv-font-heading);
    font-size: 2.8rem;
    font-weight: var(--adv-fw-bold);
    line-height: 1;
    color: var(--adv-text);
}
.adv-archive-hero__label {
    font-size: 0.6rem;
    font-weight: var(--adv-fw-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--adv-accent, #c0392b);
    margin-top: 4px;
}

/* ── Breadcrumb ── */
.adv-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--adv-sp-md) 0;
    border-bottom: 1px solid var(--adv-border);
    font-size: 0.75rem;
    font-weight: var(--adv-fw-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.adv-breadcrumb a {
    color: var(--adv-text);
    text-decoration: none;
}
.adv-breadcrumb a:hover { color: var(--adv-accent); }
.adv-breadcrumb__sep { color: var(--adv-text-muted); }
.adv-breadcrumb__current { color: var(--adv-text-muted); }

/* ── Archive layout: 2/3 posts + 1/3 sidebar ── */
.adv-archive-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--adv-sp-2xl);
    padding-top: var(--adv-sp-xl);
    padding-bottom: var(--adv-sp-2xl);
}
.adv-archive-main { min-width: 0; }

/* ── Post grid: 2 columns text-only cards ── */
.adv-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

/* ── Archive card (text-only, The Mow Times style) ── */
.adv-arc-card {
    padding: var(--adv-sp-lg) var(--adv-sp-md) var(--adv-sp-lg) 0;
    border-bottom: 1px solid var(--adv-border);
}
/* Odd cards (left column) get a right border */
.adv-arc-card:nth-child(odd) {
    border-right: 1px solid var(--adv-border);
    padding-right: var(--adv-sp-lg);
}
/* Even cards (right column) get left padding */
.adv-arc-card:nth-child(even) {
    padding-left: var(--adv-sp-lg);
}

.adv-arc-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--adv-sp-sm);
    font-size: 0.75rem;
    font-weight: var(--adv-fw-semibold);
    letter-spacing: 0.03em;
}
.adv-arc-card__cat {
    text-transform: uppercase;
    color: var(--adv-text);
    text-decoration: none;
}
.adv-arc-card__cat:hover { color: var(--adv-accent); }
.adv-arc-card__sep { color: var(--adv-text-muted); }
.adv-arc-card__time { color: var(--adv-text-muted); font-weight: 400; }

.adv-arc-card__sticky {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.65rem;
    font-weight: var(--adv-fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 2px;
    margin-right: 4px;
}
[data-theme="dark"] .adv-arc-card__sticky {
    background: #78350f;
    color: #fde68a;
}

.adv-arc-card__title {
    font-size: var(--adv-fs-lg);
    font-weight: var(--adv-fw-bold);
    line-height: var(--adv-lh-tight);
}
.adv-arc-card__title a {
    color: var(--adv-text);
    text-decoration: none;
}
.adv-arc-card__title a:hover { color: var(--adv-text-muted); }
.adv-arc-card__excerpt {
    font-weight: 400;
    color: var(--adv-text-muted);
    font-size: var(--adv-fs-base);
}

/* ── Sidebar widgets ── */
.adv-archive-sidebar {}
.adv-archive-sidebar--homepage {
    position: sticky;
    top: calc(var(--adv-header-h, 60px) + var(--adv-sp-md, 16px));
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-lg, 24px);
}

.adv-widget--donations { margin-bottom: var(--adv-sp-xl); }

.adv-widget__title--line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: var(--adv-fw-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--adv-sp-md);
}
.adv-widget__title--line::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--adv-border);
}

.adv-donation-card {
    display: flex;
    align-items: center;
    gap: var(--adv-sp-md);
    padding: var(--adv-sp-md);
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius);
    margin-bottom: var(--adv-sp-sm);
    text-decoration: none;
    color: var(--adv-text);
    font-weight: var(--adv-fw-semibold);
    font-size: var(--adv-fs-sm);
    transition: border-color .15s;
}
.adv-donation-card:hover { border-color: var(--adv-text); }
.adv-donation-card__icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
    border-right: 1px solid var(--adv-border);
    padding-right: var(--adv-sp-md);
}

.adv-widget--newsletter {
    background: var(--adv-bg-alt);
    padding: var(--adv-sp-xl);
    border-radius: var(--adv-radius);
}
.adv-widget--newsletter .adv-widget__title {
    font-family: var(--adv-font-heading);
    font-size: var(--adv-fs-lg);
    font-weight: var(--adv-fw-bold);
    line-height: var(--adv-lh-tight);
    text-align: center;
    margin-bottom: var(--adv-sp-lg);
}

.adv-newsletter-form input[type="email"] {
    display: block;
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid var(--adv-text);
    background: transparent;
    font-size: var(--adv-fs-sm);
    color: var(--adv-text);
    outline: none;
    margin-bottom: var(--adv-sp-lg);
    text-align: center;
}
.adv-newsletter-form input[type="email"]::placeholder {
    color: var(--adv-text-muted);
}
.adv-newsletter-form button {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--adv-text);
    color: var(--adv-bg);
    border: none;
    border-radius: 999px;
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-bold);
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity .15s;
}
.adv-newsletter-form button:hover { opacity: .85; }
.adv-newsletter-form__consent {
    font-size: 0.7rem;
    color: var(--adv-text-muted);
    margin-top: var(--adv-sp-md);
    line-height: 1.5;
    text-align: center;
}
.adv-newsletter-form__consent a {
    color: var(--adv-text);
    text-decoration: underline;
}

.adv-archive-empty {
    text-align: center;
    padding: var(--adv-sp-2xl) 0;
    color: var(--adv-text-muted);
}

.adv-post-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-xs);
    padding-top: var(--adv-sp-sm);
}

/* ── Pagination ── */
.adv-pagination {
    padding: var(--adv-sp-xl) 0 var(--adv-sp-2xl);
    text-align: center;
}
.adv-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.adv-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--adv-border);
    border-radius: 4px;
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-text);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.adv-pagination .page-numbers:hover {
    background: var(--adv-text);
    color: var(--adv-bg);
}
.adv-pagination .page-numbers.current {
    background: var(--adv-accent);
    color: #fff;
    border-color: var(--adv-accent);
    pointer-events: none;
}
.adv-pagination .page-numbers.dots {
    border: none;
    pointer-events: none;
}
.adv-pagination .page-numbers.prev,
.adv-pagination .page-numbers.next {
    font-size: 1.1rem;
}

/* Bullet list item (red triangle) */
.adv-post-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: var(--adv-sp-sm);
    padding: var(--adv-sp-sm) 0;
}
.adv-post-bullet-item::before {
    content: '▶';
    color: var(--adv-accent);
    font-size: 10px;
    margin-top: 4px;
    flex-shrink: 0;
}
.adv-post-bullet-item a {
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-semibold);
    color: var(--adv-text);
    line-height: var(--adv-lh-tight);
}

/* ================================================================
   12. SECTION HEADER (title + line)
   ================================================================ */
.adv-section-header {
    display: flex;
    align-items: center;
    gap: var(--adv-sp-md);
    margin-bottom: var(--adv-sp-lg);
}
.adv-section-header__title {
    font-size: var(--adv-fs-xs);
    font-weight: var(--adv-fw-black);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}
.adv-section-header__line {
    flex: 1;
    height: 2px;
    background: var(--adv-border);
    max-width: 60px;
}
@media (max-width: 600px) {
    .adv-section-header {
        align-items: flex-start;
        min-width: 0;
    }
    .adv-section-header__title {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }
    .adv-section-header__line {
        flex: 0 0 36px;
        margin-top: 0.55em;
    }
}

/* ================================================================
   12b. GDPR — Cookie Consent Banner, Consent Checkbox, Settings Link
   ================================================================ */

/* ── Cookie Consent Banner ── */
.adv-cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: var(--adv-sp-md);
}
.adv-cookie-consent.is-visible {
    opacity: 1;
    visibility: visible;
}
.adv-cookie-consent__inner {
    background: #18181b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: var(--adv-sp-xl);
    max-width: 640px;
    width: 100%;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.4);
    color: #f4f4f5;
}
.adv-cookie-consent__title {
    font-family: var(--adv-ff-heading);
    font-weight: var(--adv-fw-bold);
    font-size: var(--adv-fs-lg);
    margin-bottom: var(--adv-sp-xs);
}
.adv-cookie-consent__desc {
    font-size: var(--adv-fs-sm);
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    margin-bottom: var(--adv-sp-md);
}
.adv-cookie-consent__desc a {
    color: var(--adv-accent, #3b82f6);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.adv-cookie-consent__desc a:hover { color: #60a5fa; }

/* ── Granular toggles ── */
.adv-cookie-consent__options {
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-sm);
    margin-bottom: var(--adv-sp-lg);
    padding: var(--adv-sp-md);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.adv-cookie-toggle {
    display: flex;
    align-items: center;
    gap: var(--adv-sp-sm);
    cursor: pointer;
    padding: 6px 0;
}
.adv-cookie-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255,255,255,0.15);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.25s ease;
}
.adv-cookie-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s ease;
}
.adv-cookie-toggle input[type="checkbox"]:checked {
    background: var(--adv-accent, #3b82f6);
}
.adv-cookie-toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}
.adv-cookie-toggle input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.adv-cookie-toggle__label {
    font-weight: var(--adv-fw-semibold);
    font-size: var(--adv-fs-sm);
    min-width: 90px;
}
.adv-cookie-toggle__info {
    font-size: var(--adv-fs-xs);
    color: rgba(255,255,255,0.4);
}

/* ── Banner Actions ── */
.adv-cookie-consent__actions {
    display: flex;
    gap: var(--adv-sp-sm);
    flex-wrap: wrap;
}
.adv-cookie-consent__btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-family: var(--adv-ff-body);
    font-size: var(--adv-fs-sm);
    font-weight: var(--adv-fw-semibold);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.adv-cookie-consent__btn:hover { transform: scale(1.02); }
.adv-cookie-consent__btn:active { transform: scale(0.98); }

.adv-cookie-consent__btn--accept-all {
    background: var(--adv-accent, #3b82f6);
    color: #fff;
}
.adv-cookie-consent__btn--accept-all:hover { background: #2563eb; }

.adv-cookie-consent__btn--save {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
}
.adv-cookie-consent__btn--save:hover { background: rgba(255,255,255,0.18); }

.adv-cookie-consent__btn--reject {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.1);
}
.adv-cookie-consent__btn--reject:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

/* ── Newsletter Consent Checkbox ── */
.adv-newsletter-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-top: var(--adv-sp-sm);
    line-height: 1.4;
    cursor: pointer;
}
.adv-newsletter-consent-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    margin-top: 1px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.adv-newsletter-consent-check input[type="checkbox"]:checked {
    background: var(--adv-accent, #3b82f6);
    border-color: var(--adv-accent, #3b82f6);
}
.adv-newsletter-consent-check input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: #fff;
    line-height: 1;
}
.adv-newsletter-consent-check a {
    color: rgba(255,255,255,0.75);
    text-decoration: underline;
}
.adv-newsletter-consent-check a:hover { color: #ffffff; }

/* ── Cookie Settings Link (fixed bottom-left) ── */
.adv-cookie-settings-link {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 9999;
    background: #18181b;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: var(--adv-fs-xs);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.adv-cookie-settings-link:hover {
    background: #2a2a2e;
    color: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

/* ================================================================
   13. RESPONSIVE
   ================================================================ */

/* ── Tablet ── */
@media (max-width: 1024px) {
    .adv-sidebar-left,
    .adv-sidebar-right { display: none; }

    .adv-offcanvas { display: none; }

    .adv-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .adv-social-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .adv-hamburger { display: flex; }

    .adv-primary-nav { display: none; }

    /* Mega menu: 2 columns on tablet */
    .adv-mega-posts-grid { grid-template-columns: repeat(2, 1fr); }

    /* Archive: sidebar below main */
    .adv-archive-layout { grid-template-columns: 1fr; }
    .adv-archive-sidebar { max-width: 480px; }
    .adv-archive-sidebar--homepage { position: static; }

    /* ── Single post tablet ── */
    .adv-single-layout--sidebar {
        grid-template-columns: 1fr;
    }
    .adv-single-layout--left .adv-single-sidebar {
        order: 0;
    }
    .adv-single-sidebar {
        position: static;
        max-width: 480px;
    }
    .adv-related-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .adv-prose .alignwide {
        margin-left: -20px;
        margin-right: -20px;
        max-width: calc(100% + 40px);
    }

    /* Mobile nav open */
    .adv-nav-open .adv-primary-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: var(--adv-header-height) 0 0 0;
        background: var(--adv-bg);
        padding: var(--adv-sp-xl);
        overflow-y: auto;
        gap: 0;
        z-index: 998;
    }
    .adv-nav-open .adv-primary-nav > li {
        border-bottom: 1px solid var(--adv-border);
    }
    .adv-nav-open .adv-primary-nav > li > a {
        display: block;
        padding: var(--adv-sp-md) 0;
        font-size: var(--adv-fs-md);
    }
    .adv-nav-open body { overflow: hidden; }

    /* Mega panel as accordion on tablet/mobile */
    .adv-nav-open .adv-has-megamenu .adv-mega-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: var(--adv-sp-md) 0;
        display: none;
        background: transparent;
    }
    .adv-nav-open .adv-has-megamenu .adv-mega-panel.is-open {
        display: block;
    }
    .adv-nav-open .adv-mega-arrows { display: none; }
    .adv-nav-open .adv-mega-backdrop { display: none; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    :root {
        --adv-gutter: 16px;
        --adv-sp-xl: 32px;
        --adv-sp-2xl: 48px;
    }

    .adv-footer-grid { grid-template-columns: 1fr; }
    .adv-social-bar  { grid-template-columns: 1fr 1fr; }
    .adv-footer-bottom { flex-direction: column; text-align: center; }
    .adv-footer-bottom-nav { justify-content: center; }

    /* Newsletter CTA: stack fields */
    .adv-newsletter-form__fields { flex-direction: column; gap: 8px; }
    .adv-newsletter-input {
        border-right: 1px solid rgba(255,255,255,0.2);
        border-radius: var(--adv-radius-full);
    }
    .adv-newsletter-input--name {
        flex: none;
        width: 100%;
        border-radius: var(--adv-radius-full);
    }
    .adv-newsletter-input--name ~ .adv-newsletter-input {
        border-radius: var(--adv-radius-full);
    }
    .adv-newsletter-btn {
        border-radius: var(--adv-radius-full);
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    .adv-newsletter-btn--cta { width: 100%; }

    .adv-mega-posts-grid { grid-template-columns: 1fr 1fr; }
    .adv-mega-tabs { gap: var(--adv-sp-md); }

    /* Archive: single column cards */
    .adv-archive-grid { grid-template-columns: 1fr; }
    .adv-arc-card:nth-child(odd) {
        border-right: none;
        padding-right: 0;
    }
    .adv-arc-card:nth-child(even) {
        padding-left: 0;
    }

    /* Hero: stack count below */
    .adv-archive-hero__inner { flex-direction: column; align-items: flex-start; }
    .adv-archive-hero__desc { max-width: 100%; }
    .adv-archive-hero__count { width: 100px; height: 100px; flex-direction: column; gap: 0; }

    /* ── Single post mobile ── */
    .adv-single-post__title {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
    }
    .adv-single-post__excerpt {
        font-size: var(--adv-fs-base);
    }
    .adv-prose {
        font-size: var(--adv-fs-base);
    }
    .adv-prose h2 { font-size: 1.35rem; }
    .adv-prose h3 { font-size: 1.15rem; }
    .adv-prose h4 { font-size: 1.05rem; }
    .adv-prose .alignwide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    .adv-prose .alignleft,
    .adv-prose .alignright {
        float: none;
        max-width: 100%;
        margin: 1.5em 0;
    }
    .adv-related-posts__grid {
        grid-template-columns: 1fr;
    }
    .adv-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    /* Mobile: table horizontal scroll hint */
    .adv-prose table {
        font-size: var(--adv-fs-xs);
    }
    .adv-prose thead th,
    .adv-prose tbody td {
        padding: 8px 10px;
    }
    .adv-single-post .adv-breadcrumb__current {
        max-width: 160px;
    }
}

/* ── Small mobile ── */
@media (max-width: 480px) {
    .adv-social-bar { grid-template-columns: 1fr; }
    .adv-mega-posts-grid { grid-template-columns: 1fr; }

    /* Cookie banner mobile */
    .adv-cookie-consent__inner { padding: var(--adv-sp-md); border-radius: 12px 12px 0 0; }
    .adv-cookie-consent__actions { flex-direction: column; }
    .adv-cookie-consent__btn { min-width: 100%; }
    .adv-cookie-settings-link { bottom: 10px; left: 10px; font-size: 11px; padding: 5px 10px; }
}


/* ================================================================
   HOMEPAGE V2 — Layout ilpost.it
   Hero + Posts List full width, poi due colonne sotto
   ================================================================ */

/* Nascondi le sidebar fisse (left/right) su questa homepage */
.page-template-template-home-ilpost .adv-sidebar-left,
.page-template-template-home-ilpost .adv-sidebar-right{
    display:none !important;
}
.archive .adv-sidebar-left,
.archive .adv-sidebar-right {
    display: none !important;
}

.adv-hp2{
    padding-bottom:var(--adv-sp-xl);
}

/* ── Sezione Hero: full width container ── */
.adv-hp2 .rsb-hero-post{
    padding:var(--adv-sp-lg) 0 0;
}

/* ── Sezione Posts List: separatore ── */
.adv-hp2 .rsb-posts-list{
    border-top:1px solid var(--adv-border);
    margin-top:var(--adv-sp-lg);
}

/* ── Due colonne via wp:columns ── */
.adv-hp2 .adv-hp2-columns-block{
    border-top:1px solid var(--adv-border);
    padding-top:var(--adv-sp-lg);
    gap:var(--adv-gutter-lg) !important;
}

/* Main column: editorial flow occupa tutto */
.adv-hp2 .adv-hp2-main-col .rsb-editorial-flow{
    padding-top:0;
}
.adv-hp2 .adv-hp2-main-col .rsb-editorial-flow__container{
    max-width:none;
}

/* Sidebar column: sticky */
.adv-hp2 .adv-hp2-sidebar-col{
    position:sticky;
    top:calc(var(--adv-header-h,60px) + var(--adv-sp-md));
    display:flex;
    flex-direction:column;
    gap:var(--adv-sp-lg);
}

/* ── Tablet: sidebar sotto ── */
@media(max-width:1024px){
    .adv-hp2 .adv-hp2-sidebar-col{
        position:static;
    }
}

/* ── Mobile ── */
@media(max-width:768px){
    .adv-hp2 .rsb-hero-post__container{
        padding-inline:var(--adv-gutter);
    }
}

/* ================================================================
   ADVERTISING ITALIA — MAGAZINE OVERRIDES (v1.0.0)
   ================================================================ */

body.adv-body { background: var(--adv-bg); color: var(--adv-text); }

.adv-sidebar-left,
.adv-sidebar-right { display: none !important; }

.adv-main, .adv-hp2 { padding-left: 0 !important; padding-right: 0 !important; }

/* ---- Top bar (data + città + utenti) ---------------------------- */
.adv-topbar {
    background: #0a0a0a;
    color: #d6d6d6;
    font-family: var(--adv-ff-ui);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 1px solid #1a1a1a;
}
.adv-topbar__inner {
    max-width: var(--adv-content-width);
    margin: 0 auto;
    padding: 8px var(--adv-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.adv-topbar__left,
.adv-topbar__right { display: flex; gap: 18px; align-items: center; }
.adv-topbar__center { color: #fff; font-weight: 600; }
.adv-topbar a { color: inherit; text-decoration: none; }
.adv-topbar a:hover { color: #fff; }

/* ---- Site brand (logo testuale Advertising italia) -------------- */
.adv-site-header { background: var(--adv-bg); border-bottom: 1px solid var(--adv-border); padding: 18px 0 0; }
.adv-site-header .adv-container { max-width: var(--adv-content-width); margin: 0 auto; padding: 0 var(--adv-gutter); }
.adv-header-top { display: flex; justify-content: center; align-items: center; padding: 4px 0 8px; position: relative; }
.adv-header-top__left, .adv-header-actions { position: absolute; top: 50%; transform: translateY(-50%); }
.adv-header-top__left { left: 0; }
.adv-header-actions { right: 0; gap: 12px; }

.adv-site-brand {
    font-family: var(--adv-ff-display);
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1;
    color: var(--adv-text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
}
.adv-site-brand img { display: none; }
.adv-site-brand__txt { display: inline-flex; align-items: baseline; flex-direction: row; }
.adv-site-brand__main   { font-style: normal; color: var(--adv-text); }
.adv-site-brand__accent { font-style: italic; color: var(--adv-accent); margin-left: 0.04em; }
.adv-site-brand__tld {
    font-family: var(--adv-ff-ui);
    font-size: 11px; font-weight: 600;
    color: var(--adv-text-muted);
    text-transform: uppercase; letter-spacing: 0.18em;
    margin-left: 0.4em; align-self: baseline; margin-top: 0;
}
.adv-brand-tagline {
    text-align: center;
    font-family: var(--adv-ff-ui);
    font-size: 11px; color: var(--adv-text-muted);
    text-transform: uppercase; letter-spacing: 0.22em;
    padding: 2px 0 14px;
}

/* ── Scroll-shrink: logo + tagline + paddings ── */
.adv-site-header,
.adv-site-header .adv-site-brand,
.adv-site-header .adv-site-brand__tld,
.adv-site-header .adv-brand-tagline,
.adv-site-header .adv-header-top {
    transition: padding var(--adv-duration) var(--adv-ease),
                font-size var(--adv-duration) var(--adv-ease),
                opacity var(--adv-duration) var(--adv-ease),
                max-height var(--adv-duration) var(--adv-ease),
                margin var(--adv-duration) var(--adv-ease);
}
.adv-site-header.adv-header-scrolled { padding-top: 6px; }
.adv-site-header.adv-header-scrolled .adv-header-top { padding: 0 0 4px; }
.adv-site-header.adv-header-scrolled .adv-site-brand { font-size: clamp(32px, 4vw, 46px); }
.adv-site-header.adv-header-scrolled .adv-site-brand__tld { font-size: 10px; margin-top: 0; }
.adv-site-header.adv-header-scrolled .adv-brand-tagline {
    max-height: 0;
    opacity: 0;
    padding: 0;
    overflow: hidden;
}
.adv-site-header.adv-header-scrolled .adv-header-nav { padding: 6px 0 8px; }
.adv-site-header.adv-header-scrolled .adv-primary-nav { gap: 22px; font-size: 11px; letter-spacing: 0.12em; }
.adv-site-header.adv-header-scrolled .adv-primary-nav li > a { padding: 2px 0; }
.adv-header-nav, .adv-primary-nav { transition: padding var(--adv-duration) var(--adv-ease), gap var(--adv-duration) var(--adv-ease), font-size var(--adv-duration) var(--adv-ease), letter-spacing var(--adv-duration) var(--adv-ease); }

/* ---- Primary navigation ---------------------------------------- */
.adv-header-nav { padding: 12px 0 14px; }
.adv-primary-nav {
    list-style: none; margin: 0; padding: 0;
    display: flex; justify-content: center; flex-wrap: nowrap; gap: 28px;
    font-family: var(--adv-ff-ui); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
    white-space: nowrap;
}
.adv-primary-nav > li {
    flex: 0 0 auto;
}
.adv-primary-nav li > a {
    color: var(--adv-text); text-decoration: none;
    padding: 4px 0; border-bottom: 2px solid transparent;
    transition: all var(--adv-duration) var(--adv-ease);
}
.adv-primary-nav li.current-menu-item > a,
.adv-primary-nav li > a:hover { color: var(--adv-accent); border-bottom-color: var(--adv-accent); }

/* Switch to mobile navigation whenever the desktop menu cannot fit. */
.adv-site-header.adv-nav-compact .adv-header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: center;
    justify-content: stretch;
}
.adv-site-header.adv-nav-compact .adv-header-top__left {
    display: none;
}
.adv-site-header.adv-nav-compact .adv-header-actions {
    position: static;
    transform: none;
    justify-self: end;
}
.adv-site-header.adv-nav-compact .adv-site-brand {
    justify-self: start;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.adv-site-header.adv-nav-compact .adv-brand-tagline {
    text-align: left;
    margin-right: 120px;
    padding-left: 0;
    padding-right: 0;
}
.adv-site-header.adv-nav-compact .adv-hamburger {
    display: flex;
}
.adv-site-header.adv-nav-compact .adv-header-nav {
    padding: 0;
    border-bottom: 0;
}
.adv-site-header.adv-nav-compact .adv-primary-nav {
    display: none !important;
}
.adv-site-header.adv-nav-compact.adv-nav-open .adv-primary-nav {
    position: fixed;
    top: var(--adv-mobile-menu-top, 112px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow-y: auto;
    margin: 0;
    padding: 12px 20px 32px;
    background: var(--adv-bg);
    border-top: 1px solid var(--adv-border);
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
    white-space: normal;
}
.adv-site-header.adv-nav-compact.adv-nav-open .adv-primary-nav > li {
    border-bottom: 1px solid var(--adv-border);
}
.adv-site-header.adv-nav-compact.adv-nav-open .adv-primary-nav > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 14px 0;
    border-bottom: 0;
    font-size: 14px;
    letter-spacing: 0.16em;
    white-space: normal;
}

/* ---- Breaking ticker (TOP rosso) -------------------------------- */
.adv-ticker {
    /* condivide la border-bottom con il menu (.adv-header-nav) per evitare doppia linea */
    border-top: 0;
    border-bottom: 1px solid var(--adv-border);
    background: var(--adv-strip-bg);
    overflow: hidden;
    margin-bottom: var(--adv-sp-xl);
}
.adv-ticker__inner {
    max-width: var(--adv-content-width); margin: 0 auto;
    padding: 8px var(--adv-gutter);
    display: flex; align-items: center; gap: 16px;
    font-family: var(--adv-ff-ui); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--adv-strip-text, var(--adv-text-muted));
}
.adv-ticker__badge {
    background: var(--adv-breaking); color: var(--adv-strip-badge-text, #fff);
    font-weight: 700; padding: 4px 10px;
    border-radius: 2px; letter-spacing: 0.18em; font-size: 11px;
    flex-shrink: 0;
}
.adv-ticker__feed {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.adv-ticker__track {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    min-width: max-content;
    padding-right: 28px;
    animation: advTickerScroll var(--adv-ticker-duration, 34s) linear infinite;
}
.adv-ticker:hover .adv-ticker__track,
.adv-ticker:focus-within .adv-ticker__track {
    animation-play-state: paused;
}
.adv-ticker__item {
    color: var(--adv-strip-text, var(--adv-text));
    text-decoration: none;
}
.adv-ticker a.adv-ticker__item:hover,
.adv-ticker a.adv-ticker__item:focus-visible {
    color: var(--adv-accent);
}
@keyframes advTickerScroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-100%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .adv-ticker__feed {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .adv-ticker__track {
        animation: none;
    }
    .adv-ticker__track[aria-hidden="true"] {
        display: none;
    }
}

/* ---- Homepage 3-column grid ------------------------------------ */
.adv-hp { max-width: var(--adv-content-width); margin: 0 auto; padding: 32px var(--adv-gutter); }
.adv-hp__lead {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 40px;
}
@media (max-width: 1024px) { .adv-hp__lead { grid-template-columns: 1fr; } }

.adv-hp__latest { border-top: 1px solid var(--adv-text); padding-top: 12px; }
.adv-hp__latest h3 {
    font-family: var(--adv-ff-ui); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--adv-text); margin-bottom: 16px; font-weight: 700;
}
.adv-hp__latest ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.adv-hp__latest li { padding-bottom: 18px; border-bottom: 1px solid var(--adv-border); }
.adv-hp__latest li:last-child { border-bottom: 0; }
.adv-hp__latest .cat {
    display: block; font-family: var(--adv-ff-ui); font-size: 10px;
    color: var(--adv-accent); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; margin-bottom: 6px;
}
.adv-hp__latest a.title {
    font-family: var(--adv-ff-ui); font-size: 13px; line-height: 1.35;
    color: var(--adv-text); font-weight: 600; text-decoration: none; display: block;
}
.adv-hp__latest a.title:hover { color: var(--adv-accent); }
.adv-hp__latest .time { font-size: 10px; color: var(--adv-text-light); margin-top: 6px; display: block; }

.adv-hp__top-kicker {
    font-family: var(--adv-ff-ui); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--adv-text); font-weight: 700;
    border-bottom: 1px solid var(--adv-text);
    padding-bottom: 8px; margin-bottom: 20px;
    display: flex; gap: 24px;
}
.adv-hp__top-kicker .accent { color: var(--adv-accent); }
.adv-hp__top h1 {
    font-family: var(--adv-ff-display);
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.1; letter-spacing: -0.01em;
    color: var(--adv-text); margin: 0 0 18px; font-weight: 700;
}
.adv-hp__top h1 a { color: inherit; text-decoration: none; }
.adv-hp__top h1 a:hover { color: var(--adv-accent); }
.adv-hp__top .standfirst {
    font-family: var(--adv-ff-ui);
    font-style: normal;
    font-weight: 400;
    font-size: 17px; line-height: 1.55;
    color: var(--adv-text-muted); margin-bottom: 24px;
}
.adv-hp__top .hero-img {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e8eef5 0%, #f5e8e8 100%);
    margin-bottom: 18px; border-radius: 2px; overflow: hidden;
}
.adv-hp__top .hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-hp__top .byline { font-family: var(--adv-ff-ui); font-size: 11px; color: var(--adv-text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.adv-hp__top .byline strong { color: var(--adv-text); font-weight: 700; }

.adv-hp__sub-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--adv-border); }
.adv-hp__sub-card .img { aspect-ratio: 3/2; background: linear-gradient(135deg, #f0e8ec 0%, #ece8ee 100%); margin-bottom: 12px; border-radius: 2px; }
.adv-hp__sub-card .cats { font-family: var(--adv-ff-ui); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--adv-accent); font-weight: 700; margin-bottom: 8px; }
.adv-hp__sub-card h3 { font-family: var(--adv-ff-display); font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
.adv-hp__sub-card h3 a { color: var(--adv-text); text-decoration: none; }
.adv-hp__sub-card h3 a:hover { color: var(--adv-accent); }
.adv-hp__sub-card .time { font-size: 10px; color: var(--adv-text-light); text-transform: uppercase; letter-spacing: 0.1em; }

.adv-hp__rubrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--adv-border); }
.adv-hp__rubrics .rubric .label { font-family: var(--adv-ff-ui); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--adv-accent); font-weight: 700; margin-bottom: 6px; }
.adv-hp__rubrics .rubric h4 { font-family: var(--adv-ff-display); font-size: 18px; line-height: 1.3; margin: 0; }
.adv-hp__rubrics .rubric h4 a { color: var(--adv-text); text-decoration: none; }
.adv-hp__rubrics .rubric h4 a:hover { color: var(--adv-accent); }

.adv-hp__aside { display: flex; flex-direction: column; gap: 28px; }
.rsb-block-hp.rsb-block-hp--most-read { --rsb-hp-mb-active: 28px; }
.rsb-sw-popular { margin-bottom: 28px; }
.adv-hp__most-read { border-top: 1px solid var(--adv-text); padding-top: 12px; }
.adv-hp__most-read h3 {
    font-family: var(--adv-ff-ui); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--adv-text); margin-bottom: 14px; font-weight: 700;
    display: flex; justify-content: space-between;
}
.adv-hp__most-read ol { list-style: none; padding: 0; margin: 0; counter-reset: mr; }
.adv-hp__most-read li {
    counter-increment: mr;
    display: grid; grid-template-columns: 28px 1fr;
    gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--adv-border);
    align-items: start;
}
.adv-hp__most-read li::before {
    content: counter(mr, decimal-leading-zero);
    font-family: var(--adv-ff-display); font-size: 22px; font-weight: 700; line-height: 1;
    color: var(--adv-accent);
}
.adv-hp__most-read a { font-family: var(--adv-ff-ui); font-size: 13px; line-height: 1.35; color: var(--adv-text); text-decoration: none; font-weight: 600; }
.adv-hp__most-read a:hover { color: var(--adv-accent); }

@media (min-width: 1025px) {
    .adv-hp--magazine .wp-block-columns.alignwide > .wp-block-column:nth-child(2) > .rsb-block-hp--top-story:first-child {
        margin-top: -30px;
    }
}

.adv-hp__newsletter {
    background: var(--adv-accent-soft);
    border: 1px solid var(--adv-accent);
    border-radius: 2px; padding: 18px;
}
.adv-hp__newsletter .label { font-family: var(--adv-ff-ui); font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--adv-accent); font-weight: 700; margin-bottom: 10px; display: block; }
.adv-hp__newsletter h4 { font-family: var(--adv-ff-display); font-size: 22px; line-height: 1.2; margin: 0 0 8px; color: var(--adv-text); font-weight: 700; }
.adv-hp__newsletter p { font-size: 12px; color: var(--adv-text-muted); margin: 0 0 12px; line-height: 1.45; }
.adv-hp__newsletter form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.adv-hp__newsletter input[type="email"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--adv-border-dark);
    padding: 8px 10px;
    font-size: 12px;
    font-family: var(--adv-ff-ui);
    border-radius: 2px;
    background: #fff;
    color: var(--adv-text);
}
.adv-hp__newsletter input[type="email"]::placeholder { color: var(--adv-text-muted); opacity: .75; }
.adv-hp__newsletter button {
    width: 100%;
    box-sizing: border-box;
    background: var(--adv-accent);
    color: #fff;
    border: 0;
    padding: 9px 14px;
    font-family: var(--adv-ff-ui);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 2px;
    text-align: center;
}
.adv-hp__newsletter button:hover { background: var(--adv-accent-hover); }
.adv-hp__newsletter .rsb-newsletter-cta__consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    overflow-wrap: anywhere;
    color: var(--adv-text-muted);
}
.adv-hp__newsletter .rsb-newsletter-cta__checkbox { accent-color: var(--adv-accent); }

[data-theme="dark"] .adv-hp__newsletter {
    background: var(--adv-bg-elevated);
    border-color: color-mix(in srgb, var(--adv-accent) 78%, var(--adv-border));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
[data-theme="dark"] .adv-hp__newsletter h4 { color: var(--adv-text); }
[data-theme="dark"] .adv-hp__newsletter p,
[data-theme="dark"] .adv-hp__newsletter .rsb-newsletter-cta__consent { color: var(--adv-text-muted); }
[data-theme="dark"] .adv-hp__newsletter input[type="email"] {
    background: var(--adv-bg);
    border-color: var(--adv-border-dark);
    color: var(--adv-text);
}
[data-theme="dark"] .adv-hp__newsletter input[type="email"]::placeholder { color: var(--adv-text-muted); opacity: .8; }
[data-theme="dark"] .adv-hp__newsletter .rsb-newsletter-cta__feedback--success {
    background: rgba(74, 222, 128, .12);
    border-color: rgba(74, 222, 128, .28);
    color: #86efac;
}
[data-theme="dark"] .adv-hp__newsletter .rsb-newsletter-cta__feedback--error {
    background: rgba(248, 113, 113, .12);
    border-color: rgba(248, 113, 113, .28);
    color: #fca5a5;
}

.adv-hp__opinions { border-top: 1px solid var(--adv-text); padding-top: 12px; }
.adv-hp__opinions h3 { font-family: var(--adv-ff-ui); font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--adv-text); margin-bottom: 14px; font-weight: 700; }
.adv-hp__opinions .item { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--adv-border); align-items: start; }
.adv-hp__opinions .avatar { width: 36px; height: 36px; border-radius: 50%; background: #e8e8ec; font-family: var(--adv-ff-ui); font-size: 10px; font-weight: 700; color: var(--adv-text-muted); display: flex; align-items: center; justify-content: center; text-transform: uppercase; }
.adv-hp__opinions .name { font-family: var(--adv-ff-ui); font-size: 11px; font-weight: 700; color: var(--adv-text); text-transform: uppercase; letter-spacing: 0.08em; }
.adv-hp__opinions .role { font-family: var(--adv-ff-ui); font-size: 10px; color: var(--adv-text-light); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; display: block; }
.adv-hp__opinions .quote { font-family: var(--adv-ff-display); font-style: italic; font-size: 13px; line-height: 1.4; color: var(--adv-text); }

/* ---- Section header (§ 01 …) ------------------------------------ */
.adv-section-marker {
    max-width: var(--adv-content-width);
    margin: 60px auto 18px;
    padding: 0 var(--adv-gutter);
    display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
    border-bottom: 1px solid var(--adv-text);
    padding-bottom: 14px;
}
.adv-section-marker__title { display: flex; align-items: baseline; gap: 18px; }
.adv-section-marker__num { font-family: var(--adv-ff-display); font-style: italic; font-size: 28px; color: var(--adv-accent); font-weight: 700; }
.adv-section-marker__name { font-family: var(--adv-ff-display); font-size: 32px; font-weight: 700; color: var(--adv-text); letter-spacing: -0.01em; }
.adv-section-marker__date { font-family: var(--adv-ff-ui); font-size: 11px; color: var(--adv-text-muted); text-transform: uppercase; letter-spacing: 0.16em; }

/* ---- §01 Focus piattaforme ------------------------------------- */
.adv-platforms {
    max-width: var(--adv-content-width);
    margin: 0 auto;
    padding: 0 var(--adv-gutter);
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--adv-border);
    border-bottom: 1px solid var(--adv-border);
}
@media (max-width: 768px) { .adv-platforms { grid-template-columns: 1fr; } }
.adv-platform { background: var(--adv-bg); padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; min-height: 140px; }
.adv-platform__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.adv-platform__name { font-family: var(--adv-ff-display); font-size: 22px; font-weight: 700; color: var(--adv-text); }
.adv-platform__delta { font-family: var(--adv-ff-ui); font-size: 13px; font-weight: 700; color: var(--adv-accent); }
.adv-platform__delta--neg { color: var(--adv-breaking); }
.adv-platform__metric { font-family: var(--adv-ff-ui); font-size: 12px; color: var(--adv-text-muted); text-transform: uppercase; letter-spacing: 0.1em; padding-bottom: 8px; border-bottom: 1px solid var(--adv-text); margin-bottom: 10px; }
.adv-platform__note { font-family: var(--adv-ff-ui); font-size: 10px; color: var(--adv-text-light); text-transform: uppercase; letter-spacing: 0.14em; line-height: 1.5; }
.adv-platform__note a { color: inherit; text-decoration: none; }
.adv-platform__note a:hover { color: var(--adv-accent); }

/* ---- §02 Dati & Classifiche ------------------------------------- */
.adv-charts {
    max-width: var(--adv-content-width);
    margin: 0 auto 60px;
    padding: 0 var(--adv-gutter);
    display: grid; grid-template-columns: 1.1fr 1fr;
    gap: 40px;
}
@media (max-width: 1024px) { .adv-charts { grid-template-columns: 1fr; } }
.adv-charts__table { font-family: var(--adv-ff-ui); }
.adv-charts__table .caption { font-size: 10px; color: var(--adv-text-muted); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 10px; }
.adv-charts__table table { width: 100%; border-collapse: collapse; }
.adv-charts__table th, .adv-charts__table td { padding: 10px 6px; text-align: left; font-size: 13px; border-bottom: 1px dashed var(--adv-border); }
.adv-charts__table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--adv-text-muted); font-weight: 700; }
.adv-charts__table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.adv-charts__table td.delta { text-align: right; color: var(--adv-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.adv-charts__table .rank { color: var(--adv-text-light); width: 28px; }

.adv-charts__viz { border: 1px solid var(--adv-text); padding: 24px; background: var(--adv-bg); }
.adv-charts__viz .caption { font-family: var(--adv-ff-ui); font-size: 11px; color: var(--adv-text-muted); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 8px; }
.adv-charts__viz h3 { font-family: var(--adv-ff-display); font-size: 22px; line-height: 1.2; margin: 0 0 18px; color: var(--adv-text); font-weight: 700; }
.adv-charts__viz h3 em { color: var(--adv-accent); font-style: italic; font-weight: 700; }
.adv-charts__bars { display: flex; align-items: flex-end; gap: 18px; height: 180px; padding-bottom: 24px; border-bottom: 1px solid var(--adv-border); }
.adv-charts__bar { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 2px; position: relative; }
.adv-charts__bar .base { background: #0a0a0a; }
.adv-charts__bar .ai   { background: var(--adv-accent); }
.adv-charts__bar::after { content: attr(data-year); position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-family: var(--adv-ff-ui); font-size: 10px; color: var(--adv-text-muted); }
.adv-charts__legend { display: flex; gap: 20px; margin-top: 12px; font-family: var(--adv-ff-ui); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--adv-text-muted); }
.adv-charts__legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; }
.adv-charts__legend .l-base::before { background: #0a0a0a; }
.adv-charts__legend .l-ai::before   { background: var(--adv-accent); }

/* ---- Footer dark ----------------------------------------------- */
.adv-site-footer {
    background: #0a0a0a;
    color: #d6d6d6;
    padding: 56px 0 28px;
    margin-top: 80px;
}
.adv-site-footer .adv-container { max-width: var(--adv-content-width); margin: 0 auto; padding: 0 var(--adv-gutter); }
.adv-site-footer .adv-footer-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #1f1f1f; }
@media (max-width: 1024px) { .adv-site-footer .adv-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .adv-site-footer .adv-footer-grid { grid-template-columns: 1fr; } }

.adv-footer-brand { display: block; margin-bottom: 18px; }
.adv-footer-brand img { display: none; }
.adv-footer-brand__txt {
    font-family: var(--adv-ff-display);
    font-size: 36px; font-weight: 700; color: #fff; line-height: 1;
    display: inline-flex; align-items: baseline;
}
.adv-footer-brand__accent { font-style: italic; color: var(--adv-accent); margin-left: 0.04em; }
.adv-footer-desc { font-size: 12px; line-height: 1.6; color: #888; max-width: 320px; margin: 0; }

.adv-site-footer .adv-footer-col__title {
    font-family: var(--adv-ff-ui); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.18em; color: #fff;
    margin: 0 0 14px;
}
.adv-site-footer .adv-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adv-site-footer .adv-footer-links a { color: #d6d6d6; font-size: 12px; text-decoration: none; font-family: var(--adv-ff-ui); }
.adv-site-footer .adv-footer-links a:hover { color: #fff; }
.adv-site-footer .adv-footer-grid > .adv-footer-col:nth-child(n+2) {
    justify-self: end;
    text-align: right;
}
.adv-site-footer .adv-footer-grid > .adv-footer-col:nth-child(n+2) .adv-footer-links {
    align-items: flex-end;
}
.adv-site-footer .adv-footer-grid > .adv-footer-col:nth-child(n+2) .adv-footer-col__title::after {
    right: 0;
    left: auto;
}
@media (max-width: 600px) {
    .adv-site-footer .adv-footer-grid > .adv-footer-col:nth-child(n+2) {
        justify-self: stretch;
        text-align: left;
    }
    .adv-site-footer .adv-footer-grid > .adv-footer-col:nth-child(n+2) .adv-footer-links {
        align-items: flex-start;
    }
    .adv-site-footer .adv-footer-grid > .adv-footer-col:nth-child(n+2) .adv-footer-col__title::after {
        right: auto;
        left: 0;
    }
}

.adv-footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.adv-footer-bottom-nav { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; }
.adv-footer-bottom-nav a { color: #888; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--adv-ff-ui); }
.adv-footer-bottom-nav a:hover { color: #fff; }
.adv-footer-copy { color: #666; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--adv-ff-ui); margin: 0; }
.adv-social-bar { display: none; }

.adv-newsletter-toggle, .adv-hamburger-desktop, .adv-popular-label, .adv-scroll-top { display: none !important; }

/* --- Editable Magazine Blocks area on Home template --- */
.adv-home-blocks { padding: 32px 0; background: var(--adv-bg, #fff); }
.adv-home-blocks--top { padding-top: 24px; padding-bottom: 12px; }
.adv-home-blocks--bottom { padding-top: 12px; padding-bottom: 48px; }
.adv-home-blocks .adv-container,
.adv-home-blocks > .wp-block-group { max-width: var(--adv-max-w, 1280px); margin: 0 auto; padding-inline: var(--adv-gutter, 24px); }
.adv-home-blocks .alignwide { max-width: 1100px; margin-inline: auto; }
.adv-home-blocks .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }

/* ================================================================
   HOMEPAGE MAGAZINE (block-driven, template-home-magazine.php)
   ============================================================= */
.adv-hp{
    padding-bottom: var(--adv-sp-2xl, 64px);
}
.adv-hp .adv-container{
    max-width: var(--adv-max-w, 1280px);
    margin: 0 auto;
    padding-inline: var(--adv-gutter, 24px);
}
.adv-hp .rsb-hero-post{
    padding: var(--adv-sp-lg, 24px) 0 0;
}
.adv-hp .rsb-posts-list{
    border-top: 1px solid var(--adv-border, #e5e5e5);
    margin-top: var(--adv-sp-lg, 24px);
    padding-top: var(--adv-sp-lg, 24px);
}
.adv-hp .adv-hp-columns-block{
    border-top: 1px solid var(--adv-border, #e5e5e5);
    padding-top: var(--adv-sp-lg, 24px);
    gap: var(--adv-gutter-lg, 40px) !important;
}
.adv-hp .adv-hp-main-col .rsb-editorial-flow{
    padding-top: 0;
}
.adv-hp .adv-hp-main-col .rsb-editorial-flow__container{
    max-width: none;
}
.adv-hp .adv-hp-sidebar-col{
    position: sticky;
    top: calc(var(--adv-header-h, 60px) + var(--adv-sp-md, 16px));
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-lg, 24px);
}
@media (max-width: 1024px){
    .adv-hp .adv-hp-sidebar-col{ position: static; }
}
@media (max-width: 768px){
    .adv-hp .rsb-hero-post__container{ padding-inline: var(--adv-gutter, 24px); }
}

/* ---- Mobile header/menu hardening -------------------------------- */
@media (max-width: 1200px) {
    .adv-site-header {
        padding-top: 8px;
    }
    .adv-site-header .adv-container {
        padding-inline: 16px;
    }
    .adv-header-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 12px;
        align-items: center;
        justify-content: stretch;
        min-height: 54px;
        padding: 6px 0 8px;
    }
    .adv-header-top__left {
        display: none;
    }
    .adv-header-actions {
        position: static;
        transform: none;
        justify-self: end;
        gap: 8px;
    }
    .adv-site-brand {
        justify-self: start;
        justify-content: flex-start;
        min-width: 0;
        max-width: 100%;
        font-size: clamp(30px, 10vw, 46px);
        overflow: hidden;
    }
    .adv-site-brand__txt {
        max-width: 100%;
        white-space: nowrap;
    }
    .adv-site-brand__tld {
        flex: 0 0 auto;
        font-size: 9px;
        letter-spacing: 0.12em;
        margin-left: 0.28em;
    }
    .adv-brand-tagline {
        max-width: min(100%, 360px);
        margin-inline: 0;
        padding: 0 12px 10px;
        font-size: 8px;
        line-height: 1.4;
        letter-spacing: 0.16em;
        white-space: normal;
        text-align: left;
    }
    .adv-hamburger {
        display: flex;
        border: 1px solid var(--adv-border);
        border-radius: var(--adv-radius-full);
        background: var(--adv-bg-alt);
    }
    .adv-header-nav {
        padding: 0;
        border-bottom: 0;
    }
    .adv-primary-nav {
        display: none !important;
    }
    .adv-nav-open .adv-primary-nav {
        position: fixed;
        top: var(--adv-mobile-menu-top, 112px);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1200;
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        overflow-y: auto;
        margin: 0;
        padding: 12px 20px 32px;
        background: var(--adv-bg);
        border-top: 1px solid var(--adv-border);
        box-shadow: 0 18px 40px rgba(0,0,0,0.28);
    }
    .adv-nav-open .adv-primary-nav > li {
        border-bottom: 1px solid var(--adv-border);
    }
    .adv-nav-open .adv-primary-nav > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 52px;
        padding: 14px 0;
        border-bottom: 0;
        font-size: 14px;
        letter-spacing: 0.16em;
        white-space: normal;
    }
    .adv-nav-open .adv-primary-nav > li.current-menu-item > a,
    .adv-nav-open .adv-primary-nav > li > a:hover,
    .adv-nav-open .adv-primary-nav > li > a:focus-visible {
        color: var(--adv-accent);
    }
    .adv-nav-open .adv-has-megamenu .adv-mega-panel {
        position: static;
        display: none;
        padding: 0 0 16px;
        border: 0;
        box-shadow: none;
        background: transparent;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .adv-nav-open .adv-has-megamenu .adv-mega-panel.is-open {
        display: block;
    }
    .adv-nav-open .adv-mega-backdrop {
        display: none;
    }
}

@media (max-width: 768px) {
    .adv-topbar__left,
    .adv-topbar__right {
        display: none;
    }
    .adv-topbar__center {
        width: 100%;
        justify-content: center;
    }
    .adv-theme-toggle,
    .adv-search-toggle,
    .adv-hamburger {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 600px) {
    .adv-site-brand {
        font-size: clamp(27px, 8.4vw, 38px);
    }
    .adv-site-brand__tld {
        font-size: 8px;
        margin-left: 0.22em;
    }
    .adv-search-toggle {
        display: none !important;
    }
    .adv-header-actions {
        gap: 6px;
    }
}

/* Keep the lead story as the first homepage content on mobile/tablet. */
@media (max-width: 1024px) {
    .adv-hp--magazine .adv-hp__inner,
    .adv-hp2 > .adv-container {
        display: flex;
        flex-direction: column;
    }
    .adv-hp--magazine .adv-hp__inner > *,
    .adv-hp2 > .adv-container > * {
        order: 20;
    }
    .adv-hp--magazine .adv-hp__inner > .wp-block-columns:first-of-type,
    .adv-hp2 > .adv-container > .wp-block-columns:first-of-type {
        order: 1;
        flex-direction: column;
        flex-wrap: nowrap !important;
        row-gap: 34px;
    }
    .adv-hp--magazine .adv-hp__inner > .wp-block-columns:first-of-type > .wp-block-column,
    .adv-hp2 > .adv-container > .wp-block-columns:first-of-type > .wp-block-column {
        width: 100%;
        flex-basis: 100% !important;
    }
    .adv-hp--magazine .adv-hp__inner > .wp-block-columns:first-of-type > .wp-block-column:nth-child(2),
    .adv-hp2 > .adv-container > .wp-block-columns:first-of-type > .wp-block-column:nth-child(2) {
        order: 1;
    }
    .adv-hp2 > .adv-container > .wp-block-columns:first-of-type > .wp-block-column:has(> .rsb-block-hp--top-story) {
        order: 1;
    }
    .adv-hp--magazine .adv-hp__inner > .wp-block-columns:first-of-type > .wp-block-column:nth-child(3),
    .adv-hp2 > .adv-container > .wp-block-columns:first-of-type > .wp-block-column:nth-child(3) {
        order: 2;
    }
    .adv-hp--magazine .adv-hp__inner > .wp-block-columns:first-of-type > .wp-block-column:nth-child(1),
    .adv-hp2 > .adv-container > .wp-block-columns:first-of-type > .wp-block-column:nth-child(1) {
        order: 3;
    }
}

/* Serra Agency Suite cookie banner: ADV Italia modal treatment. */
.sas-cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--adv-sp-md, 16px);
    background: rgba(0, 0, 0, 0.5);
    color: #f4f4f5;
    font-family: var(--adv-ff-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    opacity: 0;
    visibility: hidden;
    transform: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sas-cookie-consent[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    transform: none;
    pointer-events: none;
}
.sas-cookie-consent.is-visible,
.sas-cookie-consent[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}
.sas-cookie-consent__inner {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0;
    padding: var(--adv-sp-xl, 32px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    background: #18181b;
    color: #f4f4f5;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.4);
}
.sas-cookie-consent__text {
    min-width: 0;
}
.sas-cookie-consent__title {
    margin: 0 0 var(--adv-sp-xs, 8px);
    color: #f4f4f5;
    font-family: var(--adv-ff-heading, var(--adv-ff-display, Georgia, serif));
    font-size: var(--adv-fs-lg, 20px);
    font-weight: var(--adv-fw-bold, 700);
    line-height: 1.2;
}
.sas-cookie-consent__desc {
    margin: 0 0 var(--adv-sp-md, 16px);
    color: rgba(255,255,255,0.65);
    font-size: var(--adv-fs-sm, 14px);
    line-height: 1.5;
}
.sas-cookie-consent__desc a {
    color: var(--adv-accent, #e63946);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sas-cookie-consent__desc a:hover {
    color: #ff6b77;
}
.sas-cookie-consent__options {
    display: flex;
    flex-direction: column;
    gap: var(--adv-sp-sm, 12px);
    margin: 0 0 var(--adv-sp-lg, 24px);
    padding: var(--adv-sp-md, 16px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
}
.sas-cookie-toggle {
    display: flex;
    align-items: center;
    gap: var(--adv-sp-sm, 12px);
    padding: 6px 0;
    cursor: pointer;
}
.sas-cookie-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    margin: 0;
    border: 0;
    border-radius: 11px;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: background 0.25s ease;
}
.sas-cookie-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s ease;
}
.sas-cookie-toggle input[type="checkbox"]:checked {
    background: var(--adv-accent, #e63946);
}
.sas-cookie-toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}
.sas-cookie-toggle input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.sas-cookie-toggle__label {
    min-width: 90px;
    color: #f4f4f5;
    font-size: var(--adv-fs-sm, 14px);
    font-weight: var(--adv-fw-semibold, 600);
    white-space: normal;
}
.sas-cookie-toggle__info {
    color: rgba(255,255,255,0.4);
    font-size: var(--adv-fs-xs, 12px);
    white-space: normal;
}
.sas-cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--adv-sp-sm, 12px);
}
.sas-cookie-consent__btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    font-family: var(--adv-ff-body, inherit);
    font-size: var(--adv-fs-sm, 14px);
    font-weight: var(--adv-fw-semibold, 600);
    line-height: 1;
    cursor: pointer;
    white-space: normal;
    transition: background 0.2s ease, transform 0.15s ease;
}
.sas-cookie-consent__btn:hover {
    transform: scale(1.02);
}
.sas-cookie-consent__btn:active {
    transform: scale(0.98);
}
.sas-cookie-consent__btn--accept-all {
    background: var(--adv-accent, #e63946);
    color: #fff;
}
.sas-cookie-consent__btn--accept-all:hover {
    background: var(--adv-accent-hover, #d12836);
}
.sas-cookie-consent__btn--save {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.sas-cookie-consent__btn--save:hover {
    background: rgba(255,255,255,0.18);
}
.sas-cookie-consent__btn--reject {
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.6);
}
.sas-cookie-consent__btn--reject:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.sas-cookie-settings-link {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 9999;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: #18181b;
    color: rgba(255,255,255,0.6);
    font-size: var(--adv-fs-xs, 12px);
    font-weight: var(--adv-fw-medium, 500);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.sas-cookie-settings-link:hover {
    background: #2a2a2e;
    color: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
    .sas-cookie-consent__inner {
        padding: var(--adv-sp-md, 16px);
        border-radius: 12px 12px 0 0;
    }
    .sas-cookie-consent__actions {
        flex-direction: column;
    }
    .sas-cookie-consent__btn {
        min-width: 100%;
    }
    .sas-cookie-settings-link {
        bottom: 10px;
        left: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }
}
