/* ==========================================================================
   Template 1 - Classic - Innovazione Energetica Sardegna
   Stile: verde/giallo/blu, layout classico energia solare
   W3C Compliant - No riferimenti WP
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1E88E5;
  --primary-dark: #1565C0;
  --primary-light: #42A5F5;
  --accent: #FFD600;
  --accent-light: #FFEE58;
  --accent-dark: #FBC02D;
  --blue: #2196F3;
  --blue-light: #64B5F6;
  --blue-dark: #1565C0;
  --green: #43A047;
  --green-light: #66BB6A;
  --green-dark: #2E7D32;
  --dark: #1a2744;
  --dark-light: #263550;
  --text: #1e293b;
  --text-light: #475569;
  --text-muted: #94a3b8;
  --white: #ffffff;
  --light-bg: #f0f7ff;
  --light-gray: #e2e8f0;
  --border: #cbd5e1;
  --shadow: 0 10px 30px rgba(26, 39, 68, 0.08);
  --shadow-hover: 0 18px 45px rgba(26, 39, 68, 0.14);
  --shadow-soft: 0 1px 0 rgba(255,255,255,0.65) inset, 0 14px 40px rgba(30, 136, 229, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', 'Segoe UI', 'Roboto', -apple-system, sans-serif;
  --font-heading: 'Inter', 'Segoe UI', 'Roboto', -apple-system, sans-serif;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  line-height: 1.75;
  background: var(--white);
  overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-tap-highlight-color: transparent;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  touch-action: manipulation;
}

button {
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}

input, select, textarea {
  font-size: 16px; /* previene zoom iOS su focus */
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--dark);
  letter-spacing: 0;
  font-weight: 700;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  width: 100%;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 0;
}

.section-title p {
  color: var(--text-light);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-title .label {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 214, 0, 0.35);
}

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

.btn-secondary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

/* --- Top Bar --- */
.top-bar {
  background: var(--dark);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.82rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-info {
  display: flex;
  gap: 25px;
  align-items: center;
}

.top-bar-info span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-info span i {
  color: var(--accent);
  font-size: 0.95rem;
  width: 16px;
  text-align: center;
}

.top-bar-social {
  display: flex;
  gap: 8px;
}

.top-bar-social a {
  color: var(--white);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  transition: var(--transition);
}

.top-bar-social a:hover {
  background: var(--accent);
  color: var(--dark);
  transform: scale(1.1);
}

.top-bar {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* --- Header / Navbar --- */
.header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

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

.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.logo-text span {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  gap: 5px;
  align-items: center;
}

.nav-menu a {
  padding: 22px 16px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 60%;
}

/* --- Dropdown Menu (Impianti) --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > .nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 22px 16px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
  border: none;
  background: none;
  font-family: var(--font-main);
}

.nav-dropdown > .nav-dropdown-toggle i.fa-chevron-down {
  font-size: 0.6rem;
  transition: transform 0.25s ease;
}

.nav-dropdown:hover > .nav-dropdown-toggle,
.nav-dropdown > .nav-dropdown-toggle.active {
  color: var(--primary);
}

.nav-dropdown > .nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-dropdown:hover > .nav-dropdown-toggle::after {
  width: 60%;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 260px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid var(--light-gray);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 1100;
  padding: 8px 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover > .nav-dropdown-toggle i.fa-chevron-down {
  transform: rotate(180deg);
}

.nav-dropdown-menu .dropdown-label {
  display: block;
  padding: 10px 20px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px !important;
  font-size: 0.9rem !important;
  color: var(--text) !important;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-menu a::after {
  display: none !important;
}

.nav-dropdown-menu a:hover {
  background: rgba(30, 136, 229, 0.06);
  color: var(--primary) !important;
}

.nav-dropdown-menu a i {
  color: var(--accent);
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}

.nav-dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--light-gray);
  margin: 6px 16px;
}

.nav-dropdown-menu .dropdown-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px !important;
  font-size: 0.85rem !important;
  font-weight: 600;
  color: var(--primary) !important;
  background: rgba(30, 136, 229, 0.06);
  border-top: 1px solid var(--light-gray);
  margin-top: 4px;
  transition: background 0.2s ease;
}

.nav-dropdown-menu .dropdown-view-all:hover {
  background: rgba(30, 136, 229, 0.12);
}

.nav-dropdown-menu .dropdown-view-all i {
  color: var(--primary);
}

.header-cta {
  background: var(--primary);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 10px;
  letter-spacing: 0.01em;
}

.header-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,136,229,0.25);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  background: #1E88E5;
  color: var(--white);
  display: flex;
  align-items: center;
  position: relative;
  padding: 80px 0;
  overflow: hidden; /* Previene overflow orizzontale da ::before su mobile */
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: transparent;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content .label {
  display: inline-block;
  background: rgba(255, 214, 0, 0.25);
  color: var(--accent-light);
  padding: 8px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 214, 0, 0.35);
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual .placeholder-img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4/3;
  background: rgba(33,150,243,0.15);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.hero-visual .placeholder-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.hero-stats .stat {
  text-align: center;
}

.hero-stats .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.hero-stats .stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* --- Stats Bar --- */
.stats-bar {
  background: #1565C0;
  color: var(--white);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item .number {
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
  color: var(--accent);
}

.stat-item .text {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* --- Services --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--light-gray);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: var(--green);
  font-size: 1.5rem;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- About Section --- */
.about-section {
  background: #f0f7ff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image .placeholder-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.5);
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.about-features {
  margin-top: 25px;
}

.about-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 15px;
}

.about-feature .check {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Portfolio --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

a.portfolio-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

a.portfolio-card:hover .card-img img {
  transform: scale(1.05);
}

a.portfolio-card:hover .portfolio-link {
  color: var(--primary);
  gap: 8px;
}

.portfolio-card .card-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: #1E88E5;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.portfolio-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}

.portfolio-card .card-body {
  padding: 20px;
  background: var(--white);
}

.portfolio-card .card-body .tag {
  display: inline-block;
  background: rgba(30, 136, 229, 0.08);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.portfolio-card .card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.portfolio-card .card-body p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  transition: var(--transition);
}

.portfolio-link i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

a.portfolio-card:hover .portfolio-link i {
  transform: translateX(3px);
}

/* Portfolio Dettaglio */
.portfolio-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 25px;
}

.portfolio-hero-img img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

.portfolio-body {
  line-height: 1.8;
  color: var(--text);
}

.portfolio-body h2 {
  font-size: 1.5rem;
  margin: 30px 0 15px;
  color: var(--dark);
}

.portfolio-body h3 {
  font-size: 1.25rem;
  margin: 25px 0 12px;
  color: var(--dark);
}

.portfolio-body p {
  margin-bottom: 15px;
}

.portfolio-body ul,
.portfolio-body ol {
  margin: 15px 0;
  padding-left: 0;
  list-style: none;
}

.portfolio-body ul li {
  padding: 6px 0 6px 24px;
  position: relative;
}

.portfolio-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.portfolio-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.portfolio-body table th,
.portfolio-body table td {
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.portfolio-body table th {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.portfolio-body table tr:nth-child(even) {
  background: #f8f9fa;
}

.portfolio-body strong {
  color: var(--dark);
}

/* --- Blog --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  transition: var(--transition);
}

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

.blog-card .card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: #43A047;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.blog-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.blog-card .card-body {
  padding: 25px;
}

.blog-card .meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover {
  gap: 10px;
  color: var(--primary-dark);
}

/* --- Agevolazioni --- */
.agevolazioni-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.agevolazione-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 35px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
  transition: var(--transition);
}

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

.agevolazione-card .badge {
  display: inline-block;
  background: rgba(30, 136, 229, 0.1);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.agevolazione-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.agevolazione-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.agevolazione-card .detail {
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 600;
}

/* --- Preventivo --- */
.preventivo-section {
  background: var(--light-bg);
}

.preventivo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-main);
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.preventivo-info {
  background: var(--dark);
  color: var(--white);
  padding: 40px;
  border-radius: var(--radius);
}

.preventivo-info h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.preventivo-info p {
  opacity: 0.9;
  margin-bottom: 25px;
}

.preventivo-info .info-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.preventivo-info .info-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-info-4col {
  grid-template-columns: repeat(4, 1fr);
}

.contact-info-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-info-card .icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.2rem;
}

.contact-info-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.contact-info-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.map-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--light-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  border: 2px dashed var(--border);
}

/* --- CTA Banner --- */
.cta-banner {
  background: #43A047;
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--white);
  margin-bottom: 15px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Page Header (inner pages) --- */
.page-header {
  background: var(--primary-dark);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: 0;
}

.page-header .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.7;
}

.page-header .breadcrumb a {
  color: var(--accent-light);
  opacity: 1;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.page-header {
  position: relative;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 60px 0 0;
}

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

.footer-about .logo-text {
  font-size: 1.3rem;
  margin-bottom: 15px;
  display: block;
}

.footer-logo-img {
  height: 45px;
  width: auto;
  display: block;
  margin-bottom: 18px;
  filter: brightness(0) invert(1);
}

.footer-about p {
  opacity: 0.8;
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.footer-social a[aria-label="Facebook"]:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.footer-social a[aria-label="Instagram"]:hover {
  background: #e6683c;
  border-color: #e6683c;
}

.footer-social a[aria-label="LinkedIn"]:hover {
  background: #0a66c2;
  border-color: #0a66c2;
}

.footer-social a[aria-label="YouTube"]:hover {
  background: #ff0000;
  border-color: #ff0000;
}

.footer h4 {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
  padding-left: 5px;
}

/* --- Kit / Products Section --- */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.kit-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}

.kit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.kit-card .kit-header {
  background: var(--blue);
  color: var(--white);
  padding: 25px;
  text-align: center;
}

.kit-card .kit-header h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.kit-card .kit-header .kit-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.kit-card .kit-body {
  padding: 25px;
}

.kit-card .kit-body ul {
  list-style: none;
}

.kit-card .kit-body ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--light-gray);
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kit-card .kit-body ul li:last-child {
  border-bottom: none;
}

.kit-card .kit-body ul li::before {
  content: '\2713';
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: var(--dark);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.kit-card .kit-footer {
  padding: 0 25px 25px;
  text-align: center;
}

.kit-card.featured {
  border-color: var(--accent);
  transform: scale(1.03);
}

.kit-card.featured .kit-header {
  background: var(--primary-dark);
}

/* --- Gallery grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.gallery-item:hover img {
  transform: scale(1.05);
}

/* --- Blue section variant --- */
.section-blue {
  background: #e8f4fd;
}

/* --- Zone grid (4 columns default) --- */
.zone-grid {
  grid-template-columns: repeat(4, 1fr);
}

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

.btn-blue:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(33, 150, 243, 0.3);
}

.footer-contact .item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.9rem;
  opacity: 0.85;
}

.footer-contact .item i {
  color: var(--accent);
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--blue);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 10px;
}

/* --- Focus styles (WCAG 2.4.7) --- */
*:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(255, 214, 0, 0.22);
}

/* Rimuove focus ring su click mouse ma lo mantiene da tastiera */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Visual Refresh & Accessibility --- */
body {
  background:
    linear-gradient(180deg, rgba(240, 247, 255, 0.72) 0, rgba(255, 255, 255, 0) 420px),
    var(--white);
}

.header {
  border-bottom: 1px solid rgba(30, 136, 229, 0.08);
  box-shadow: 0 8px 30px rgba(26, 39, 68, 0.08);
}

.logo-img,
.footer-logo-img {
  object-fit: contain;
}

.btn,
.header-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.45) inset;
}

.btn:active,
.header-cta:active {
  transform: translateY(0);
}

.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 58%, var(--green-dark) 140%);
  isolation: isolate;
}

.hero::before {
  width: 100%;
  height: 100%;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 90px),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0));
  opacity: 0.55;
}

.hero h1 {
  text-shadow: 0 2px 18px rgba(0,0,0,0.18);
}

.hero p {
  max-width: 620px;
}

.hero-visual .placeholder-img,
.about-image .placeholder-img {
  box-shadow: 0 22px 60px rgba(26, 39, 68, 0.22);
}

.hero-visual .placeholder-img {
  transform: rotate(1deg);
}

.hero-visual .placeholder-img img,
.about-image .placeholder-img img {
  transition: transform 0.45s ease, filter 0.45s ease;
}

.hero-visual .placeholder-img:hover img,
.about-image .placeholder-img:hover img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.03);
}

.hero-stats .stat,
.stats-grid .stat-item {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.10);
  padding: 18px 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}

.stats-bar {
  background: linear-gradient(135deg, var(--primary-dark), var(--dark));
}

.section {
  position: relative;
}

.section-blue,
.about-section {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0)),
    var(--light-bg);
}

.service-card,
.blog-card,
.portfolio-card,
.kit-card,
.agevolazione-card,
.contact-info-card,
.preventivo-info {
  position: relative;
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: var(--shadow);
}

.service-card,
.blog-card,
.portfolio-card,
.kit-card,
.agevolazione-card,
.contact-info-card {
  overflow: hidden;
}

.service-card::before,
.blog-card::before,
.portfolio-card::before,
.kit-card::before,
.contact-info-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--green));
  opacity: 0.92;
}

.service-card:hover,
.blog-card:hover,
.portfolio-card:hover,
.kit-card:hover,
.agevolazione-card:hover,
.contact-info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.service-icon,
.contact-info-card .icon,
.preventivo-info .info-icon {
  box-shadow: 0 10px 24px rgba(46, 125, 50, 0.22);
}

.portfolio-card {
  display: block;
  border-radius: var(--radius);
  background: var(--white);
  transition: var(--transition);
}

.portfolio-card .card-img::after,
.blog-card .card-img::after,
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,39,68,0) 44%, rgba(26,39,68,0.42));
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.portfolio-card:hover .card-img::after,
.blog-card:hover .card-img::after,
.gallery-item:hover::after {
  opacity: 1;
}

.portfolio-card .overlay {
  position: absolute;
  inset: auto 16px 16px;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
}

.portfolio-card:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}

.blog-card .card-img img,
.portfolio-card .card-img img,
.gallery-item img {
  transition: transform 0.45s ease, filter 0.45s ease;
}

.blog-card:hover .card-img img,
.portfolio-card:hover .card-img img,
.gallery-item:hover img {
  transform: scale(1.045);
  filter: saturate(1.08) contrast(1.02);
}

.gallery-item {
  position: relative;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.72);
}

.kit-card .kit-header,
.cta-banner,
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.kit-card.featured .kit-header,
.cta-banner {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
}

.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.12) 0 1px, transparent 1px 78px);
  opacity: 0.55;
  pointer-events: none;
}

.cta-banner .container {
  position: relative;
  z-index: 1;
}

.footer {
  background: linear-gradient(135deg, var(--dark), #101a2f);
}

.footer-links a,
.footer-contact .item {
  min-height: 34px;
}

/* --- Responsive --- */

/* ===== Tablet (max-width: 992px) ===== */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-visual {
    display: none;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
  }

  .about-grid,
  .preventivo-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid,
  .blog-grid,
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .kit-card.featured {
    transform: none;
  }

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

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

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

  .contact-info-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
  /* --- Top Bar --- */
  .top-bar {
    display: none;
  }

  /* --- Header --- */
  .header {
    position: sticky;
    top: 0;
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .header .container {
    min-height: 60px;
  }

  .logo-img {
    height: 36px;
  }

  /* --- Navigation (Mobile Menu) --- */
  .nav-menu {
    display: flex;
    position: fixed;
    top: 60px;
    left: auto;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85%;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
    padding: 12px 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s;
    visibility: hidden;
  }

  .nav-menu.active {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-menu a {
    padding: 0 24px;
    min-height: 52px; /* WCAG 2.5.8 touch target */
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--light-gray);
    transition: background 0.2s ease, color 0.2s ease;
    position: static;
    width: 100%;
    text-align: left;
  }

  .nav-menu a:last-child {
    border-bottom: none;
  }

  .nav-menu a:hover,
  .nav-menu a:active {
    background: rgba(30, 136, 229, 0.06);
    color: var(--primary);
  }

  .nav-menu a.active {
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
  }

  .nav-menu a::after {
    display: none !important;
  }

  /* --- Dropdown Mobile --- */
  .nav-dropdown {
    position: static;
    width: 100%;
  }

  .nav-dropdown > .nav-dropdown-toggle {
    padding: 0 24px !important;
    min-height: 52px;
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--light-gray);
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-main);
  }

  .nav-dropdown > .nav-dropdown-toggle::after {
    display: none !important;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: var(--light-bg);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.35s ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 500px;
  }

  /* Override desktop :hover rules that break mobile layout */
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.open .nav-dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
  }

  .nav-dropdown.open > .nav-dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
  }

  .nav-dropdown-menu .dropdown-label {
    padding: 12px 24px 4px;
  }

  .nav-dropdown-menu a {
    padding: 10px 16px 10px 28px !important;
    min-height: 48px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    white-space: normal;
    font-size: 0.9rem !important;
    line-height: 1.4;
  }

  .nav-dropdown-menu .dropdown-divider {
    margin: 4px 16px;
  }

  .nav-dropdown-menu .dropdown-view-all {
    padding: 10px 16px !important;
    min-height: 48px;
    justify-content: center;
    text-align: center;
    background: rgba(30, 136, 229, 0.08);
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 4px;
    font-weight: 600;
    font-size: 0.85rem !important;
    white-space: normal;
    width: 100%;
  }

  /* Backdrop overlay */
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 60px 0 0 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .nav-backdrop.active {
    display: block;
  }

  /* Body scroll lock */
  body.menu-open {
    overflow: hidden;
  }

  .hamburger {
    display: flex;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
  }

  .header-cta {
    display: none;
  }

  /* --- Hero --- */
  .hero {
    padding: 50px 0 40px;
    min-height: auto;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-content .label {
    font-size: 0.78rem;
    padding: 6px 14px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hero-buttons .btn {
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
  }

  .hero-stats .stat-number {
    font-size: 1.6rem;
  }

  .hero-stats .stat-label {
    font-size: 0.8rem;
  }

  /* --- Stats Bar --- */
  .stats-bar {
    padding: 30px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .stat-item .number {
    font-size: 1.8rem;
  }

  .stat-item .text {
    font-size: 0.85rem;
  }

  /* --- Sections --- */
  .section {
    padding: 50px 0;
  }

  .section-title {
    margin-bottom: 32px;
  }

  /* --- Grids: single column --- */
  .services-grid,
  .blog-grid,
  .portfolio-grid,
  .agevolazioni-grid,
  .kit-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .kit-card.featured {
    transform: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .contact-info-cards,
  .contact-info-4col {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* --- About --- */
  .about-grid {
    gap: 30px;
  }

  .about-content h2 {
    font-size: 1.5rem;
  }

  .about-content p {
    font-size: 0.95rem;
  }

  /* --- Service Card padding ridotto --- */
  .service-card {
    padding: 30px 22px;
  }

  /* --- Agevolazione card padding ridotto --- */
  .agevolazione-card {
    padding: 28px 20px;
  }

  /* --- CTA Banner --- */
  .cta-banner {
    padding: 45px 0;
  }

  /* --- Page Header --- */
  .page-header {
    padding: 40px 0;
  }

  .page-header .breadcrumb {
    font-size: 0.85rem;
  }

  /* --- Footer compatto su mobile --- */
  .footer {
    padding: 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    text-align: left;
  }

  .footer-about {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
  }

  .footer-logo-img {
    height: 30px;
    margin: 0;
  }

  .footer-about p {
    display: none;
  }

  .footer-social {
    margin-left: auto;
    gap: 8px;
  }

  .footer-social a {
    width: 44px; /* WCAG 2.5.8 touch target */
    height: 44px;
    font-size: 1rem;
  }

  .footer h4 {
    font-size: 0.85rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .footer h4::after {
    width: 24px;
    height: 2px;
  }

  .footer-links a {
    font-size: 0.82rem;
    padding: 6px 0;
    min-height: 44px; /* WCAG touch target */
    display: flex;
    align-items: center;
  }

  .footer-links a:hover {
    padding-left: 0;
  }

  .footer-grid > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
  }

  .footer-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
  }

  .footer-contact .item {
    margin-bottom: 0;
    font-size: 0.82rem;
    min-height: 44px; /* WCAG touch target */
    display: flex;
    align-items: center;
  }

  .footer-contact .item i {
    font-size: 0.85rem;
    width: 16px;
  }

  .footer-bottom {
    padding: 14px 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    font-size: 0.75rem;
    margin-top: 4px;
  }

  /* --- Zone Coperte --- */
  .zone-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* --- Buttons: WCAG 2.5.5/2.5.8 touch target (min 44px) --- */
  .btn {
    padding: 14px 28px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
  }

  /* --- Preventivo Info --- */
  .preventivo-info {
    padding: 28px 20px;
  }

  /* --- Tabelle overflow scroll orizzontale --- */
  .dettaglio-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* --- Immagini portfolio/blog card --- */
  .portfolio-card .card-img,
  .blog-card .card-img {
    aspect-ratio: 16/9;
  }

  /* --- Map placeholder --- */
  .map-placeholder {
    aspect-ratio: 4/3;
    font-size: 0.95rem;
  }

  /* --- Form inputs accessibilità mobile --- */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* previene zoom su iOS */
    padding: 14px 16px;
    min-height: 48px;
    border-radius: var(--radius-sm);
  }

  .form-group label {
    font-size: 0.88rem;
    margin-bottom: 8px;
  }

  /* --- Read more touch target --- */
  .read-more {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
  }

  /* --- Card link arrow touch target --- */
  a.agevolazione-card-link .card-link-arrow {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
  }

  /* --- Sidebar links touch target --- */
  .sidebar-links a {
    min-height: 48px;
    padding: 12px 0;
  }

  /* --- Tabelle CMS (TinyMCE) scroll orizzontale --- */
  .agevolazione-body table,
  .portfolio-body table,
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Fascia statistiche compatta */
.stats-bar {
  padding: 28px 0 56px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-grid .stat-item {
  min-height: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(26, 39, 68, 0.07);
}

.stat-item .number {
  flex: 0 0 auto;
  font-size: clamp(1.55rem, 2vw, 2.25rem);
  white-space: normal;
}

.stat-item .text {
  font-size: 0.92rem;
  line-height: 1.45;
}

.stats-grid .stat-item:last-child .number {
  font-size: clamp(1.35rem, 1.65vw, 1.95rem);
  line-height: 1.18;
}

@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid .stat-item {
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================================
   Refinement Pass 3 - Hero piu professionale e meno pesante
   ========================================================================== */
.hero {
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(240,247,255,0.98) 0%, rgba(255,255,255,0.98) 48%, rgba(232,244,253,0.9) 100%);
  padding: clamp(42px, 5vw, 72px) 0 clamp(56px, 6vw, 84px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

.hero::before {
  background:
    radial-gradient(circle at 86% 20%, rgba(30,136,229,0.13), transparent 28%),
    radial-gradient(circle at 10% 78%, rgba(255,214,0,0.18), transparent 22%);
  opacity: 1;
}

.hero::after {
  display: none;
}

.hero .container {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.82fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
}

.hero-content .label {
  background: rgba(30, 136, 229, 0.09);
  color: var(--primary-dark);
  border-color: rgba(30, 136, 229, 0.18);
  box-shadow: none;
}

.hero h1 {
  max-width: 680px;
  color: var(--dark);
  font-size: clamp(2.15rem, 3.45vw, 3.85rem);
  text-shadow: none;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  left: 0.05em;
  right: 0.05em;
  bottom: 0.08em;
  height: 0.18em;
  background: rgba(255, 214, 0, 0.72);
  z-index: -1;
  border-radius: 999px;
}

.hero p {
  color: var(--text-light);
  opacity: 1;
  max-width: 620px;
}

.hero .btn-outline {
  color: var(--primary-dark);
  border-color: rgba(30, 136, 229, 0.32);
  background: rgba(255,255,255,0.75);
}

.hero .btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.hero-visual .placeholder-img {
  max-width: 600px;
  aspect-ratio: 16 / 11;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow: 0 24px 70px rgba(26, 39, 68, 0.18);
}

.hero-visual .placeholder-img img {
  border-radius: 18px;
}

.hero-highlights {
  margin-top: 24px;
}

.hero-highlights span {
  color: var(--text);
  background: var(--white);
  border-color: rgba(203, 213, 225, 0.92);
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.07);
}

.hero-highlights i {
  color: var(--primary);
}

.stats-bar {
  padding: 34px 0 64px;
}

.stats-grid .stat-item {
  box-shadow: 0 12px 34px rgba(26, 39, 68, 0.08);
}

@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-buttons,
  .hero-highlights {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 36px 0 46px;
  }

  .hero .container {
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .hero-buttons,
  .hero-highlights {
    justify-content: center;
  }
}

/* ==========================================================================
   Refinement Pass 2 - Hero piu sobria, statistiche non duplicate
   ========================================================================== */
.hero {
  min-height: auto;
  padding: clamp(64px, 7vw, 96px) 0 clamp(72px, 8vw, 108px);
}

.hero .container {
  grid-template-columns: minmax(0, 0.98fr) minmax(380px, 0.74fr);
  gap: clamp(36px, 6vw, 78px);
}

.hero-content .label {
  padding: 7px 16px;
  font-size: 0.7rem;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(2.4rem, 4.2vw, 4.35rem);
  margin-bottom: 22px;
}

.hero p {
  max-width: 620px;
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.72;
  margin-bottom: 28px;
}

.hero-buttons .btn {
  min-height: 54px;
  border-radius: 18px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  max-width: 650px;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.11);
  color: rgba(255,255,255,0.94);
  font-size: 0.88rem;
  font-weight: 600;
}

.hero-highlights i {
  color: var(--accent);
}

.hero-visual .placeholder-img {
  max-width: 560px;
  aspect-ratio: 4 / 3;
}

.stats-bar {
  margin-top: 0;
  padding: 48px 0 72px;
  background: var(--white);
}

.stats-grid {
  gap: 18px;
}

.stats-grid .stat-item {
  min-height: 118px;
  padding: 24px;
  border-radius: 18px;
}

.stat-item .number {
  font-size: clamp(1.85rem, 2.45vw, 2.75rem);
}

.section {
  padding: 78px 0;
}

.section-title {
  margin-bottom: 42px;
}

.services-grid,
.kit-grid,
.portfolio-grid,
.blog-grid {
  gap: 24px;
}

@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: flex;
  }

  .hero-visual .placeholder-img {
    max-width: 620px;
    margin: 0 auto;
  }

  .hero-highlights {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 42px 0 58px;
  }

  .hero-visual {
    display: none;
  }

  .hero-highlights {
    justify-content: stretch;
  }

  .hero-highlights span {
    width: 100%;
    justify-content: center;
  }

  .stats-bar {
    padding: 32px 0 48px;
  }

  .stats-grid .stat-item {
    min-height: auto;
  }
}

/* ===== Small Mobile (max-width: 480px) ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .hero {
    padding: 36px 0 30px;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero-stats {
    gap: 15px;
  }

  .hero-stats .stat-number {
    font-size: 1.4rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .stat-item .number {
    font-size: 1.5rem;
  }

  .section {
    padding: 36px 0;
  }

  .section-title {
    margin-bottom: 24px;
  }

  .service-card {
    padding: 22px 16px;
  }

  .service-card .icon-box {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .agevolazione-card {
    padding: 22px 16px;
  }

  .kit-card .kit-header {
    padding: 20px 15px;
  }

  .kit-card .kit-body {
    padding: 20px 15px;
  }

  .kit-card .kit-footer {
    padding: 0 15px 20px;
  }

  .contact-info-cards,
  .contact-info-4col {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-grid {
    gap: 8px;
  }

  .zone-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer: contatti su 1 colonna su schermi molto piccoli */
  .footer-contact {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 8px 12px;
  }

  .footer-social a {
    width: 44px; /* WCAG touch target mantenuto */
    height: 44px;
    font-size: 0.9rem;
  }

  .about-content h2 {
    font-size: 1.35rem;
  }

  /* --- Preventivo Info compatto --- */
  .preventivo-info {
    padding: 22px 16px;
  }

  /* --- CTA Banner compatto --- */
  .cta-banner {
    padding: 36px 0;
  }

  .cta-banner .btn {
    width: 100%;
  }

  /* --- Page Header compatto --- */
  .page-header {
    padding: 30px 0;
  }

  /* --- Map aspect ratio verticale --- */
  .map-placeholder {
    aspect-ratio: 1/1;
  }
}

/* ===== Reduced Motion (WCAG 2.3.3) ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .service-card:hover,
  .portfolio-card:hover,
  .blog-card:hover,
  .kit-card:hover,
  .agevolazione-card:hover {
    transform: none;
  }

  .top-bar-social a:hover {
    transform: none;
  }

  .footer-social a:hover {
    transform: none;
  }
}

/* ===== Print Styles ===== */
@media print {
  .top-bar,
  .hamburger,
  .header-cta,
  .cta-banner,
  .footer-social,
  nav {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .hero {
    background: none !important;
    color: #000;
    padding: 20px 0;
  }

  .hero h1,
  .hero h1 span {
    color: #000;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  .footer {
    background: none !important;
    color: #000;
  }
}

/* ==========================================================================
   Refinement Pass - Homepage piu equilibrata
   ========================================================================== */
.top-bar {
  padding: 6px 0;
}

.top-bar-info {
  gap: 22px;
}

.top-bar-social a {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
}

.header .container {
  min-height: 74px;
}

.logo-img {
  height: 44px;
}

.nav-menu a,
.nav-dropdown > .nav-dropdown-toggle {
  padding: 24px 14px;
}

.header-cta {
  padding: 11px 22px;
  border-radius: 999px;
}

.hero {
  min-height: calc(100vh - 116px);
  padding: 72px 0 92px;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 214, 0, 0.18), transparent 26%),
    linear-gradient(135deg, #1565C0 0%, #1E88E5 50%, #248c8c 100%);
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 86px;
  background: linear-gradient(180deg, rgba(255,255,255,0), var(--white));
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.78fr);
  gap: clamp(42px, 6vw, 92px);
}

.hero-content .label {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.55rem, 4.8vw, 4.9rem);
  line-height: 1.05;
}

.hero p {
  max-width: 700px;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  opacity: 0.94;
}

.hero-buttons {
  gap: 18px;
}

.hero-buttons .btn {
  padding: 15px 30px;
}

.hero-visual .placeholder-img {
  max-width: 620px;
  aspect-ratio: 5 / 4;
  transform: rotate(0);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: 0 28px 80px rgba(14, 39, 83, 0.34);
}

.hero-visual .placeholder-img img {
  border-radius: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 16px;
  max-width: 620px;
  margin-top: 42px;
}

.hero-stats .stat {
  text-align: left;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.hero-stats .stat-number {
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
}

.hero-stats .stat-label {
  margin-top: 4px;
  opacity: 0.92;
}

.stats-bar {
  padding: 0 0 44px;
  margin-top: -54px;
  background: var(--white);
  position: relative;
  z-index: 2;
}

.stats-grid {
  gap: 18px;
  text-align: left;
}

.stats-grid .stat-item {
  min-height: 132px;
  padding: 24px 26px;
  background: var(--white);
  color: var(--text);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 18px 45px rgba(26, 39, 68, 0.1);
}

.stat-item .number {
  color: var(--primary-dark);
  font-size: clamp(1.95rem, 3vw, 3rem);
  line-height: 1.08;
}

.stat-item .text {
  color: var(--text-light);
  opacity: 1;
}

.section {
  padding: 86px 0;
}

.services-section,
.portfolio-preview-section,
.gallery-section {
  background: var(--white);
}

.section-title {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.section-title .label {
  color: var(--primary-dark);
  letter-spacing: 0.12em;
}

.section-title h2 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
}

.services-grid {
  gap: 22px;
}

.service-card {
  text-align: left;
  padding: 32px 28px;
  border-radius: 18px;
}

.service-card::before {
  height: 3px;
}

.service-icon {
  margin: 0 0 22px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--primary));
}

.section-blue {
  background:
    linear-gradient(180deg, rgba(232, 244, 253, 0.98), rgba(240, 247, 255, 0.82));
}

.kit-grid {
  align-items: stretch;
}

.kit-card {
  border-radius: 20px;
}

.kit-card .kit-header {
  padding: 28px 24px;
}

.kit-card .kit-body {
  padding: 28px 24px 18px;
}

.about-section {
  background:
    linear-gradient(90deg, rgba(30, 136, 229, 0.07), rgba(67, 160, 71, 0.06)),
    #f8fbff;
}

.about-grid {
  gap: clamp(40px, 7vw, 88px);
}

.about-image .placeholder-img {
  border-radius: 24px;
  overflow: hidden;
}

.about-content h2 {
  font-size: clamp(1.9rem, 3vw, 2.75rem);
}

.about-feature {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 14px;
  padding: 12px 14px;
}

.portfolio-card,
.blog-card {
  border-radius: 20px;
}

.portfolio-card .card-body,
.blog-card .card-body {
  padding: 26px;
}

.portfolio-card .card-img,
.blog-card .card-img {
  aspect-ratio: 16 / 10;
}

.cta-banner {
  margin: 20px auto;
  padding: 78px 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 214, 0, 0.2), transparent 24%),
    linear-gradient(135deg, var(--green-dark), var(--green));
}

.cta-banner p {
  max-width: 760px;
}

.gallery-grid {
  gap: 18px;
}

.gallery-item {
  border-radius: 20px;
}

.zone-card {
  min-height: 170px;
}

@media (max-width: 1200px) {
  .nav-menu a,
  .nav-dropdown > .nav-dropdown-toggle {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.9rem;
  }

  .header-cta {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 992px) {
  .hero {
    min-height: auto;
    padding: 64px 0 86px;
  }

  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero p,
  .hero-stats {
    margin-left: auto;
    margin-right: auto;
  }

  .stats-bar {
    margin-top: -42px;
  }
}

@media (max-width: 768px) {
  .header .container {
    min-height: 62px;
  }

  .hero {
    padding: 44px 0 70px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 11vw, 3rem);
  }

  .hero-stats,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats .stat,
  .stats-grid .stat-item {
    text-align: center;
  }

  .stats-bar {
    padding-bottom: 30px;
  }

  .section {
    padding: 58px 0;
  }

  .service-card {
    text-align: center;
  }

  .service-icon {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ==========================================================================
   Pagine Dettaglio Agevolazioni
   ========================================================================== */

/* --- Card Cliccabili in Agevolazioni --- */
a.agevolazione-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
}

a.agevolazione-card-link:hover {
  border-left-color: var(--primary-light);
}

a.agevolazione-card-link .card-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 10px;
  transition: var(--transition);
}

a.agevolazione-card-link:hover .card-link-arrow {
  gap: 12px;
  color: var(--primary-dark);
}

/* --- Layout Dettaglio --- */
.dettaglio-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.dettaglio-content {
  min-width: 0;
}

.dettaglio-badge {
  display: inline-block;
  background: rgba(30, 136, 229, 0.1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.dettaglio-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--dark);
  line-height: 1.3;
}

.dettaglio-content h3 {
  font-size: 1.25rem;
  margin: 35px 0 15px;
  color: var(--dark);
  display: flex;
  align-items: center;
}

.dettaglio-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.8;
}

/* --- Lista Dettaglio --- */
.dettaglio-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.dettaglio-list li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.dettaglio-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* --- Box Esempio --- */
.dettaglio-example {
  background: #e8f4fd;
  border-radius: var(--radius);
  padding: 30px;
  margin: 25px 0;
  border-left: 4px solid var(--accent);
}

.dettaglio-example h4 {
  font-size: 1.1rem;
  color: var(--accent-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.dettaglio-example p {
  color: var(--text);
  margin-bottom: 10px;
}

.dettaglio-example ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dettaglio-example ul li {
  padding: 5px 0 5px 20px;
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
}

.dettaglio-example ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* --- Box Evidenza --- */
.dettaglio-highlight {
  background: #e8f4fd;
  border-radius: var(--radius);
  padding: 25px 30px;
  margin: 25px 0;
  border-left: 3px solid var(--accent);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.dettaglio-highlight > i {
  font-size: 1.8rem;
  color: var(--accent-dark);
  flex-shrink: 0;
  margin-top: 3px;
}

.dettaglio-highlight strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.dettaglio-highlight p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* --- Tabella Dettaglio --- */
.dettaglio-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.9rem;
}

.dettaglio-table th,
.dettaglio-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dettaglio-table th {
  background: rgba(30, 136, 229, 0.08);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dettaglio-table td {
  color: var(--text);
}

.dettaglio-table tbody tr:hover {
  background: rgba(30, 136, 229, 0.03);
}

/* --- Sidebar --- */
.dettaglio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}

.sidebar-card h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-card h4 i {
  color: var(--primary);
}

.sidebar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--light-gray);
}

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

.sidebar-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.sidebar-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  text-align: right;
}

/* --- Sidebar CTA --- */
.sidebar-cta {
  background: var(--dark);
  color: var(--white);
  border-top-color: var(--accent);
}

.sidebar-cta h4 {
  color: var(--white);
}

.sidebar-cta h4 i {
  color: var(--accent);
}

.sidebar-cta p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* --- Sidebar Links --- */
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--light-gray);
  transition: var(--transition);
}

.sidebar-links a:last-child {
  border-bottom: none;
}

.sidebar-links a i {
  color: var(--primary);
  font-size: 0.7rem;
  transition: var(--transition);
}

.sidebar-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.sidebar-links a:hover i {
  transform: translateX(3px);
}

/* --- Responsive Dettaglio --- */
@media (max-width: 968px) {
  .dettaglio-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .dettaglio-sidebar {
    position: static;
  }

  .dettaglio-content h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  }

  .dettaglio-highlight {
    flex-direction: column;
    gap: 12px;
  }

  .sidebar-links a {
    min-height: 48px; /* WCAG touch target */
    padding: 12px 0;
  }
}

@media (max-width: 600px) {
  .dettaglio-example {
    padding: 20px 16px;
  }

  .dettaglio-highlight {
    padding: 20px 16px;
  }

  .sidebar-card {
    padding: 22px 16px;
  }

  .dettaglio-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dettaglio-table th,
  .dettaglio-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .dettaglio-content h3 {
    font-size: 1.1rem;
  }

  .dettaglio-content p {
    font-size: 0.9rem;
  }

  .dettaglio-list li {
    font-size: 0.9rem;
  }

  .sidebar-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .sidebar-value {
    text-align: left;
  }
}

/* --- Agevolazione Body (contenuto TinyMCE) --- */
.agevolazione-body h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--dark);
  line-height: 1.3;
}

.agevolazione-body h3 {
  font-size: 1.2rem;
  margin: 30px 0 15px;
  color: var(--dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--light-gray);
}

.agevolazione-body h4 {
  font-size: 1.05rem;
  margin: 20px 0 10px;
  color: var(--accent-dark);
}

.agevolazione-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 15px;
  line-height: 1.8;
}

.agevolazione-body ul,
.agevolazione-body ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.agevolazione-body ul li,
.agevolazione-body ol li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.agevolazione-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.agevolazione-body ol {
  counter-reset: ol-counter;
}

.agevolazione-body ol li::before {
  counter-increment: ol-counter;
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agevolazione-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0 25px;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.agevolazione-body table th,
.agevolazione-body table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.agevolazione-body table th {
  background: rgba(30, 136, 229, 0.08);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agevolazione-body table td {
  color: var(--text);
}

.agevolazione-body table tbody tr:hover {
  background: rgba(30, 136, 229, 0.03);
}

.agevolazione-body blockquote {
  background: #e8f4fd;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 25px 30px;
  margin: 25px 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.agevolazione-body blockquote strong {
  color: var(--primary-dark);
  display: block;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.agevolazione-body strong {
  color: var(--dark);
}

/* Hover card agevolazioni */
.agevolazione-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  border-color: var(--blue);
}

@media (max-width: 768px) {
  .agevolazione-body h2 {
    font-size: 1.4rem;
  }
  .agevolazione-body h3 {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Utility Classi Responsive per Layout Inline
   ========================================================================== */

/* --- Layout a griglia che stackano su mobile --- */
.grid-2col-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.grid-2col-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.grid-2col-spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-auto-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.grid-process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

/* --- Kit dettaglio layout --- */
.kit-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* --- Flex utilities --- */
.flex-bar-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.flex-center-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Card paddings --- */
.card-padded {
  padding: 30px;
}

.process-step {
  text-align: center;
  padding: 30px;
}

.process-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.3rem;
  font-weight: 800;
}

/* --- Paginazione blog --- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* --- Blog article nav --- */
.article-nav {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Compare table wrapper --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Mobile Overrides per utility classi ===== */
@media (max-width: 768px) {
  .grid-2col-form {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .grid-2col-fields {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .grid-2col-spec {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .grid-auto-cards {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .grid-process {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .kit-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .card-padded {
    padding: 20px 16px !important;
  }

  .process-step {
    padding: 20px 16px !important;
  }

  .process-number {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.1rem !important;
  }

  .article-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .article-nav .btn {
    text-align: center;
    justify-content: center;
  }

  /* Fix agevolazioni inline grid override */
  .agevolazioni-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Kit dettaglio testi */
  .kit-detail-grid .kit-title-main {
    font-size: clamp(1.3rem, 4vw, 1.8rem) !important;
  }

  .kit-detail-grid .kit-price-main {
    font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
  }

  /* Contatti / Preventivo sidebar box */
  .sidebar-box-contact {
    padding: 20px 16px !important;
  }

  /* Zone cards padding */
  .zone-card {
    padding: 20px 16px !important;
  }

  .zone-icon {
    width: 44px !important;
    height: 44px !important;
    font-size: 1rem !important;
  }

  /* Social touch targets */
  .social-icon-circle {
    width: 44px !important;
    height: 44px !important;
  }

  /* Filter buttons mobile */
  .filter-btn {
    min-height: 44px;
    padding: 10px 16px !important;
  }

  /* Agevolazione card body */
  .agevolazione-card-body {
    padding: 22px 16px !important;
  }

  /* Kit page blocks */
  .kit-detail-block {
    padding: 22px 16px !important;
  }

  /* Riepilogo row wrap */
  .riepilogo-row {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* FAQ summary */
  .faq-summary {
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
  }

  .faq-content {
    padding: 0 16px 16px !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .grid-auto-cards {
    gap: 12px !important;
  }

  .card-padded {
    padding: 16px 12px !important;
  }

  .process-step {
    padding: 16px 12px !important;
  }

  .blog-pagination {
    gap: 4px;
  }
}

/* ==========================================================================
   Override definitivo homepage compatta
   ========================================================================== */
.top-bar {
  padding: 4px 0 !important;
  font-size: 0.78rem !important;
}

.top-bar-social a {
  width: 30px !important;
  height: 30px !important;
}

.header .container {
  min-height: 62px !important;
}

.logo-img {
  height: 38px !important;
}

.nav-menu a,
.nav-dropdown > .nav-dropdown-toggle {
  padding: 18px 12px !important;
  font-size: 0.9rem !important;
}

.header-cta {
  min-height: 40px !important;
  padding: 9px 20px !important;
  font-size: 0.84rem !important;
}

.hero {
  min-height: auto !important;
  padding: 42px 0 40px !important;
  color: var(--text) !important;
  background:
    radial-gradient(circle at 88% 16%, rgba(30, 136, 229, 0.10), transparent 25%),
    radial-gradient(circle at 8% 80%, rgba(255, 214, 0, 0.12), transparent 22%),
    linear-gradient(115deg, #f8fbff 0%, #ffffff 50%, #eaf6ff 100%) !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.7) !important;
}

.hero::before,
.hero::after {
  display: none !important;
}

.hero .container {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr) !important;
  gap: clamp(28px, 4vw, 56px) !important;
  align-items: center !important;
}

.hero-content .label {
  padding: 6px 14px !important;
  margin-bottom: 16px !important;
  background: rgba(30, 136, 229, 0.08) !important;
  color: var(--primary-dark) !important;
  border-color: rgba(30, 136, 229, 0.18) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.08em !important;
}

.hero h1 {
  max-width: 620px !important;
  margin-bottom: 16px !important;
  color: var(--dark) !important;
  font-size: clamp(2rem, 3vw, 3.15rem) !important;
  line-height: 1.08 !important;
  text-shadow: none !important;
}

.hero h1 span {
  color: var(--primary) !important;
}

.hero p {
  max-width: 590px !important;
  margin-bottom: 22px !important;
  color: var(--text-light) !important;
  font-size: clamp(0.98rem, 1.1vw, 1.08rem) !important;
  line-height: 1.62 !important;
  opacity: 1 !important;
}

.hero-buttons {
  gap: 12px !important;
}

.hero-buttons .btn {
  min-height: 46px !important;
  padding: 12px 24px !important;
  border-radius: 14px !important;
  font-size: 0.88rem !important;
}

.hero .btn-outline {
  color: var(--primary-dark) !important;
  border-color: rgba(30, 136, 229, 0.32) !important;
  background: rgba(255,255,255,0.88) !important;
}

.hero-visual .placeholder-img {
  max-width: 460px !important;
  aspect-ratio: 16 / 11 !important;
  border-radius: 18px !important;
  border: 1px solid rgba(203, 213, 225, 0.9) !important;
  box-shadow: 0 18px 42px rgba(26, 39, 68, 0.16) !important;
}

.hero-visual .placeholder-img img {
  border-radius: 15px !important;
}

.hero-highlights {
  margin-top: 18px !important;
  gap: 8px !important;
}

.hero-highlights span {
  min-height: 34px !important;
  padding: 7px 12px !important;
  color: var(--text) !important;
  background: var(--white) !important;
  border-color: rgba(203, 213, 225, 0.9) !important;
  box-shadow: 0 6px 18px rgba(26, 39, 68, 0.06) !important;
  font-size: 0.8rem !important;
}

.hero-highlights i {
  color: var(--primary) !important;
}

.stats-bar {
  padding: 18px 0 18px !important;
  margin: 0 !important;
  background: var(--white) !important;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.stats-grid .stat-item {
  min-height: 74px !important;
  padding: 13px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: left !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(26, 39, 68, 0.06) !important;
}

.stat-item .number {
  font-size: clamp(1.32rem, 1.75vw, 1.9rem) !important;
  line-height: 1.05 !important;
}

.stats-grid .stat-item:last-child .number {
  font-size: clamp(1.05rem, 1.28vw, 1.32rem) !important;
}

.stat-item .text {
  font-size: 0.82rem !important;
  line-height: 1.3 !important;
}

.services-section {
  padding-top: 38px !important;
}

.services-section .section-title {
  margin-bottom: 28px !important;
}

.section-title h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.55rem) !important;
}

@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr !important;
  }

  .hero-visual .placeholder-img {
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 32px 0 36px !important;
  }

  .hero .container {
    text-align: center !important;
  }

  .hero-visual {
    display: none !important;
  }

  .hero-buttons,
  .hero-highlights {
    justify-content: center !important;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-grid .stat-item {
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   Fix finale homepage - elimina vuoti eccessivi
   ========================================================================== */
.hero {
  padding-bottom: clamp(42px, 5vw, 60px) !important;
}

.stats-bar {
  padding: 22px 0 18px !important;
  margin: 0 !important;
  background: var(--white) !important;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.stats-grid .stat-item {
  min-height: 88px !important;
  padding: 16px 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  border-radius: 16px !important;
}

.stat-item .number {
  font-size: clamp(1.45rem, 1.95vw, 2.15rem) !important;
  line-height: 1.05 !important;
}

.stats-grid .stat-item:last-child .number {
  font-size: clamp(1.2rem, 1.45vw, 1.55rem) !important;
}

.stat-item .text {
  font-size: 0.88rem !important;
  line-height: 1.35 !important;
}

.services-section {
  padding-top: 46px !important;
}

.services-section .section-title {
  margin-bottom: 36px !important;
}

@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-grid .stat-item {
    justify-content: center !important;
    text-align: center !important;
  }
}

/* ==========================================================================
   Homepage Final Polish - ordine finale degli override
   ========================================================================== */
.hero {
  min-height: auto;
  color: var(--text);
  padding: clamp(44px, 5vw, 72px) 0 clamp(54px, 6vw, 82px);
  background:
    radial-gradient(circle at 85% 18%, rgba(30, 136, 229, 0.12), transparent 28%),
    radial-gradient(circle at 8% 78%, rgba(255, 214, 0, 0.16), transparent 24%),
    linear-gradient(115deg, #f7fbff 0%, #ffffff 48%, #e8f4fd 100%);
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

.hero::before,
.hero::after {
  display: none;
}

.hero .container {
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.78fr);
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}

.hero-content .label {
  background: rgba(30, 136, 229, 0.09);
  color: var(--primary-dark);
  border-color: rgba(30, 136, 229, 0.18);
  box-shadow: none;
}

.hero h1 {
  max-width: 680px;
  color: var(--dark);
  font-size: clamp(2.1rem, 3.35vw, 3.75rem);
  line-height: 1.08;
  text-shadow: none;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 620px;
  color: var(--text-light);
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  opacity: 1;
}

.hero .btn-outline {
  color: var(--primary-dark);
  border-color: rgba(30, 136, 229, 0.32);
  background: rgba(255,255,255,0.85);
}

.hero .btn-outline:hover {
  color: var(--white);
  border-color: var(--primary);
  background: var(--primary);
}

.hero-visual .placeholder-img {
  max-width: 570px;
  aspect-ratio: 16 / 11;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow: 0 24px 70px rgba(26, 39, 68, 0.18);
}

.hero-visual .placeholder-img img {
  border-radius: 18px;
}

.hero-highlights {
  margin-top: 24px;
}

.hero-highlights span {
  color: var(--text);
  background: var(--white);
  border-color: rgba(203, 213, 225, 0.92);
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.07);
}

.hero-highlights i {
  color: var(--primary);
}

.stats-bar {
  margin-top: 0;
  padding: 34px 0 64px;
  background: var(--white);
}

.stats-grid .stat-item {
  min-height: 118px;
  color: var(--text);
  background: var(--white);
  box-shadow: 0 12px 34px rgba(26, 39, 68, 0.08);
}

@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: flex;
  }

  .hero-visual .placeholder-img {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 36px 0 46px;
  }

  .hero .container {
    text-align: center;
  }

  .hero-visual {
    display: none;
  }

  .hero-buttons,
  .hero-highlights {
    justify-content: center;
  }

  .hero-highlights span {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Override reale finale homepage compatta
   ========================================================================== */
.hero {
  padding: 30px 0 28px !important;
}

.hero .container {
  gap: clamp(24px, 3.5vw, 46px) !important;
}

.hero-content .label {
  margin-bottom: 12px !important;
}

.hero h1 {
  max-width: 590px !important;
  margin-bottom: 12px !important;
  font-size: clamp(1.85rem, 2.55vw, 2.8rem) !important;
}

.hero p {
  max-width: 560px !important;
  margin-bottom: 18px !important;
  font-size: clamp(0.96rem, 1vw, 1.03rem) !important;
  line-height: 1.55 !important;
}

.hero-buttons .btn {
  min-height: 42px !important;
  padding: 10px 20px !important;
}

.hero-highlights {
  margin-top: 14px !important;
}

.hero-highlights span {
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 0.76rem !important;
}

.hero-visual .placeholder-img {
  max-width: 410px !important;
  box-shadow: 0 14px 34px rgba(26, 39, 68, 0.14) !important;
}

.stats-bar {
  padding: 10px 0 20px !important;
  margin: 0 !important;
}

.stats-grid {
  gap: 10px !important;
}

.stats-grid .stat-item {
  min-height: 58px !important;
  padding: 10px 13px !important;
  gap: 10px !important;
  border-radius: 12px !important;
}

.stat-item .number {
  font-size: clamp(1.14rem, 1.45vw, 1.55rem) !important;
}

.stats-grid .stat-item:last-child .number {
  font-size: clamp(0.98rem, 1.12vw, 1.14rem) !important;
}

.stat-item .text {
  font-size: 0.76rem !important;
}

.services-section {
  padding-top: 28px !important;
}

@media (max-width: 768px) {
  .hero {
    padding: 26px 0 28px !important;
  }
}

/* ==========================================================================
   Hero v112 — restyle premium con blob, trust e floating cards
   ========================================================================== */
.hero {
  position: relative !important;
  overflow: visible !important;
  isolation: isolate !important;
  background:
    radial-gradient(1100px 520px at 92% -10%, rgba(255, 196, 0, 0.18), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(0, 102, 204, 0.16), transparent 65%),
    linear-gradient(135deg, #f4f9ff 0%, #eaf3fd 60%, #f7fbff 100%) !important;
  border-bottom: 1px solid rgba(0, 102, 204, 0.08) !important;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 204, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 204, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  animation: heroFloat 14s ease-in-out infinite;
}

.hero-blob--1 {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(255, 196, 0, 0.55), rgba(255, 196, 0, 0));
}

.hero-blob--2 {
  width: 320px;
  height: 320px;
  bottom: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.45), rgba(0, 102, 204, 0));
  animation-delay: -6s;
}

@keyframes heroFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(20px, -18px, 0) scale(1.06); }
}

.hero-content .label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 6px 14px !important;
  background: rgba(0, 102, 204, 0.08) !important;
  color: #0066cc !important;
  border: 1px solid rgba(0, 102, 204, 0.18) !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.74rem !important;
}

.hero-content .label i { color: #ffc400; }

.hero h1 {
  letter-spacing: -0.01em !important;
  line-height: 1.12 !important;
}

.hero h1 span {
  background: linear-gradient(120deg, #0066cc 0%, #29a4ff 60%, #ffc400 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.hero h1 span::after {
  display: none !important;
}

.hero-buttons .btn-primary {
  background: linear-gradient(135deg, #0066cc 0%, #1e88f0 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(0, 102, 204, 0.28) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.hero-buttons .btn-primary:hover {
  background: linear-gradient(135deg, #0057b0 0%, #1577d6 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 102, 204, 0.34) !important;
}

.hero-buttons .btn-outline {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.hero-trust__rating {
  display: inline-flex;
  gap: 2px;
  color: #ffc400;
  font-size: 0.95rem;
  filter: drop-shadow(0 2px 4px rgba(255, 196, 0, 0.4));
}

.hero-trust__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 0.82rem;
  color: #1a2744;
}

.hero-trust__text strong { font-weight: 700; }
.hero-trust__text span { color: #5a6478; font-size: 0.76rem; }

.hero-visual {
  position: relative;
}

.hero-visual .placeholder-img {
  position: relative;
  border-radius: 26px !important;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(26, 39, 68, 0.35),
    0 18px 36px -18px rgba(0, 102, 204, 0.25) !important;
  transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.hero-visual .placeholder-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 30, 70, 0.18) 100%);
  pointer-events: none;
}

.hero-visual:hover .placeholder-img {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}

.hero-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 18px 40px -12px rgba(26, 39, 68, 0.25),
    0 4px 12px rgba(26, 39, 68, 0.08);
  z-index: 3;
  animation: heroCardFloat 5s ease-in-out infinite;
  max-width: 220px;
}

.hero-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0066cc 0%, #1e88f0 100%);
  color: #fff;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.hero-card__icon--accent {
  background: linear-gradient(135deg, #ffc400 0%, #ff9800 100%);
}

.hero-card__body {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hero-card__body strong {
  font-size: 0.86rem;
  color: #1a2744;
  font-weight: 700;
}

.hero-card__body span {
  font-size: 0.72rem;
  color: #5a6478;
}

.hero-card--energy {
  top: 18px;
  left: -18px;
}

.hero-card--guarantee {
  bottom: 22px;
  right: -14px;
  animation-delay: -2.5s;
}

@keyframes heroCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 992px) {
  .hero-card { display: none; }
  .hero-visual .placeholder-img { transform: none; }
}

@media (max-width: 768px) {
  .hero-blob--1 { width: 220px; height: 220px; }
  .hero-blob--2 { width: 200px; height: 200px; }
  .hero-trust { justify-content: flex-start; }
  .hero::before { background-size: 32px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob,
  .hero-card,
  .hero-visual .placeholder-img { animation: none !important; transition: none !important; transform: none !important; }
}

/* ==========================================================================
   Mobile Optimization Pass v115 - UX touch, filtri scrollabili, anti-zoom iOS
   ========================================================================== */

/* Filtri portfolio: stile base + scroll orizzontale fluido su mobile */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.portfolio-filters .filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--blue, var(--primary));
  background: transparent;
  color: var(--blue, var(--primary));
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.portfolio-filters .filter-btn:hover {
  background: rgba(30, 136, 229, 0.08);
}
.portfolio-filters .filter-btn.active {
  background: var(--blue, var(--primary));
  color: #fff;
}

@media (max-width: 768px) {
  .portfolio-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    padding: 4px 16px 12px;
    margin-left: -16px;
    margin-right: -16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .portfolio-filters::-webkit-scrollbar { display: none; }
  .portfolio-filters .filter-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    min-height: 44px;
    padding: 10px 18px;
  }
}

/* Anti-zoom iOS: input/select/textarea devono avere font-size >= 16px */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  input[type="url"],
  input[type="date"],
  select,
  textarea,
  .form-control {
    font-size: 16px !important;
  }
}

/* Touch device: forza overlay portfolio sempre visibile (no hover su mobile) */
@media (hover: none), (max-width: 768px) {
  .portfolio-card .overlay {
    opacity: 1;
    transform: translateY(0);
  }
  .portfolio-card .card-img::after,
  .blog-card .card-img::after,
  .gallery-item::after {
    opacity: 0.85;
  }
}

/* Filtri portfolio: scroll orizzontale fluido su mobile, touch target 44px */
@media (max-width: 768px) {
  .filter-btn,
  [class*="filter-btn"] {
    min-height: 44px !important;
    padding: 10px 18px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
    flex-shrink: 0;
    touch-action: manipulation;
  }

  /* Container filtri con scroll orizzontale fluido */
  .portfolio-grid + script ~ *,
  div[style*="display:flex"][style*="justify-content:center"] {
    -webkit-overflow-scrolling: touch;
  }
}

/* CTA full width su mobile */
@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  .cta-banner .btn,
  .section .btn {
    min-height: 48px;
  }
  .header-cta {
    display: none;
  }
}

/* Iframe e immagini sempre fluide */
@media (max-width: 768px) {
  iframe,
  embed,
  object,
  video {
    max-width: 100% !important;
    height: auto;
  }
  iframe[src*="google.com/maps"],
  iframe[src*="maps.google"] {
    height: 280px;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Touch targets: link e bottoni minimo 44px (WCAG 2.5.8) */
@media (max-width: 768px) {
  .btn,
  button,
  .footer-links a,
  .pagination a {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Spaziatura tra link footer per evitare tap accidentali */
  .footer-links li {
    margin-bottom: 4px;
  }
}

/* Tipografia mobile: line-height più ariosa, no overflow orizzontale */
@media (max-width: 768px) {
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip; /* clip non rompe position:fixed come hidden */
  }
  h1 { word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
  h2 { word-wrap: break-word; overflow-wrap: break-word; }
  p, li { line-height: 1.65; }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Sezioni: padding ridotto su mobile per più contenuto visibile */
@media (max-width: 480px) {
  .section {
    padding: 48px 0;
  }
  .section-title {
    margin-bottom: 28px;
  }
  .section-title h2 {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }
}

/* Card body: padding ridotto su small mobile */
@media (max-width: 480px) {
  .portfolio-card .card-body,
  .blog-card .card-body,
  .service-card,
  .kit-card .kit-body {
    padding: 18px;
  }
  .portfolio-card h3,
  .blog-card h3 {
    font-size: 1.1rem;
  }
}

/* Form: spacing migliorato e bottoni full-width */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 18px;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0;
  }
  form .btn[type="submit"],
  .preventivo-form .btn,
  .contact-form .btn {
    width: 100%;
    min-height: 52px;
  }
}

/* Gallery: 2 colonne su mobile, 1 su small */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
@media (max-width: 380px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Page header: padding ridotto su mobile */
@media (max-width: 768px) {
  .page-header {
    padding: 48px 0 32px;
  }
  .page-header h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }
  .breadcrumb {
    font-size: 0.85rem;
  }
}

/* Hamburger: assicura touch target adeguato */
@media (max-width: 768px) {
  .hamburger {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
  }
}

/* Safe area (iPhone notch / home bar) */
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    .header {
      padding-top: env(safe-area-inset-top);
    }
    .footer {
      padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
  }
}

/* ==========================================================================
   Mobile Optimization Pass v116 - Site-wide refinements
   ========================================================================== */

/* === Compare table (impianti.php): scroll orizzontale fluido su mobile === */
.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  background: #fff;
}
.compare-table {
  min-width: 640px;
  width: 100%;
  border-collapse: collapse;
}
.compare-table th,
.compare-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 0.92rem;
}
.compare-table th {
  background: var(--light-bg, #f7fafc);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
@media (max-width: 768px) {
  .compare-table {
    font-size: 0.85rem;
  }
  .compare-table th,
  .compare-table td {
    padding: 10px 8px;
  }
}

/* === Form input full responsive (sostituisce inline styles) === */
.form-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="url"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text, #1a1a1a);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary, #1e88e5);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}
textarea {
  resize: vertical;
  min-height: 120px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text, #1a1a1a);
}

/* === Contatti: info card responsive === */
.contact-info-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 992px) {
  .contact-info-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .contact-info-4col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* === Sidebar (kit-dettaglio, blog-dettaglio, portfolio-dettaglio, agevolazione-dettaglio) === */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 40px;
}
@media (max-width: 992px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .detail-sidebar {
    position: static !important;
    order: 2;
  }
}

/* === Kit cards: assicura altezza coerente e bottoni in basso === */
.kit-card {
  display: flex;
  flex-direction: column;
}
.kit-card .kit-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.kit-card .kit-body > .btn:last-child,
.kit-card .kit-body > a.btn:last-child {
  margin-top: auto;
}

/* === Tabs touch-friendly (kit-dettaglio) === */
@media (max-width: 768px) {
  .tabs,
  .tab-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
  }
  .tabs::-webkit-scrollbar,
  .tab-buttons::-webkit-scrollbar { display: none; }
  .tab-btn,
  .tabs button,
  .tab-buttons button {
    flex-shrink: 0;
    min-height: 44px;
    white-space: nowrap;
  }
}

/* === Breadcrumb: wrap e ridotto su mobile === */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.8rem;
  }
}

/* === Cards: ombra ridotta su mobile per performance === */
@media (max-width: 768px) {
  .service-card,
  .kit-card,
  .portfolio-card,
  .blog-card,
  .stat-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
  .service-card:hover,
  .kit-card:hover,
  .portfolio-card:hover,
  .blog-card:hover {
    transform: none !important;
  }
}

/* === Disabilita animazioni costose su mobile === */
@media (max-width: 768px) {
  .hero::before,
  .hero::after,
  .hero-blob {
    animation-duration: 30s !important;
  }
}

/* === Footer mobile: layout pulito === */
@media (max-width: 768px) {
  .footer {
    text-align: left;
    padding: 40px 0 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  .footer h3,
  .footer h4 {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  .footer-links a {
    padding: 6px 0;
    display: inline-flex;
    align-items: center;
  }
  .footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
  }
}

/* === CTA banner mobile === */
@media (max-width: 768px) {
  .cta-banner {
    padding: 48px 0;
    text-align: center;
  }
  .cta-banner h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 14px;
  }
  .cta-banner p {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  .cta-banner .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* === Section blue (varianti) === */
@media (max-width: 768px) {
  .section.section-blue,
  .section.section-light {
    padding: 48px 0;
  }
}

/* === Blog dettaglio mobile === */
@media (max-width: 768px) {
  .blog-content,
  .article-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  .blog-content h2,
  .article-content h2 {
    font-size: 1.4rem;
    margin-top: 28px;
    margin-bottom: 12px;
  }
  .blog-content h3,
  .article-content h3 {
    font-size: 1.2rem;
  }
  .blog-content img,
  .article-content img {
    margin: 16px 0;
    border-radius: 8px;
  }
  .blog-meta {
    font-size: 0.85rem;
    flex-wrap: wrap;
  }
}

/* === Kit dettaglio: prezzo e features mobile === */
@media (max-width: 768px) {
  .kit-price-big,
  .price-large {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }
  .kit-features li,
  .features-list li {
    padding: 8px 0;
    font-size: 0.95rem;
  }
}

/* === Page header mobile padding === */
@media (max-width: 480px) {
  .page-header {
    padding: 36px 0 24px;
  }
  .page-header h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    margin-bottom: 8px;
  }
}

/* === Top bar: nascosta sotto 992px (era 768) per più spazio === */
@media (max-width: 992px) {
  .top-bar {
    display: none;
  }
}

/* === Sticky header su mobile per accesso rapido === */
@media (max-width: 992px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background: var(--white, #fff);
  }
}

/* === Tap highlight personalizzato (no flash blu brutto su iOS) === */
a, button, [role="button"] {
  -webkit-tap-highlight-color: rgba(30, 136, 229, 0.18);
}

/* === Print friendly === */
@media print {
  .header, .footer, .top-bar, .nav-menu, .hamburger,
  .cta-banner, .header-cta, .filter-btn, .portfolio-filters {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* === Focus visibile per accessibilità (WCAG 2.4.7) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary, #1e88e5);
  outline-offset: 2px;
  border-radius: 4px;
}

/* === Skip link visibile al focus === */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--primary, #1e88e5);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* === Autarc Check iframe (preventivo.php) === */
.autarc-check-wrap {
  width: 100%;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.autarc-check-wrap iframe {
  display: block;
  width: 100%;
}
@media (max-width: 768px) {
  .autarc-check-wrap iframe {
    min-height: 32rem;
  }
}
