/**
 * Bonus Immobiliare — Components (translated from UI kit JSX vanilla)
 * v2.0.0 — 2026-05-25 (DS migration Wave 0)
 *
 * @layer components — consumes @layer tokens (semantic Tier 2 preferred).
 * Source: assets/design-system/extracted/project/ui_kits/bonusimmobiliare/site.css
 *
 * 11 components: Header, Footer, HomeHero, BrandLockup, ArticleCard,
 * CategoryCard, Newsletter, CTACard, FAQItem, FAQ, StatCard.
 *
 * KNOWN TECH DEBT (W0.T21 stylelint enforces gradually):
 * Some primitives still consumed directly (--olive, --terracotta) here.
 * Will be migrated to semantic Tier 2 (--accent-primary, --fg-heading) in Wave 2-6
 * during per-page rebrand. Stylelint rule allowlist this file for now.
 *
 * FAQ pattern: <details>/<summary> HTML5 nativo (NO React useState).
 * Italic <em>: 4 varianti gestite in base.css (h1/h2/h3 em + .on-dark + .newsletter + .blog-hero).
 */

@layer components {

/* UI Kit — Bonus Immobiliare
   Page-level layouts and components. Imports colors_and_type.css for tokens.
   Mirrors what's live at bonusimmobiliare.it (commit 69f40fd2). */

@import url('../../colors_and_type.css');

/* Reset basics carried through */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    overflow-x: hidden;
}

/* ============================================
   PAPER TEXTURE — on every UI-kit page
   ============================================ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.025;
    z-index: var(--z-toast);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: var(--z-header);
    padding: var(--space-lg) var(--space-2xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}
.header.transparent { background: transparent; }
.header.solid {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    padding: var(--space-md) var(--space-2xl);
}
.header .logo img { height: 72px; width: auto; transition: height var(--transition-base); }
.header.solid .logo img { height: 64px; }
/* Logo swap cream↔olive. logo-on-light nascosto di default via CSS (specificity 0,3,0
   batte base.css 'img{display:block}') + attributo [hidden] nel markup come difesa
   extra se il CSS tarda. Mai due loghi affiancati. Su .solid: inverti. */
.header .logo .logo-on-light { display: none; }
.header.solid .logo .logo-on-dark { display: none; }
.header.solid .logo .logo-on-light { display: block; }
.header .nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}
.header .nav-link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    position: relative;
    padding: var(--space-xs) 0;
    transition: var(--transition-base);
}
.header.solid .nav-link { color: var(--bark); }
.header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--terracotta);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}
.header .nav-link:hover::after { width: 100%; }
/* nav-cta — defensive !important to neutralize any cached or page-scoped
   override (es. .mappe-city-v2 a) on visited link color and padding. */
.header .nav-cta,
.header .nav-cta:link,
.header .nav-cta:visited,
.header.solid .nav-cta,
.header.solid .nav-cta:link,
.header.solid .nav-cta:visited,
body .header .nav-cta {
    background: var(--terracotta) !important;
    color: var(--cream) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    padding: 0.75rem 1.5rem !important;
    line-height: 1 !important;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    white-space: nowrap;
    flex-shrink: 0;
}
.header .nav-cta:hover,
.header .nav-cta:focus,
.header.solid .nav-cta:hover,
body .header .nav-cta:hover {
    background: var(--terracotta-light) !important;
    color: var(--cream) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-cta-soft);
}

/* ============================================
   HERO — editorial cream cover (la direzione brand)
   ============================================ */
.hero {
    position: relative;
    padding: calc(var(--header-height) + var(--space-3xl)) var(--space-2xl) var(--space-4xl);
    background: var(--cream);
    overflow: hidden;
    color: var(--bark);
}
/* Subtle warm wash bottom-left */
.hero::before {
    content: '';
    position: absolute;
    bottom: -40%; left: -15%;
    width: 55%; height: 100%;
    background: radial-gradient(ellipse, rgba(240, 101, 67, 0.10) 0%, transparent 60%);
    pointer-events: none;
}
/* Terracotta hairline at the bottom — section terminator */
.hero::after {
    content: '';
    position: absolute;
    left: var(--space-2xl); right: var(--space-2xl);
    bottom: 0;
    height: 1px;
    background: var(--terracotta);
    opacity: 0.4;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: var(--space-3xl);
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
}
.hero-left { min-width: 0; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: var(--space-lg);
}
.hero-eyebrow::before {
    content: '';
    width: 32px; height: 2px;
    background: currentColor;
    border-radius: var(--radius-full);
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--weight-bold);
    color: var(--olive-deep);
    line-height: 1.25;
    letter-spacing: -0.008em;
    margin: 0 0 var(--space-3xl);
    word-break: break-word;
    overflow-wrap: anywhere;
}
.hero-title em {
    font-style: italic;
    color: var(--terracotta);
    font-weight: var(--weight-bold);
}
.hero-subtitle {
    font-size: var(--text-body-lg);
    color: var(--earth);
    max-width: 480px;
    line-height: var(--leading-relaxed);
    margin: 0 0 var(--space-xl);
}
.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Featured stack — visual anchor on right side of hero */
.hero-featured {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.hero-featured-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--earth);
    margin: 0 0 var(--space-xs);
}
.hero-featured-card {
    display: flex;
    gap: var(--space-md);
    background: white;
    padding: var(--space-md);
    border-radius: 14px;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    align-items: center;
    transition: var(--transition-base);
    cursor: pointer;
}
.hero-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}
.hero-featured-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex: 0 0 auto;
    background-color: var(--sage-mist);
    background-image: linear-gradient(135deg, var(--sage-mist), var(--sage-pale));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--olive-deep);
}
.hero-featured-info { min-width: 0; flex: 1; }
.hero-featured-meta {
    font-size: 0.7rem;
    font-weight: var(--weight-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.hero-featured-card h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: var(--weight-bold);
    color: var(--olive-deep);
    margin: 4px 0 0;
    line-height: 1.3;
}

.hero-content {
    max-width: 720px;
    position: relative;
    z-index: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition-base);
    line-height: 1;
    white-space: nowrap;
}
.btn-primary { background: var(--terracotta); color: var(--cream); }
.btn-primary:hover {
    background: var(--terracotta-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-cta);
    color: var(--cream);
}
.btn-secondary { background: var(--olive); color: var(--cream); }
.btn-secondary:hover { background: var(--olive-deep); color: var(--cream); }

.btn-secondary-dark {
    background: transparent;
    color: var(--cream);
    border: 2px solid rgba(250, 247, 242, 0.4);
    padding: calc(var(--space-md) - 2px) calc(var(--space-xl) - 2px);
}
.btn-secondary-dark:hover {
    background: rgba(250, 247, 242, 0.1);
    border-color: rgba(250, 247, 242, 0.6);
    color: var(--cream);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--olive);
    color: var(--olive);
    padding: calc(var(--space-md) - 2px) calc(var(--space-xl) - 2px);
}
.btn-outline:hover { background: var(--olive); color: var(--cream); }
.btn .icon { width: 18px; height: 18px; transition: var(--transition-fast); }
.btn:hover .icon { transform: translateX(3px); }

/* ============================================
   SECTION HEADER
   ============================================ */
.section {
    padding: var(--space-5xl) var(--space-2xl);
    position: relative;
}
.section-cream { background: var(--cream); }
.section-parchment { background: var(--parchment); }
.section-olive {
    background: linear-gradient(135deg, var(--olive-deep) 0%, var(--olive) 100%);
    color: var(--cream);
}
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-extreme);
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: var(--space-md);
}
.section-label::before,
.section-label::after {
    content: '';
    width: 30px; height: 1px;
    background: currentColor;
    opacity: 0.5;
}
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-section);
    font-weight: var(--weight-regular);
    color: var(--olive-deep);
    line-height: var(--leading-snug);
    margin: 0 0 var(--space-md);
}
.section-title em {
    font-style: italic;
    color: var(--terracotta);
    font-weight: var(--weight-medium);
}
.section-subtitle {
    font-size: var(--text-body-lg);
    color: var(--earth);
    max-width: 520px;
    margin: 0 auto;
}

/* ============================================
   MAGAZINE GRID + ARTICLE CARDS
   ============================================ */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-lg);
    max-width: 1300px;
    margin: 0 auto;
}
.article-card {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lifted);
}
.article-card.featured-large { grid-column: span 7; grid-row: span 2; }
.article-card.featured-medium { grid-column: span 5; }

.article-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background-color: var(--sage-mist);
    background-size: cover;
    background-position: center;
}
.article-card.featured-large .article-card-image { aspect-ratio: 16/12; }
.article-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(42, 50, 35, 0.35) 100%);
}
.article-card-image-placeholder {
    background: var(--sage-mist);
}
.article-category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 2;
    background: var(--cream);
    color: var(--olive-deep);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(42, 50, 35, 0.35);
}
.article-card-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.article-card.featured-large .article-card-body { padding: var(--space-xl); }
.article-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    line-height: 1.3;
    margin: 0 0 var(--space-sm);
    transition: var(--transition-base);
}
.article-card.featured-large .article-card-title { font-size: 1.75rem; }
.article-card:hover .article-card-title { color: var(--terracotta); }
.article-card-excerpt {
    font-size: 0.95rem;
    color: var(--earth);
    line-height: 1.6;
    margin: 0 0 var(--space-md);
    flex: 1;
}
.article-card-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: var(--stone);
}
.article-card-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* ============================================
   CATEGORY CARDS
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1100px;
    margin: 0 auto;
}
.category-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--olive);
    transform: scaleX(0);
    transition: var(--transition-base);
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lifted);
}
.category-card:hover::before { transform: scaleX(1); }
.category-icon {
    width: 64px; height: 64px;
    margin: 0 auto var(--space-lg);
    background: var(--sage-mist);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}
.category-icon svg {
    width: 32px; height: 32px;
    color: var(--olive);
    transition: var(--transition-base);
}
.category-card:hover .category-icon { background: var(--olive); }
.category-card:hover .category-icon svg { color: var(--cream); }
.category-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    margin: 0 0 var(--space-sm);
}
.category-desc {
    font-size: 0.95rem;
    color: var(--earth);
    line-height: 1.6;
    margin: 0 0 var(--space-lg);
}
.category-count {
    font-size: 0.7rem;
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--terracotta);
    padding: var(--space-xs) var(--space-md);
    background: var(--terracotta-pale);
    border-radius: var(--radius-full);
    display: inline-block;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-inner {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.newsletter-icon {
    width: 56px; height: 56px;
    margin: 0 auto var(--space-md);
    background: var(--gold);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.newsletter-icon svg { width: 28px; height: 28px; color: var(--olive-dark); }
.newsletter h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: var(--weight-regular);
    color: var(--cream);
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
}
.newsletter h2 em { font-style: italic; color: var(--gold-light); font-weight: var(--weight-medium); }
.newsletter p {
    font-size: var(--text-base);
    color: rgba(250, 247, 242, 0.8);
    margin: 0 0 var(--space-xl);
}
.newsletter-form {
    display: flex;
    gap: var(--space-md);
    max-width: 440px;
    margin: 0 auto;
}
.newsletter-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: rgba(250, 247, 242, 0.1);
    border: 2px solid rgba(250, 247, 242, 0.2);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--cream);
}
.newsletter-input::placeholder { color: rgba(250, 247, 242, 0.5); }
.newsletter-input:focus { outline: none; border-color: var(--gold); background: rgba(250, 247, 242, 0.15); }
.newsletter-btn {
    padding: var(--space-md) var(--space-xl);
    background: var(--terracotta);
    color: var(--cream);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: var(--transition-base);
}
.newsletter-btn:hover { background: var(--terracotta-light); transform: translateY(-2px); }

/* ============================================
   FOOTER
   ============================================ */
/* On-dark sections: headings must be cream (base.css colors h1-h6 olive-deep,
   which wins over component rules here regardless of @layer — !important needed).
   Covers footer (.footer.on-dark), newsletter (.newsletter.on-dark), any dark section.
   The em accent (gold-light) keeps its own rule. Wave 2.6 contrast fix. */
.on-dark :is(h1, h2, h3, h4, h5, h6) { color: var(--cream) !important; }

.footer {
    background: var(--olive-dark);
    padding: var(--space-4xl) var(--space-2xl) var(--space-2xl);
    color: rgba(250, 247, 242, 0.7);
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-main {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(120px, 1fr));
    gap: var(--space-2xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(250, 247, 242, 0.1);
}
.footer-brand { max-width: 280px; }
.footer-logo img { height: 42px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin: var(--space-md) 0 0; }
.footer-nav h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: var(--weight-semibold);
    color: var(--cream);
    margin: 0 0 var(--space-md);
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: var(--space-sm); }
.footer-nav a {
    color: rgba(250, 247, 242, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition-base);
    cursor: pointer;
}
.footer-nav a:hover { color: var(--gold); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    font-size: 0.8rem;
}
.footer-legal { display: flex; gap: var(--space-lg); }
.footer-legal a { color: inherit; text-decoration: none; cursor: pointer; }
.footer-legal a:hover { color: var(--cream); }

/* ============================================
   BLOG LIST PAGE
   ============================================ */
.blog-hero {
    padding: 7rem var(--space-2xl) var(--space-xl);
    background: linear-gradient(165deg, var(--olive-deep) 0%, var(--olive) 100%);
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 50%; height: 100%;
    background: radial-gradient(ellipse, rgba(191, 166, 122, 0.12) 0%, transparent 60%);
    pointer-events: none;
}
.blog-hero-inner { max-width: 880px; margin: 0 auto; position: relative; z-index: 1; }
.blog-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: var(--weight-regular);
    color: var(--cream);
    margin: 0 0 var(--space-sm);
}
.blog-hero h1 em { font-style: italic; color: var(--sage-pale); font-weight: var(--weight-medium); }
.blog-hero p { font-size: 1rem; color: rgba(250, 247, 242, 0.75); margin: 0; }

.filter-bar {
    background: white;
    border-bottom: 1px solid var(--cream-dark);
    padding: var(--space-md) var(--space-2xl);
    position: sticky;
    top: 65px;
    z-index: var(--z-filter-bar);
}
.filter-inner {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}
.search-box { position: relative; flex: 0 1 240px; }
.search-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem var(--space-md) 0.6rem 2.4rem;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-full);
    background: var(--cream);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--bark);
    transition: var(--transition-base);
}
.search-box input:focus { outline: none; border-color: var(--olive); background: white; }
.search-box svg { position: absolute; left: var(--space-md); top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--earth); }
.chips { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.chip {
    box-sizing: border-box;
    padding: 0.4rem 0.85rem;
    font-size: 0.7rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-full);
    background: white;
    color: var(--earth);
    cursor: pointer;
    font-family: var(--font-body);
    line-height: 1.1;
    transition: var(--transition-fast);
}
.chip:hover { border-color: var(--olive); color: var(--olive-deep); }
.chip.active { background: var(--olive); border-color: var(--olive); color: var(--cream); }

.blog-content { max-width: 880px; margin: 0 auto; padding: var(--space-2xl); }
.article-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-md);
    align-items: center;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--cream-dark);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition-base);
}
.article-row:hover {
    background: white;
    margin: 0 calc(-1 * var(--space-md));
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
    border-color: transparent;
    box-shadow: var(--shadow-soft);
}
.row-tag {
    font-size: 0.6rem;
    font-weight: var(--weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}
.row-tag[data-cat="compravendita"] { background: var(--olive); color: var(--cream); }
.row-tag[data-cat="affitto"]      { background: #8B6F47; color: var(--cream); }
.row-tag[data-cat="fiscale"]      { background: #6B4A5C; color: var(--cream); }
.row-tag[data-cat="bonus"]        { background: #B8860B; color: #1F1A14; } /* dark text: cream on goldenrod fails AA (3.25:1) */
.row-tag[data-cat="legale"]       { background: var(--terracotta); color: var(--cream); }
.row-info { min-width: 0; }
.row-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    line-height: 1.35;
    margin: 0 0 var(--space-xs);
    transition: var(--transition-base);
}
.article-row:hover .row-title { color: var(--terracotta); }
.row-excerpt {
    font-size: 0.85rem;
    color: var(--earth);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row-meta { font-size: 0.75rem; color: var(--stone); white-space: nowrap; }

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-hero {
    padding: 7rem var(--space-2xl) var(--space-2xl);
    background: linear-gradient(165deg, var(--olive-deep) 0%, var(--olive) 100%);
    position: relative;
}
.article-hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: rgba(250, 247, 242, 0.7);
    margin-bottom: var(--space-md);
}
.breadcrumb a { color: inherit; text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { color: var(--cream); }
.article-category-pill {
    display: inline-block;
    background: var(--terracotta);
    color: var(--cream);
    font-size: 0.65rem;
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}
.article-hero h1 {
    font-family: var(--font-display);
    font-size: var(--text-article-h1);
    font-weight: var(--weight-medium);
    color: var(--cream);
    line-height: 1.2;
    margin: 0 0 var(--space-lg);
}
.article-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.9rem;
    color: rgba(250, 247, 242, 0.8);
    align-items: center;
}
.article-meta .author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.article-meta .author img {
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gold);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-2xl);
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl);
}
.article-body {
    max-width: var(--max-width-article);
    font-size: var(--text-body);
    line-height: var(--leading-loose);
}
.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    margin: var(--space-2xl) 0 var(--space-md);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    margin: var(--space-xl) 0 var(--space-md);
}
.article-body p { margin: 0 0 var(--space-lg); color: var(--bark); }
.article-body strong { font-weight: var(--weight-semibold); color: var(--olive-deep); }
.article-body a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 0 0 var(--space-lg); padding-left: var(--space-xl); }
.article-body li { margin-bottom: var(--space-sm); }
.article-body blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--sage-mist);
    border-left: 4px solid var(--olive);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}
.article-body blockquote p { margin: 0; }

.info-box {
    background: var(--gold-pale);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}
.info-box-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: var(--weight-semibold);
    color: var(--olive-deep);
    margin: 0 0 var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.info-box-title svg { width: 20px; height: 20px; color: var(--gold); }
.info-box p { margin: 0; font-size: 0.95rem; }

.sidebar-cta { position: sticky; top: 100px; height: fit-content; }
.cta-card {
    background: linear-gradient(145deg, var(--olive-deep) 0%, var(--olive) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-medium);
    color: var(--cream);
}
.cta-card-badge {
    display: inline-block;
    background: var(--cream);
    color: var(--olive-deep);
    font-size: 0.65rem;
    font-weight: var(--weight-bold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}
.cta-card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: var(--weight-medium);
    color: var(--cream);
    margin: 0 0 var(--space-sm);
    line-height: 1.3;
}
.cta-card p { font-size: 0.9rem; color: rgba(250, 247, 242, 0.85); margin: 0 0 var(--space-lg); line-height: 1.6; }
.cta-card-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--terracotta);
    color: var(--cream);
    padding: var(--space-md);
    border-radius: var(--radius-full);
    font-weight: var(--weight-semibold);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}
.cta-card-btn:hover { background: var(--terracotta-light); color: var(--cream); transform: translateY(-2px); }
.cta-card-note { font-size: 0.75rem; color: rgba(250, 247, 242, 0.6); text-align: center; margin: var(--space-md) 0 0; }

/* ============================================
   FAQ
   ============================================ */
.faq-section { margin-top: var(--space-3xl); padding-top: var(--space-2xl); border-top: 1px solid var(--cream-dark); }
.faq-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    margin: 0 0 var(--space-xl);
}
.faq-item {
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: var(--space-lg);
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: var(--weight-medium);
    color: var(--olive-deep);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}
.faq-question:hover { background: var(--cream); }
.faq-question svg { width: 20px; height: 20px; color: var(--earth); transition: var(--transition-base); flex-shrink: 0; margin-left: var(--space-md); }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { padding: 0 var(--space-lg) var(--space-lg); display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-answer p { margin: 0; color: var(--earth); }

/* ============================================
   STAT CARDS  (calculator landing)
   ============================================ */
.stat-cards-row {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: 0 var(--space-2xl) var(--space-2xl);
    flex-wrap: wrap;
    margin-top: -2rem;
}
.stat-card {
    background: white;
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    text-align: center;
    min-width: 170px;
}
.stat-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: var(--weight-semibold);
    color: var(--accent-city, var(--olive));
    line-height: 1;
    margin: 0 0 var(--space-xs);
}
.stat-label { font-size: 0.9rem; color: var(--olive-deep); font-weight: var(--weight-semibold); }
.stat-desc { font-size: 0.75rem; color: var(--earth); line-height: 1.4; margin-top: 4px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .magazine-grid { grid-template-columns: 1fr 1fr; }
    .article-card.featured-large { grid-column: span 2; grid-row: span 1; }
    .article-card.featured-medium { grid-column: span 1; }
    .article-layout { grid-template-columns: 1fr; max-width: 800px; }
    .sidebar-cta { position: static; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; max-width: none; }
}
@media (max-width: 768px) {
    .header { padding: var(--space-sm) var(--space-lg); }
    .header .nav { display: none; }
    .header .logo img { height: 48px; }
    .header.solid .logo img { height: 44px; }
    .hero { padding: var(--space-4xl) var(--space-lg) var(--space-3xl); }
    .section { padding: var(--space-3xl) var(--space-lg); }
    .magazine-grid { grid-template-columns: 1fr; }
    .article-card.featured-large, .article-card.featured-medium { grid-column: span 1; }
    .categories-grid { grid-template-columns: 1fr; }
    .newsletter-form { flex-direction: column; }
    .footer-main { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { grid-column: span 1; }
    .footer-bottom { flex-direction: column; gap: var(--space-sm); }
}

/* ============================================
   Nav Dropdown — Minimal classic (Wave 2.2 v6 — ispirato Tania Rascia gist)
   ============================================ */
.nav-dropdown {
    position: relative;
}
.nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #FAF7F2;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    list-style: none;
    margin: 0;
    z-index: calc(var(--z-header) + 1);
    overflow: hidden;
}

.nav-dropdown-menu li {
    list-style: none;
}

/* !important: homepage.css 'a {color:inherit}' è unlayered e batte i layer. Wave 6 cleanup. */
.header .nav .nav-dropdown-link {
    display: block;
    padding: 10px 18px;
    font-family: 'Source Serif 4', Georgia, serif !important;
    font-weight: 500;
    font-size: 0.9375rem;
    color: #3D4832 !important;
    text-decoration: none;
    text-align: center;
    transition: all 200ms ease-in-out;
}

.header .nav .nav-dropdown-link:hover {
    color: #F06543 !important;
    background: rgba(240, 101, 67, 0.06);
}

.header .nav .nav-dropdown-link:focus-visible {
    outline: 2px solid #F06543;
    outline-offset: -2px;
    color: #F06543 !important;
}

} /* close @layer components */

/* ============================================
   HEADER on light hero (shared skin)
   Single SoT for sections whose hero is light (cream/olive band starts
   below the header): canone landings, city maps, report pages. Replaces
   the per-section copy that lived in pages/{canone,mappa,report,report-seo}.css.
   Unlayered on purpose so it keeps priority over the layered base .header,
   matching the prior behaviour of the unlayered section blocks.
   ============================================ */
body:is(.canone-v2, .mappe-city-v2, .report-v2, .report-seo-v2) .header {
    background: rgba(250, 247, 242, 0.96);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    padding: var(--space-md) var(--space-2xl);
}
body:is(.canone-v2, .mappe-city-v2, .report-v2, .report-seo-v2) .header .logo .logo-on-dark { display: none; }
body:is(.canone-v2, .mappe-city-v2, .report-v2, .report-seo-v2) .header .logo .logo-on-light { display: block; }
body:is(.canone-v2, .mappe-city-v2, .report-v2, .report-seo-v2) .header .nav-link { color: var(--bark); }
body:is(.canone-v2, .mappe-city-v2, .report-v2, .report-seo-v2) .header .menu-toggle span { background: var(--olive-deep); }
