/*
Theme Name: CalcoloBolloAuto
Theme URI: https://calcolobolloauto.com
Author: CalcoloBolloAuto
Author URI: https://calcolobolloauto.com
Description: A fast, SEO-friendly, mobile-first WordPress theme for CalcoloBolloAuto.com — the Italian car tax calculator. Fully optimized for Core Web Vitals with semantic HTML, structured data support, and clean rendering.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calcolobolloauto
Tags: one-column, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  --blu: #003DA5;
  --blu-dark: #002878;
  --blu-light: #1456C8;
  --rosso: #CC2929;
  --verde: #1A8A50;
  --oro: #D4A017;
  --grigio-bg: #F0F3F8;
  --grigio-bordo: #D0D5DD;
  --testo: #1C1C2E;
  --testo-muted: #5A6478;
  --bianco: #FFFFFF;
  --card-shadow: 0 4px 24px rgba(0, 61, 165, 0.10);
  --card-shadow-hover: 0 8px 40px rgba(0, 61, 165, 0.18);
  --font-heading: 'Satoshi', -apple-system, sans-serif;
  --font-body: 'Satoshi', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--grigio-bg);
  color: var(--testo);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blu);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--blu-dark);
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--testo);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--article {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  background: var(--bianco);
  border-bottom: 3px solid var(--blu);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 61, 165, 0.08);
}

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

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo__icon {
  width: 40px;
  height: 40px;
  background: var(--blu);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bianco);
  flex-shrink: 0;
}

.site-logo__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.site-logo__text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: var(--testo);
  line-height: 1.1;
}

.site-logo__text span {
  color: var(--blu);
}

.site-logo__sub {
  font-size: 10px;
  color: var(--testo-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
  font-family: var(--font-heading);
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-nav__link {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--testo-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.main-nav__link:hover {
  background: var(--grigio-bg);
  color: var(--blu);
}

.main-nav__cta {
  background: var(--blu);
  color: var(--bianco);
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}

.main-nav__cta:hover {
  background: var(--blu-dark);
  color: var(--bianco);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--testo);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu) 50%, var(--blu-light) 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 24px 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px);
  pointer-events: none;
}

.hero__road {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: #0a0a1a;
  clip-path: polygon(0 40%, 100% 20%, 100% 100%, 0 100%);
}

.hero__road::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--oro) 0, var(--oro) 30px, transparent 30px, transparent 60px);
  transform: translateY(-50%);
  opacity: 0.6;
}

.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: end;
  position: relative;
  z-index: 2;
}

.hero__content {
  padding-bottom: 80px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #A8C8FF;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  color: var(--bianco);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero__title em {
  font-style: normal;
  color: var(--oro);
}

.hero__subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero__stats {
  display: flex;
  gap: 32px;
}

.hero__stat {
  text-align: center;
}

.hero__stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--bianco);
  line-height: 1;
}

.hero__stat-label {
  font-family: var(--font-heading);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Hero Car SVG */
.hero__car {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 30px;
}

.hero__car-svg {
  width: 100%;
  max-width: 440px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* ==========================================================================
   SECTION COMMON
   ========================================================================== */

.section-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blu);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--grigio-bordo), transparent);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--testo);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 16px;
  color: var(--testo-muted);
  margin-bottom: 36px;
}

/* ==========================================================================
   CALCULATOR SECTION
   ========================================================================== */

.section-calc {
  padding: 60px 24px;
  background: var(--grigio-bg);
}

.calc-container {
  max-width: 900px;
  margin: 0 auto;
}

.calc-card {
  background: var(--bianco);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid rgba(0, 61, 165, 0.08);
}

.calc-top {
  background: linear-gradient(90deg, var(--blu) 0%, var(--blu-light) 100%);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.calc-top__icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--bianco);
}

.calc-top__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.calc-top__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--bianco);
}

.calc-top__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-heading);
}

.calc-body {
  padding: 32px 28px;
}

/* Form Elements */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--testo-muted);
  margin-bottom: 10px;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--testo-muted);
  pointer-events: none;
}

.form-select,
.form-input {
  border: 2px solid var(--grigio-bordo);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--testo);
  background: var(--grigio-bg);
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  width: 100%;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--blu);
  background: var(--bianco);
  box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

/* Fuel Grid */
.fuel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fuel-btn {
  border: 2px solid var(--grigio-bordo);
  border-radius: 10px;
  padding: 10px 8px;
  background: var(--grigio-bg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--testo-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.fuel-btn:hover {
  border-color: var(--blu);
  color: var(--blu);
  background: rgba(0, 61, 165, 0.04);
}

.fuel-btn.active {
  border-color: var(--blu);
  background: rgba(0, 61, 165, 0.07);
  color: var(--blu);
}

.fuel-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.fuel-btn__icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* kW Row */
.kw-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kw-row .form-input {
  flex: 1;
}

.cv-display {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--testo-muted);
  background: var(--grigio-bg);
  border: 2px solid var(--grigio-bordo);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
}

/* Calculate Button */
.calc-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--blu) 0%, var(--blu-light) 100%);
  color: var(--bianco);
  border: none;
  border-radius: 12px;
  padding: 18px 32px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 61, 165, 0.35);
}

.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 61, 165, 0.45);
}

.calc-btn:active {
  transform: translateY(0);
}

.calc-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   RESULT PANEL
   ========================================================================== */

.result-panel {
  margin-top: 24px;
  background: linear-gradient(135deg, #F0F7FF 0%, #EFF8F4 100%);
  border: 2px solid rgba(0, 61, 165, 0.12);
  border-radius: 16px;
  padding: 28px;
  display: none;
}

.result-panel.visible {
  display: block;
  animation: resultReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.result-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde);
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-label svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.result-amount {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 600;
  color: var(--testo);
  line-height: 1;
  letter-spacing: -0.02em;
}

.result-amount__currency {
  font-size: 28px;
  color: var(--testo-muted);
  margin-right: 4px;
}

.result-year {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--testo-muted);
  margin-top: 4px;
}

.result-scadenza-label {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--testo-muted);
  margin-bottom: 4px;
  text-align: right;
}

.result-scadenza-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--rosso);
  text-align: right;
}

.result-breakdown {
  border-top: 1px solid rgba(0, 61, 165, 0.1);
  padding-top: 16px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.breakdown-item {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 61, 165, 0.08);
}

.breakdown-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--testo);
}

.breakdown-key {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--testo-muted);
  margin-top: 2px;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-paga {
  flex: 1;
  background: var(--verde);
  color: var(--bianco);
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-paga:hover {
  background: #157040;
  transform: translateY(-1px);
}

.btn-paga svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-salva {
  background: var(--bianco);
  color: var(--testo);
  border: 2px solid var(--grigio-bordo);
  border-radius: 10px;
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-salva:hover {
  border-color: var(--blu);
  color: var(--blu);
}

.btn-salva svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   HOW IT WORKS SECTION
   ========================================================================== */

.section-how {
  padding: 60px 24px;
  background: var(--bianco);
}

.section-how__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 40px;
  background: var(--grigio-bordo);
  border-radius: 16px;
  overflow: hidden;
}

.step {
  background: var(--bianco);
  padding: 36px 28px;
}

.step__num {
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 800;
  color: rgba(0, 61, 165, 0.12);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

.step__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 61, 165, 0.06);
  color: var(--blu);
  margin-bottom: 16px;
}

.step__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.step__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  color: var(--testo);
  margin-bottom: 8px;
}

.step__desc {
  font-size: 14px;
  color: var(--testo-muted);
  line-height: 1.6;
}

/* ==========================================================================
   REGIONI SECTION
   ========================================================================== */

.section-regioni {
  padding: 60px 24px;
  background: var(--grigio-bg);
}

.regioni-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.regioni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
  margin-top: 36px;
}

.regione-card {
  background: var(--bianco);
  border: 1px solid var(--grigio-bordo);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.regione-card:hover {
  border-color: var(--blu);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.regione-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0, 61, 165, 0.06);
  color: var(--blu);
  flex-shrink: 0;
}

.regione-card__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.regione-card__info {
  min-width: 0;
  overflow: hidden;
}

.regione-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  color: var(--testo);
  line-height: 1.3;
  display: block;
}

.regione-card__tariffa {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blu);
  font-weight: 600;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.section-faq {
  padding: 60px 24px;
  background: var(--bianco);
}

.faq-inner {
  max-width: 780px;
  margin: 0 auto;
}

.faq-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--grigio-bordo);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: var(--card-shadow);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--testo);
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.faq-item.open {
  border-color: var(--blu);
}

.faq-question:focus {
  outline: none;
}

.faq-arrow {
  color: var(--blu);
  flex-shrink: 0;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.faq-arrow svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px;
  font-size: 14px;
  color: var(--testo-muted);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s;
  border-top: 1px solid transparent;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 4px 20px 20px;
  border-top-color: var(--grigio-bordo);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--testo);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-disclaimer {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-disclaimer svg {
  width: 16px;
  height: 16px;
  fill: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  margin-top: 1px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.footer-brand .site-logo__text {
  color: var(--bianco);
  font-size: 20px;
}

.footer-brand .site-logo__text span {
  color: #6B9FFF;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bianco);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--bianco);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 12px;
}

.footer-bottom__flag {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom__flag svg {
  width: 20px;
  height: 14px;
}

/* ==========================================================================
   COOKIE CONSENT BANNER (GDPR / ePrivacy compliant)
   ========================================================================== */

.cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

.cookie-overlay.visible {
  display: block;
}

.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background: var(--testo);
  border-radius: 14px;
  padding: 22px 24px;
  z-index: 9999;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  gap: 14px;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-banner.visible {
  display: flex;
  animation: slideUpCookie 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideUpCookie {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-banner__header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bianco);
  font-family: var(--font-heading);
  font-size: 15px;
}

.cookie-banner__header svg {
  flex-shrink: 0;
  color: var(--giallo, #fbbf24);
}

.cookie-banner__text {
  font-family: var(--font-heading);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner__text a {
  color: var(--azzurro, #60a5fa);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__text a:hover {
  color: var(--bianco);
}

.cookie-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cookie {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cookie--accept,
.btn-cookie--accept-all {
  background: var(--verde);
  color: var(--bianco);
}

.btn-cookie--accept:hover,
.btn-cookie--accept-all:hover {
  background: #157040;
}

.btn-cookie--reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cookie--reject:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-cookie--settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cookie--settings:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Settings panel */
.cookie-banner__settings {
  display: none;
}

.cookie-banner__settings:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookie-back {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.cookie-back:hover {
  color: var(--bianco);
}

/* Cookie categories */
.cookie-category {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.cookie-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-category__title {
  color: var(--bianco);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
}

.cookie-category__badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.cookie-category__badge--required {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

.cookie-category__desc {
  margin: 8px 0 0;
  font-family: var(--font-heading);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: background 0.3s;
}

.cookie-toggle__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--bianco);
  border-radius: 50%;
  transition: transform 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--verde);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(20px);
}

.cookie-toggle--disabled {
  opacity: 0.5;
}

.cookie-toggle--disabled .cookie-toggle__slider {
  cursor: not-allowed;
}

/* Reopen button */
.cookie-reopen {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--testo);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  z-index: 998;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

.cookie-reopen:not([hidden]) {
  display: flex;
}

.cookie-reopen:hover {
  color: var(--bianco);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

@media (max-width: 600px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    border-radius: 14px 14px 0 0;
    max-height: 85vh;
  }
  .cookie-btns {
    flex-direction: column;
  }
  .btn-cookie {
    text-align: center;
  }
  .cookie-reopen {
    bottom: 12px;
    left: 12px;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

/* Animations — disabled for SEO (content must be visible to crawlers) */

.animate-fade-up {
  opacity: 1;
}

/* ==========================================================================
   SINGLE POST / ARTICLE
   ========================================================================== */

.article-header {
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu) 50%, var(--blu-light) 100%);
  padding: 60px 24px 40px;
  position: relative;
}

.article-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px);
  pointer-events: none;
}

.article-header__inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.article-breadcrumb {
  font-family: var(--font-heading);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

.article-breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover {
  color: var(--bianco);
}

.article-breadcrumb__separator {
  margin: 0 8px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #A8C8FF;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 16px;
  text-decoration: none;
}

.article-date {
  font-family: var(--font-heading);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-date svg {
  width: 14px;
  height: 14px;
  fill: rgba(255, 255, 255, 0.55);
}

.article-reading-time {
  font-family: var(--font-heading);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-reading-time svg {
  width: 14px;
  height: 14px;
  fill: rgba(255, 255, 255, 0.55);
}

.article-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--bianco);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.article-excerpt {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* Featured Image */
.article-featured-image {
  max-width: 780px;
  margin: -20px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

.article-featured-image img {
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Table of Contents */
.toc-wrapper {
  max-width: 780px;
  margin: 24px auto;
  padding: 0 24px;
}

.toc {
  background: var(--bianco);
  border: 1px solid var(--grigio-bordo);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--testo);
  gap: 8px;
  transition: background 0.2s;
}

.toc__header:hover {
  background: var(--grigio-bg);
}

.toc__header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc__header-left svg {
  width: 18px;
  height: 18px;
  fill: var(--blu);
}

.toc__toggle-icon {
  width: 20px;
  height: 20px;
  fill: var(--testo-muted);
  transition: transform 0.3s;
}

.toc.open .toc__toggle-icon {
  transform: rotate(180deg);
}

.toc__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.toc.open .toc__body {
  max-height: 500px;
}

.toc__list {
  padding: 0 20px 16px;
  list-style: none;
}

.toc__list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--grigio-bg);
}

.toc__list li:last-child {
  border-bottom: none;
}

.toc__list a {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--testo-muted);
  text-decoration: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc__list a::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grigio-bordo);
  flex-shrink: 0;
  transition: background 0.2s;
}

.toc__list a:hover {
  color: var(--blu);
}

.toc__list a:hover::before {
  background: var(--blu);
}

.toc__list--nested {
  padding-left: 20px;
}

/* Article Content */
.article-content {
  max-width: 780px;
  margin: 32px auto;
  padding: 0 24px;
}

.article-content h2 {
  font-size: 28px;
  margin: 40px 0 16px;
  padding-top: 20px;
}

.article-content h3 {
  font-size: 22px;
  margin: 32px 0 12px;
}

.article-content h4 {
  font-size: 18px;
  margin: 24px 0 10px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--testo);
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 20px 24px;
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 8px;
  color: var(--testo);
}

.article-content blockquote {
  border-left: 4px solid var(--blu);
  background: rgba(0, 61, 165, 0.04);
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--testo-muted);
}

.article-content img {
  border-radius: 12px;
  margin: 24px 0;
}

.article-content a {
  color: var(--blu);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--blu-dark);
}

.article-content pre {
  background: var(--testo);
  color: #E0E0E0;
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 24px 0;
  line-height: 1.6;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--grigio-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--rosso);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.article-content th {
  background: var(--blu);
  color: var(--bianco);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
}

.article-content td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--grigio-bordo);
}

.article-content tr:nth-child(even) td {
  background: var(--grigio-bg);
}

/* FAQ in article */
.article-faq {
  margin: 40px 0;
}

.article-faq__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--testo);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-faq__title svg {
  width: 24px;
  height: 24px;
  fill: var(--blu);
}

/* ==========================================================================
   AUTHOR BOX
   ========================================================================== */

.author-box {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 24px;
}

.author-box__inner {
  background: var(--bianco);
  border: 1px solid var(--grigio-bordo);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--card-shadow);
}

.author-box__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--grigio-bg);
}

.author-box__label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blu);
  margin-bottom: 4px;
}

.author-box__name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--testo);
  margin-bottom: 8px;
}

.author-box__name a {
  color: var(--testo);
  text-decoration: none;
}

.author-box__name a:hover {
  color: var(--blu);
}

.author-box__bio {
  font-size: 14px;
  color: var(--testo-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.author-box__links {
  display: flex;
  gap: 12px;
}

.author-box__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--grigio-bg);
  color: var(--testo-muted);
  transition: all 0.2s;
}

.author-box__link:hover {
  background: var(--blu);
  color: var(--bianco);
}

.author-box__link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==========================================================================
   RELATED ARTICLES
   ========================================================================== */

.related-articles {
  max-width: 780px;
  margin: 40px auto 60px;
  padding: 0 24px;
}

.related-articles__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--testo);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.related-articles__title svg {
  width: 24px;
  height: 24px;
  fill: var(--blu);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--bianco);
  border: 1px solid var(--grigio-bordo);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
}

.related-card:hover {
  border-color: var(--blu);
  box-shadow: var(--card-shadow);
  transform: translateY(-3px);
}

.related-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.related-card:hover .related-card__image img {
  transform: scale(1.05);
}

.related-card__body {
  padding: 16px;
}

.related-card__category {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blu);
  margin-bottom: 6px;
}

.related-card__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--testo);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card__date {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--testo-muted);
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background: var(--grigio-bg);
  text-align: center;
}

.error-404__inner {
  max-width: 560px;
}

.error-404__code {
  font-family: var(--font-mono);
  font-size: clamp(80px, 15vw, 160px);
  font-weight: 600;
  color: rgba(0, 61, 165, 0.08);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}

.error-404__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 61, 165, 0.06);
  color: var(--blu);
  margin: 0 auto 24px;
}

.error-404__icon svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.error-404__title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  color: var(--testo);
  margin-bottom: 12px;
}

.error-404__desc {
  font-size: 16px;
  color: var(--testo-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.error-404__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-404__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.error-404__btn--primary {
  background: linear-gradient(135deg, var(--blu) 0%, var(--blu-light) 100%);
  color: var(--bianco);
  box-shadow: 0 4px 20px rgba(0, 61, 165, 0.35);
}

.error-404__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 61, 165, 0.45);
  color: var(--bianco);
}

.error-404__btn--secondary {
  background: var(--bianco);
  color: var(--testo);
  border: 2px solid var(--grigio-bordo);
}

.error-404__btn--secondary:hover {
  border-color: var(--blu);
  color: var(--blu);
}

.error-404__btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Search form in 404 */
.error-404__search {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.error-404__search input {
  flex: 1;
  border: 2px solid var(--grigio-bordo);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.error-404__search input:focus {
  border-color: var(--blu);
}

.error-404__search button {
  background: var(--blu);
  color: var(--bianco);
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.error-404__search button:hover {
  background: var(--blu-dark);
}

.error-404__search button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   ARCHIVE / INDEX
   ========================================================================== */

.archive-header {
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu) 50%, var(--blu-light) 100%);
  padding: 50px 24px;
  text-align: center;
  position: relative;
}

.archive-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px);
  pointer-events: none;
}

.archive-header__inner {
  position: relative;
  z-index: 2;
}

.archive-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--bianco);
  margin-bottom: 8px;
}

.archive-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.65);
}

.archive-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--bianco);
  border: 1px solid var(--grigio-bordo);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--blu);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}

.post-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__category {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blu);
  margin-bottom: 8px;
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--testo);
  line-height: 1.3;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__excerpt {
  font-size: 14px;
  color: var(--testo-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--testo-muted);
}

.post-card__author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-card__author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}


/* ==========================================================================
   PAGE TEMPLATE
   ========================================================================== */

.page-header {
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu) 100%);
  padding: 50px 24px;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255, 255, 255, 0.04) 60px);
  pointer-events: none;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--bianco);
  position: relative;
  z-index: 2;
}

.page-content {
  max-width: 780px;
  margin: 40px auto 60px;
  padding: 0 24px;
}

.page-content h2 {
  font-size: 28px;
  margin: 36px 0 16px;
}

.page-content h3 {
  font-size: 22px;
  margin: 28px 0 12px;
}

.page-content p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.page-content ul,
.page-content ol {
  margin: 16px 0 20px 24px;
  list-style: disc;
}

.page-content ol {
  list-style: decimal;
}

.page-content li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.page-content img {
  border-radius: 12px;
  margin: 24px 0;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

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

@media (max-width: 768px) {
  /* Header */
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bianco);
    flex-direction: column;
    padding: 12px 16px 20px;
    border-bottom: 3px solid var(--blu);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    gap: 2px;
  }

  .main-nav.open {
    display: flex;
    z-index: 200;
  }

  .main-nav__link {
    padding: 14px 16px;
    font-size: 16px;
    display: block;
    width: 100%;
    border-radius: 8px;
  }

  .main-nav__link--has-children {
    padding: 14px 16px;
    font-size: 16px;
    width: 100%;
    border-radius: 8px;
  }

  .main-nav__cta {
    text-align: center;
    padding: 14px 18px;
    font-size: 16px;
    margin-top: 8px;
  }

  /* Hero */
  .hero {
    padding: 50px 24px 0;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero__car {
    display: none;
  }

  .hero__content {
    padding-bottom: 100px;
  }

  .hero__stats {
    gap: 20px;
  }

  /* Calculator */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .fuel-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .kw-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cv-display {
    min-width: auto;
  }

  .calc-body {
    padding: 24px 20px;
  }

  .calc-top {
    padding: 16px 20px;
  }

  /* Result */
  .result-breakdown {
    grid-template-columns: 1fr;
  }

  .result-header {
    flex-direction: column;
    gap: 16px;
  }

  .result-scadenza-label,
  .result-scadenza-value {
    text-align: left;
  }

  .result-amount {
    font-size: 40px;
  }

  .result-actions {
    flex-direction: column;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
  }

  /* Regioni */
  .regioni-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .site-footer {
    padding: 32px 16px 20px;
  }

  .footer-disclaimer {
    font-size: 10px;
    padding: 8px 12px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    font-size: 12px;
  }

  .footer-col h4 {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .footer-col a {
    font-size: 13px;
    padding: 4px 0;
    margin-bottom: 4px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 11px;
  }

  /* Archive */
  .posts-grid {
    grid-template-columns: 1fr;
  }

  /* Related */
  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Author Box */
  .author-box__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-box__links {
    justify-content: center;
  }

  /* Article */
  .article-title {
    font-size: clamp(24px, 5vw, 36px);
  }

  .article-content h2 {
    font-size: 24px;
  }

  .article-content h3 {
    font-size: 20px;
  }

  /* 404 */
  .error-404__actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .fuel-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .regioni-grid {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero__stat {
    flex: 1;
    min-width: 70px;
  }

  /* Footer - single column on small screens */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col a {
    font-size: 14px;
    padding: 6px 0;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .cookie-overlay,
  .cookie-reopen,
  .result-actions,
  .main-nav,
  .menu-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .article-content {
    max-width: 100%;
    padding: 0;
  }
}

/* ==========================================================================
   WORDPRESS CLASSES
   ========================================================================== */

.alignleft {
  float: left;
  margin: 0 20px 16px 0;
}

.alignright {
  float: right;
  margin: 0 0 16px 20px;
}

.aligncenter {
  display: block;
  margin: 20px auto;
}

.wp-caption {
  max-width: 100%;
  margin-bottom: 20px;
}

.wp-caption-text {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--testo-muted);
  text-align: center;
  margin-top: 8px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.gallery-item img {
  border-radius: 8px;
}

.sticky .post-card {
  border-color: var(--blu);
  border-width: 2px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* WordPress block editor support */
.wp-block-image {
  margin: 24px 0;
}

.wp-block-image img {
  border-radius: 12px;
}

.has-text-align-center {
  text-align: center;
}

.has-text-align-right {
  text-align: right;
}

/* ==========================================================================
   DROPDOWN NAVIGATION
   ========================================================================== */

.main-nav__dropdown {
  position: relative;
}

.main-nav__link--has-children {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--testo-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  line-height: inherit;
}

.main-nav__link--has-children:hover {
  background: var(--grigio-bg);
  color: var(--blu);
}

.main-nav__link--has-children:focus-visible {
  box-shadow: 0 0 0 2px var(--blu);
}

.main-nav__link--has-children svg {
  transition: transform 0.2s;
}

.main-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--bianco);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 8px 0;
  z-index: 100;
  margin-top: 12px;
}

.main-nav__dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--bianco);
}

.main-nav__dropdown.open .main-nav__dropdown-menu {
  display: block;
  animation: fadeSlideDown 0.2s ease;
}

.main-nav__dropdown.open .main-nav__link--has-children svg {
  transform: rotate(180deg);
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.main-nav__dropdown-link {
  display: block;
  padding: 10px 20px;
  color: var(--testo);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.main-nav__dropdown-link:hover {
  background: var(--grigio-bg);
  color: var(--blu);
}

.main-nav__dropdown-link--all {
  border-top: 1px solid var(--grigio-bordo);
  margin-top: 4px;
  padding-top: 12px;
  font-weight: 700;
  color: var(--blu);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   GUIDE POPOLARI SECTION (Homepage)
   ========================================================================== */

.section-guide {
  padding: 80px 24px;
  background: var(--bianco);
}

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

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
  text-align: left;
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--grigio-bg);
  border-radius: 14px;
  text-decoration: none;
  color: var(--testo);
  transition: box-shadow 0.25s, transform 0.25s;
}

.guide-card:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.guide-card__icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blu);
  border-radius: 10px;
  padding: 8px;
}

.guide-card__icon svg {
  width: 24px;
  height: 24px;
  fill: var(--bianco);
}

.guide-card__content {
  flex: 1;
  min-width: 0;
}

.guide-card__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--testo);
  margin-bottom: 2px;
}

.guide-card__desc {
  display: block;
  font-size: 13px;
  color: var(--testo-muted);
  line-height: 1.4;
}

.guide-card__arrow {
  width: 20px;
  min-width: 20px;
  opacity: 0.3;
  transition: opacity 0.2s, transform 0.2s;
}

.guide-card__arrow svg {
  width: 20px;
  height: 20px;
  fill: var(--testo);
}

.guide-card:hover .guide-card__arrow {
  opacity: 0.7;
  transform: translateX(2px);
}

/* ==========================================================================
   REGIONAL LANDING PAGE
   ========================================================================== */

.regione-hero {
  padding: 40px 24px 60px;
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu) 100%);
  color: var(--bianco);
  text-align: center;
}

.regione-hero__inner {
  max-width: 780px;
  margin: 0 auto;
}

.regione-hero__breadcrumb {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.regione-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.regione-hero__breadcrumb a:hover {
  color: var(--bianco);
  text-decoration: underline;
}

.regione-hero__breadcrumb span {
  margin: 0 6px;
  opacity: 0.5;
}

.regione-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--bianco);
}

.regione-hero p {
  font-size: 17px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Regione: Tariff Table */
.regione-tariffe {
  padding: 48px 24px;
  background: var(--bianco);
}

.regione-tariffe__inner {
  max-width: 900px;
  margin: 0 auto;
}

.regione-tariffe__table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--grigio-bordo);
  margin-top: 24px;
}

.regione-tariffe__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-heading);
  font-size: 14px;
}

.regione-tariffe__table th {
  background: var(--blu);
  color: var(--bianco);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.regione-tariffe__table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grigio-bordo);
}

.regione-tariffe__table tr:last-child td {
  border-bottom: none;
}

.regione-tariffe__table tr:nth-child(even) {
  background: var(--grigio-bg);
}

.regione-tariffe__fuel {
  font-weight: 600;
  color: var(--testo);
}

.regione-tariffe__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--testo-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
}

.regione-tariffe__note svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  fill: var(--blu);
  margin-top: 2px;
}

/* Regione: Payment Section */
.regione-pagamento {
  padding: 48px 24px;
  background: var(--grigio-bg);
}

.regione-pagamento__inner {
  max-width: 900px;
  margin: 0 auto;
}

.regione-pagamento__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.regione-pagamento__card {
  text-align: center;
  padding: 24px 16px;
  background: var(--bianco);
  border-radius: 14px;
  border: 1px solid var(--grigio-bordo);
}

.regione-pagamento__card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--blu);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.regione-pagamento__card-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--bianco);
}

.regione-pagamento__card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--testo);
}

.regione-pagamento__card-desc {
  font-size: 13px;
  color: var(--testo-muted);
  line-height: 1.5;
}

.regione-pagamento__portale {
  margin-top: 20px;
  font-size: 14px;
  color: var(--testo-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.regione-pagamento__portale svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  fill: var(--blu);
}

.regione-pagamento__portale a {
  color: var(--blu);
  text-decoration: underline;
}

/* Regione: FAQ */
.regione-faq {
  padding: 48px 24px;
  background: var(--bianco);
}

.regione-faq__inner {
  max-width: 780px;
  margin: 0 auto;
}

/* Regione: Related Articles */
.regione-articoli {
  padding: 48px 24px;
  background: var(--grigio-bg);
}

.regione-articoli__inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Regione: Neighboring Regions */
.regione-vicine {
  padding: 48px 24px;
  background: var(--bianco);
}

.regione-vicine__inner {
  max-width: 900px;
  margin: 0 auto;
}

.regione-vicine__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

/* Shared section labels */
.section-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blu);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--testo);
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--testo-muted);
  line-height: 1.6;
  max-width: 600px;
}

/* Related cards grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.related-card {
  background: var(--bianco);
  border: 1px solid var(--grigio-bordo);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--testo);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.related-card__image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.related-card__body {
  padding: 16px;
}

.related-card__category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blu);
  margin-bottom: 6px;
}

.related-card__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.related-card__date {
  font-size: 12px;
  color: var(--testo-muted);
  margin-top: 8px;
}

/* Responsive: regione sections */
@media (max-width: 768px) {
  .regione-pagamento__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .regione-vicine__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .regione-pagamento__grid {
    grid-template-columns: 1fr;
  }

  .regione-vicine__grid {
    grid-template-columns: 1fr;
  }
}

/* Calc CTA card */
.calc-cta {
  max-width: 780px;
  margin: -30px auto 40px;
  padding: 24px 32px;
  background: var(--bianco);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--testo);
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  z-index: 2;
}

.calc-cta:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.calc-cta__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--blu);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.calc-cta__icon svg {
  width: 28px;
  height: 28px;
  fill: var(--bianco);
}

.calc-cta__text {
  flex: 1;
}

.calc-cta__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.calc-cta__sub {
  font-size: 13px;
  color: var(--testo-muted);
}

.calc-cta__arrow {
  width: 24px;
  min-width: 24px;
}

.calc-cta__arrow svg {
  width: 24px;
  height: 24px;
  fill: var(--blu);
}

/* Tariff table */
.tariff-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.tariff-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--grigio-bordo);
  margin-top: 24px;
}

.tariff-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-heading);
  font-size: 14px;
}

.tariff-table th {
  background: var(--blu);
  color: var(--bianco);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.tariff-table th:first-child {
  border-radius: 0;
}

.tariff-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grigio-bordo);
}

.tariff-table tr:last-child td {
  border-bottom: none;
}

.tariff-table tr:nth-child(even) {
  background: var(--grigio-bg);
}

.tariff-table td:first-child {
  font-weight: 600;
  color: var(--testo);
}

.tariff-table .tariff-free {
  color: var(--verde);
  font-weight: 700;
}

/* How to pay */
.pay-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.pay-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--grigio-bg);
  border-radius: 14px;
}

.pay-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--blu);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.pay-card__icon svg {
  width: 28px;
  height: 28px;
  fill: var(--bianco);
}

.pay-card__title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pay-card__desc {
  font-size: 12px;
  color: var(--testo-muted);
}

/* Neighbor regions grid */
.neighbors-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.neighbors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   PILLAR PAGE
   ========================================================================== */

.pillar-hero {
  padding: 40px 24px 60px;
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu-light) 100%);
  color: var(--bianco);
  text-align: center;
}

.pillar-hero__inner {
  max-width: 780px;
  margin: 0 auto;
}

.pillar-hero__breadcrumb {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.pillar-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.pillar-hero__breadcrumb a:hover {
  color: var(--bianco);
}

.pillar-hero__breadcrumb span {
  margin: 0 6px;
  opacity: 0.5;
}

.pillar-hero h1,
.pillar-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--bianco);
}

.pillar-hero p {
  font-size: 17px;
  opacity: 0.9;
}

.pillar-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px;
}

.pillar-content h2 { font-size: 28px; margin: 40px 0 16px; padding-top: 20px; font-family: var(--font-heading); font-weight: 800; }
.pillar-content h3 { font-size: 22px; margin: 32px 0 12px; font-family: var(--font-heading); font-weight: 700; }
.pillar-content h4 { font-size: 18px; margin: 24px 0 10px; font-family: var(--font-heading); font-weight: 700; }
.pillar-content p { font-size: 17px; line-height: 1.8; color: var(--testo); margin-bottom: 20px; }
.pillar-content ul,
.pillar-content ol { margin: 16px 0 20px 24px; list-style: disc; }
.pillar-content ol { list-style: decimal; }
.pillar-content li { font-size: 16px; line-height: 1.7; margin-bottom: 8px; color: var(--testo); }
.pillar-content blockquote { border-left: 4px solid var(--blu); background: rgba(0, 61, 165, 0.04); margin: 24px 0; padding: 12px 20px; color: var(--testo-muted); }
.pillar-content img { border-radius: 12px; margin: 24px 0; max-width: 100%; height: auto; }
.pillar-content a { color: var(--blu); text-decoration: underline; text-underline-offset: 2px; }
.pillar-content a:hover { color: var(--blu-dark); }
.pillar-content table { width: 100%; border-collapse: collapse; margin: 24px 0; border-radius: 12px; overflow: hidden; box-shadow: var(--card-shadow); }
.pillar-content th { background: var(--blu); color: var(--bianco); font-family: var(--font-heading); font-weight: 600; padding: 12px 16px; text-align: left; }
.pillar-content td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--grigio-bordo); }
.pillar-content tr:nth-child(even) td { background: var(--grigio-bg); }

/* Silo articles grid (legacy) */
.silo-articles {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.silo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

/* Cross-links section (legacy) */
.cross-links {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.cross-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.cross-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--grigio-bg);
  border-radius: 12px;
  text-decoration: none;
  color: var(--testo);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  transition: box-shadow 0.2s, transform 0.2s;
}

.cross-link-card:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.cross-link-card svg {
  width: 20px;
  height: 20px;
  fill: var(--blu);
  min-width: 20px;
}

/* ---- Pillar CTA ---- */
.pillar-cta {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px;
}

.pillar-cta__inner {
  max-width: 100%;
}

.pillar-cta__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--blu) 0%, var(--blu-light) 100%);
  border-radius: 16px;
  text-decoration: none;
  color: var(--bianco);
  transition: box-shadow 0.2s, transform 0.2s;
}

.pillar-cta__card:hover {
  box-shadow: 0 8px 24px rgba(0, 61, 165, 0.3);
  transform: translateY(-2px);
}

.pillar-cta__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-cta__icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.pillar-cta__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pillar-cta__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.pillar-cta__heading {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.pillar-cta__arrow {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.2s;
}

.pillar-cta__card:hover .pillar-cta__arrow {
  transform: translateX(4px);
}

.pillar-cta__arrow svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ---- Pillar Articles (silo section) ---- */
.pillar-articles {
  background: var(--grigio-bg);
  padding: 48px 0;
}

.pillar-articles__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.pillar-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.pillar-articles__more {
  text-align: center;
  margin-top: 32px;
}

.pillar-articles__more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--blu);
  text-decoration: none;
  padding: 10px 24px;
  border: 2px solid var(--blu);
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.pillar-articles__more-link:hover {
  background: var(--blu);
  color: var(--bianco);
}

.pillar-articles__more-link svg {
  transition: transform 0.2s;
}

.pillar-articles__more-link:hover svg {
  transform: translateX(3px);
  fill: currentColor;
}

/* ---- Article Card ---- */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bianco);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--testo);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.article-card:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-3px);
}

.article-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--grigio-bg);
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grigio-bordo);
}

.article-card__placeholder svg {
  width: 40px;
  height: 40px;
}

.article-card__body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.article-card__category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blu);
}

.article-card__title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--testo);
  margin: 0;
}

.article-card__excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--testo-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  font-size: 12px;
  color: var(--testo-muted);
  margin-top: auto;
  padding-top: 8px;
}

/* ---- Pillar Cross-Silo Links ---- */
.pillar-cross {
  padding: 48px 0;
}

.pillar-cross__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.pillar-cross__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pillar-cross__card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--grigio-bg);
  border-radius: 14px;
  text-decoration: none;
  color: var(--testo);
  transition: box-shadow 0.2s, transform 0.2s;
}

.pillar-cross__card:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.pillar-cross__card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(0, 61, 165, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-cross__card-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--blu);
}

.pillar-cross__card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pillar-cross__card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--testo);
}

.pillar-cross__card-desc {
  font-size: 13px;
  color: var(--testo-muted);
  line-height: 1.4;
}

.pillar-cross__card-arrow {
  flex-shrink: 0;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
}

.pillar-cross__card:hover .pillar-cross__card-arrow {
  opacity: 0.8;
  transform: translateX(3px);
}

.pillar-cross__card-arrow svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   REGIONI INDEX PAGE
   ========================================================================== */

.regioni-index-hero {
  padding: 40px 24px 60px;
  background: linear-gradient(135deg, var(--blu-dark) 0%, var(--blu) 100%);
  color: var(--bianco);
  text-align: center;
}

.regioni-index-hero__inner {
  max-width: 780px;
  margin: 0 auto;
}

.regioni-index-hero__breadcrumb {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.regioni-index-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.regioni-index-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
}

.regioni-index-hero p {
  font-size: 17px;
  opacity: 0.9;
}

.regioni-index-grid {
  max-width: 1100px;
  margin: -30px auto 40px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.regioni-index-grid .regioni-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   RESPONSIVE: NEW SECTIONS
   ========================================================================== */

@media (max-width: 1024px) {
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .regioni-index-grid .regioni-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .silo-grid,
  .pillar-articles__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav__dropdown {
    width: 100%;
  }
  .main-nav__dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    background: var(--grigio-bg);
    border-radius: 8px;
    margin: 4px 0 8px;
    min-width: 0;
    width: 100%;
  }
  .main-nav__dropdown-menu::before {
    display: none;
  }
  @keyframes fadeSlideDown {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .main-nav__dropdown-link {
    color: var(--testo);
    padding: 13px 20px;
    font-size: 15px;
    display: block;
    width: 100%;
  }
  .main-nav__dropdown-link:hover {
    background: rgba(0, 61, 165, 0.08);
    color: var(--blu);
  }
  .main-nav__dropdown-link--all {
    border-color: var(--grigio-bordo);
    color: var(--blu);
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .pay-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .neighbors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .regioni-index-grid .regioni-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .silo-grid,
  .pillar-articles__grid {
    grid-template-columns: 1fr;
  }
  .cross-links-grid,
  .pillar-cross__grid {
    grid-template-columns: 1fr;
  }
  .pillar-cta__card {
    flex-direction: column;
    text-align: center;
  }
  .pillar-cta__arrow {
    display: none;
  }
  .calc-cta {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .pay-grid {
    grid-template-columns: 1fr;
  }
  .neighbors-grid {
    grid-template-columns: 1fr;
  }
  .regioni-index-grid .regioni-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.error-404--compact {
  min-height: 40vh;
}

.icon-inline {
  vertical-align: middle;
}

/* Skip to content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blu);
  color: #fff;
  padding: 8px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--giallo);
  outline-offset: 2px;
}

