/* ==========================================================================
   3C SCAVI S.r.l.s. - Uniform Earth & Road Geological Stylesheet
   Design integrato: Asfalto stradale & Stratigrafia continua color terra
   ========================================================================== */

:root {
  /* Brand Core */
  --c-brand-blue: #003BD5;
  --c-brand-indigo: #2806A3;
  --c-brand-yellow: #F59E0B;
  --c-brand-yellow-light: #FBBF24;
  --c-brand-orange: #EA580C;

  /* Geological Earth & Road Strata Palette */
  --c-asphalt-dark: #1C1714;
  --c-asphalt-main: #27201C;
  --c-asphalt-binder: #342B25;
  --c-curb-stone: #8E8275;
  --c-curb-concrete: #B5A898;

  --c-strata-gravel: #4A4235;
  --c-strata-sand: #786144;
  --c-strata-sand-gold: #967954;
  --c-strata-clay: #56331C;
  --c-strata-clay-dark: #3F2312;
  --c-strata-tuff: #472D1E;
  --c-strata-rock: #25201C;
  --c-strata-bedrock: #14110F;

  /* Integrated Earth Theme Colors */
  --c-bg-earth: #382417;
  --c-bg-earth-dark: #24160E;
  --c-bg-card-earth: rgba(50, 31, 20, 0.82);
  --c-border-earth: rgba(245, 158, 11, 0.28);
  --c-border-earth-subtle: rgba(255, 235, 205, 0.12);

  /* Typography & Highlights */
  --c-text-main: #FDF9F3;
  --c-text-muted: #D6C7B7;
  --c-text-dim: #A69584;
  --c-text-accent: #FBBF24;

  /* Pipe & Utility Signatures */
  --c-pipe-fiber: #F97316;
  --c-pipe-electric: #EF4444;
  --c-pipe-water: #0EA5E9;
  --c-pipe-gas: #FACC15;
  --c-pipe-sewer: #84CC16;

  /* Fonts & Radius */
  --font-heading: 'Outfit', 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --max-w: 1320px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-earth: 0 12px 32px rgba(18, 10, 5, 0.6);
  --shadow-glow-yellow: 0 0 25px rgba(245, 158, 11, 0.35);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--c-asphalt-dark);
  color: var(--c-text-main);
  font-family: var(--font-body);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Seamless Geological Ground Gradient from Surface to Deep Core */
  background: 
    linear-gradient(
      180deg,
      var(--c-asphalt-dark) 0px,
      var(--c-asphalt-main) 120px,
      var(--c-asphalt-binder) 260px,
      var(--c-strata-gravel) 650px,
      var(--c-strata-sand) 1200px,
      var(--c-strata-clay) 2000px,
      var(--c-strata-clay-dark) 3200px,
      var(--c-strata-tuff) 4400px,
      var(--c-strata-rock) 5600px,
      var(--c-strata-bedrock) 100%
    );
  background-attachment: scroll;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--c-text-main);
  font-weight: 800;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   ROADWAY SURFACE HEADER (Asfalto integrato in cima)
   ========================================================================== */
.header-topbar {
  background: #14171E;
  border-bottom: 2px solid rgba(245, 158, 11, 0.35);
  font-size: 0.8rem;
  color: var(--c-text-muted);
  padding: 0.4rem 0;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-items {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.topbar-item i {
  color: var(--c-brand-yellow);
}

/* Site Header (Integrated into the Asphalt Road) */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 29, 36, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--c-curb-stone);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 0.85rem 0;
}

/* White Road Lane Dash under navbar */
.site-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    #FFF,
    #FFF 40px,
    transparent 40px,
    transparent 70px
  );
  opacity: 0.75;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

/* High-Contrast Plate for Blue Logo */
.brand-logo-plate {
  background: #FFFFFF;
  padding: 6px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.brand-logo-plate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
  border-color: var(--c-brand-yellow);
}

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

.footer-brand-plate {
  background: #FFFFFF;
  padding: 8px 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  margin-bottom: 1.25rem;
  max-width: 260px;
}

.footer-brand-plate .footer-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FFF;
  line-height: 1.1;
}

.brand-title span {
  color: var(--c-brand-yellow);
}

.brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-text-muted);
  font-weight: 700;
}

/* Nav Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text-muted);
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--c-brand-yellow);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-link:hover,
.nav-link.active {
  color: #FFF;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.audio-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--c-text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audio-toggle-btn:hover,
.audio-toggle-btn.active {
  background: var(--c-brand-yellow);
  color: #0F172A;
  border-color: var(--c-brand-yellow);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   BUTTONS & BADGES (Earth & High-Vis Accents)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-brand-yellow), var(--c-brand-orange));
  color: #1A120B;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.6);
  color: #000;
}

.btn-blue {
  background: linear-gradient(135deg, var(--c-brand-blue), var(--c-brand-indigo));
  color: #FFF;
  box-shadow: 0 4px 18px rgba(0, 59, 213, 0.4);
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 59, 213, 0.6);
  color: #FFF;
}

.btn-outline {
  background: rgba(30, 20, 13, 0.6);
  border: 1px solid var(--c-border-earth);
  color: var(--c-text-main);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--c-brand-yellow);
  color: var(--c-brand-yellow-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--c-brand-yellow-light);
}

.badge-blue {
  background: rgba(0, 59, 213, 0.25);
  border: 1px solid rgba(0, 59, 213, 0.5);
  color: #93C5FD;
}

.badge-green {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6EE7B7;
}

/* ==========================================================================
   GEOLOGICAL DEPTH SEPARATORS & MARKERS
   ========================================================================== */
.geotech-strata-marker {
  position: relative;
  width: 100%;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem 0;
  z-index: 5;
}

.strata-line-left, .strata-line-right {
  flex-grow: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-border-earth), transparent);
}

.strata-marker-pill {
  background: rgba(36, 22, 14, 0.95);
  border: 1px solid var(--c-brand-yellow);
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--c-brand-yellow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   EARTH-INTEGRATED CARDS & CONTAINERS
   ========================================================================== */
.card-feature {
  background: var(--c-bg-card-earth);
  border: 1px solid var(--c-border-earth);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-earth);
}

.card-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--c-brand-yellow), var(--c-brand-orange));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card-feature:hover {
  transform: translateY(-6px);
  border-color: var(--c-brand-yellow);
  background: var(--c-earth-card-hover);
  box-shadow: var(--shadow-earth), var(--shadow-glow-yellow);
}

.card-feature:hover::before {
  opacity: 1;
}

.card-icon {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid var(--c-border-earth);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-brand-yellow);
  font-size: 1.7rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition-normal);
}

.card-feature:hover .card-icon {
  background: var(--c-brand-yellow);
  color: #1A120B;
  transform: scale(1.08);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: #FFF;
}

.card-desc {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-brand-yellow);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: #FFF;
}

.section-subtitle {
  font-size: 1.12rem;
  color: var(--c-text-muted);
  line-height: 1.65;
}

/* Stats Bar */
.stats-bar {
  background: rgba(36, 22, 14, 0.85);
  border-top: 2px solid var(--c-border-earth);
  border-bottom: 2px solid var(--c-border-earth);
  padding: 3.5rem 0;
  position: relative;
  backdrop-filter: blur(10px);
}

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

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--c-border-earth);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 3.8vw, 3.4rem);
  font-weight: 900;
  color: var(--c-brand-yellow);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-number .unit {
  font-size: 1.5rem;
  color: #FFF;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Calculator Widget in Earth Theme */
.calc-widget {
  background: linear-gradient(145deg, rgba(58, 36, 23, 0.9), rgba(36, 22, 14, 0.95));
  border: 1px solid var(--c-border-earth);
  border-radius: var(--radius-xl);
  padding: 2.75rem;
  box-shadow: var(--shadow-earth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.75rem;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calc-input, .calc-select {
  background: rgba(20, 12, 7, 0.85);
  border: 1px solid var(--c-border-earth);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  color: #FFF;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.calc-input:focus, .calc-select:focus {
  outline: none;
  border-color: var(--c-brand-yellow);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.calc-result-box {
  background: rgba(20, 12, 7, 0.9);
  border: 1px dashed var(--c-brand-yellow);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.calc-result-val {
  font-weight: 800;
  color: var(--c-brand-yellow);
}

/* Fleet Cards */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.fleet-card {
  background: var(--c-bg-card-earth);
  border: 1px solid var(--c-border-earth);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-earth);
}

.fleet-card:hover {
  transform: translateY(-6px);
  border-color: var(--c-brand-yellow);
  box-shadow: var(--shadow-earth), var(--shadow-glow-yellow);
}

.fleet-media {
  height: 220px;
  background: #1B120B;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--c-border-earth);
}

.fleet-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.fleet-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 1rem;
  background: rgba(20, 12, 7, 0.7);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fleet-spec-item {
  display: flex;
  flex-direction: column;
}

.fleet-spec-item span:first-child {
  color: var(--c-text-dim);
  font-size: 0.72rem;
}

.fleet-spec-item span:last-child {
  font-weight: 700;
  color: #FFF;
}

/* CTA Banner (Deep Earth Rock) */
.cta-banner {
  background: linear-gradient(135deg, rgba(62, 38, 24, 0.95), rgba(30, 18, 11, 0.98));
  border: 2px solid var(--c-brand-yellow);
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-earth);
  margin: 5rem auto;
}

.cta-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.cta-desc {
  font-size: 1.1rem;
  color: var(--c-text-muted);
}

/* Footer (Substrato Roccioso) */
.site-footer {
  background: var(--c-strata-bedrock);
  border-top: 3px solid var(--c-border-earth);
  color: var(--c-text-muted);
  font-size: 0.9rem;
  padding-top: 4.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col-brand p {
  line-height: 1.65;
  margin-bottom: 1.5rem;
  color: var(--c-text-muted);
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--c-border-earth);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-main);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--c-brand-yellow);
  color: #1A120B;
  border-color: var(--c-brand-yellow);
  transform: translateY(-3px);
}

.footer-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 25px;
  height: 2px;
  background: var(--c-brand-yellow);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a:hover {
  color: var(--c-brand-yellow);
  padding-left: 4px;
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-contact-item i {
  color: var(--c-brand-yellow);
  margin-top: 0.2rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 0;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(26, 17, 12, 0.96);
  border: 1px solid var(--c-brand-yellow);
  color: #FFF;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slideInRight 0.3s forwards;
  font-size: 0.82rem;
  font-weight: 700;
  max-width: 380px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 9, 6, 0.88);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: #2A1A10;
  border: 1px solid var(--c-brand-yellow);
  border-radius: var(--radius-xl);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-earth);
  transform: scale(0.92);
  transition: transform var(--transition-normal);
  position: relative;
}

.modal-overlay.active .modal-window {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  background: #EF4444;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2)::after { display: none; }
}

@media (max-width: 768px) {
  .topbar-content { flex-direction: column; gap: 0.35rem; text-align: center; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1F150D;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 2px solid var(--c-brand-yellow);
    box-shadow: var(--shadow-earth);
    gap: 1rem;
  }
  .main-nav.open { display: flex; }
  .mobile-nav-toggle { display: block; }
  .header-actions .btn-primary { display: none; }
  .calc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item::after { display: none; }
}

/* ==========================================================================
   Site In-Development Notice Banner (Collaudo & Sviluppo)
   ========================================================================== */
.site-dev-notice-banner {
  background: linear-gradient(90deg, #78350F 0%, #92400E 50%, #B45309 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.4);
  color: #FEF3C7;
  font-size: 0.78rem;
  padding: 0.45rem 1rem;
  position: relative;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.site-dev-notice-banner.hidden {
  display: none !important;
}

.dev-notice-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dev-notice-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.4;
}

.dev-notice-text i {
  color: #FBBF24;
  font-size: 0.95rem;
  flex-shrink: 0;
  animation: pulseWarning 2s infinite ease-in-out;
}

@keyframes pulseWarning {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

.dev-notice-close {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(254, 243, 199, 0.25);
  color: #FEF3C7;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.dev-notice-close:hover {
  background: rgba(0, 0, 0, 0.45);
  color: #FFF;
  border-color: #FEF3C7;
}

/* ==========================================================================
   Cookie Consent Banner (Solo Cookie Tecnici & Cloudflare)
   ========================================================================== */
.cookie-banner-wrap {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 880px;
  margin: 0 auto;
  z-index: 99999;
  background: rgba(22, 14, 9, 0.97);
  border: 1px solid var(--c-brand-yellow);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 15px rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(16px);
  padding: 1.5rem 1.75rem;
  color: var(--c-text-main);
  animation: cookieSlideUp 0.35s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner-wrap.cookie-hidden {
  opacity: 0;
  transform: translateY(25px);
  pointer-events: none;
}

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

.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cookie-banner-title i {
  color: var(--c-brand-yellow);
  font-size: 1.2rem;
}

.cookie-tech-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10B981;
  color: #34D399;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cookie-banner-body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--c-text-muted);
}

.cookie-banner-body strong {
  color: #FFF;
}

.cookie-banner-body code {
  background: rgba(255, 255, 255, 0.1);
  color: #FDE68A;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cookie-accept {
  background: var(--c-brand-yellow);
  color: #110A05;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cookie-accept:hover {
  background: #FBBF24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-cookie-info {
  background: transparent;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border-earth);
  font-size: 0.82rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-cookie-info:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .site-dev-notice-banner { font-size: 0.72rem; padding: 0.4rem 0.6rem; }
  .cookie-banner-wrap { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 1.15rem; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn-cookie-accept,
  .cookie-banner-actions .btn-cookie-info { width: 100%; justify-content: center; }
}
