/*
Theme Name: Edilizia-AI
Theme URI: https://edilizia-ai.it
Description: Tema ufficiale Edilizia-AI.it — Dove il cantiere incontra l'intelligenza artificiale. Community professionale per tecnici e imprese del settore edile.
Version: 1.0
Author: Edilizia-AI.it
Author URI: https://edilizia-ai.it
Text Domain: edilizia-ai
*/

:root {
  --navy:       #0D2137;
  --navy-mid:   #162F4A;
  --navy-light: #1E3D5C;
  --steel:      #2E5077;
  --gold:       #B8963E;
  --gold-light: #D4AC52;
  --white:      #FFFFFF;
  --off-white:  #F7F8FA;
  --gray-100:   #EEF0F4;
  --gray-200:   #DDE1E8;
  --gray-400:   #9AA3B0;
  --gray-600:   #5A6474;
  --text:       #1A2332;
  --text-muted: #6B7685;
  --border:     #D8DCE4;
  --rule:       #C8CAD0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }

a { text-decoration: none; color: inherit; }

h1, h2, h3 { font-family: 'Merriweather', serif; }

.topbar { background: var(--navy); color: var(--gray-400); font-size: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06); }

.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; justify-content: space-between; align-items: center; }

.topbar a { color: var(--gray-400); transition: color .2s; }

.topbar a:hover { color: var(--gold-light); }

.topbar-right { display: flex; gap: 20px; }

.topbar-sep { color: rgba(255,255,255,.2); }

header { background: var(--navy-mid); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(255,255,255,.07); box-shadow: 0 2px 16px rgba(0,0,0,.35); }

.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; gap: 14px; }

.logo-mark { width: 42px; height: 42px; border: 2px solid var(--gold); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: 'Merriweather', serif; font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: -1px; }

.logo-text-wrap { display: flex; flex-direction: column; }

.logo-name { font-family: 'Merriweather', serif; font-size: 17px; font-weight: 700; color: var(--white); letter-spacing: .2px; line-height: 1.2; }

.logo-name span { color: var(--gold-light); }

.logo-claim { font-size: 10.5px; color: var(--gray-400); letter-spacing: .6px; text-transform: uppercase; margin-top: 1px; }

nav { display: flex; gap: 0; }

nav a { color: #A8B8C8; font-size: 13px; font-weight: 500; padding: 8px 14px; letter-spacing: .2px; border-bottom: 2px solid transparent; transition: all .2s; }

nav a:hover, nav a.active { color: var(--white); border-bottom-color: var(--gold); }

.header-actions { display: flex; gap: 10px; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 3px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; letter-spacing: .3px; }

.btn-ghost { background: transparent; color: #A8B8C8; border: 1px solid rgba(255,255,255,.2); }

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-gold { background: var(--gold); color: var(--white); }

.btn-gold:hover { background: var(--gold-light); }

.topics-bar { background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }

.topics-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.topics-inner::-webkit-scrollbar { display: none; }

.topics-inner a { color: #7A9AB8; font-size: 11px; font-weight: 500; padding: 10px 11px; white-space: nowrap; border-bottom: 2px solid transparent; transition: all .2s; letter-spacing: .2px; text-transform: uppercase; }

.topics-inner a:hover { color: var(--white); border-bottom-color: var(--gold); }

.hero { background: var(--navy); background-image: linear-gradient(to bottom, rgba(13,33,55,.97) 0%, rgba(22,47,74,.95) 100%); padding: 72px 32px 64px; position: relative; overflow: hidden; }

.hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); }

.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }

.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-light); margin-bottom: 20px; }

.hero-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold); }

.hero h1 { font-size: 36px; font-weight: 700; line-height: 1.25; color: var(--white); margin-bottom: 20px; letter-spacing: -.3px; }

.hero h1 em { font-style: normal; color: var(--gold-light); }

.hero-lead { font-size: 15.5px; color: #8AACCA; line-height: 1.75; max-width: 560px; margin-bottom: 32px; }

.hero-lead strong { color: var(--white); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; margin-bottom: 44px; }

.hero-divider { height: 1px; background: rgba(255,255,255,.08); margin-bottom: 28px; }

.hero-stats { display: flex; gap: 0; }

.stat { padding: 0 28px 0 0; margin-right: 28px; border-right: 1px solid rgba(255,255,255,.1); }

.stat:first-child { padding-left: 0; }

.stat:last-child { border-right: none; }

.stat-num { font-family: 'Merriweather', serif; font-size: 26px; font-weight: 700; color: var(--gold-light); line-height: 1.1; }

.stat-label { font-size: 11px; color: var(--gray-400); letter-spacing: .3px; margin-top: 2px; }

.hero-panel { background: var(--white); border-radius: 2px; box-shadow: 0 24px 64px rgba(0,0,0,.4); overflow: hidden; }

.panel-header { background: var(--navy-light); padding: 18px 24px; border-bottom: 2px solid var(--gold); }

.panel-header h3 { font-family: 'Merriweather', serif; font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 3px; }

.panel-header p { font-size: 12px; color: var(--gray-400); }

.panel-body { padding: 24px; }

.subscribers-badge { display: flex; align-items: center; gap: 8px; background: var(--off-white); border: 1px solid var(--border); border-radius: 3px; padding: 8px 12px; margin-bottom: 18px; font-size: 12px; color: var(--text-muted); }

.subscribers-badge strong { color: var(--navy); }

.dot-green { width: 7px; height: 7px; border-radius: 50%; background: #27ae60; flex-shrink: 0; }

.form-field { margin-bottom: 10px; }

.form-field input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 3px; font-size: 13.5px; font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); transition: border-color .2s; outline: none; }

.form-field input:focus { border-color: var(--navy-light); }

.form-field input::placeholder { color: var(--gray-400); }

.btn-submit { width: 100%; padding: 11px; background: var(--navy); color: var(--white); border: none; border-radius: 3px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 600; letter-spacing: .4px; transition: background .2s; margin-top: 4px; }

.btn-submit:hover { background: var(--navy-light); }

.panel-note { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 12px; line-height: 1.5; }

.panel-note a { color: var(--steel); text-decoration: underline; }

.panel-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-100); }

.perk { display: flex; align-items: flex-start; gap: 7px; font-size: 11.5px; color: var(--text-muted); }

.perk::before { content: '✓'; color: #27ae60; font-weight: 700; font-size: 11px; flex-shrink: 0; margin-top: 1px; }

.page-wrap { max-width: 1200px; margin: 0 auto; padding: 44px 32px; display: grid; grid-template-columns: 1fr 292px; gap: 40px; }

.section-hd { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 2px solid var(--navy); margin-bottom: 22px; }

.section-hd h2 { font-size: 17px; font-weight: 700; color: var(--navy); letter-spacing: -.1px; }

.section-hd a { font-size: 12px; color: var(--steel); font-weight: 600; letter-spacing: .2px; }

.section-hd a:hover { color: var(--gold); }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 40px; }

.topic-card { border: 1px solid var(--border); border-radius: 2px; padding: 16px 14px; background: var(--white); transition: all .25s; cursor: pointer; }

.topic-card:hover { border-color: var(--navy); box-shadow: 0 4px 16px rgba(13,33,55,.1); transform: translateY(-1px); }

.topic-icon { font-size: 22px; margin-bottom: 9px; }

.topic-name { font-family: 'Merriweather', serif; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }

.topic-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }

.topic-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 2px; letter-spacing: .3px; }

.tt-blue { background: #EBF1F8; color: var(--navy-light); border: 1px solid #C8D8E8; }

.tt-gold { background: #F8F2E6; color: #8B6914; border: 1px solid #E0CFA0; }

.tt-green { background: #EBF5ED; color: #1E5E30; border: 1px solid #B8D8BD; }

.forum-section { margin-bottom: 40px; }

.forum-list { display: flex; flex-direction: column; gap: 8px; }

.forum-item { border: 1px solid var(--border); border-radius: 2px; padding: 14px 20px; background: var(--white); display: flex; align-items: center; gap: 16px; transition: all .2s; }

.forum-item:hover { border-color: var(--navy); background: #FAFBFD; }

.forum-icon-wrap { width: 38px; height: 38px; border-radius: 2px; background: var(--off-white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }

.forum-body { flex: 1; }

.forum-body h4 { font-family: 'Merriweather', serif; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }

.forum-body p { font-size: 12px; color: var(--text-muted); }

.forum-count { text-align: right; flex-shrink: 0; }

.forum-count .num { font-family: 'Merriweather', serif; font-size: 22px; font-weight: 700; color: var(--navy); display: block; }

.forum-count .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

.products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 40px; }

.product-card { border: 1px solid var(--border); border-radius: 2px; background: var(--white); overflow: hidden; transition: all .25s; }

.product-card:hover { border-color: var(--navy); box-shadow: 0 6px 20px rgba(13,33,55,.1); transform: translateY(-2px); }

.product-band { height: 4px; }

.band-navy { background: var(--navy); }

.band-gold { background: var(--gold); }

.band-green { background: #27ae60; }

.band-steel { background: var(--steel); }

.product-body-inner { padding: 16px 16px 18px; }

.platform-label { font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; }

.product-body-inner h4 { font-family: 'Merriweather', serif; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; line-height: 1.4; }

.product-body-inner p { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }

.product-footer-row { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--gray-100); }

.price-tag { font-size: 17px; font-weight: 700; color: var(--navy); }

.price-old { font-size: 11px; color: var(--text-muted); text-decoration: line-through; margin-right: 4px; }

.stars-row { color: #C8963E; font-size: 11.5px; }

.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sb-card { border: 1px solid var(--border); border-radius: 2px; background: var(--white); overflow: hidden; }

.sb-header { background: var(--navy); padding: 11px 16px; font-family: 'Merriweather', serif; font-size: 12.5px; font-weight: 700; color: var(--white); letter-spacing: .2px; }

.sb-body { padding: 16px; }

.ad-space { border-radius: 4px; background: var(--white); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--border); }

.ad-slot { width: 100%; background: #f1f3f4; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }

.ad-slot-300x250 { height: 250px; }
.ad-slot-300x600 { height: 600px; }

.ad-slot::before { content: 'Pubblicità'; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #9aa3af; position: absolute; top: 10px; left: 0; right: 0; text-align: center; }

.ad-slot-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }

.ad-slot-size { font-size: 13px; font-weight: 700; color: #c5cad0; letter-spacing: .5px; }

.ad-slot-label { font-size: 10px; color: #b0b8c2; }

.ad-slot-google { display: inline-flex; align-items: center; gap: 5px; background: white; border: 1px solid #dadce0; border-radius: 12px; padding: 4px 10px; font-size: 10px; color: #5f6368; font-weight: 500; margin-top: 4px; }

.ad-slot-google::before { content: 'G'; display: inline-block; width: 14px; height: 14px; background: #4285F4; color: white; border-radius: 50%; font-size: 9px; font-weight: 700; text-align: center; line-height: 14px; }

.ad-footer { padding: 8px 12px; background: var(--white); border-top: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }

.ad-footer-label { font-size: 10px; color: var(--text-muted); }

.ad-footer a { font-size: 10.5px; font-weight: 600; color: var(--steel); }

.ad-footer a:hover { color: var(--gold); }

.aff-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }

.aff-item:last-child { border-bottom: none; }

.aff-icon { width: 40px; height: 40px; border-radius: 2px; background: var(--off-white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }

.aff-info { flex: 1; }

.aff-info h5 { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 1px; }

.aff-info p { font-size: 11px; color: var(--text-muted); }

.aff-pct { font-size: 11px; font-weight: 700; color: #1E5E30; background: #EBF5ED; border: 1px solid #B8D8BD; padding: 2px 7px; border-radius: 2px; }

.linkedin-block { background: var(--navy); border-radius: 2px; padding: 20px 16px; text-align: center; }

.linkedin-block h4 { font-family: 'Merriweather', serif; font-size: 13px; font-weight: 700; color: var(--white); margin-bottom: 6px; }

.linkedin-block p { font-size: 12px; color: var(--gray-400); line-height: 1.5; margin-bottom: 14px; }

.btn-li { display: inline-block; background: #0077B5; color: white; font-size: 12.5px; font-weight: 600; padding: 8px 18px; border-radius: 3px; letter-spacing: .3px; }

.adv-top { display: none !important; }

.adv-top-label { display: inline-block; background: var(--navy); color: white; font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; margin-right: 8px; }

.nl-band { background: var(--navy); border-top: 2px solid var(--gold); padding: 52px 32px; }

.nl-inner { max-width: 640px; margin: 0 auto; text-align: center; }

.nl-inner h2 { font-size: 26px; font-weight: 700; color: var(--white); margin-bottom: 10px; letter-spacing: -.2px; }

.nl-inner p { font-size: 14.5px; color: #8AACCA; margin-bottom: 28px; line-height: 1.7; }

.nl-form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto 16px; }

.nl-form input { flex: 1; padding: 11px 16px; border-radius: 3px; border: 1px solid var(--border); background: var(--white); color: var(--text); font-size: 14px; outline: none; transition: border-color .2s; }

.nl-form input::placeholder { color: var(--gray-400); }

.nl-form input:focus { border-color: var(--gold); }

/* Input nel contesto navy (banner newsletter) */
.nl-band .nl-form input { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: var(--white); }
.nl-band .nl-form input::placeholder { color: #5A7A9A; }

.nl-form button { background: var(--gold); color: var(--white); border: none; border-radius: 3px; cursor: pointer; font-size: 13.5px; font-weight: 600; padding: 11px 22px; white-space: nowrap; transition: background .2s; letter-spacing: .3px; }

.nl-form button:hover { background: var(--gold-light); }

.nl-perks { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }

.nl-perk { font-size: 12px; color: #6A90AA; display: flex; align-items: center; gap: 6px; }

.nl-perk::before { content: '—'; color: var(--gold); font-size: 10px; }

footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,.06); padding: 52px 32px 24px; }

.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.07); }

.footer-about p { font-size: 13px; color: #5A7A9A; line-height: 1.7; max-width: 260px; margin: 14px 0 18px; }

.socials { display: flex; gap: 8px; }

.social-icon { width: 32px; height: 32px; border-radius: 3px; border: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all .2s; cursor: pointer; }

.social-icon:hover { border-color: var(--gold); }

.footer-col h5 { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gray-400); margin-bottom: 14px; }

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a { font-size: 13px; color: #5A7A9A; transition: color .2s; }

.footer-col ul li a:hover { color: var(--white); }

.footer-bottom { max-width: 1200px; margin: 20px auto 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.footer-bottom p { font-size: 12px; color: #3A5A74; }

.footer-links { display: flex; gap: 18px; }

.footer-links a { font-size: 12px; color: #3A5A74; transition: color .2s; }

.footer-links a:hover { color: var(--gray-400); }

/* ── Right Rail Ad ───────────────────────────────────── */
.right-rail { position: fixed; top: 120px; right: 0; width: 160px; display: flex; flex-direction: column; gap: 16px; padding-right: 12px; z-index: 100; }
.right-rail .ad-space { width: 160px; }
.right-rail .ad-slot-160x600 { height: 600px; width: 160px; }
.right-rail .ad-slot-160x160 { height: 160px; width: 160px; }
@media (max-width: 1460px) { .right-rail { display: none; } }

.fab { position: fixed; bottom: 28px; right: 28px; background: var(--navy); color: var(--white); width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; z-index: 900; border: 2px solid var(--gold); box-shadow: 0 4px 20px rgba(13,33,55,.5); transition: transform .2s; }

.fab:hover { transform: scale(1.08); }

/* ── Newsletter Popup ─────────────────────────────────── */
.nl-popup-overlay { position: fixed; inset: 0; background: rgba(5,15,30,.75); backdrop-filter: blur(4px); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.nl-popup-overlay.open { opacity: 1; pointer-events: all; }
.nl-popup { background: var(--white); border-radius: 4px; width: 100%; max-width: 480px; overflow: hidden; box-shadow: 0 32px 80px rgba(0,0,0,.5); transform: translateY(16px); transition: transform .3s; }
.nl-popup-overlay.open .nl-popup { transform: translateY(0); }
.nl-popup-head { background: var(--navy); padding: 28px 28px 22px; border-bottom: 2px solid var(--gold); position: relative; }
.nl-popup-head h3 { font-family: 'Merriweather', serif; font-size: 17px; color: var(--white); margin-bottom: 5px; }
.nl-popup-head p { font-size: 13px; color: var(--gray-400); line-height: 1.5; }
.nl-popup-close { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.1); border: none; color: var(--gray-400); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.nl-popup-close:hover { background: rgba(255,255,255,.2); color: white; }
.nl-popup-body { padding: 24px 28px 28px; }
.nl-popup-body .form-field { margin-bottom: 10px; }
.nl-popup-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.nl-popup-perk { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.nl-popup-perk::before { content: '✓'; color: #27ae60; font-weight: 700; font-size: 11px; }

/* ── Hero News Feed ───────────────────────────────────── */
.news-feed-list { list-style: none; padding: 0; margin: 0 0 16px; }
.news-feed-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--gray-100); align-items: flex-start; }
.news-feed-item:last-child { border-bottom: none; }
.news-feed-cat { font-size: 9px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); background: rgba(184,150,62,.1); border: 1px solid rgba(184,150,62,.25); border-radius: 2px; padding: 2px 5px; white-space: nowrap; margin-top: 2px; flex-shrink: 0; }
.news-feed-title { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.4; }
.news-feed-title a { color: inherit; transition: color .15s; }
.news-feed-title a:hover { color: var(--navy-light); }
.news-feed-date { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.news-feed-empty { text-align: center; padding: 12px 0; font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.btn-open-popup { width: 100%; padding: 11px; background: var(--navy); color: var(--white); border: none; border-radius: 3px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .4px; transition: background .2s; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-open-popup:hover { background: var(--navy-light); }

/* ── Single Article ──────────────────────────────────── */
.single-article { max-width: 760px; }
.article-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 28px; flex-wrap: wrap; }
.article-meta strong { color: var(--text); }
.article-sep { color: var(--border); }
.article-cat { color: var(--steel); font-weight: 600; }
.article-cat:hover { color: var(--gold); }
.article-body { font-size: 16px; line-height: 1.85; color: var(--text); }
.article-body h2, .article-body h3 { font-family: 'Merriweather', serif; color: var(--navy); margin: 36px 0 14px; line-height: 1.3; }
.article-body h2 { font-size: 22px; }
.article-body h3 { font-size: 17px; }
.article-body p { margin-bottom: 20px; }
.article-body strong { color: var(--navy); }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote { border-left: 3px solid var(--gold); padding: 12px 20px; margin: 28px 0; background: var(--off-white); font-style: italic; color: var(--gray-600); }
.article-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.tag-label { font-weight: 600; color: var(--text-muted); font-size: 12px; }
.btn-back { font-size: 13px; font-weight: 600; color: var(--navy); border: 1px solid var(--border); padding: 7px 16px; border-radius: 3px; transition: all .2s; }
.btn-back:hover { border-color: var(--navy); background: var(--off-white); }

/* Page-specific */
.page-hero { background: var(--navy); padding: 48px 32px 40px; border-bottom: 2px solid var(--gold); }

.page-hero-inner { max-width: 1200px; margin: 0 auto; }

.page-hero .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-light); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

.page-hero .eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }

.page-hero h1 { font-size: 30px; font-weight: 700; color: var(--white); margin-bottom: 10px; }

.page-hero p { font-size: 15px; color: #8AACCA; max-width: 600px; line-height: 1.7; }

.empty-state { border: 1px dashed var(--border); border-radius: 2px; background: var(--off-white); padding: 48px 32px; text-align: center; margin-bottom: 24px; }

.empty-state .es-icon { font-size: 48px; opacity: .25; margin-bottom: 16px; }

.empty-state h3 { font-family: 'Merriweather', serif; font-size: 16px; color: var(--text); margin-bottom: 8px; }

.empty-state p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* Search */
.search-bar { display: flex; gap: 8px; margin-bottom: 28px; }

.search-bar input { flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-radius: 3px; font-size: 14px; outline: none; }

.search-bar input:focus { border-color: var(--navy); }

.search-bar button { background: var(--navy); color: white; border: none; padding: 10px 20px; border-radius: 3px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Filters */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

.filter-pill { padding: 6px 14px; border-radius: 2px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--white); color: var(--text-muted); transition: all .2s; }

.filter-pill:hover, .filter-pill.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

@media (max-width: 1200px) {
  .page-corsi-wrap { grid-template-columns: 1fr 250px !important; }
  .page-corsi-wrap > aside:first-child { display: none; }
}

/* ── Hamburger button ─────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #A8B8C8;
  border-radius: 2px;
  transition: all .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav overlay ──────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0; right: 0; bottom: 0;
  background: var(--navy);
  z-index: 998;
  padding: 8px 0 32px;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: #A8B8C8;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: block;
  transition: color .2s, background .2s;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--gold-light); background: rgba(255,255,255,.03); }
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 24px 0;
}
.mobile-nav-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 14px;
  text-align: center;
}
.mobile-nav-sep {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 8px 0;
}

/* ── Tablet (769-980px) ──────────────────────────────── */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .page-wrap { grid-template-columns: 1fr; padding: 32px 20px; }
  .page-corsi-wrap { grid-template-columns: 1fr !important; }
  .page-corsi-wrap > aside { display: none; }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .header-inner { padding: 0 20px; }
  nav a { padding: 8px 10px; font-size: 12px; }
}

/* ── Mobile (≤768px) ─────────────────────────────────── */
@media (max-width: 768px) {
  /* Topbar: hide tagline, keep only right links */
  .topbar-inner > span:first-child { display: none; }
  .topbar-inner { justify-content: center; padding: 0 16px; }

  /* Header */
  .header-inner { padding: 0 16px; height: 60px; }
  .logo-claim { display: none; }
  .logo-mark { width: 36px; height: 36px; font-size: 18px; }
  .logo-name { font-size: 14px; }
  nav { display: none; }
  .header-actions { display: none; }
  .nav-toggle { display: flex; }

  /* Topics bar */
  .topics-inner { padding: 0 8px; }
  .topics-inner a { padding: 9px 8px; font-size: 10px; }

  /* AdSense top */
  .adv-top { padding: 6px 12px; }

  /* Hero */
  .hero { padding: 32px 16px 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 22px; }
  .hero-lead { font-size: 14px; margin-bottom: 24px; }
  .hero-actions { flex-direction: column; gap: 8px; }
  .hero-actions .btn { width: 100%; justify-content: center; padding: 12px 20px; }
  .hero-stats { flex-wrap: wrap; gap: 12px 20px; }
  .stat { border-right: none; padding: 0; margin: 0; width: calc(50% - 10px); }
  .stat-num { font-size: 22px; }

  /* Page hero */
  .page-hero { padding: 28px 16px 24px; }
  .page-hero h1 { font-size: 20px; }
  .page-hero p { font-size: 13.5px; }

  /* Page wrap */
  .page-wrap { padding: 20px 16px; gap: 24px; grid-template-columns: 1fr; }

  /* Grids */
  .topic-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .products-grid { grid-template-columns: 1fr; }

  /* Search */
  .search-bar { flex-direction: column; }
  .search-bar button { width: 100%; padding: 11px; }

  /* Newsletter band */
  .nl-band { padding: 36px 16px; }
  .nl-inner h2 { font-size: 20px; }
  .nl-inner p { font-size: 13.5px; margin-bottom: 20px; }
  .nl-form { flex-direction: column; gap: 10px; }
  .nl-form button { width: 100%; }
  .nl-perks { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Footer */
  footer { padding: 32px 16px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-links { flex-wrap: wrap; gap: 12px; }

  /* Single article */
  .single-article { max-width: 100%; }
  .article-body { font-size: 15px; line-height: 1.75; }
  .article-body h2 { font-size: 19px; }
  .article-body h3 { font-size: 15px; }
  .article-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .article-tags { flex-wrap: wrap; }

  /* Filter pills */
  .filter-bar { gap: 6px; }
  .filter-pill { font-size: 11px; padding: 5px 10px; }

  /* Modals */
  .nl-popup { max-width: calc(100vw - 32px); margin: 0 16px; }
  .nl-popup-head, .nl-popup-body { padding: 20px; }
  .ed-modal { max-width: calc(100vw - 32px); margin: 0 16px; }
  .ed-modal-body { padding: 16px; }

  /* FAB */
  .fab { bottom: 16px; right: 16px; width: 46px; height: 46px; font-size: 18px; }

  /* Section header */
  .section-hd h2 { font-size: 15px; }

  /* Forum items */
  .forum-item { padding: 12px 14px; gap: 10px; }
  .forum-icon-wrap { width: 32px; height: 32px; font-size: 14px; }
  .forum-count .num { font-size: 18px; }

  /* Panel perks — stack on mobile */
  .panel-perks { grid-template-columns: 1fr; }
  .nl-popup-perks { grid-template-columns: 1fr; }
}

/* ── Modal (discussioni + contatti) ───────────────────────── */
.ed-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5,15,30,.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.ed-modal-overlay.open { opacity: 1; pointer-events: all; }
.ed-modal {
  background: var(--white);
  border-radius: 6px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.45);
  transform: translateY(16px);
  transition: transform .3s;
}
.ed-modal-overlay.open .ed-modal { transform: translateY(0); }
.ed-modal-head {
  background: var(--navy);
  padding: 22px 24px 18px;
  border-bottom: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: space-between;
}
.ed-modal-head h3 { font-family: 'Merriweather', serif; font-size: 16px; color: var(--white); margin: 0; }
.ed-modal-close {
  background: rgba(255,255,255,.1); border: none; color: var(--gray-400);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.ed-modal-close:hover { background: rgba(255,255,255,.2); color: #fff; }
.ed-modal-body { padding: 24px; }

/* ── Lista discussioni ────────────────────────────────────── */
.topics-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.topic-thread {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: 6px; padding: 14px 16px;
  transition: border-color .2s;
}
.topic-thread:hover { border-color: var(--gold); }
.thread-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.thread-body { flex: 1; min-width: 0; }
.thread-title { font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 3px; }
.thread-meta { font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; }
.thread-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Alert messaggi ───────────────────────────────────────── */
.alert-success {
  background: #d1fae5; color: #065f46;
  padding: 12px 16px; border-radius: 6px;
  margin-bottom: 20px; font-size: 14px;
  display: flex; gap: 10px; align-items: center;
}
.alert-error {
  background: #fee2e2; color: #991b1b;
  padding: 12px 16px; border-radius: 6px;
  margin-bottom: 20px; font-size: 14px;
}
