/* =========================================================
   Clínica Veterinaria Cachorros — Propuesta de rediseño
   Estética de clínica veterinaria de barrio: confianza profesional
   con calidez. Teal salud + coral cálido, tipografía redondeada
   pero legible, radios medios (ni pill festivo ni cuadrado serio).
   ========================================================= */

:root {
  /* Marca */
  --teal-900: #0c3b37;
  --teal-800: #124f49;
  --teal-700: #17685f;
  --teal-600: #1c7d72;
  --teal-500: #2a9c8e;
  --teal-300: #8fd2c6;
  --teal-050: #eaf6f3;

  /* Acento cálido (calidez humana, no infantil) */
  --coral: #ff7a59;
  --coral-dark: #e0603f;
  --amber: #ffb648;

  /* Neutros — blanco roto cálido, no blanco frío de app */
  --ink: #1c2724;
  --ink-soft: #55635f;
  --line: #dde6e2;
  --bg: #fbfaf7;
  --bg-soft: #f1f7f5;
  --bg-dark: #0a2e2a;
  --white: #ffffff;

  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 16px rgba(12, 59, 55, .08);
  --shadow: 0 16px 40px rgba(12, 59, 55, .14);
  --shadow-lg: 0 28px 64px rgba(12, 59, 55, .24);

  --maxw: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --font-display: 'Baloo 2', 'Poppins', system-ui, sans-serif;
  --font-body: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* overflow-x va en <html>, no en <body>: en iOS Safari, un overflow en body
   rompe los elementos position:fixed (como el header) durante el scroll. */
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.14; font-weight: 700; letter-spacing: -.01em; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-050);
  padding: 7px 16px; border-radius: var(--radius-pill);
}

.section { padding: clamp(60px, 8vw, 110px) 0; }
.section-head { max-width: 660px; margin-bottom: 50px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); margin: 16px 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent; transition: transform .3s var(--ease), background .25s, box-shadow .3s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: 0 10px 24px rgba(23, 104, 95, .32); }
.btn-primary:hover { background: var(--teal-800); box-shadow: 0 14px 30px rgba(23, 104, 95, .4); }
.btn-wa { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-wa:hover { border-color: #25D366; color: #1a8f47; }
.btn-ghost { background: #fff; color: var(--teal-800); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--teal-300); }
.btn svg { width: 19px; height: 19px; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0; transition: padding .35s var(--ease), background .35s, box-shadow .35s;
}
.header.scrolled { background: rgba(251,250,247,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 6px 24px rgba(12,59,55,.08); padding: 11px 0; }

/* Header sobre el hero (foto): mientras no se hace scroll, texto claro sobre velo oscuro */
.header--hero:not(.scrolled)::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,30,27,.55), rgba(8,30,27,0));
  z-index: 0;
}
.header--hero:not(.scrolled) .nav { position: relative; z-index: 1; }
.header--hero:not(.scrolled) .brand { color: #fff; }
.header--hero:not(.scrolled) .nav-links > a { color: rgba(255,255,255,.92); }
.header--hero:not(.scrolled) .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.header--hero:not(.scrolled) .btn-ghost:hover { background: rgba(255,255,255,.24); }
.header--hero:not(.scrolled) .burger { color: #fff; }

/* La barra de marca + hamburguesa debe quedar SIEMPRE por encima del panel
   desplegable (aunque esté abierto), si no el botón para cerrarlo queda tapado. */
.header .nav { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.24rem; color: var(--teal-900); }
.brand .paw { width: 30px; height: 30px; color: var(--coral); flex: 0 0 auto; }
.brand span b { color: var(--coral); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 600; font-size: .95rem; color: var(--ink); position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--coral); border-radius: 2px; transition: width .3s var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.burger { display: none; position: relative; background: none; border: 0; width: 26px; height: 26px; cursor: pointer; color: var(--teal-900); }
.burger svg { position: absolute; inset: 0; margin: auto; width: 100%; height: 100%; transition: opacity .2s; }
.burger .icon-close { opacity: 0; }
.header.menu-open .burger .icon-menu { opacity: 0; }
.header.menu-open .burger .icon-close { opacity: 1; }
/* Con el menú abierto, la marca y la hamburguesa se ven siempre en tono oscuro sobre fondo claro */
.header.menu-open::before { display: none; }
.header.menu-open .brand, .header.menu-open .burger { color: var(--teal-900); }

/* El panel exterior es el que anima max-height: SIN padding propio, porque el
   padding no se comprime por debajo de max-height y dejaría una barra visible
   tapando la cabecera incluso "cerrado". El padding real vive en .mobile-menu-inner.
   z-index por debajo de .header .nav (5) para que marca+hamburguesa (que también
   cierra el menú) queden siempre visibles y pulsables por encima del panel. */
.mobile-menu {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; z-index: 2;
  background: var(--white); box-shadow: var(--shadow-lg);
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease);
}
.mobile-menu.open { max-height: 100vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 2px; padding: 92px 24px 28px; }
.mm-link { padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.mobile-menu-inner > .mm-link:last-of-type { border-bottom: 0; }
.mm-cta { justify-content: center; margin-top: 16px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .burger { display: block; }
  .mobile-menu { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: flex-end;
  padding: 150px 0 80px;
  background-image:
    linear-gradient(180deg, rgba(8,30,27,.35) 0%, rgba(8,30,27,.5) 45%, rgba(6,26,24,.92) 100%),
    url('img/fachada-letrero.jpg');
  background-size: cover;
  background-position: center 60%;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 660px; }
.hero .eyebrow { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.4vw, 3.9rem); margin: 20px 0 16px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { font-size: 1.14rem; color: rgba(255,255,255,.9); max-width: 40ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero .btn-ghost { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.22); }
.hero-info { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color: rgba(255,255,255,.72); font-size: .9rem; }
.hero-info b { color: #fff; }
.hero-info .div { width: 1px; height: 20px; background: rgba(255,255,255,.3); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Info bar (horario / franjas) ---------- */
.infobar { background: var(--teal-900); color: #fff; padding: 16px 0; }
.infobar-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; text-align: center; font-size: .92rem; }
.infobar-item { display: flex; align-items: center; gap: 9px; opacity: .95; }
.infobar-item svg { width: 18px; height: 18px; color: var(--amber); flex: 0 0 auto; }

/* ---------- La clínica (texto + foto) ---------- */
.zones { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.about-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text .section-head { margin-bottom: 26px; }
.about-text > p { color: var(--ink-soft); margin-bottom: 24px; font-size: 1.02rem; }
.trait-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.trait { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.trait .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--teal-050); color: var(--teal-700); display: grid; place-items: center; flex: 0 0 auto; }
.trait .ico svg { width: 21px; height: 21px; }
.trait h4 { font-size: 1.02rem; margin-bottom: 3px; }
.trait p { color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .about-photo { aspect-ratio: 16/9; } }

/* Grid genérico reutilizado por valor.html (tarjetas de "seis mejoras") */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }

/* ---------- Servicios ---------- */
.serv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.serv {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 24px 24px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.serv:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.serv::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--teal-500), var(--coral)); }
.serv .ico { width: 50px; height: 50px; border-radius: 15px; background: var(--teal-050); color: var(--teal-700); display: grid; place-items: center; margin-bottom: 16px; }
.serv .ico svg { width: 26px; height: 26px; }
.serv h3 { font-size: 1.14rem; margin-bottom: 7px; }
.serv p { color: var(--ink-soft); font-size: .94rem; }
.serv .tag { display: inline-block; margin-top: 12px; font-family: var(--font-display); font-weight: 600; font-size: .76rem; color: var(--coral-dark); background: #fff1ec; padding: 4px 12px; border-radius: var(--radius-pill); }

/* ---------- Stats ---------- */
.stats { background: linear-gradient(135deg, var(--teal-800), var(--teal-900)); color: #fff; border-radius: var(--radius-lg); padding: clamp(34px, 5vw, 54px); position: relative; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; text-align: center; position: relative; }
.stat .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.1rem); line-height: 1; color: var(--amber); }
.stat .lbl { margin-top: 8px; font-size: .95rem; opacity: .9; }

/* ---------- Galería ---------- */
.gallery-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-teaser figure, .gallery figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; aspect-ratio: 4/3; }
.gallery-teaser img, .gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-teaser figure:hover img, .gallery figure:hover img { transform: scale(1.06); }
.gallery-note { text-align: center; margin-top: 28px; color: var(--ink-soft); font-size: .92rem; background: var(--teal-050); border-radius: var(--radius); padding: 16px 22px; }
@media (max-width: 760px) { .gallery-teaser { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6,26,24,.94); display: none; place-items: center; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 14px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; background: #fff; border: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 1.35rem; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Info práctica ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info-item .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-050); color: var(--teal-700); display: grid; place-items: center; flex: 0 0 auto; }
.info-item .ico svg { width: 22px; height: 22px; }
.info-item h4 { font-size: 1.02rem; margin-bottom: 3px; }
.info-item p { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: stretch; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 8px; }
.contact-card > p { color: var(--ink-soft); margin-bottom: 24px; }
.contact-line { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-line:first-of-type { border-top: 0; }
.contact-line .ico { width: 44px; height: 44px; border-radius: 13px; background: var(--teal-050); color: var(--teal-700); display: grid; place-items: center; flex: 0 0 auto; }
.contact-line .ico svg { width: 21px; height: 21px; }
.contact-line small { display: block; color: var(--ink-soft); font-size: .8rem; }
.contact-line b { font-family: var(--font-display); font-size: 1.02rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.socials { display: flex; gap: 12px; margin-top: 22px; }
.socials a { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--teal-050); color: var(--teal-700); transition: transform .3s var(--ease), background .3s, color .3s; }
.socials a:hover { transform: translateY(-4px); background: var(--teal-700); color: #fff; }
.socials svg { width: 20px; height: 20px; }
.map-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); min-height: 400px; border: 6px solid #fff; filter: saturate(.9); }
.map-card iframe { width: 100%; height: 100%; min-height: 400px; border: 0; display: block; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-box { background: linear-gradient(135deg, var(--teal-700), var(--teal-900)); color: #fff; border-radius: var(--radius-lg); padding: clamp(42px, 6vw, 72px) 24px; position: relative; overflow: hidden; }
.cta-box .eyebrow { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.cta-box h2 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin: 16px 0 12px; }
.cta-box p { font-size: 1.08rem; opacity: .92; max-width: 46ch; margin: 0 auto 26px; }
.cta-box .btn-ghost { background: #fff; color: var(--teal-800); border-color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--teal-900); color: #cde7e1; padding: 54px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; margin-bottom: 38px; }
.footer .brand { color: #fff; margin-bottom: 12px; }
.footer .brand .paw { color: var(--amber); }
.footer p { font-size: .92rem; opacity: .8; max-width: 34ch; }
.footer h5 { color: #fff; font-family: var(--font-display); font-size: .98rem; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a { font-size: .92rem; opacity: .82; transition: opacity .2s, color .2s; }
.footer ul a:hover { opacity: 1; color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .84rem; opacity: .72; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Llamar flotante ----------
   Botón de llamada directa, no WhatsApp: el negocio no publica un número de
   WhatsApp Business (ver config.js), así que el CTA persistente en pantalla
   debe ser "llamar" (tel:), el único canal 100% verificado hoy mismo. */
.call-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--coral); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(255,122,89,.45);
  transition: transform .3s var(--ease);
}
.call-float:hover { transform: scale(1.08); }
.call-float svg { width: 27px; height: 27px; }

@media (max-width: 980px) {
  .hero { background-position: 50% center; }
}
@media (max-width: 640px) {
  .gallery-teaser { grid-template-columns: repeat(2, 1fr); }
}
