/* ==========================================================================
   Clínica Veterinaria Quirurgivet — styles.css
   Mobile-first · breakpoints: 375px / 768px / 1200px
   ========================================================================== */

/* ---- Variables ---- */
:root {
  --teal: #0F766E;
  --teal-dark: #0B4F4A;
  --teal-soft: #E3F1EF;
  --coral: #FB7185;
  --coral-dark: #E11D48;
  --cream: #FDF6EC;
  --ink: #1F2937;
  --ink-soft: #4B5563;
  --white: #FFFFFF;
  --gold: #C9A227;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 30px rgba(15, 118, 110, 0.10);
  --shadow-card: 0 4px 18px rgba(31, 41, 55, 0.07);

  --bar-h: 42px;
  --header-h: 72px;

  /* Patrón de huellas (SVG inline) */
  --paw-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='%230F766E' fill-opacity='0.06'%3E%3Cg transform='translate(14,14) scale(1.1)'%3E%3Ccircle cx='8.3' cy='7.7' r='2.2'/%3E%3Ccircle cx='15.7' cy='7.7' r='2.2'/%3E%3Ccircle cx='4.9' cy='12' r='2'/%3E%3Ccircle cx='19.1' cy='12' r='2'/%3E%3Cellipse cx='12' cy='15.8' rx='4.6' ry='3.9'/%3E%3C/g%3E%3Cg transform='translate(56,52) scale(0.9) rotate(24 12 12)'%3E%3Ccircle cx='8.3' cy='7.7' r='2.2'/%3E%3Ccircle cx='15.7' cy='7.7' r='2.2'/%3E%3Ccircle cx='4.9' cy='12' r='2'/%3E%3Ccircle cx='19.1' cy='12' r='2'/%3E%3Cellipse cx='12' cy='15.8' rx='4.6' ry='3.9'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Reset básico ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  padding-top: var(--bar-h);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--teal); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 2.5rem, 1160px);
  margin-inline: auto;
}

.section { padding: 4rem 0; }

/* ---- Tipografía de secciones ---- */
.eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--teal);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: #FECDD3; }

h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }

.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-sub { color: var(--ink-soft); }

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--teal-dark); }

.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-ghost:hover { background: var(--teal-soft); }

.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }

/* ---- 1. Barra de urgencias ---- */
.emergency-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--bar-h);
  background: var(--coral-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.emergency-bar a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.2rem 0.6rem;
}
.emergency-bar a:hover { text-decoration: underline; }

/* ---- 2. Header ---- */
.site-header {
  position: sticky;
  top: var(--bar-h);
  z-index: 50;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(31, 41, 55, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand img { width: 140px; height: auto; }

.main-nav ul { display: flex; gap: 1.4rem; align-items: center; }
.main-nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.97rem;
}
.main-nav a:not(.btn):hover { color: var(--teal); }
.main-nav { display: flex; align-items: center; gap: 1.6rem; }

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 24px; height: 3px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- 3. Hero ---- */
.hero {
  background: var(--cream) var(--paw-pattern);
  padding: 3.5rem 0 4rem;
}
.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero h1 em {
  font-style: normal;
  color: var(--teal);
}
.hero-sub {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-card);
}
.open-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #10B981;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}

.hero-panel {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--white);
  max-width: 340px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-chip {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.7rem 1.1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.hero-chip strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--teal);
}
.hero-chip span { font-size: 0.82rem; color: var(--ink-soft); }

/* ---- 4. Franja de confianza ---- */
.trust {
  background: var(--white);
  padding: 2.2rem 0;
  border-block: 1px solid var(--teal-soft);
}
.trust-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.trust-item p { margin: 0; display: flex; flex-direction: column; line-height: 1.35; }
.trust-item strong { font-size: 0.98rem; }
.trust-item span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---- Iconos SVG ---- */
.icon {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  stroke: var(--teal);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- 5. Servicios ---- */
.services-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 118, 110, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.card .icon { margin-bottom: 0.9rem; }
.card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.card-featured {
  background: linear-gradient(150deg, #FFF1F2 0%, var(--white) 60%);
  border: 2px solid var(--coral);
}
.card-featured .icon { stroke: var(--coral-dark); }
.badge {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: var(--coral);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

/* ---- 6. Nosotros ---- */
.section-alt {
  background: var(--white) var(--paw-pattern);
}
.about-inner {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
.about-copy p { color: var(--ink-soft); }
.about-copy p:first-of-type { color: var(--ink); }

.about-facts {
  display: grid;
  gap: 1rem;
}
.about-facts li {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-card);
}
.about-facts .icon { width: 36px; height: 36px; }
.about-facts span { display: flex; flex-direction: column; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.4; }
.about-facts strong { color: var(--ink); font-size: 0.98rem; }

/* ---- 7. Urgencias ---- */
.emergency {
  background:
    radial-gradient(110% 140% at 85% 0%, rgba(251, 113, 133, 0.35) 0%, rgba(251, 113, 133, 0) 55%),
    linear-gradient(150deg, var(--teal-dark) 0%, #093B37 100%);
  color: var(--white);
}
.emergency h2 { color: var(--white); }
.emergency-inner {
  max-width: 700px;
  text-align: center;
  margin-inline: auto;
}
.emergency p { color: rgba(255, 255, 255, 0.88); }
.emergency strong { color: var(--white); }

.btn-emergency {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.5vw, 1.6rem);
  padding: 1.1rem 2rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 10px 30px rgba(251, 113, 133, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn-emergency:hover {
  background: var(--coral-dark);
  transform: translateY(-3px);
}
.emergency-address {
  font-size: 0.95rem;
  margin: 0;
}

/* ---- 8. Contacto ---- */
.contact-grid {
  display: grid;
  gap: 2rem;
}
.contact-list { display: grid; gap: 1.3rem; margin-bottom: 2rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list .icon { width: 34px; height: 34px; margin-top: 2px; }
.contact-list span { display: flex; flex-direction: column; color: var(--ink-soft); line-height: 1.5; }
.contact-list strong { color: var(--ink); margin-bottom: 0.1rem; }
.contact-list a { color: var(--teal); font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 320px;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
}

/* ---- 9. Footer ---- */
.site-footer {
  background: var(--ink);
  color: #D1D5DB;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand img {
  width: 170px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}
.footer-brand p { font-size: 0.92rem; }
.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.9rem;
}
.footer-col ul { display: grid; gap: 0.55rem; font-size: 0.92rem; }
.footer-col a { color: #D1D5DB; text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-note { padding-top: 1.4rem; padding-bottom: 5.5rem; }
.footer-note p { padding-right: 4.5rem; }
.footer-note p { margin: 0; font-size: 0.85rem; color: #9CA3AF; }

/* ---- 10. Botón flotante WhatsApp ---- */
.whatsapp-fab {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 70;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* ---- Animaciones de scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .open-dot { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* ---- Móvil: menú hamburguesa (hasta 767px) ---- */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    box-shadow: 0 14px 24px rgba(31, 41, 55, 0.12);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .main-nav ul a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--teal-soft);
  }
  .nav-cta { margin-top: 1rem; justify-content: center; }
  .brand img { width: 120px; }
}

/* ---- Tablet: 768px+ ---- */
@media (min-width: 768px) {
  .section { padding: 5rem 0; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
  .hero-panel { max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: stretch; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

@media (min-width: 768px) {
  .footer-note { padding-bottom: 0; }
  .footer-note p { padding-right: 0; }
}

/* ---- Escritorio: 1200px+ ---- */
@media (min-width: 1200px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .about-inner { grid-template-columns: 1.2fr 0.8fr; gap: 4rem; }
  .hero { padding: 5rem 0 5.5rem; }
  .hero-panel { max-width: 420px; }
}
