/* ==========================================================================
   ESTILOS GLOBALES - CLÍNICA VETERINARIA CANIFEL
   Diseño Premium, Moderno y Optimizado para SEO y Rendimiento Técnico
   Documentado y Codificado enteramente en Español
   ========================================================================== */

/* Importación de tipografías premium desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* --------------------------------------------------------------------------
   1. VARIABLES DE DISEÑO (TOKENS)
   -------------------------------------------------------------------------- */
:root {
  /* Paleta de colores - HSL para mayor armonía y facilidad de variación */
  --primary-h: 175;
  --primary-s: 75%;
  --primary-l: 26%;
  
  --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l)); /* Verde azulado médico */
  --primary-hover: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 6%));
  --primary-light: hsl(var(--primary-h), var(--primary-s), 96%);
  --primary-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.15);
  
  /* Color de Acento - Coral/Naranja Cálido (Amor y Fisioterapia) */
  --accent-h: 14;
  --accent-s: 85%;
  --accent-l: 58%;
  
  --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-hover: hsl(var(--accent-h), var(--accent-s), calc(var(--accent-l) - 8%));
  --accent-light: hsl(var(--accent-h), var(--accent-s), 96%);
  --accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
  
  /* Colores de soporte */
  --dark: hsl(215, 25%, 12%); /* Pizarra profundo para legibilidad máxima */
  --slate: hsl(215, 16%, 40%); /* Gris de soporte */
  --light-bg: hsl(210, 20%, 98%); /* Fondo alternativo suave */
  --white: #ffffff;
  --border-color: rgba(15, 23, 42, 0.08);
  --border-color-light: rgba(15, 23, 42, 0.04);
  
  /* Tipografías */
  --font-headings: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Sombras Premium */
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 15px 30px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
  --shadow-accent-glow: 0 15px 30px hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
  
  /* Transiciones y radios de borde */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. REINICIO Y ESTILOS BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

ul, ol {
  list-style: none;
}

/* Enlace de accesibilidad para lectores de pantalla */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top var(--transition-fast);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}
.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   3. MAQUETACIÓN Y CONTENEDORES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Espaciados entre secciones */
.section {
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
  position: relative;
}

.section-alt {
  background-color: var(--light-bg);
}

/* --------------------------------------------------------------------------
   4. CABECERA Y NAVEGACIÓN (STICKY GLASSMORPHIC)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-b: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

/* Header al hacer scroll (inyectado por JS) */
.site-header-scrolled {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.92);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 102;
}

.brand-logo {
  height: 50px;
  width: auto;
  transition: var(--transition-normal);
}
.site-header-scrolled .brand-logo {
  height: 42px;
}

.brand-text {
  font-family: var(--font-headings);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Menú de Escritorio */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition-normal);
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link-active {
  color: var(--primary);
}
.nav-link-active::after {
  width: 100%;
}

/* Botón de Cita en menú */
.btn-nav {
  background-color: var(--primary);
  color: var(--white) !important;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.btn-nav:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Botón de Menú Móvil */
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 102;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 32px;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--dark);
  border-radius: var(--radius-full);
  transition: var(--transition-normal);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Estado Activo del Botón Hamburguesa */
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
  background-color: var(--primary);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
  background-color: var(--primary);
}

/* Menú Cortina Móvil */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -320px;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--white);
  z-index: 101;
  padding: 100px 2rem 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  transition: var(--transition-normal);
}

.mobile-nav.active {
  right: 0;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-link {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color-light);
}

.mobile-nav-link:hover {
  color: var(--primary);
  padding-left: 0.5rem;
}

.mobile-menu-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   5. BOTONES PREMIUM
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-glow);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--dark);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--light-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--white);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.2);
}
.btn-whatsapp:hover {
  background-color: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.3);
}

.btn-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   6. SECCIÓN HERO (PRINCIPAL)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 10% 20%, hsla(var(--primary-h), var(--primary-s), 96%, 0.6) 0%, hsla(0, 0%, 100%, 1) 90%);
  padding-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

/* Decoraciones de fondo */
.hero-bg-glow {
  position: absolute;
  width: clamp(200px, 40vw, 500px);
  height: clamp(200px, 40vw, 500px);
  background: var(--primary-glow);
  border-radius: var(--radius-full);
  filter: blur(100px);
  top: -100px;
  right: -100px;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-tag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-tag a:hover {
  color: var(--accent);
}

.hero-logo-container {
  margin-bottom: 1.5rem;
}
.hero-logo {
  height: clamp(70px, 15vw, 110px);
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.05));
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.hero-title span {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-desc {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--slate);
  margin-bottom: 2rem;
  max-width: 580px;
}

/* Destacado de fisioterapia en hero */
.hero-physio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--accent-light);
  border: 1.5px solid var(--accent);
  color: var(--accent-hover);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-accent-glow);
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 500px) {
  .hero-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tarjetas rápidas de estadísticas */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background-color: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-num {
  font-family: var(--font-headings);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--slate);
}

/* Contenedor de Imágenes Hero */
.hero-media-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-image-main {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4/3;
  transition: var(--transition-slow);
}
.hero-image-main:hover {
  transform: scale(1.02);
}

.hero-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.hero-image-sub {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 4/3;
  transition: var(--transition-slow);
}
.hero-image-sub:hover {
  transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   7. SECCIÓN BANNER CONFIANZA
   -------------------------------------------------------------------------- */
.trust-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.trust-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent 60%);
  pointer-events: none;
}

.trust-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .trust-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.trust-content {
  max-width: 600px;
}

.trust-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--primary-h), var(--primary-s), 80%);
  margin-bottom: 0.5rem;
}

.trust-title {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.trust-desc {
  color: hsl(var(--primary-h), var(--primary-s), 90%);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   8. TARJETAS DE SERVICIOS (GRID Y HOVER PREMIUM)
   -------------------------------------------------------------------------- */
.section-title-wrapper {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-title {
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.section-subtitle {
  color: var(--slate);
  font-size: 1.05rem;
}

.services-grid {
  margin-bottom: 3.5rem;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  pointer-events: none;
  transition: var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::after {
  border-color: var(--primary-glow);
}

.service-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-normal);
}

.service-card:hover .service-icon-wrapper {
  background-color: var(--primary);
  color: var(--white);
  transform: scale(1.05);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Tarjeta Fisioterapia Destacada */
.service-card-featured {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--white) 350px);
  box-shadow: var(--shadow-accent-glow);
}

.service-card-featured::after {
  display: none;
}

.service-card-featured:hover {
  box-shadow: 0 20px 40px hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.25);
}

.service-card-featured .service-icon-wrapper {
  background-color: var(--accent);
  color: var(--white);
}

.service-card-featured:hover .service-icon-wrapper {
  background-color: var(--accent-hover);
}

.service-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background-color: var(--accent);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.service-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.service-card-featured .service-link {
  color: var(--accent-hover);
}

.service-link:hover {
  gap: 0.75rem;
}

/* Subgrupo de otros servicios */
.other-services-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 3rem 0 1.5rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   9. SECCIÓN RESEÑAS (TESTIMONIAL GRID DE ALTO IMPACTO)
   -------------------------------------------------------------------------- */
.reviews-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .reviews-grid { grid-template-columns: repeat(4, 1fr); }
}

.review-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-glow);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.review-author {
  font-weight: 700;
  color: var(--dark);
  font-size: 1.05rem;
}

.review-tag {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
}

.review-stars {
  color: #fbbf24; /* Amarillo oro */
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.review-text {
  font-size: 0.925rem;
  color: var(--slate);
  font-style: italic;
  line-height: 1.6;
}

.reviews-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   10. CÓMO LLEGAR Y DETALLES DE UBICACIÓN
   -------------------------------------------------------------------------- */
.map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .map-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.location-lead {
  font-size: 1.1rem;
  color: var(--slate);
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.location-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.location-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.location-details strong {
  display: block;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.15rem;
}

.location-details p, .location-details a {
  font-size: 0.9rem;
  color: var(--slate);
}

.location-details a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.map-media-wrapper {
  position: relative;
}

.map-image {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  width: 100%;
}

.map-caption {
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 0.75rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   11. PREGUNTAS FRECUENTES (FAQ ACORDEÓN DINÁMICO)
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
}

.faq-item:hover {
  border-color: var(--primary-glow);
  box-shadow: var(--shadow-sm);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-headings);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.faq-icon {
  color: var(--primary);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.faq-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--slate);
  border-top: 1px solid transparent;
  line-height: 1.6;
}

.faq-content a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Clases activas inyectadas por JS */
.faq-item.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  background-color: var(--primary);
  color: var(--white);
}

.faq-item.active .faq-content {
  border-top-color: var(--border-color-light);
}

/* --------------------------------------------------------------------------
   12. CONTACTO Y HORARIOS
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-card-box {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.contact-card-box:hover {
  box-shadow: var(--shadow-md);
}

.contact-item-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .contact-item-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-small-card {
  background-color: var(--light-bg);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color-light);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition-normal);
}

.contact-small-card:hover {
  background-color: var(--white);
  border-color: var(--primary-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.contact-small-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.contact-small-detail {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
}

.contact-small-detail a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Panel Horarios */
.schedule-panel {
  background-color: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.schedule-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.schedule-title i {
  color: var(--primary);
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.schedule-row {
  background-color: var(--white);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}

.schedule-day {
  font-weight: 700;
  color: var(--dark);
}

.schedule-time {
  color: var(--slate);
  font-weight: 500;
  text-align: right;
}

.schedule-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.schedule-note {
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   13. PIE DE PÁGINA (FOOTER PREMIUM)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--dark);
  color: var(--white);
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand-text {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
}

.footer-desc {
  font-size: 0.9rem;
  color: hsl(215, 15%, 70%);
  line-height: 1.6;
}

.footer-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: hsl(215, 15%, 80%);
}

.footer-item i {
  color: hsl(var(--primary-h), var(--primary-s), 65%);
  margin-top: 0.25rem;
}

.footer-item a {
  color: hsl(215, 15%, 80%);
}

.footer-item a:hover {
  color: var(--white);
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-normal);
}

.social-btn:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* Derechos de autor y links legales */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: hsl(215, 15%, 60%);
  margin-bottom: 0.75rem;
}

.footer-legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: hsl(215, 15%, 60%);
}

.footer-legal-link {
  text-decoration: underline;
}

.footer-legal-link:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   14. WIDGET DE CHAT FLOTANTE DE WHATSAPP (SIMULACIÓN PREMIUM)
   -------------------------------------------------------------------------- */
.floating-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Botón disparador */
.chat-trigger {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  position: relative;
}

.chat-trigger:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 14px 35px rgba(37, 211, 102, 0.5);
}

/* Pulsación de notificación */
.chat-trigger-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 2px solid #25D366;
  pointer-events: none;
  animation: pulseTrigger 2s infinite;
}

@keyframes pulseTrigger {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Ventana de chat / Globo emergente */
.chat-popup {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 320px;
  background-color: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: var(--transition-normal);
}

.chat-popup.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-popup-header {
  background-color: var(--primary);
  color: var(--white);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.chat-header-info {
  display: flex;
  flex-direction: column;
}

.chat-header-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.chat-header-status {
  font-size: 0.75rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-status::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background-color: #25D366;
  border-radius: var(--radius-full);
}

.chat-popup-body {
  padding: 1.25rem;
  background-color: #efeae2; /* Color de fondo tipo WhatsApp */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 240px;
  overflow-y: auto;
}

.chat-msg-bubble {
  background-color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: 0 12px 12px 12px;
  font-size: 0.875rem;
  color: var(--dark);
  max-width: 85%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  align-self: flex-start;
  position: relative;
}

.chat-msg-time {
  display: block;
  font-size: 0.7rem;
  color: var(--slate);
  text-align: right;
  margin-top: 0.25rem;
}

.chat-popup-footer {
  padding: 1rem;
  background-color: var(--white);
  border-top: 1px solid var(--border-color-light);
}

/* --------------------------------------------------------------------------
   15. PESTAÑAS (TABS) PERSONALIZADOS DE FISIOTERAPIA
   -------------------------------------------------------------------------- */
.tabs-container {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-top: 3rem;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  padding: 0.75rem;
  gap: 0.5rem;
  background-color: var(--light-bg);
  border-b: 1px solid var(--border-color);
}

.tab-button {
  background: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-headings);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-normal);
}

.tab-button:hover {
  color: var(--primary);
  background-color: rgba(15, 23, 42, 0.03);
}

.tab-button.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-button.active:hover {
  color: var(--white);
  background-color: var(--primary);
}

.tabs-panels {
  padding: 2.25rem;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
  display: block;
}

.tab-panel h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--primary);
}

.tab-panel p {
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tab-panel p:last-child {
  margin-bottom: 0;
}

.tab-panel ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.tab-panel li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--dark);
}

.tab-panel li i {
  color: var(--accent);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   16. ANIMACIONES E INTERSECCIÓN (OBSERVER Y SCROLL)
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Animaciones para la carga con Intersection Observer */
.reveal-element {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Delay secuencial para rejillas de elementos */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Botón flotante para Volver Arriba */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px; /* Para no chocar con el chat */
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: var(--transition-normal);
  z-index: 98;
}

.back-to-top.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   17. SECCIÓN ESPECÍFICA PÁGINAS LEGALES E HIGIENE DIGITAL
   -------------------------------------------------------------------------- */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.7;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-top: 1rem;
}

.legal-content ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}
.legal-content a:hover {
  color: var(--primary-hover);
}
