/* Bonus Immobiliare — Article EXTRAS (brand-v2 Wave 3)
   SOLO componenti che components.css NON copre: warning-box, comparison-table,
   related, map-cta, zone-color, author-bio. Tutto il resto (hero, breadcrumb,
   category-pill, meta, layout, body, cta-card, faq, info-box, sidebar-cta) = components.css. */

@layer components {

/* P0 cascade overrides — base.css heading/meta rules win over @layer components
   (unlayered-beats-layered). !important mirato fino al Wave 6 layer cleanup.
   Risolve: H1 hero verde-su-verde, CTA card h3 verde-su-verde, icone meta giganti. */
.article-hero h1 { color: var(--cream) !important; }
.cta-card h3 { color: var(--cream) !important; font-size: 1.2rem !important; }
.article-meta { display: flex; gap: var(--space-lg); flex-wrap: wrap; align-items: center; }
.article-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 16px !important; height: 16px !important; flex-shrink: 0; }

.article-answer-box {
    margin: var(--space-lg) 0 var(--space-md);
    padding: var(--space-lg);
    border: 1px solid rgba(250, 247, 242, 0.18);
    border-radius: var(--radius-md);
    background: rgba(250, 247, 242, 0.08);
    color: rgba(250, 247, 242, 0.88);
    text-align: left;
}

.article-answer-box strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: 0.95rem;
}

.article-answer-box p {
    margin: 0;
    color: inherit;
    font-size: 1rem;
    line-height: 1.55;
}

.article-answer-box a {
    color: var(--gold-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.author-bio-block {
    display: flex; gap: var(--space-md); align-items: center;
    padding: var(--space-lg); background: var(--cream-dark);
    border-radius: var(--radius-md); margin: var(--space-2xl) 0;
}
.author-bio-avatar-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-bio-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--earth); margin-bottom: 0.15rem; }
.author-bio-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--bark) !important; text-decoration: none; }
.author-bio-name:hover { color: var(--terracotta); }
.author-bio-jobtitle { font-size: 0.85rem; color: var(--earth); margin-top: 0.15rem; }

.warning-box {
    background: var(--terracotta-pale);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.warning-box-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--terracotta);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.warning-box-title svg {
    width: 20px;
    height: 20px;
    color: var(--terracotta);
    flex-shrink: 0;
}

.warning-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.map-cta-box {
    background: linear-gradient(145deg, var(--olive-deep) 0%, var(--olive) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
    text-align: center;
    color: var(--cream);
}

.map-cta-box h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--cream);
}

.map-cta-box p {
    color: rgba(250, 247, 242, 0.85);
    margin-bottom: var(--space-lg);
}

.map-cta-btn {
    display: inline-block;
    background: var(--terracotta);
    color: var(--cream);
    padding: var(--space-md) var(--space-2xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-base);
}

.map-cta-btn:hover {
    background: var(--terracotta-light);
    color: var(--cream);
    transform: translateY(-2px);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--cream-dark);
}

.comparison-table th {
    background: var(--sage-mist);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--olive-deep);
}

.comparison-table tr:hover {
    background: var(--cream-dark);
}

.zone-colors {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.zone-color-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
}

.zone-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.related-section {
    background: var(--parchment);
    padding: var(--space-3xl) var(--space-2xl);
    margin-top: var(--space-3xl);
}

.related-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.related-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--olive-deep);
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.related-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition-base);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.related-card-category {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: var(--space-sm);
}

.related-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--olive-deep);
    line-height: 1.3;
    margin-bottom: var(--space-sm);
    transition: var(--transition-base);
}

.related-card:hover .related-card-title {
    color: var(--terracotta);
}

.related-card-meta {
    font-size: 0.8rem;
    color: var(--stone);
}

@media (max-width: 768px) {
    .comparison-table {
        font-size: 0.85rem;
    }
    .comparison-table th,
    .comparison-table td {
        padding: var(--space-sm);
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .zone-colors {
        flex-direction: column;
    }
}


/* Custom article components — recuperati dai CSS inline legacy (Wave 3 batch) */
.hero-dek {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    font-style: italic;
    color: rgba(250, 247, 242, 0.85);
    line-height: 1.55;
    max-width: 720px;
    margin-bottom: var(--space-lg);
}

.hero-dek:empty {
    display: none;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.article-tags:empty {
    display: none;
}

.article-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(250, 247, 242, 0.85);
    background: rgba(250, 247, 242, 0.08);
    border: 1px solid rgba(250, 247, 242, 0.18);
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

a.article-tag:hover {
    color: var(--cream);
    background: rgba(250, 247, 242, 0.16);
    border-color: rgba(250, 247, 242, 0.3);
}

.featured-image-figure {
    margin: 0 0 var(--space-2xl) 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.featured-image-figure img {
    width: 100%;
    display: block;
    aspect-ratio: 21 / 9;
    max-height: 380px;
    object-fit: cover;
    object-position: center;
}

.featured-image-figure figcaption {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-style: italic;
    color: var(--earth);
    padding: var(--space-sm) var(--space-md);
    background: rgba(74, 63, 53, 0.04);
    text-align: right;
}

.featured-image-figure figcaption a {
    color: var(--terracotta);
    text-decoration: none;
}

.featured-image-figure figcaption a:hover {
    text-decoration: underline;
}

.tldr-box {
    background: var(--terracotta-pale);
    border-left: 3px solid var(--terracotta);
    border-radius: var(--radius-sm);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.tldr-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--terracotta);
    margin-bottom: var(--space-sm);
}

.tldr-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tldr-list li {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--bark);
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: var(--space-xs);
}

.tldr-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--terracotta);
    font-weight: 700;
}

.tldr-list li:last-child {
    margin-bottom: 0;
}

.update-note-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--earth);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px dashed rgba(74, 63, 53, 0.15);
}

.update-note-box svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
    flex-shrink: 0;
}

.update-note-box-detail {
    color: var(--bark);
    font-style: normal;
}

.contract-clause {
    background: var(--cream-dark);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    white-space: pre-wrap;
    border-left: 4px solid var(--olive);
}

.contract-clause-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--olive-deep);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.example-text {
    background: var(--cream-dark);
    border: 1px solid var(--stone);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--bark);
}

.example-text-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--olive-deep);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.example-text-title svg {
    width: 18px;
    height: 18px;
    color: var(--olive);
}

.pro-list, .con-list {
    list-style: none;
    padding-left: 0;
}

.pro-list li, .con-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: var(--space-sm);
}

.pro-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--olive);
    font-weight: 700;
}

.con-list li::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: var(--terracotta);
    font-weight: 700;
}

}
