/* =========================================================
   Clínica Veterinaria La Solana — Propuesta de rediseño
   Estética de confianza clínica: petróleo/teal profesional +
   acento melocotón cálido. Ni verde festivo (La Fiestuky) ni
   vino tradicional (Asador Castilla): un tercer registro propio,
   sobrio pero cercano — instalaciones amplias, equipo cualificado.
   ========================================================= */

:root {
  /* Marca */
  --petrol-900: #0b3436;
  --petrol-700: #135a5c;
  --petrol-500: #1c8583;
  --petrol-300: #8fc7c3;
  --petrol-050: #eaf5f4;

  /* Acento cálido (contrapunto humano a la clínica) */
  --peach: #ee8a5c;
  --peach-dark: #d66a3c;
  --peach-050: #fdefe6;

  /* Estado / confianza */
  --gold-star: #e8ab2f;

  /* Neutros — marfil cálido, no blanco de hospital */
  --ink: #17282a;
  --ink-soft: #526367;
  --line: #dee7e6;
  --bg: #fbfaf7;
  --bg-soft: #f1f6f5;
  --bg-dark: #0d2426;
  --white: #ffffff;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 16px rgba(11, 52, 54, .07);
  --shadow: 0 16px 38px rgba(11, 52, 54, .14);
  --shadow-lg: 0 26px 64px rgba(11, 52, 54, .22);

  --maxw: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

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

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: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--petrol-700);
  background: var(--petrol-050);
  padding: 7px 16px; border-radius: var(--radius-pill);
}

.section { padding: clamp(60px, 8vw, 108px) 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 16px 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.04rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: .96rem;
  padding: 14px 27px; border-radius: var(--radius);
  cursor: pointer; border: 1.5px solid transparent; transition: background .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--peach); color: #fff; box-shadow: 0 10px 24px rgba(238,138,92,.38); }
.btn-primary:hover { background: var(--peach-dark); box-shadow: 0 14px 30px rgba(238,138,92,.46); }
.btn-wa { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-wa:hover { border-color: #25D366; color: #1a8f47; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--petrol-500); color: var(--petrol-700); }
.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,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(11,52,54,.08); padding: 11px 0; }

/* Header sobre el hero (foto): velo superior mientras no se hace scroll */
.header--hero:not(.scrolled)::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,26,27,.62), rgba(6,26,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 { border-color: #fff; }
.header--hero:not(.scrolled) .burger { color: #fff; }

/* La barra (marca+hamburguesa) siempre por encima del panel desplegable */
.header .nav { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; color: var(--petrol-900); }
.brand img { height: 34px; width: auto; }
.header--hero:not(.scrolled) .brand img { filter: brightness(0) invert(1); }

.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(--peach); 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(--petrol-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; }
.header.menu-open .brand,
.header.menu-open .brand img { color: var(--petrol-900); filter: none; }

/* El panel exterior anima max-height SIN padding propio (si tuviera padding
   fijo, "cerrado" se quedaría con una barra sólida tapando la cabecera).
   El padding real vive en .mobile-menu-inner. z-index por debajo de
   .header .nav (5) para que marca+hamburguesa queden siempre visibles. */
.mobile-menu {
  display: none;
  position: fixed; left: 0; right: 0; top: 0; z-index: 2;
  background: var(--bg-dark); 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; }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 2px; padding: 92px 24px 26px; }
.mm-link { padding: 14px 6px; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 600; color: rgba(255,255,255,.9); font-size: .98rem; }
.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: 96svh; display: flex; align-items: flex-end;
  padding: 150px 0 80px;
  background:
    linear-gradient(180deg, rgba(6,26,27,.32) 0%, rgba(6,26,27,.52) 48%, rgba(6,26,27,.92) 100%),
    url('img/foto-03.jpg');
  background-size: cover;
  background-position: center 38%;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 660px; }
.hero .eyebrow { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.6vw, 3.8rem); margin: 20px 0 18px; }
.hero h1 em { font-style: normal; color: var(--peach); }
.hero .lead { font-size: 1.13rem; color: rgba(255,255,255,.9); max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.42); }
.hero .btn-ghost:hover { border-color: #fff; }
.hero .btn-wa { color: #fff; border-color: rgba(255,255,255,.42); }
.hero .btn-wa:hover { border-color: #25D366; color: #4ee08a; }

.hero-trust { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,.85); font-size: .92rem; }
.hero-trust .stars { color: var(--gold-star); letter-spacing: 2px; }
.hero-trust b { color: #fff; }
.hero-trust .div { width: 1px; height: 20px; background: rgba(255,255,255,.3); }

.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-badge {
  background: rgba(255,255,255,.97); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-family: var(--font-display); font-size: .88rem; color: var(--petrol-900);
}
.hero-badge .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 auto; background: var(--petrol-050); }
.hero-badge small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--ink-soft); font-size: .72rem; }

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

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

/* ---------- La clínica (texto + foto) ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; 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: 28px; }
.about-text > p { color: var(--ink-soft); margin-bottom: 26px; font-size: 1.02rem; }
.trait-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.trait { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.trait .ico { font-size: 1.3rem; width: 36px; height: 36px; border-radius: 10px; background: var(--petrol-050); display: grid; place-items: center; flex: 0 0 auto; }
.trait h4 { font-size: 1.02rem; margin-bottom: 4px; }
.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; } }

.zones { background: var(--bg-soft); }

/* ---------- Servicios ---------- */
.serv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.serv {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 24px; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.serv:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.serv .ico { width: 48px; height: 48px; border-radius: 13px; background: var(--petrol-050); color: var(--petrol-700); display: grid; place-items: center; margin-bottom: 16px; }
.serv .ico svg { width: 24px; height: 24px; }
.serv h3 { font-size: 1.1rem; margin-bottom: 6px; }
.serv p { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Stats ---------- */
.stats { background: var(--bg-dark); border-radius: var(--radius-lg); padding: clamp(36px, 5vw, 54px); position: relative; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: var(--peach); }
.stat .lbl { margin-top: 8px; font-size: .9rem; color: rgba(255,255,255,.68); }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 18px; } }

/* ---------- Galería instalaciones ---------- */
.gallery-teaser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-teaser figure, .gallery figure { border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4/3; position: relative; }
.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-teaser figcaption {
  position: absolute; inset: auto 0 0 0; padding: 10px 12px 8px;
  background: linear-gradient(180deg, transparent, rgba(6,26,27,.86));
  color: #fff; font-size: .74rem; font-weight: 600; line-height: 1.3;
}
@media (max-width: 720px) { .gallery-teaser { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Equipo ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; }
.team-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem;
  color: #fff; background: linear-gradient(135deg, var(--petrol-700), var(--petrol-500));
}
.team-card h4 { font-size: 1.05rem; margin-bottom: 3px; }
.team-role { display: block; color: var(--peach-dark); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.team-card p { color: var(--ink-soft); font-size: .88rem; line-height: 1.55; }

/* ---------- Opiniones ---------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.review-card .stars { color: var(--gold-star); letter-spacing: 2px; font-size: .95rem; }
.review-card p { color: var(--ink); font-size: .94rem; line-height: 1.58; flex: 1; }
.review-card .author { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: .88rem; color: var(--petrol-900); }
.review-card .author small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--ink-soft); font-size: .76rem; }

/* ---------- Info práctica / horario ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.info-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.info-item .ico { font-size: 1.3rem; margin-bottom: 10px; display: block; }
.info-item h4 { font-size: 1rem; margin-bottom: 6px; }
.info-item p { color: var(--ink-soft); font-size: .9rem; }
.schedule-table { display: grid; gap: 8px; margin-top: 8px; }
.schedule-row { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row b { color: var(--ink); font-weight: 600; }

/* ---------- 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, 3vw, 2.3rem); margin-bottom: 10px; }
.contact-card > p { color: var(--ink-soft); margin-bottom: 26px; }
.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(--petrol-050); display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 auto; }
.contact-line small { display: block; color: var(--ink-soft); font-size: .8rem; }
.contact-line b { font-family: var(--font-display); font-size: 1rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.map-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); min-height: 380px; border: 6px solid #fff; }
.map-card iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
.cta-final { background: var(--bg-dark); }
.cta-box { text-align: center; color: #fff; }
.cta-box .eyebrow { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.cta-box h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 16px 0 14px; }
.cta-box p { color: rgba(255,255,255,.72); max-width: 520px; margin: 0 auto 28px; font-size: 1.04rem; }
.cta-box .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta-box .btn-ghost:hover { border-color: var(--peach); color: var(--peach); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.68); padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer .brand { color: #fff; margin-bottom: 12px; }
.footer .brand img { filter: brightness(0) invert(1); }
.footer p { font-size: .9rem; opacity: .78; max-width: 34ch; }
.footer h5 { color: #fff; font-family: var(--font-display); font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 15px; font-weight: 700; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { font-size: .9rem; opacity: .82; transition: opacity .2s, color .2s; }
.footer ul a:hover { opacity: 1; color: var(--peach); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; opacity: .68; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Llamar flotante ---------- */
/* Botón de llamada directa: la clínica no publica número de WhatsApp Business
   en su web actual (ver config.js), así que el CTA persistente en pantalla
   es "llamar" (tel:), el canal 100% verificado hoy mismo. */
.call-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: var(--petrol-700); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(11,52,54,.4);
  border: 1.5px solid rgba(255,255,255,.2); transition: transform .3s var(--ease);
}
.call-float:hover { transform: scale(1.07); background: var(--petrol-900); }
.call-float svg { width: 26px; height: 26px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(6,26,27,.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(92vw, 1000px); max-height: 86vh; border-radius: 8px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

@media (max-width: 720px) {
  .hero { padding-top: 118px; }
}
