/* Fuente y base */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-600: #2563eb; /* azul 600 */
  --primary-700: #1d4ed8; /* azul 700 */
  --primary-50: #eff6ff;
  --indigo-50: #eef2ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

html, body {
  scroll-behavior: smooth;
  overflow-x: hidden;  /* Evita overflow horizontal general */
}

.body {
  background: var(--gray-50);
  font-family: 'Poppins', sans-serif;
  color: var(--gray-900);
  margin: 0;
}

/* Utilidades */
.hidden { display: none; }
.center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-24 { gap: 1.5rem; }
.text-primary { color: var(--primary-600); }
.full { width: 100%; }
.shadow-md { box-shadow: var(--shadow-md); }

/* Layouts */
.container {
  max-width: 80rem; /* 1280px */
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding: 5rem 1.5rem;
}

.section-white {
  background: var(--white);
}

.section-gray {
  background: #f3f4f6;  ;
}
.section-contacto{
    background: linear-gradient(180deg,#ffffff,#193e8e);
  }
.grid-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) { /* md */
  .grid-two {
    grid-template-columns: 1fr 1fr;
  }
}

/* -----------------
   HEADER
   - logo centrado visualmente
   - botón móvil a la derecha (posición absoluta)
   - menú desktop centrado en fila inferior
------------------*/
.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* header-top: logo centrado y botón móvil a la derecha */
.header-top {
  position: relative;            /* para posicionar el botón a la derecha */
  display: block;
  text-align: center;            /* centra el logo */
  padding: 0.8rem 1rem;
}

.logo-box picture img {
  height: 60px;         /* 🔧 Tamaño fijo del logo */
  width: auto;          /* Mantiene proporción */
  display: inline-block;
  margin: 0 auto;
  vertical-align: middle;
}

/* Wrapper del botón móvil colocado a la derecha */
.menu-mobile-btn-wrap {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Botón menu móvil */
.menu-mobile-btn {
  background: transparent;
  border: 0;
  color: var(--gray-800);
  cursor: pointer;
  padding: .25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Icon sizes */
.icon-24 { width: 24px; height: 24px; }

/* Menú móvil (por defecto oculto) */
.mobile-menu {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1rem 1.5rem;
  z-index: 70;
  transition: max-height 1s ease;
}
.mobile-menu-inner { display:flex; flex-direction:column; gap: .75rem; }
.mobile-link { color: var(--gray-800); font-weight:500; text-decoration:none; }
.mobile-link:hover { color: var(--primary-600); }

/* header-bottom: menú desktop */
.header-bottom {
  border-top: 1px solid rgba(0,0,0,0.05);
  background: var(--white);
}
.navbar { display:flex; justify-content:center; }
.menu-desktop {
  display: none; /* hidden on mobile, shown on desktop via media query */
  gap: 2rem;
  padding: .75rem 0;
}
.nav-link {
  color: var(--gray-800);
  font-weight: 500;
  text-decoration: none; /* importante: no subrayado */
  transition: color .2s ease;
  margin-left:40px;
  margin-right:40px;
}
.nav-link:hover { color: var(--primary-600); }

/* Mostrar menú-desktop y ocultar botón móvil en pantallas >= 1024px */
@media (min-width: 1150px) {
  .menu-desktop { display:flex; }
  .menu-mobile-btn-wrap { display: none; }
  .mobile-menu { display: none !important; }
}

/* pequeño helper para mostrar mobile menu cuando se elimina .hidden (tu JS) */
.hidden { display: none !important; }
.navbar.scrolled {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.3s, box-shadow 0.3s;
  }

/* Hero */
.hero {
  position: relative;
  padding: 5rem 1rem 3rem;
  overflow: hidden; /* Para que el blur no se salga */
}

/* Imagen de fondo blurreada */
.hero::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  background-image: image-set(
    url("imagenes/CONSULTA_GENERICA_1.webp") type("image/webp"),
    url("imagenes/CONSULTA_GENERICA_1.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(6px); /* Ajusta el valor para más o menos desenfoque */
  transform: scale(1.05); /* Evita bordes cortados al aplicar blur */
  z-index: 0;
}

/* Capa oscura encima del blur para legibilidad */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* Contenido encima del fondo */
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3rem;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 3vw + 1rem, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
}
.hero-span{
  color: #00c7ff;
}
.hero-subtitle {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: #ffffff; /* Gris oscuro */
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  max-width: 42rem;
}

/* Botón primario */
.hero-cta .btn-primary {
  background: rgba(37, 99, 235, 0.95); /* Azul con leve transparencia */
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-cta .btn-primary:hover {
  background: rgba(29, 78, 216, 1); /* Azul sólido al pasar el mouse */
}

/* Botón secundario */
.hero-cta .btn-outline {
  background: rgba(255, 255, 255, 0.9);
  color: #111827; /* Gris oscuro */
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 1);
}

/* Secciones comunes */
.section-header { margin-bottom: 4rem; }
.section-title {
  font-size: clamp(1.75rem, 1.2vw + 1rem, 2.25rem);
  font-weight: 700;
}
.section-underline {
  width: 5rem;
  height: 4px;
  background: var(--primary-600);
  margin: 1rem auto 0;
}
.section-description {
  max-width: 48rem;
  margin: 1.5rem auto 0;
  color: var(--gray-600);
  font-size: 1.125rem;
}

/* Tipografía auxiliar */
.subheading { font-size: 1.5rem; font-weight: 600; color: var(--gray-800); margin-bottom: 1.5rem; }
.paragraph { color: var(--gray-600); margin-bottom: 1.5rem; }

/* Cards */
.card{
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}
.card-datos{
    background: var(--white);
    padding: 2rem 4rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 100%; /* No se salga del contenedor */
    box-sizing: border-box; /* Para que padding no agregue ancho extra */
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}
.card-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 100%; /* No se salga del contenedor */
  box-sizing: border-box; /* Para que padding no agregue ancho extra */
  /* Eliminé width: fit-content para mejor responsividad */
  width: 100%;
}
.image-card .mb-6 { margin-bottom: 1.5rem; }
.image-rounded { width: 100%; border-radius: var(--radius-lg); display: block; }
.card.primary { background: #1e40af; color: #fff; border-radius: var(--radius-lg); padding: 1.5rem; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.card-quote { color: #FFF; }
/* Ajustes para móviles pequeños */
@media (max-width: 480px) {
    .card-datos,
    .card-form {
      padding: 1rem; /* Reducimos padding para que entre mejor */
    }
  }

/* Estilo cards original */
.carousel-viewport {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: none;
  gap: 10px;
}

.logo-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;     /* 🔧 ancho fijo */
  height: 150px;    /* 🔧 alto fijo */
  margin-right: 10px;
  flex: 0 0 auto;   /* 🔧 mantiene flujo horizontal */
  padding: 10px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive carousel */
@media (max-width: 1024px) {
  .carousel-track .logo-card {
    flex: 0 0 33.33%;
    max-width: 33.33%;
  }
}

@media (max-width: 640px) {
  .carousel-track .logo-card {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Servicios */
.service-card {
  border-top: 4px solid var(--primary-600);
  transition: transform .5s ease, box-shadow .5s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}
.icon-row {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.icon-badge {
  background: #dbeafe; /* blue-100 */
  padding: .75rem;
  border-radius: .5rem;
  color: var(--primary-600);
  display: inline-flex;
}
.icon-badge.sm { padding: .5rem; }
.card-heading { font-size: 1.5rem; font-weight: 600; color: var(--gray-800); }
.border-top-primary { border-top: 4px solid var(--primary-600); }

.check-list {
  list-style: none;
  padding: 0; margin: 0;
}
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--gray-700);
  margin-bottom: .75rem;
}
.check-list li::before {
  content: "✔";
  position: absolute;
  left: 0; top: 0.15rem;
  color: var(--primary-600);
  font-weight: 700;
}

/* Botones */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: .5rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn-primary {
  background: #1e40af;
  color: #fff;
}
.btn-primary:hover { background: #2961f8; }
.btn-outline {
  border: 1px solid var(--primary-600);
  color: var(--primary-600);
  background: transparent;
}
.btn-outline:hover { background: #eff6ff; }
.btn-cartilla {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color:#2961f8; /* Azul base */
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  
  .btn-cartilla:hover {
    background-color: #1e40af; /* Azul más oscuro al pasar el mouse */
    transform: translateY(-2px);
  }
  /* Centrar sección de valoraciones */
.valoraciones-center {
  display: flex;
  justify-content: center; /* Horizontal */
  align-items: center;     /* Vertical */
  flex-direction: column;
  gap: 2rem;
}
/* Estilo del modal */
.modal-exito {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-contenido {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  font-size: 1.1em;
  text-align: center;
  animation: aparecer 0.3s ease-out;
}

@keyframes aparecer {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Contacto */
.stack-24 { display: grid; gap: 1.5rem; }
.icon-item { display: flex; gap: 1rem; align-items: flex-start; }
.item-title { font-weight: 600; color: var(--gray-900); margin: 0 0 .25rem; }
.item-text {
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  word-wrap: break-word !important;
  hyphens: auto;
  max-width: 100%;
}
.section-contacto {
  display: flex;
  justify-content: center; /* horizontal */
  align-items: center;     /* vertical */
  min-height: 100vh;       /* ocupa toda la altura de la ventana */
}

  
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #dbeafe;
  color: var(--primary-600);
  border-radius: 9px;
  transition: background 0.3s, transform 0.3s;
  text-decoration: none;
}

.social-btn:hover {
  background: dbeafe;
  transform: scale(1.1);
}

/* ----------------
   Redes sociales (nuevo estilo)
-----------------*/
.social-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.08);
  color: #d1d5db;
  border-radius: 9px;
  transition: background 0.3s, transform 0.3s;
  text-decoration: none;
}

.icon-20 {
  width: 20px;
  height: 20px;
}

.footer-social:hover {
  background: var(--primary-700);
  transform: scale(1.1);
}
/* Formulario */
.form { display: grid; gap: 1.5rem; padding: 0rem 1rem; }
.form-field { display: grid; gap: .5rem; }
.form .grid-two { gap: 3rem; }
.label { font-size: .875rem; font-weight: 500; color: var(--gray-700); gap: .5rem; }
.input {
    width: 100%;
    padding: 0rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: .5rem;
    font: inherit;
    color: var(--gray-900);
    background: var(--white);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    height: 48px; 
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.input:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}
.textarea {
    min-height: 5rem; 
    resize: vertical;
    height: auto; 
    line-height: 1.5;
}
/* Footer */
.footer {
  background:#193e8e ;
  color: #fff;
  padding: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

.footer-logo{ margin-bottom: 1rem; }
.footer-text { color: #e5e7eb; margin-bottom: 1.5rem; }
.footer-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-link { color: #e5e7eb; text-decoration: none; transition: color .3s ease; }
.footer-link:hover { color: #ffffff; }
.footer-bottom {
  border-top: 1px solid #ffffff;
  margin-top: 2.5rem; padding-top: 1.5rem;
  text-align: center;
  color: #fff;
}

@media (min-width: 768px) { /* md */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer-col-span2 {
    grid-column: span 2;
  }
}

/* Espaciados heredados del diseño */
.mb-6 { margin-bottom: 1.5rem; }

/* Ajustes responsivos específicos */
@media (min-width: 640px) { /* sm */
  .hero-cta { gap: 1rem; }
}
@media (min-width: 768px) { /* md */
  .section { padding: 5rem 3rem; }
}

/* Ajuste de la card en la sección #nosotros */
#nosotros .image-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  max-width: 500px;   /* limita el ancho */
  margin: 0 auto;     /* la centra dentro de su columna */
  padding: 1.5rem;    /* menos padding que otras cards */
}

#nosotros .image-card img {
  max-height: 350px;   /* achica la imagen */
  object-fit: cover;   /* mantiene proporciones sin deformarse */
  margin-bottom: 1rem; /* separa de la card inferior */
}

#nosotros .image-card .card.primary {
  padding: 1rem 1.25rem; /* más compacto */
  text-align: center;
}
/* ===== ANIMACIÓN FADE MENU MÓVIL ===== */

.mobile-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.mobile-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Tamaño del logo en el footer */
.footer-col-span2 picture img {
  height: 60px;        /* 🔧 Fija el alto del logo */
  width: auto;         /* Mantiene la proporción */
  display: block;
  margin-bottom: 1rem;
}

/* Opcional: versión más pequeña en pantallas móviles */
@media (max-width: 480px) {
  .footer-col-span2 picture img {
    height: 50px;
  }
}
/* === SECCIÓN PRESTACIONES === */
.prestaciones-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .prestaciones-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .prestaciones-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.prestacion-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prestacion-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.prestacion-img {
  max-width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 10%;
  margin: 0 auto 1rem;
  display: block;
}

.prestacion-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}
/* ===== Sección Dirección (imagen de fondo difuminada) ===== */
.section-direccion {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Imagen de fondo blurreada con soporte webp/jpg */
.section-direccion::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("imagenes/DIRECCION.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter:/* blur(6px)*/ brightness(0.5);
  transform: scale(1.1);
  z-index: 0;
}

/* Para navegadores modernos usar webp */
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .section-direccion::before {
    background-image: image-set(
      url("imagenes/DIRECCION.webp") type("image/webp"),
      url("imagenes/DIRECCION.png") type("image/png")
    );
  }
}

/* Capa que contiene el contenido */
.direccion-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
  padding: 3rem 1.5rem;
  max-width: 700px;
}

/* Contenido */
.icono-ubicacion {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.icon-40 {
  width: 40px;
  height: 40px;
  color: #fff;
}

.direccion-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #FFF;
}

.direccion-text {
  color: #e5e7eb;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Botón */
.btn-maps {
  background-color: #b42c00;
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  border-radius: 2rem;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-maps:hover {
  background-color: #e04600;
  transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .section-direccion {
    min-height: 60vh;
  }
  .direccion-title {
    font-size: 1.5rem;
  }
  .direccion-text {
    font-size: 1rem;
  }
}
