/* ═══════════════════════════════════════════════════
   Ambulanza Veterinaria .PRO — Main Stylesheet
   ═══════════════════════════════════════════════════ */

:root {
  --red:        #d32f2f;
  --red-dark:   #9a0007;
  --red-light:  #ff6659;
  --cream:      #faf7f2;
  --charcoal:   #1a1a1a;
  --mid:        #444;
  --muted:      #888;
  --border:     #e8e2d9;
  --white:      #fff;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius:  12px;
  --shadow:  0 4px 32px rgba(0,0,0,.10);
  --transition: .3s ease;

  --container: 1160px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.65;
  font-size: 1rem;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

/* ── Utility ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-label {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--charcoal);
  margin-bottom: 20px;
}
.section-sub {
  font-size: 1.1rem;
  color: var(--mid);
  max-width: 600px;
  margin-bottom: 56px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: var(--white); }
.btn-emergency {
  background: var(--red);
  color: var(--white);
  padding: 10px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}
.btn-emergency:hover { background: var(--red-dark); }

/* ── Pulse dot ── */
.pulse-dot {
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* ══════════════════════════════════
   HEADER
══════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(250,247,242,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,.08); }
.header-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
/* Desktop: nav sits inside the header bar row */
.main-nav {
  display: contents; /* children participate in header-bar flex */
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
  list-style: none;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--mid);
  transition: color var(--transition);
}
.main-nav a:hover { color: var(--red); }

.hamburger span {
  width: 24px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  padding-top: 72px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--charcoal);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(211,47,47,.25) 0%, transparent 65%),
              radial-gradient(ellipse at 20% 80%, rgba(211,47,47,.12) 0%, transparent 55%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(211,47,47,.15);
  border: 1px solid rgba(211,47,47,.4);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: .05em;
  color: #ff8a80;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--red-light);
}
.hero-lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,.75);
  max-width: 480px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-white {
  background: var(--white);
  color: var(--charcoal);
}
.btn-white:hover { background: var(--cream); }
.btn-ghost {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.25);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-box {
  padding: 32px 28px;
  background: rgba(255,255,255,.03);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--red-light);
  line-height: 1;
}
.stat-label { font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 6px; }

/* ══════════════════════════════════
   CHI SIAMO
══════════════════════════════════ */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual {
  position: relative;
}
.about-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 40px 40px 100px; /* bottom padding reserves space for the badge */
  border: 1px solid var(--border);
}
.about-card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.about-card p { color: var(--mid); font-size: .95rem; }
.about-accent-card {
  position: absolute;
  bottom: 20px;   /* sits inside the padded bottom area, never over text */
  right: 20px;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  min-width: 120px;
}
.about-accent-card .big { font-size: 2rem; display: block; }
.values-list { display: flex; flex-direction: column; gap: 20px; }
.value-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.value-item:hover { border-color: var(--red); box-shadow: 0 4px 20px rgba(211,47,47,.08); }
.value-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: rgba(211,47,47,.08);
  border-radius: 10px;
  display: grid; place-items: center;
}
.value-item h4 { font-family: var(--font-display); font-weight: 700; margin-bottom: 4px; }
.value-item p  { font-size: .88rem; color: var(--mid); }

/* ══════════════════════════════════
   SERVIZI
══════════════════════════════════ */
.services { background: var(--cream); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  width: 56px; height: 56px;
  background: rgba(211,47,47,.08);
  border-radius: 14px;
  display: grid; place-items: center;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.service-card p { font-size: .9rem; color: var(--mid); line-height: 1.6; }

/* ══════════════════════════════════
   TERRITORIO / MAP
══════════════════════════════════ */
.territory { background: var(--charcoal); color: var(--white); }
.territory .section-title { color: var(--white); }
.territory .section-sub   { color: rgba(255,255,255,.6); }
.territory .section-label { color: var(--red-light); }
.territory-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
#italy-map {
  height: 540px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.cities-sidebar { display: flex; flex-direction: column; gap: 12px; }
.cities-sidebar-title {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 4px;
}
.city-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  font-size: .9rem;
}
.city-pill:hover { background: rgba(211,47,47,.15); border-color: rgba(211,47,47,.4); }
.city-pill.active { background: rgba(211,47,47,.2); border-color: var(--red); }
.city-name { font-weight: 600; }
.city-region { font-size: .75rem; color: rgba(255,255,255,.4); }
.city-phone { font-size: .8rem; color: var(--red-light); font-family: var(--font-display); }

/* ══════════════════════════════════
   CONTATTI
══════════════════════════════════ */
.contacts { background: var(--white); }
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-card {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: border-color var(--transition);
}
.contact-card:hover { border-color: var(--red); }
.contact-card-icon {
  width: 52px; height: 52px;
  background: rgba(211,47,47,.08);
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.contact-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-card a, .contact-card span {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--charcoal);
}
.contact-card a:hover { color: var(--red); }
.emergency-box {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.emergency-box h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.emergency-box p { opacity: .8; margin-bottom: 24px; font-size: .95rem; }
.emergency-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  display: block;
  margin: 16px 0 24px;
  letter-spacing: .03em;
}
.emergency-box .btn {
  background: var(--white);
  color: var(--red);
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 50px;
}
.emergency-box .btn:hover { background: var(--cream); }

/* ══════════════════════════════════
   LEAFLET POPUP CUSTOM
══════════════════════════════════ */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.2) !important;
  font-family: var(--font-body) !important;
}
.map-popup h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.map-popup .region-label {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.map-popup .popup-phone {
  color: var(--red);
  font-weight: 700;
  font-size: .95rem;
}
.map-popup .popup-cta {
  display: inline-block;
  margin-top: 10px;
  background: var(--red);
  color: #fff;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 700;
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
  background: #111;
  color: rgba(255,255,255,.7);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  display: block;
}
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.45); line-height: 1.7; }
.footer-links h4, .footer-contact h4 {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-phone {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red-light) !important;
}
.footer-contact a { font-size: .9rem; transition: color var(--transition); }
.footer-contact a:hover { color: var(--white); }
.footer-contact span { font-size: .8rem; color: rgba(255,255,255,.35); }
.social-row { display: flex; gap: 10px; margin-top: 8px; }
.social-row a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: .8rem;
  font-weight: 700;
  transition: background var(--transition), border-color var(--transition);
}
.social-row a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.footer-bottom {
  padding: 20px 0;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.25); text-align: center; }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-accent-card { display: none; }
  .territory-layout { grid-template-columns: 1fr; }
  .cities-sidebar { flex-direction: row; flex-wrap: wrap; }
  .contacts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(250,247,242,.98);
    backdrop-filter: blur(12px);
    padding: 32px 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  display: block;
  transition: transform var(--transition), opacity var(--transition);
}

/* ── details/summary dropdown ── */

}

/* Show on hover over the container */

  
}

/* ══════════════════════════════════════════════
   HEADER + NAV — flat, no dropdown, no JS
══════════════════════════════════════════════ */

.nav-toggle-input { display: none; }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(250,247,242,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,.08); }

.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
  flex-wrap: nowrap;
}

/* Logo */
.logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo-img { height: 48px; width: auto; object-fit: contain; display: block; }

/* Nav — all links in one row */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 1;
  flex-wrap: nowrap;
  overflow: visible;
}
.main-nav a {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  color: var(--mid);
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.main-nav a:hover     { color: var(--red); background: rgba(211,47,47,.06); }
.main-nav a.nav-active { color: var(--red); background: rgba(211,47,47,.08); }

/* Emergency button */
.btn-emergency {
  background: var(--red);
  color: var(--white);
  padding: 9px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-emergency:hover { background: var(--red-dark); }

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  border: none;
  background: none;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  display: block;
  transition: transform .3s, opacity .3s;
}

/* ─ MOBILE ≤768px ─ */
@media (max-width: 768px) {
  .hamburger    { display: flex; }
  .btn-emergency { font-size: .78rem; padding: 8px 12px; }

  /* Hide nav by default */
  .main-nav {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 2px solid var(--border);
    padding: 8px 0 16px;
    margin-left: 0;
    z-index: 9999;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
  }
  .main-nav a {
    padding: 13px 24px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: .95rem;
  }
  .main-nav a:last-child { border-bottom: none; }

  /* Show when checkbox checked */
  #nav-toggle:checked ~ .header-bar .main-nav { display: flex; }

  /* Hamburger → X */
  #nav-toggle:checked ~ .header-bar .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  #nav-toggle:checked ~ .header-bar .hamburger span:nth-child(2) { opacity: 0; }
  #nav-toggle:checked ~ .header-bar .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ══════════════════════════════════
   PAGE HIGHLIGHTS ROW (shared)
══════════════════════════════════ */
.page-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.page-highlight-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 18px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.page-highlight-card:hover { border-color: var(--red); }
.page-highlight-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.page-highlight-card strong {
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  color: var(--charcoal);
}
.page-highlight-card span {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
}
