/*
Theme Name: ilFiscale
Theme URI: https://ilfiscale.com
Author: Redazione ilFiscale
Description: Tema istituzionale per ilFiscale.com — portale di informazione fiscale per contribuenti e imprenditori. Design autorevole con palette navy/oro, tab Sintesi/Approfondimento per articoli, chatbot AI integrato.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: ilfiscale
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy: #0c1a2e;
  --navy-light: #132640;
  --navy-mid: #1b3358;
  --gold: #c8963a;
  --gold-light: #dbb05e;
  --gold-pale: #f5e6c8;
  --gold-glow: rgba(200,150,58,0.10);
  --cream: #faf9f6;
  --white: #ffffff;
  --sand: #f4f2ed;
  --gray-100: #f5f4f0;
  --gray-200: #e6e4de;
  --gray-300: #d1cfca;
  --gray-500: #7a7870;
  --gray-600: #5c5a54;
  --gray-700: #3d3b37;
  --gray-900: #1a1917;
  --shadow-sm: 0 1px 4px rgba(12,26,46,0.06);
  --shadow-md: 0 4px 20px rgba(12,26,46,0.08);
  --radius: 8px;
  --highlight-bg: #faf5ec;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Manrope', sans-serif;
  color: var(--gray-900);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 2rem; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; }

/* TYPOGRAPHY */
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; color: var(--navy); }
h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: 1.8rem; font-weight: 600; line-height: 1.15; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-family: 'Manrope', sans-serif; font-size: 1rem; font-weight: 700; }
p { margin-bottom: 1rem; }

/* HEADER */
.disclaimer-bar { background: var(--navy); padding: 0.5rem 0; font-size: 0.72rem; color: var(--gold-pale); text-align: center; }
.disclaimer-bar strong { color: var(--gold); }

.top-bar { background: var(--navy); border-bottom: 1px solid rgba(200,150,58,0.15); padding: 5px 0; font-size: 0.73rem; color: rgba(255,255,255,0.5); }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: var(--gold-light); }

.site-header { background: rgba(250,249,246,0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; max-width: 1240px; margin: 0 auto; padding: 0 2rem; }

/* Logo */
.site-logo { display: flex; align-items: baseline; gap: 1px; text-decoration: none; }
.site-logo .il { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-style: italic; font-size: 1.55rem; color: var(--gray-500); }
.site-logo .name { font-weight: 800; font-size: 1.3rem; color: var(--navy); letter-spacing: -0.04em; }
.site-logo .dot { font-weight: 800; font-size: 1.3rem; color: var(--gold); }
.site-logo .tld { font-weight: 300; font-size: 0.78rem; color: var(--gray-500); letter-spacing: 0.04em; }

.main-nav { display: flex; gap: 0.2rem; align-items: center; }
.main-nav ul { list-style: none; display: flex; gap: 0.2rem; align-items: center; margin: 0; padding: 0; }
.main-nav a { font-size: 0.84rem; font-weight: 600; color: var(--gray-600); padding: 0.4rem 0.95rem; border-radius: 6px; transition: all 0.2s; }
.main-nav a:hover { color: var(--navy); background: rgba(12,26,46,0.04); }
.main-nav .nav-cta a { background: var(--navy); color: var(--white); margin-left: 0.5rem; }
.main-nav .nav-cta a:hover { background: var(--navy-mid); }

/* BREADCRUMB */
.breadcrumb { padding: 1.2rem 0; font-size: 0.78rem; color: var(--gray-500); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { margin: 0 0.5rem; color: var(--gray-300); }
.breadcrumb .current { color: var(--navy); font-weight: 600; }

/* HOMEPAGE */
.hero {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-light) 55%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 5.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before { content: ''; position: absolute; top: -40%; right: -5%; width: 650px; height: 650px; background: radial-gradient(circle, rgba(200,150,58,0.07) 0%, transparent 65%); }
.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold)); }
.hero-grid { display: grid; grid-template-columns: 1fr 380px; gap: 4rem; align-items: center; position: relative; }
.hero-date { font-size: 0.68rem; color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1.5rem; font-weight: 600; }
.hero h1 { font-family: 'Cormorant Garamond', serif; font-size: 3.3rem; font-weight: 600; line-height: 1.08; margin-bottom: 1.3rem; color: var(--white); }
.hero h1 .hl { color: var(--gold-light); font-style: italic; }
.hero .subtitle { font-size: 1.05rem; font-weight: 300; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 2rem; max-width: 520px; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn-gold { background: var(--gold); color: var(--navy); font-weight: 700; font-size: 0.88rem; padding: 0.82rem 1.8rem; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; transition: all 0.2s; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline-w { background: transparent; color: var(--white); font-weight: 600; font-size: 0.88rem; padding: 0.82rem 1.8rem; border: 1.5px solid rgba(255,255,255,0.2); border-radius: 6px; text-decoration: none; display: inline-block; transition: all 0.2s; }
.btn-outline-w:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn-navy { background: var(--navy); color: var(--white); font-weight: 700; font-size: 0.85rem; padding: 0.8rem 2rem; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-navy:hover { background: var(--navy-mid); }

.hero-card { background: rgba(255,255,255,0.05); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 1.8rem; }
.hero-card-title { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 1.3rem; }
.hc-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.hc-row:last-child { border-bottom: none; }
.hc-icon { width: 36px; height: 36px; background: rgba(200,150,58,0.12); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.hc-label { font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.hc-value { font-size: 1rem; font-weight: 600; color: var(--white); }

/* SECTIONS */
.section { padding: 5rem 0; }
.section-articoli { background: var(--white); }
.sec-header { margin-bottom: 3rem; }
.sec-header.centered { text-align: center; }
.sec-over { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gold); margin-bottom: 0.7rem; }
.sec-title { font-family: 'Cormorant Garamond', serif; font-size: 2.3rem; font-weight: 600; color: var(--navy); }
.sec-desc { font-size: 0.98rem; color: var(--gray-500); margin-top: 0.6rem; max-width: 480px; }
.sec-header.centered .sec-desc { margin-left: auto; margin-right: auto; }
.gold-line { width: 40px; height: 2px; background: var(--gold); margin-top: 1rem; }
.sec-header.centered .gold-line { margin-left: auto; margin-right: auto; }

/* NEWS GRID */
.news-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.4rem; }
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-200); transition: all 0.3s; position: relative; }
.news-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); opacity: 0; transition: opacity 0.3s; }
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--gray-300); }
.news-card:hover::before { opacity: 1; }
.news-tag { display: inline-block; margin: 1.3rem 1.3rem 0; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 9px; border-radius: 4px; background: var(--gold-glow); color: var(--gold); }
.news-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.18rem; font-weight: 600; padding: 0.7rem 1.3rem 0.4rem; color: var(--navy); }
.news-card h3 a { color: var(--navy); }
.news-card p { font-size: 0.85rem; color: var(--gray-500); padding: 0 1.3rem; line-height: 1.55; }
.news-footer { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.3rem 1.1rem; margin-top: 0.5rem; border-top: 1px solid var(--gray-100); }
.news-date { font-size: 0.7rem; color: var(--gray-500); font-weight: 500; }
.news-link { font-size: 0.8rem; font-weight: 700; color: var(--gold); }
.news-link:hover { color: var(--navy); }
.news-more { text-align: center; margin-top: 2.5rem; }

/* GUIDE GRID */
.articolo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.articolo-card { padding: 1.7rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--gray-200); background: var(--cream); display: block; transition: all 0.3s; position: relative; overflow: hidden; }
.articolo-card::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--gold); opacity: 0; transition: opacity 0.3s; }
.articolo-card:hover { transform: translateY(-3px); box-shadow: 0 0 28px var(--gold-glow); border-color: transparent; }
.articolo-card:hover::after { opacity: 1; }
.articolo-emoji { font-size: 1.6rem; margin-bottom: 0.9rem; display: block; }
.articolo-card h3 { font-family: 'Manrope', sans-serif; font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 0.35rem; line-height: 1.3; }
.articolo-card p { font-size: 0.8rem; color: var(--gray-500); line-height: 1.5; }
.articolo-count { font-size: 0.65rem; color: var(--gold); font-weight: 600; margin-top: 0.8rem; letter-spacing: 0.05em; }

/* SCADENZE */
.scadenze-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.scad-card { background: var(--white); border-radius: var(--radius); padding: 1.4rem; border: 1px solid var(--gray-200); border-left: 3px solid var(--gold); transition: all 0.25s; }
.scad-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.scad-date { font-size: 0.72rem; font-weight: 600; color: var(--navy); margin-bottom: 0.45rem; text-transform: uppercase; letter-spacing: 0.04em; }
.scad-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--navy); margin-bottom: 0.25rem; }
.scad-card p { font-size: 0.8rem; color: var(--gray-500); line-height: 1.45; }

/* ARTICLE PAGE */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 3.5rem; padding-bottom: 4rem; }
.article-tag { display: inline-block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 4px; margin-bottom: 1rem; background: var(--gold-glow); color: var(--gold); }
.article-title { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 1rem; }
.article-meta { display: flex; align-items: center; gap: 1.5rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--gray-200); flex-wrap: wrap; }
.meta-item { font-size: 0.72rem; color: var(--gray-500); font-weight: 500; }

/* READING MODE TABS */
.reading-mode-box { margin-bottom: 2rem; }
.reading-mode-intro { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); margin-bottom: 0.6rem; }
.reading-tabs { display: flex; gap: 0.8rem; }
.tab-btn { flex: 1; font-family: 'Manrope', sans-serif; color: var(--gray-600); background: var(--white); border: 1.5px solid var(--gray-200); padding: 1rem 1.2rem; cursor: pointer; transition: all 0.25s; border-radius: var(--radius); text-align: left; display: flex; flex-direction: column; gap: 0.2rem; }
.tab-btn:hover { border-color: var(--gray-300); background: var(--gray-100); }
.tab-btn.active { border-color: var(--gold); background: var(--highlight-bg); box-shadow: 0 0 0 1px var(--gold); }
.tab-label { font-size: 0.92rem; font-weight: 700; color: var(--navy); }
.tab-desc { font-size: 0.76rem; font-weight: 400; color: var(--gray-500); line-height: 1.4; }
.tab-btn.active .tab-desc { color: var(--gray-600); }
.tab-time { font-size: 0.65rem; font-weight: 600; color: var(--gray-500); background: var(--gray-100); padding: 2px 8px; border-radius: 10px; align-self: flex-start; margin-top: 0.3rem; }
.tab-btn.active .tab-time { background: var(--gold-glow); color: var(--gold); }

.reading-legend { display: none; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; padding: 0.65rem 1rem; background: var(--highlight-bg); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.78rem; color: var(--gray-600); }
.reading-legend.visible { display: flex; }

/* DEEPEN CTA */
.deepen-cta { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; padding: 1.1rem 1.4rem; background: var(--white); border: 1.5px solid var(--gray-200); border-radius: var(--radius); cursor: pointer; transition: all 0.25s; }
.deepen-cta:hover { border-color: var(--gold); background: var(--highlight-bg); box-shadow: 0 2px 12px var(--gold-glow); }
.deepen-cta.hidden { display: none; }
.deepen-text { flex: 1; }
.deepen-text strong { font-size: 0.9rem; color: var(--navy); display: block; margin-bottom: 0.1rem; }
.deepen-text span { font-size: 0.78rem; color: var(--gray-500); }
.deepen-arrow { font-size: 1.5rem; color: var(--gold); font-weight: 300; }

/* ARTICLE BODY */
.article-body h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.55rem; font-weight: 600; color: var(--navy); margin: 2.2rem 0 0.8rem; }
.article-body p { font-size: 0.95rem; color: var(--gray-700); line-height: 1.8; margin-bottom: 1.1rem; }
.article-body strong { font-weight: 700; color: var(--gray-900); }
.article-body ul, .article-body ol { margin: 0.8rem 0 1.2rem 1.5rem; }
.article-body li { font-size: 0.95rem; color: var(--gray-700); line-height: 1.7; margin-bottom: 0.35rem; }
.article-body blockquote { background: var(--sand); border-left: 3px solid var(--gold); padding: 1.1rem 1.4rem; margin: 1.3rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.article-body blockquote p { font-style: italic; color: var(--gray-600); margin-bottom: 0; font-size: 0.92rem; }

.info-box { background: var(--sand); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.3rem; margin: 1.2rem 0; }
.info-box h4 { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 0.4rem; }
.info-box p { font-size: 0.88rem; color: var(--gray-700); line-height: 1.6; margin-bottom: 0; }

/* DEEP CONTENT */
.deep { display: none; }
.deep.visible { display: block; position: relative; padding: 1.1rem 1.3rem; margin: 1rem 0 1.2rem; background: var(--highlight-bg); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; animation: fadeDeep 0.35s ease; }
.deep p { font-size: 0.92rem; color: var(--gray-700); line-height: 1.75; margin-bottom: 0.8rem; }
.deep p:last-child { margin-bottom: 0; }
.deep .info-box { background: var(--white); }
@keyframes fadeDeep { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.norm-ref { color: var(--gold); font-weight: 600; border-bottom: 1px dotted var(--gold); cursor: pointer; }
.norm-ref:hover { color: var(--navy); border-bottom-color: var(--navy); }

/* SIDEBAR */
.sidebar { position: sticky; top: 90px; align-self: start; }
.sidebar-block { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1rem; }
.sidebar-title { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 0.9rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--gray-100); }
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.3rem; }
.toc-list a { font-size: 0.82rem; color: var(--gray-600); padding: 0.3rem 0.5rem; border-radius: 4px; display: block; border-left: 2px solid transparent; transition: all 0.2s; }
.toc-list a:hover { color: var(--navy); background: var(--gray-100); border-left-color: var(--gold); }

.norme-list { list-style: none; }
.norme-item { padding: 0.6rem 0; border-bottom: 1px solid var(--gray-100); transition: background 0.3s; }
.norme-item:last-child { border-bottom: none; }
.norme-item a { color: var(--navy); font-weight: 600; font-size: 0.8rem; display: block; line-height: 1.35; }
.norme-item a:hover { color: var(--gold); }
.norme-tipo { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); margin-bottom: 0.15rem; }
.norme-desc { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.15rem; line-height: 1.4; }
.norme-item.highlight { background: var(--gold-glow); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: 4px; }

.scad-mini { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-100); }
.scad-mini:last-child { border-bottom: none; }
.scad-mini-date { font-size: 0.68rem; font-weight: 700; color: var(--navy); background: var(--gray-100); padding: 3px 7px; border-radius: 3px; white-space: nowrap; flex-shrink: 0; }
.scad-mini-name { font-size: 0.82rem; color: var(--gray-700); font-weight: 500; }

.sidebar-cta { background: var(--navy); border-radius: var(--radius); padding: 1.4rem; text-align: center; }
.sidebar-cta h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; color: var(--white); margin-bottom: 0.4rem; }
.sidebar-cta p { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-bottom: 0.9rem; line-height: 1.5; }
.sidebar-cta .btn-gold { font-size: 0.78rem; padding: 0.6rem 1.3rem; }

.article-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200); }
.article-tags a { font-size: 0.7rem; font-weight: 600; color: var(--gray-600); background: var(--gray-100); padding: 4px 10px; border-radius: 4px; }
.article-tags a:hover { background: var(--gold-glow); color: var(--gold); }

/* GUIDE PAGE */
.articolo-hero { background: linear-gradient(145deg, var(--navy) 0%, var(--navy-light) 55%, var(--navy-mid) 100%); color: var(--white); padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.articolo-hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold)); }
.articolo-category { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); background: rgba(200,150,58,0.12); padding: 5px 12px; border-radius: 4px; margin-bottom: 1rem; }
.articolo-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: 2.8rem; font-weight: 700; line-height: 1.08; color: var(--white); margin-bottom: 1rem; max-width: 700px; }
.articolo-hero .lead { font-size: 1.05rem; font-weight: 300; color: rgba(255,255,255,0.6); max-width: 600px; line-height: 1.7; margin-bottom: 1.5rem; }
.articolo-meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.gm-item { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

.articolo-layout { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; padding: 2.5rem 0 4rem; }
.articolo-nav { position: sticky; top: 90px; align-self: start; }
.articolo-nav-title { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 0.8rem; }
.articolo-nav-list { list-style: none; }
.articolo-nav-list li { margin-bottom: 0.15rem; }
.articolo-nav-list a { font-size: 0.82rem; color: var(--gray-500); padding: 0.4rem 0.7rem; border-radius: 4px; display: block; border-left: 2px solid transparent; transition: all 0.2s; }
.articolo-nav-list a:hover { color: var(--navy); background: var(--gray-100); border-left-color: var(--gold); }

.articolo-step { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 2rem 2.2rem; margin-bottom: 1.5rem; }
.step-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.step-badge { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); background: var(--gold-glow); padding: 4px 10px; border-radius: 4px; }
.step-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 600; color: var(--navy); }

/* NEWSLETTER */
.section-nl { background: var(--gold); padding: 3.5rem 0; }
.nl-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.nl-inner h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 600; color: var(--navy); }
.nl-inner p { color: var(--navy-light); font-size: 0.92rem; margin-top: 0.2rem; }
.nl-form { display: flex; gap: 0; flex-shrink: 0; }
.nl-form input { padding: 0.8rem 1.2rem; border: 2px solid var(--navy); border-right: none; border-radius: 6px 0 0 6px; font-family: 'Manrope', sans-serif; font-size: 0.9rem; width: 280px; outline: none; background: var(--white); }
.nl-form button { background: var(--navy); color: var(--gold-pale); font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 1.6rem; border: 2px solid var(--navy); border-radius: 0 6px 6px 0; cursor: pointer; }
.nl-form button:hover { background: var(--navy-light); }

/* FOOTER */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.5); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand p { font-size: 0.82rem; line-height: 1.6; max-width: 300px; margin-top: 0.8rem; }
.site-footer h4 { font-weight: 700; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.4rem; }
.site-footer ul a { color: rgba(255,255,255,0.45); font-size: 0.84rem; }
.site-footer ul a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 1.3rem; display: flex; justify-content: space-between; font-size: 0.72rem; }
.footer-legal a { color: rgba(255,255,255,0.35); margin-left: 1.2rem; }

/* CHATBOT FAB */
.chat-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 60px; height: 60px; background: var(--gold); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; z-index: 1000; box-shadow: 0 8px 32px rgba(12,26,46,0.15), 0 4px 20px rgba(200,150,58,0.2); transition: all 0.3s; }
.chat-fab:hover { transform: scale(1.08); }
.chat-fab.open { transform: rotate(45deg); border-radius: 14px; background: var(--navy); font-size: 1.2rem; }

.chat-window { position: fixed; bottom: 5.5rem; right: 1.5rem; width: 400px; max-height: 580px; background: var(--white); border-radius: 16px; box-shadow: 0 12px 48px rgba(12,26,46,0.18); z-index: 999; display: flex; flex-direction: column; overflow: hidden; transform: scale(0.9) translateY(20px); opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); transform-origin: bottom right; }
.chat-window.visible { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
.chat-header { background: var(--navy); padding: 1rem 1.2rem; display: flex; align-items: center; gap: 0.7rem; }
.chat-avatar { width: 34px; height: 34px; background: var(--gold); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; color: var(--navy); }
.chat-header-name { font-weight: 700; font-size: 0.9rem; color: var(--white); }
.chat-header-status { font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.2rem; background: var(--gray-100); display: flex; flex-direction: column; gap: 0.8rem; min-height: 300px; max-height: 400px; }
.welcome-msg { background: var(--white); border-radius: 12px; padding: 1.2rem; text-align: center; border: 1px solid var(--gray-200); }
.welcome-msg h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; }
.welcome-msg p { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.8rem; }
.quick-q { background: var(--gold-glow); border: 1px solid rgba(200,150,58,0.15); color: var(--navy); font-size: 0.78rem; font-weight: 500; padding: 0.5rem 0.8rem; border-radius: 8px; cursor: pointer; text-align: left; transition: all 0.2s; display: block; width: 100%; margin-bottom: 0.4rem; }
.quick-q:hover { background: rgba(200,150,58,0.18); border-color: var(--gold); }
.msg { display: flex; flex-direction: column; }
.msg-user { align-items: flex-end; }
.msg-bot { align-items: flex-start; }
.msg .bubble { max-width: 85%; padding: 0.65rem 0.95rem; font-size: 0.88rem; line-height: 1.55; }
.msg-user .bubble { background: var(--navy); color: var(--white); border-radius: 12px 12px 3px 12px; }
.msg-bot .bubble { background: var(--white); color: var(--gray-900); border-radius: 12px 12px 12px 3px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
.chat-input-area { padding: 0.8rem; border-top: 1px solid var(--gray-200); background: var(--white); display: flex; gap: 0.5rem; }
.chat-input { flex: 1; border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 0.65rem 0.9rem; font-family: 'Manrope', sans-serif; font-size: 0.88rem; outline: none; resize: none; min-height: 40px; max-height: 100px; }
.chat-input:focus { border-color: var(--gold); }
.chat-send { width: 40px; height: 40px; background: var(--gold); border: none; border-radius: 10px; cursor: pointer; color: var(--navy); font-size: 1.1rem; font-weight: 700; }
.chat-send:hover { background: var(--gold-light); }
.chat-powered { text-align: center; padding: 0.4rem; font-size: 0.62rem; color: var(--gray-500); background: var(--white); border-top: 1px solid var(--gray-100); }
.typing { display: flex; align-items: flex-start; }
.typing .bubble { background: var(--white); border-radius: 12px; padding: 0.7rem 1rem; display: flex; gap: 0.3rem; border: 1px solid var(--gray-200); }
.typing-dot { width: 7px; height: 7px; background: var(--gray-300); border-radius: 50%; animation: typingBounce 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); background: var(--gray-300); } 30% { transform: translateY(-5px); background: var(--gold); } }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .articolo-grid { grid-template-columns: 1fr 1fr; }
  .scadenze-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .articolo-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 2.2rem; }
  .article-title { font-size: 1.8rem; }
  .news-grid, .articolo-grid, .scadenze-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .nl-inner { flex-direction: column; text-align: center; }
  .nl-form { flex-direction: column; width: 100%; }
  .nl-form input { width: 100%; border-right: 2px solid var(--navy); border-radius: 6px; }
  .nl-form button { border-radius: 6px; padding: 0.8rem; }
  .header-inner { height: auto; padding: 0.8rem 1.5rem; }
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .reading-tabs { flex-direction: column; gap: 0.5rem; }
  .deepen-cta { flex-direction: column; text-align: center; }
  .chat-window { bottom: 0; right: 0; left: 0; width: 100%; max-height: 100vh; border-radius: 0; }
}


/* ========================================
   Articoli Archive Layout
   ======================================== */
.articoli-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.articoli-main .news-grid {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 1.5rem;
}

.articoli-main .news-card {
  background: #fff;
  border: 1px solid #e8e0d0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.articoli-main .news-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #c9a84c;
}

.articoli-main .news-card h3 {
  margin: 0.5rem 0;
  font-size: 1.15rem;
  line-height: 1.4;
}

.articoli-main .news-card h3 a {
  color: #1a2744;
  text-decoration: none;
}

.articoli-main .news-card h3 a:hover {
  color: #c9a84c;
}

.articoli-main .news-card p {
  color: #5a6a7a;
  font-size: 0.95rem;
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* Load more button */
.load-more-wrap {
  text-align: center;
  margin-top: 2rem;
}

.btn-load-more {
  background: #1a2744;
  color: #fff;
  border: none;
  padding: 0.85rem 2.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-load-more:hover {
  background: #c9a84c;
  transform: translateY(-1px);
}

.btn-load-more:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Sidebar */
.articoli-sidebar {
  position: sticky;
  top: 2rem;
}

.sidebar-block {
  background: #fff;
  border: 1px solid #e8e0d0;
  border-radius: 12px;
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2744;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #c9a84c;
}

.sidebar-cat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: #1a2744;
  transition: background 0.15s;
  margin-bottom: 0.25rem;
}

.sidebar-cat-item:hover {
  background: #f8f5ef;
}

.sidebar-cat-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.sidebar-cat-info {
  display: flex;
  flex-direction: column;
}

.sidebar-cat-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a2744;
}

.sidebar-cat-count {
  font-size: 0.8rem;
  color: #8a8a8a;
}

/* Responsive */
@media (max-width: 768px) {
  .articoli-layout {
    grid-template-columns: 1fr;
  }
  .articoli-sidebar {
    position: static;
    order: -1;
  }
}
