/* ============================================================
   db Impianti — clean & simple
   Un solo font (Inter). Bianco + colori del logo.
   ============================================================ */

:root {
  --c-cyan: #00AEEF;
  --c-green: #1FA64C;
  --c-forest: #0E4225;
  --c-ink: #1a1a1a;
  --c-text: #2a2a2a;
  --c-muted: #6c6c6c;
  --c-line: #e5e5e5;
  --c-bg: #ffffff;
  --c-soft: #f6f7f9;
  --c-blue-soft: #f0f7fb;

  --pad: clamp(1rem, 4vw, 2rem);
  --gap: clamp(3rem, 6vw, 5rem);

  --r: 6px;
  --r-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; }

/* Typography — solo Inter, scala chiara */
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--c-ink); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
h4 { font-size: 1rem; }
p { margin: 0; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--c-muted); line-height: 1.55; }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-cyan);
  margin-bottom: 16px;
}

.wrap { width: min(1240px, 100% - var(--pad) * 2); margin: 0 auto; }
.section { padding: var(--gap) 0; }
.section-sm { padding: clamp(2rem, 4vw, 3rem) 0; }

/* Buttons — semplici */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--r);
  transition: background-color .2s, color .2s, border-color .2s;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--c-forest); color: #fff; }
.btn-primary:hover { background: var(--c-green); }
.btn-cyan { background: var(--c-cyan); color: #fff; }
.btn-cyan:hover { background: #0098cf; }
.btn-outline { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn-outline:hover { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.btn-light { background: #fff; color: var(--c-forest); border: 1px solid var(--c-line); }
.btn-light:hover { background: var(--c-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}
.nav-logo img { height: 64px; width: auto; }
@media (max-width: 600px) { .nav-logo img { height: 50px; } }
.nav-links { display: none; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--c-text);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav-links a:hover { color: var(--c-forest); }
.nav-links a.active { color: var(--c-forest); border-bottom-color: var(--c-cyan); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang { font-size: 13px; color: var(--c-muted); }
.lang a.active { color: var(--c-ink); font-weight: 500; }
.lang span { margin: 0 6px; color: var(--c-line); }
.menu-toggle {
  width: 40px; height: 40px;
  border: 1px solid var(--c-line); border-radius: var(--r);
  display: grid; place-items: center;
}
@media (min-width: 980px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: #fff;
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex; flex-direction: column;
  padding: 20px var(--pad);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--c-line); }
.mobile-menu .close { width: 40px; height: 40px; border: 1px solid var(--c-line); border-radius: var(--r); display: grid; place-items: center; }
.mobile-menu nav { margin-top: 20px; display: flex; flex-direction: column; }
.mobile-menu nav a { font-size: 18px; padding: 14px 0; border-bottom: 1px solid var(--c-line); }

/* Hero — clean, photo-led */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: center;
  background: var(--c-soft);
  overflow: hidden;
}
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.88) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 90px 0;
  max-width: 720px;
}
@media (min-width: 900px) {
  .hero .wrap {
    margin-left: clamp(100px, 18vw, 360px);
    margin-right: auto;
  }
}
@media (min-width: 768px) {
  .hero-img::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.92) 50%, rgba(255,255,255,0.2) 90%);
  }
}
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--c-forest); }
.hero .lead { margin-bottom: 32px; max-width: 56ch; color: var(--c-ink); font-weight: 400; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Page header (non-home) */
.page-head { padding: 60px 0 40px; border-bottom: 1px solid var(--c-line); }
.page-head .eyebrow { margin-bottom: 12px; }
.page-head h1 { max-width: 22ch; margin-bottom: 16px; }
.page-head .lead { max-width: 68ch; }
.breadcrumb {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--c-muted);
  margin-bottom: 24px;
}
.breadcrumb a:hover { color: var(--c-forest); }
.breadcrumb .sep { color: var(--c-line); }

/* Product grid (homepage / soluzioni) */
.prod-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .prod-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .prod-grid { grid-template-columns: repeat(4, 1fr); } }
.prod {
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  transition: border-color .2s, transform .2s;
  display: flex; flex-direction: column;
}
.prod:hover { border-color: var(--c-cyan); transform: translateY(-2px); }
.prod-img { aspect-ratio: 1/1; overflow: hidden; background: var(--c-soft); }
.prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.prod:hover .prod-img img { transform: scale(1.04); }
.prod-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.prod-body h3 { font-size: 17px; margin-bottom: 8px; }
.prod-body p { font-size: 14px; color: var(--c-muted); flex: 1; }
.prod-body .arrow { margin-top: 14px; font-size: 13px; color: var(--c-cyan); font-weight: 500; }

/* Two-column section */
.two-col {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col img { border-radius: var(--r-lg); width: 100%; height: 100%; object-fit: cover; }
.two-col img.img-contain, img.img-contain {
  object-fit: contain;
  background: #ffffff;
  padding: 24px;
  border: 1px solid var(--c-line);
}

/* Sectors list — text-based */
.sector-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--c-line);
}
@media (min-width: 700px) { .sector-list { grid-template-columns: 1fr 1fr; } }
.sector-item {
  border-bottom: 1px solid var(--c-line);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  align-items: start;
}
.sector-item:nth-child(odd):not(:last-child) { border-right: 1px solid var(--c-line); padding-right: 32px; }
.sector-item:nth-child(even) { padding-left: 32px; }
@media (max-width: 699px) {
  .sector-item:nth-child(odd):not(:last-child) { border-right: none; padding-right: 0; }
  .sector-item:nth-child(even) { padding-left: 0; }
}
.sector-num {
  font-size: 13px; color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}
.sector-item h3 { font-size: 17px; margin-bottom: 6px; }
.sector-item p { font-size: 14px; color: var(--c-muted); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat .num { font-size: clamp(2rem, 3.5vw, 2.8rem); color: var(--c-forest); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.stat .lab { font-size: 13px; color: var(--c-muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Process */
.process {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .process { grid-template-columns: repeat(4, 1fr); } }
.proc-step h4 { margin: 12px 0 6px; }
.proc-step p { font-size: 14px; color: var(--c-muted); }
.proc-num {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  color: var(--c-cyan);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-cyan);
}

/* Quote / testimonial */
.quote {
  text-align: center;
  padding: 40px 0;
}
.quote blockquote {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.4;
  color: var(--c-ink);
  max-width: 38ch;
  margin: 0 auto;
  font-weight: 400;
}
.quote cite {
  display: block;
  margin-top: 20px;
  font-size: 13px; color: var(--c-muted);
  font-style: normal;
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 13px; color: var(--c-muted); font-weight: 500; }
.field input, .field textarea, .field select {
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  background: #fff;
  font-size: 15px;
  color: var(--c-ink);
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-cyan);
}
.field textarea { min-height: 110px; resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--c-muted); }
.checkbox input { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* Configurator */
.cfg {
  background: var(--c-soft);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 36px);
}
.cfg-progress {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  margin-bottom: 28px;
}
.cfg-progress .step { height: 3px; background: var(--c-line); border-radius: 2px; }
.cfg-progress .step.active { background: var(--c-cyan); }
.cfg-progress .step.done { background: var(--c-forest); }
.cfg-step { display: none; }
.cfg-step.active { display: block; }
.cfg-step h2 { margin-bottom: 8px; }
.cfg-step .lead { margin-bottom: 28px; font-size: 15px; }
.cfg-options {
  display: grid; gap: 10px; margin-bottom: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .cfg-options { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cfg-options.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.cfg-options.cols-1 { grid-template-columns: 1fr !important; }
.cfg-opt {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: left;
  width: 100%;
  display: flex; align-items: center; gap: 14px;
}
.cfg-opt:hover { border-color: var(--c-cyan); }
.cfg-opt.selected { border-color: var(--c-forest); background: var(--c-blue-soft); }
.cfg-opt .opt-title { font-weight: 500; font-size: 15px; color: var(--c-ink); }
.cfg-opt .opt-desc { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.cfg-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--c-line); }
.cfg-counter { font-size: 13px; color: var(--c-muted); }
.cfg-summary {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 24px;
}
.cfg-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--c-line); }
.cfg-summary .row:last-child { border-bottom: none; }
.cfg-summary .row .k { color: var(--c-muted); }
.cfg-summary .row .v { color: var(--c-ink); font-weight: 500; }

/* Footer */
.site-footer { background: var(--c-ink); color: #d4d4d4; padding: 60px 0 24px; }
.foot-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.foot-grid h5 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; font-weight: 600; }
.foot-grid a { display: block; padding: 4px 0; color: #aaa; font-size: 14px; }
.foot-grid a:hover { color: #fff; }
.foot-logo { margin-bottom: 20px; background: #fff; display: inline-block; padding: 10px 14px; border-radius: 8px; }
.foot-logo img { height: 44px; width: auto; display: block; }
.foot-addr { font-size: 14px; color: #aaa; line-height: 1.7; }
.foot-bottom {
  display: flex; flex-direction: column;
  gap: 12px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid #333;
  font-size: 12px; color: #888;
}
@media (min-width: 700px) { .foot-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.foot-bottom .credits a { color: var(--c-cyan); }
.foot-bottom .credits a:hover { color: #fff; }
.foot-social a { color: #aaa; }
.foot-social { display: flex; gap: 18px; }

/* Utility */
.text-center { text-align: center; }
.muted { color: var(--c-muted); }
.divider { border: none; height: 1px; background: var(--c-line); margin: 0; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Big stats — homepage feature */
.stats-big {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-line);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  margin: 0 auto;
  max-width: 1100px;
}
@media (min-width: 720px) { .stats-big { grid-template-columns: repeat(4, 1fr); } }
.stat-big {
  background: #fff;
  padding: clamp(32px, 5vw, 56px) 20px;
  text-align: center;
}
.stat-big .num {
  font-size: clamp(3rem, 5vw, 4.6rem);
  font-weight: 700;
  color: var(--c-forest);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-big .num span { color: var(--c-cyan); font-weight: 600; margin-left: 2px; }
.stat-big .lab {
  font-size: 12px;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 16px;
  font-weight: 500;
}

/* Why-us blocks */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 700px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.why-card {
  padding: 32px 28px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: #fff;
  transition: border-color .25s, transform .25s;
}
.why-card:hover { border-color: var(--c-cyan); transform: translateY(-2px); }
.why-card .ico {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-blue-soft);
  color: var(--c-forest);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 18px;
}
.why-card h4 { margin-bottom: 8px; font-size: 17px; }
.why-card p { font-size: 14px; color: var(--c-muted); }

/* Problematiche grid */
.prob-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) { .prob-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .prob-grid { grid-template-columns: repeat(3, 1fr); } }
.prob-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  transition: border-color .25s, background .25s;
}
.prob-card:hover { border-color: var(--c-cyan); background: var(--c-blue-soft); }
.prob-card h4 { font-size: 15px; margin-bottom: 4px; }
.prob-card p { font-size: 13px; color: var(--c-muted); }
.prob-card .arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-soft);
  display: grid; place-items: center;
  color: var(--c-forest);
  transition: background .25s, color .25s;
}
.prob-card:hover .arrow { background: var(--c-forest); color: #fff; }

/* Big visual sector cards */
.sector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 700px) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .sector-grid { grid-template-columns: repeat(4, 1fr); } }
.sector-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.sector-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.sector-card:hover img { transform: scale(1.06); }
.sector-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,26,18,0) 30%, rgba(10,26,18,0.85) 100%);
}
.sector-card .label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px;
  z-index: 2; color: #fff;
}
.sector-card .label .num {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-cyan);
  margin-bottom: 6px;
  font-weight: 500;
}
.sector-card .label h3 {
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

/* WATER full-width banner */
.water-banner {
  width: 100%;
  background: #ffffff;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 60px);
  text-align: center;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.water-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.water-svg {
  width: 100%;
  height: auto;
  max-height: 320px;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.water-poem p {
  font-size: clamp(18px, 2.2vw, 30px);
  color: #4a4a4a;
  margin-bottom: 6px;
  line-height: 1.4;
  font-weight: 400;
}
.water-poem .answer {
  font-size: clamp(28px, 4.5vw, 56px);
  color: var(--c-cyan);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 18px;
  line-height: 1;
}

/* FAQ */
.faq {
  max-width: 880px;
  margin: 0 auto;
  border-top: 1px solid var(--c-line);
}
.faq-item {
  border-bottom: 1px solid var(--c-line);
}
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--c-ink);
  text-align: left;
  background: none; border: none;
  transition: color .2s;
}
.faq-q:hover { color: var(--c-forest); }
.faq-q .toggle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-soft);
  display: grid; place-items: center;
  transition: transform .3s, background .3s, color .3s;
  flex-shrink: 0;
  color: var(--c-forest);
}
.faq-item.open .toggle {
  transform: rotate(45deg);
  background: var(--c-cyan);
  color: #fff;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding-bottom .3s ease;
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding-bottom: 24px;
}
.faq-a p {
  color: var(--c-muted);
  line-height: 1.7;
  font-size: 15px;
  margin-bottom: 10px;
}
.faq-a a { color: var(--c-forest); text-decoration: underline; }

/* Big CTA banner */
.cta-banner {
  background: var(--c-forest);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 800px) { .cta-banner { grid-template-columns: 2fr 1fr; } }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-top: 12px; }
.cta-banner .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
@media (min-width: 800px) { .cta-banner .actions { justify-content: flex-end; } }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 26, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  opacity: 0;
  transition: opacity .2s ease;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; opacity: 1; }
.modal {
  background: #fff;
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 940px;
  margin: auto;
  position: relative;
  transform: translateY(16px);
  transition: transform .3s ease;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close {
  position: sticky; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  z-index: 2;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.modal-close .modal-title { font-size: 13px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.modal-close button.x {
  width: 36px; height: 36px;
  border: 1px solid var(--c-line); border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  transition: background .2s, border-color .2s;
}
.modal-close button.x:hover { background: var(--c-soft); border-color: var(--c-forest); }
.modal-body { padding: clamp(20px, 3vw, 32px); }
.modal-body .cfg { background: transparent; padding: 0; }

/* Chatbot */
.chat-fab {
  position: fixed; bottom: 20px; right: 20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--c-forest);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  transition: transform .2s, background .2s;
  border: none;
}
.chat-fab:hover { transform: scale(1.06); background: var(--c-cyan); }
.chat-fab .badge {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c-cyan);
  color: #fff;
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid #fff;
}
.chat-panel {
  position: fixed; bottom: 90px; right: 20px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 16px 50px rgba(0,0,0,0.28);
  z-index: 91;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; animation: chat-in .25s ease; }
@keyframes chat-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.chat-head {
  padding: 14px 16px;
  background: var(--c-forest);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.chat-head .name { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; }
.chat-head .sub { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.chat-head .close-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff;
  display: grid; place-items: center;
  border: none; cursor: pointer; flex-shrink: 0;
}
.chat-head .close-btn:hover { background: rgba(255,255,255,0.28); }
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--c-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  word-wrap: break-word;
}
.chat-msg.bot {
  background: #fff;
  border: 1px solid var(--c-line);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: var(--c-text);
}
.chat-msg.user {
  background: var(--c-forest);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg.typing { color: var(--c-muted); font-style: italic; }
.chat-msg .cta-btn {
  display: inline-block; margin-top: 10px;
  padding: 8px 14px;
  background: var(--c-cyan); color: #fff !important;
  border-radius: 6px;
  font-size: 13px; font-weight: 600;
  text-decoration: none !important;
  pointer-events: auto !important;
}
.chat-msg .cta-btn:hover { background: #0098cf; }
.chat-msg a { color: var(--c-forest); text-decoration: underline; }
.chat-input {
  padding: 12px;
  border-top: 1px solid var(--c-line);
  background: #fff;
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-input textarea {
  flex: 1;
  border: 1px solid var(--c-line);
  border-radius: 18px;
  padding: 10px 14px;
  font-size: 14px;
  resize: none; outline: none;
  min-height: 40px; max-height: 120px;
  font-family: inherit;
  line-height: 1.4;
}
.chat-input textarea:focus { border-color: var(--c-cyan); }
.chat-input .send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-forest); color: #fff;
  display: grid; place-items: center;
  border: none; cursor: pointer; flex-shrink: 0;
}
.chat-input .send:hover { background: var(--c-cyan); }
.chat-input .send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-disclaimer {
  font-size: 10px; color: var(--c-muted);
  text-align: center; padding: 6px 12px 8px;
  background: #fff;
  border-top: 1px solid var(--c-line);
}

/* Focus */
:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }
}
