/* ================================================================
   ECOPULITO v2.0 — home.css
   ================================================================ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg:          #f9fafb;
  --surface:     #ffffff;
  --surf-alt:    #f1f5f9;
  --brand:       #e63b11;
  --brand-d:     #c1300a;
  --dark:        #0f172a;
  --dark-mid:    #1e293b;
  --text:        #111827;
  --text-mid:    #374151;
  --muted:       #6b7280;
  --line:        rgba(17, 24, 39, 0.1);
  --section-pad: clamp(4rem, 8vw, 7rem);
}

html { scroll-behavior: smooth; }

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

body {
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Layout ──────────────────────────────────────────────────── */
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-pad { padding: var(--section-pad) 0; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.18s, box-shadow 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(230, 59, 17, 0.28);
}
.btn.primary:hover {
  background: var(--brand-d);
  border-color: var(--brand-d);
  box-shadow: 0 6px 22px rgba(230, 59, 17, 0.4);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.9);
}

.btn.outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text-mid);
}
.btn.outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn.white {
  background: #fff;
  border-color: #fff;
  color: var(--brand);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}
.btn.white:hover {
  background: #f1f5f9;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.26);
}

.btn.large {
  padding: 1rem 1.9rem;
  font-size: 1.05rem;
}

.btn.full-w { width: 100%; }

/* ── Section heading ─────────────────────────────────────────── */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 0.65rem;
}
.section-tag.light { color: rgba(255, 255, 255, 0.55); }

.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.35s;
}

.site-header.scrolled {
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.07);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 62px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-mid);
  transition: color 0.2s;
}
.btn-nav:hover { color: var(--brand); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem;
  z-index: 110;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: background 0.3s, transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #fff !important; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #fff !important; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("../img/IMG-20240805-WA0016.avif") center / cover no-repeat;
  transform: scale(1.04);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 9rem 0 5rem;
}

.hero-content { max-width: 860px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.35rem;
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(230, 59, 17, 0.3);
}

h1 {
  font-size: clamp(2.5rem, 5.8vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1.35rem;
}
h1 em {
  font-style: normal;
  color: var(--brand);
}

.lead {
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-trust strong { color: rgba(255, 255, 255, 0.92); }
.hero-trust .sep { opacity: 0.3; }

/* ================================================================
   STATS STRIP
   ================================================================ */
.stats-strip {
  background: var(--dark);
  padding: 3.25rem 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 150px;
}

.stat-num {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

.stat-divider {
  width: 1px;
  height: 52px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* ================================================================
   PROCESS
   ================================================================ */
.process {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.process::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(230, 59, 17, 0.08), transparent 55%),
              radial-gradient(ellipse at 80% 20%, rgba(230, 59, 17, 0.05), transparent 40%);
  pointer-events: none;
}
.process .section-head { position: relative; z-index: 1; }
.process .section-head h2 { color: #fff; }
.process .section-sub { color: rgba(255, 255, 255, 0.45); }

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.process-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid var(--brand);
  padding: 2.25rem 1.75rem;
  transition: background 0.28s, transform 0.28s, border-color 0.28s;
}
.process-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-5px);
}

.process-num {
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--brand);
  opacity: 1;
  line-height: 1;
  margin-bottom: 1.35rem;
  letter-spacing: -0.06em;
}

.process-card h3 {
  font-size: 1.12rem;
  color: #fff;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.process-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}
.process-card p em {
  font-style: normal;
  font-weight: 700;
  color: var(--brand);
  opacity: 1;
}

/* ================================================================
   AUTHORITY
   ================================================================ */
.authority { background: var(--surface); }

.authority-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.authority-text .section-tag { display: block; }

.authority-text h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.authority-intro {
  font-size: 1.06rem;
  color: var(--text-mid);
  line-height: 1.72;
  margin-bottom: 0.9rem;
}

.authority-body {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: 2rem;
}

.authority-badges {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}

.badge {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--brand);
  background: var(--surf-alt);
  gap: 0.15rem;
}
.badge strong { font-size: 0.88rem; color: var(--text); }
.badge span { font-size: 0.8rem; color: var(--muted); }

.authority-visual {
  height: 540px;
}

.authority-img-wrap {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
}
.authority-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.authority-img-wrap:hover img { transform: scale(1.04); }

/* ================================================================
   GALLERY
   ================================================================ */
.gallery-section { background: var(--dark); }
.gallery-section .section-head h2 { color: #fff; }
.gallery-section .section-sub { color: rgba(255, 255, 255, 0.45); }

.gallery-outer { width: 100%; padding-top: 0.5rem; }

.gallery-track-wrap {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
  background: linear-gradient(180deg, #1a2640, #141e30);
  perspective: 1400px;
  min-height: 450px;
}

.gallery-track {
  position: relative;
  min-height: 430px;
  transform-style: preserve-3d;
}

.gallery-item {
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(260px, 30vw, 400px);
  height: clamp(240px, 24vw, 330px);
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(17, 24, 39, 0.12);
  transition: transform 0.54s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s, opacity 0.35s, filter 0.35s;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.gallery-item[data-pos="center"] {
  z-index: 6; opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) translateZ(64px) rotateY(0deg) scale(1.05);
  filter: none;
  border-color: rgba(230, 59, 17, 0.8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.gallery-item[data-pos="left"] {
  z-index: 5; opacity: 0.75;
  transform: translate(-50%, -50%) translateX(-56%) translateZ(-20px) rotateY(40deg) scale(0.87);
  filter: saturate(0.75) brightness(0.8) blur(1.5px);
}
.gallery-item[data-pos="right"] {
  z-index: 5; opacity: 0.75;
  transform: translate(-50%, -50%) translateX(56%) translateZ(-20px) rotateY(-40deg) scale(0.87);
  filter: saturate(0.75) brightness(0.8) blur(1.5px);
}
.gallery-item[data-pos="left2"] {
  z-index: 4; opacity: 0.48;
  transform: translate(-50%, -50%) translateX(-97%) translateZ(-60px) rotateY(55deg) scale(0.68);
  filter: saturate(0.5) brightness(0.62) blur(3.5px);
}
.gallery-item[data-pos="right2"] {
  z-index: 4; opacity: 0.48;
  transform: translate(-50%, -50%) translateX(97%) translateZ(-60px) rotateY(-55deg) scale(0.68);
  filter: saturate(0.5) brightness(0.62) blur(3.5px);
}
.gallery-item[data-pos="back"] {
  z-index: 1; opacity: 0;
  transform: translate(-50%, -50%) translateZ(-200px) scale(0.5);
  filter: blur(6px) brightness(0.3);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
}
.gallery-item::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72) 100%);
  z-index: 1;
}

.gallery-caption {
  position: absolute;
  left: 0.8rem; bottom: 0.75rem;
  z-index: 2;
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.gallery-item[data-pos="center"] .gallery-caption { opacity: 1; }

.gallery-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(6px);
}
.gallery-nav:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.gallery-prev { left: 0.8rem; }
.gallery-next { right: 0.8rem; }

.gallery-dots { display: flex; justify-content: center; gap: 0.45rem; margin-top: 1rem; }
.gallery-dots button {
  width: 8px; height: 8px;
  border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.2); cursor: pointer; padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.gallery-dots button.is-active { background: var(--brand); transform: scale(1.35); }

/* ================================================================
   LOCATIONS / MAP
   ================================================================ */
.locations { background: var(--surface); }

.map-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  border: 1px solid var(--line);
  overflow: hidden;
}

.map-sidebar {
  background: var(--surf-alt);
  border-right: 1px solid var(--line);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--brand); }
.search-input::placeholder { color: var(--muted); }

.filter-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.filter-chip {
  border: 1px solid var(--line);
  color: var(--text-mid);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: all 0.18s;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.locations-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.location-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.18s, background 0.18s;
}
.location-item:hover { border-color: rgba(230, 59, 17, 0.4); background: rgba(230, 59, 17, 0.03); }
.location-item.is-active { border-color: var(--brand); background: rgba(230, 59, 17, 0.06); }
.location-item strong { font-size: 0.88rem; color: var(--text); margin-bottom: 0.1rem; }
.location-item span { font-size: 0.8rem; color: var(--muted); }

.map-cta { margin-top: 0.25rem; }

#multi-map { width: 100%; height: 480px; display: block; }

.brand-pin-wrap {
  background: transparent;
  border: 0;
}

.brand-pin {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  background: var(--brand);
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.brand-pin::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  top: 4px;
  left: 4px;
  border-radius: 50%;
  background: #ffffff;
}

/* ================================================================
   CTA FINALE
   ================================================================ */
.cta-final {
  background: var(--dark);
  padding: var(--section-pad) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(230, 59, 17, 0.2), transparent 65%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-final h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #fff;
}

.cta-final p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.68;
}

.cta-actions { margin-top: 0.5rem; }

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--dark-mid);
  padding: 3.5rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-logo-text {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 1rem;
}
.logo-eco    { color: #38bdf8; }
.logo-pulito { color: #ffffff; }
.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.65;
  max-width: 300px;
}

.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-links strong,
.footer-contact strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.2rem;
}
.footer-links a,
.footer-contact a,
.footer-contact span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover,
.footer-contact a:hover { color: var(--brand); }

.footer-copy {
  padding-top: 1.5rem;
  text-align: center;
}
.footer-copy p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .authority-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .authority-visual { height: 360px; }
}

@media (max-width: 900px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    z-index: 105;
  }
  .nav-links.open { display: flex; }
  .btn-nav { font-size: 1.35rem; color: rgba(255, 255, 255, 0.85) !important; }
  .nav-links .btn.primary { font-size: 1.1rem; }

  .process-grid { grid-template-columns: 1fr; gap: 1rem; }

  .stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-divider { display: none; }

  .map-wrap { grid-template-columns: 1fr; }
  .map-sidebar { border-right: none; border-bottom: 1px solid var(--line); }
  #multi-map { height: 340px; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

  .gallery-track-wrap { min-height: 320px; }
  .gallery-track { min-height: 308px; }
  .gallery-item { width: min(86vw, 340px); height: 240px; }
  .gallery-item[data-pos="left"],
  .gallery-item[data-pos="right"] {
    opacity: 0.18;
    transform: translate(-50%, -50%) translateZ(-90px) scale(0.72);
    filter: none;
  }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .authority-visual { height: 240px; }
}
