:root {
  --color-blue: #0059A1;
  --color-green: #0C9D4C;
  --color-yellow: #FFC72C;
  --color-dark: #1F2937;
  --color-light: #F9FAFB;
  --color-white: #FFFFFF;
  
  --font-main: 'Outfit', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden !important;
}

body {
  font-family: var(--font-main);
  color: var(--color-dark);
  background-color: var(--color-light);
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden !important;
}

/* Anclas: espacio para la barra compacta fija */
section[id] {
  scroll-margin-top: 5.5rem;
}

#inicio.hero-section {
  scroll-margin-top: 0;
}

/* Navbar solo en portada: dentro del hero, absolute (sale al hacer scroll) */
.navbar {
  background-color: var(--color-white);
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  margin-left: -2rem;
  min-width: 0;
  overflow: hidden; /* Bloquea cualquier desbordamiento interno */
}

.nav-logo {
  height: calc(180px - 2cm);
  width: auto;
  object-fit: contain;
  image-rendering: crisp-edges;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Perfectamente centrado verticalmente */
  min-width: 0; /* Permite que el texto se encoja dentro del flex */
}

.logo-title {
  font-family: 'Montserrat', var(--font-main);
  font-size: 1.25rem; /* Reducido ligeramente a favor del subtítulo */
  font-weight: 500; /* Peso medium para que no aplane */
  color: var(--color-blue);
  line-height: 1.2;
}

.logo-subtitle {
  font-family: 'Montserrat', var(--font-main);
  font-size: 1.15rem; /* Ligeramente menor a la línea principal (1.25rem) */
  font-weight: 600; /* Integración uniforme y equilibrada */
  font-style: italic; /* Cursiva solicitada */
  color: var(--color-blue); /* Azul institucional igual al título */
  margin-top: 0.1rem;
}

.navbar nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.navbar nav a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar nav a:hover {
  color: var(--color-green);
}

/* Barra compacta: visible al salir del hero */
.nav-compact {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 4%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #e2e8f0;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-compact.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-compact__brand {
  flex-shrink: 0;
  font-family: 'Montserrat', var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-blue);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-compact__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.85rem;
  margin: 0;
  padding: 0;
}

.nav-compact__list a {
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.nav-compact__list a:hover,
.nav-compact__list a.is-active {
  color: var(--color-green);
}

.nav-compact__list a.is-active {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

@media (max-width: 768px) {
  .nav-compact {
    padding: 0.5rem 3%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-compact__list {
    justify-content: center;
    row-gap: 0.25rem;
    column-gap: 0.65rem;
  }

  .nav-compact__list a {
    font-size: 0.78rem;
  }

  section[id] {
    scroll-margin-top: 7rem;
  }

  #trayectoria.trayectoria,
  #servicios.services,
  .planes,
  .testimonios,
  .contacto,
  .mensaje-directora {
    scroll-margin-top: 7rem;
  }
}

/* Utilities */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-yellow);
  color: var(--color-dark);
}

.btn-primary:hover {
  background-color: #eab308;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(234, 179, 8, 0.4);
}

button.btn {
  font-family: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Home — Hero (portada) — fondo sin franjas (cover + viewport estable) */
.hero-section {
  background-image: url('imagenes/portada_final.webp'), url('imagenes/portada_final.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-color: #1a1a1a;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  height: auto;
  width: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  text-align: center;
  color: var(--color-white);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.hero-section .hero-content {
  position: relative;
  z-index: 1;
  color: #ffffff;
  padding: 0 15px;
  max-width: 900px;
}

.hero-section .hero-content h1 {
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.55), 0 0 30px rgba(0, 0, 0, 0.3);
}

.hero-section .hero-content h2.hero-subtitle {
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 10px 0 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  text-align: center;
  text-wrap: balance;
  white-space: normal;
}

.hero-section .hero-content p {
  font-size: 1.5rem;
  margin: 0 0 15px;
  font-weight: 400;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5), 2px 2px 8px rgba(0, 0, 0, 0.7);
}

@media (min-width: 769px) {
  .hero-section .hero-content h2.hero-subtitle {
    white-space: nowrap;
  }
}

.hero-section--verano {
  /* Desplazamiento vertical del fondo (+4.5 cm sobre la base en %) */
  background-position: center calc(28% + 4.5cm);
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(100px, 22vmin, 360px);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.hero-section--verano .hero-content {
  margin-top: calc(clamp(1rem, 6vmin, 80px) + 5cm);
}

.hero-section--classic {
  background-position: center calc(0% + 4.5cm);
  align-items: center;
  justify-content: center;
  padding-top: clamp(72px, 12vmin, 120px);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.hero-section--classic .hero-content {
  margin-top: 0;
}

.hero-section--classic #hero-contact.btn {
  opacity: 1;
}

@media (max-width: 1024px) {
  .hero-section--verano {
    background-position: center calc(22% + 4.5cm);
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 100dvh;
    min-height: 100svh;
    background-position: center center;
  }

  .hero-section--verano {
    background-position: center calc(18% + 4.5cm);
    align-items: center;
    padding-top: clamp(90px, 18vw, 200px);
    padding-bottom: 2.5rem;
  }

  .hero-section--verano .hero-content {
    margin-top: calc(0.75rem + min(5cm, 18vh));
  }

  .hero-section--classic {
    padding-top: clamp(72px, 14vw, 110px);
  }
}

@media (max-width: 480px) {
  #btn-video.btn {
    font-size: 1.05rem;
    padding: 1rem 1.35rem;
    transform: scale(1);
    animation: none;
  }

  #btn-video.btn:hover {
    transform: scale(1.02);
  }
}

/* Hero Buttons Container */
.hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.hero-buttons .btn {
  min-width: min(280px, 100%);
  max-width: 100%;
  box-sizing: border-box;
}

#hero-contact.btn {
  font-size: 1rem;
  padding: 0.875rem 2rem;
  opacity: 0.85;
}

#btn-video.btn {
  font-size: 1.35rem;
  font-weight: 700;
  padding: 1.25rem 3rem;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.08);
  position: relative;
  overflow: hidden;
  animation: pulso-suave 2.5s ease-in-out infinite;
}

#btn-video.btn:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Botón interactivo #btn-video */
#btn-video {
  position: relative;
  overflow: hidden;
}

#btn-video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

#btn-video:hover {
  transform: scale(1.12) !important;
  filter: brightness(1.15);
}

#btn-video:hover::after {
  width: 300px;
  height: 300px;
  opacity: 1;
}

#btn-video.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: brillo 3s ease-in-out infinite;
}

@keyframes pulso-suave {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 8px 35px rgba(239, 68, 68, 0.6), 0 6px 16px rgba(0, 0, 0, 0.2);
  }
}

@keyframes brillo {
  0%, 100% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}

/* Mensaje Directora Section */
.mensaje-directora {
  padding: 5.5rem 5% 6rem;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: stretch;
  justify-content: center;
  background-color: var(--color-white);
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  scroll-margin-top: 5.5rem;
}

.md-image-col {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Sombra suave para resaltar */
  border: 1px solid #e5e7eb; /* Borde muy fino gris claro */
  display: flex;
  overflow: hidden;
  margin: 0;
}

.md-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.md-text-col h2 {
  font-family: 'Montserrat', var(--font-main);
  font-size: 2.6rem;
  color: var(--color-blue);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.md-text-col p {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  color: #4b5563;
  line-height: 1.8;
}

.md-text-col .directora-firma {
  margin-top: 3rem;
  font-size: 1.2rem;
  color: var(--color-blue);
  font-family: 'Montserrat', var(--font-main);
  border-top: 2px solid #e5e7eb;
  padding-top: 2rem;
  font-style: italic;
  margin-bottom: 0;
}

.md-text-col .directora-firma strong {
  font-weight: 700;
  font-size: 1.35rem;
  font-style: normal; /* El nombre normal, el cargo en cursiva */
  display: block;
  margin-bottom: 0.3rem;
}

/* Director Section */
.director {
  padding: 5rem 5%;
  background-color: #F0F9FF; /* light blue */
}

.director-container {
  display: flex;
  flex-direction: row-reverse;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.director-info {
  flex: 1;
}

.director-info h2 {
  font-size: 2.5rem;
  color: var(--color-blue);
  margin-bottom: 0.5rem;
}

.director-info h3 {
  font-size: 1.5rem;
  color: var(--color-green);
  margin-bottom: 1.5rem;
}

.director-info p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #4b5563;
}

.director-image {
  flex: 1;
}

.director-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  border: 5px solid var(--color-white);
  display: block;
  margin: 0 auto;
}

/* Galeria Histórica */
.galeria {
  padding: 5rem 5%;
  background-color: var(--color-white);
  text-align: center;
}

.galeria h2 {
  font-size: 2.5rem;
  color: var(--color-blue);
  margin-bottom: 1rem;
}

.galeria-desc {
  font-size: 1.1rem;
  color: #4b5563;
  margin-bottom: 3rem;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.galeria-item {
  background: var(--color-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.galeria-item:hover {
  transform: translateY(-5px);
}

.galeria-item .img-placeholder {
  width: 100%;
  height: 250px;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  color: #6b7280;
  font-size: 0.9rem;
  border-bottom: 4px solid var(--color-green);
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
}

.galeria-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: 4px solid var(--color-green);
  display: block;
}

.galeria-item h3 {
  padding: 1.5rem;
  font-size: 1.2rem;
  color: var(--color-blue);
}

/* Trayectoria Histórica */
.trayectoria {
  padding: 5rem 5%;
  background-color: #F8FAFC; /* Fondo muy suave y contrastante */
  text-align: center;
}

.trayectoria h2 {
  font-size: 2.5rem;
  color: var(--color-blue);
  margin-bottom: 1rem;
}

#trayectoria.trayectoria {
  scroll-margin-top: 5.5rem;
  padding-top: 5.5rem;
  padding-bottom: 5rem;
}

.trayectoria-prose {
  max-width: 850px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.75;
}

.trayectoria-timeline {
  max-width: 820px;
  margin: 2rem auto 0;
  padding: 0;
  list-style: none;
  border-left: 3px solid #bfdbfe;
  text-align: left;
}

.trayectoria-timeline li {
  position: relative;
  padding: 0 0 2rem 1.75rem;
}

.trayectoria-timeline li:last-child {
  padding-bottom: 0;
}

.trayectoria-timeline li::before {
  content: '';
  position: absolute;
  left: -0.55rem;
  top: 0.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--color-green);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #bfdbfe;
}

.trayectoria-year {
  display: inline-block;
  font-family: 'Montserrat', var(--font-main);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-blue);
  background: #e0f2fe;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}

.trayectoria-timeline p {
  margin: 0;
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.7;
}

.trayectoria-desc {
  color: #4b5563;
  font-size: 1.15rem;
  margin-bottom: 3.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.trayectoria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.trayectoria-card {
  background: var(--color-white);
  border-radius: 16px; /* Borde redondeado elegante */
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); /* Sombra muy sutil */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
}

.trayectoria-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08); /* Mejora de sombra elegante al hacer hover */
}

.trayectoria-card .img-wrapper {
  position: relative;
  width: 100%;
  height: 250px;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid var(--color-green); /* Acento sutil en el borde de foto */
}

.trayectoria-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 10;
}

.fallback-placeholder {
  position: absolute;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.trayectoria-card .caption {
  padding: 1.8rem;
  text-align: left;
  flex-grow: 1;
  background: #ffffff;
}

.trayectoria-card h3 {
  color: var(--color-blue); /* Fuente azul institucional */
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.trayectoria-card p {
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

.elegant-placeholder {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
  border: 2px dashed #9ca3af !important;
  color: #4b5563 !important;
}

/* Services */
.services {
  padding: 5.5rem 5% 5rem;
  background-color: var(--color-light);
  text-align: center;
}

#servicios.services {
  scroll-margin-top: 5.5rem;
}

.services h2 {
  font-size: 2.5rem;
  color: var(--color-blue);
  margin-bottom: 3rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

.services-grid .service-card {
  grid-column: span 2;
}

/* 5 tarjetas: 3 arriba + 2 centradas abajo */
.services-grid .service-card:nth-child(4):nth-last-child(2) {
  grid-column: 2 / span 2;
}

.services-grid .service-card:nth-child(5):last-child {
  grid-column: 4 / span 2;
}

.service-card {
  background: var(--color-white);
  padding: 2.5rem 2.5rem;
  border-radius: 24px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  border-top: 5px solid var(--color-green); /* Borde sutil de color verde del logo */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%; /* Obliga a mantener simetría idéntica entre tarjetas contiguas */
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.45rem;
  color: var(--color-blue); /* Color azul institucional */
  margin-bottom: 1rem;
  font-family: 'Montserrat', var(--font-main);
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid .service-card,
  .services-grid .service-card:nth-child(4):nth-last-child(2),
  .services-grid .service-card:nth-child(5):last-child {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card p {
  color: #4b5563;
  flex-grow: 1; /* Permite estirarse equilibrando los párrafos */
  margin-bottom: 2rem; /* Deja suficiente paso superior al botón contiguo inferior */
}

/* Planes y costos */
.planes {
  padding: 5.5rem 5% 5rem;
  background-color: #f8fafc;
  scroll-margin-top: 5.5rem;
}

.planes-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.planes h2 {
  font-size: 2.5rem;
  color: var(--color-blue);
  text-align: center;
  margin-bottom: 0.75rem;
  font-family: 'Montserrat', var(--font-main);
}

.planes-intro {
  text-align: center;
  color: #4b5563;
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-size: 1.08rem;
}

.planes-block {
  margin-bottom: 2.75rem;
}

.planes-block h3 {
  color: var(--color-blue);
  font-size: 1.45rem;
  font-family: 'Montserrat', var(--font-main);
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.planes-ages {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.planes-block-note {
  color: #4b5563;
  margin-bottom: 1.25rem;
  line-height: 1.65;
  max-width: 820px;
}

.planes-block--soft {
  background: #ffffff;
  border-radius: 24px;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid #e2e8f0;
}

.planes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.planes-grid--two {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 700px) {
  .planes-grid,
  .planes-grid--two {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem 1.35rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(0, 89, 161, 0.06);
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0.75rem;
}

.planes-block--soft .plan-card {
  background: #f8fafc;
}

.plan-card--accent {
  border-top: 4px solid var(--color-yellow);
}

.plan-card h4 {
  margin: 0;
  color: var(--color-blue);
  font-size: 1.2rem;
  font-family: 'Montserrat', var(--font-main);
}

.plan-includes {
  margin: 0;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.55;
  flex-grow: 1;
}

.plan-price {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-dark);
  font-family: 'Montserrat', var(--font-main);
}

.plan-price span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.15rem;
}

.plan-card .btn-whatsapp {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.planes-disclaimer {
  text-align: center;
  color: #64748b;
  font-size: 0.92rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .planes h2 {
    font-size: 2rem;
  }

  .planes-block--soft {
    padding: 1.25rem 1rem;
  }
}

/* Testimonios */
.testimonios {
  padding: 5.5rem 5% 5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  scroll-margin-top: 5.5rem;
}

.testimonios-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.testimonios h2 {
  font-size: 2.5rem;
  color: var(--color-blue);
  text-align: center;
  margin-bottom: 0.75rem;
  font-family: 'Montserrat', var(--font-main);
}

.testimonios-intro {
  text-align: center;
  color: #4b5563;
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.testimonios-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.testimonios-filter {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--color-dark);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.testimonios-filter:hover {
  border-color: var(--color-green);
  color: var(--color-green);
}

.testimonios-filter.is-active {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #ffffff;
}

.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .testimonios-grid {
    grid-template-columns: 1fr;
  }
}

#testimonios-more[hidden] {
  display: none !important;
}

.testimonio-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 10px 24px rgba(0, 89, 161, 0.08);
  border: 1px solid #e2e8f0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonio-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.testimonio-badge {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.testimonio-anio {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
}

.testimonio-texto {
  margin: 0;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.65;
  font-style: italic;
}

.testimonio-nombre {
  margin: 0;
  color: var(--color-blue);
  font-weight: 700;
  font-family: 'Montserrat', var(--font-main);
}

.testimonio-relacion {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.testimonios-empty {
  text-align: center;
  color: #64748b;
  margin: 1rem 0 0;
}

.testimonios-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.testimonios-form-card {
  margin-top: 3.5rem;
  background: #ffffff;
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  border-top: 5px solid var(--color-green);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.testimonios-form-card h3 {
  color: var(--color-blue);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', var(--font-main);
}

.testimonios-form-note {
  color: #4b5563;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.testimonios-form .form-row {
  margin-bottom: 1.1rem;
  text-align: left;
}

.testimonios-form label {
  display: block;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.testimonios-form input,
.testimonios-form select,
.testimonios-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--color-dark);
  background: #fff;
  box-sizing: border-box;
}

.testimonios-form input:focus,
.testimonios-form select:focus,
.testimonios-form textarea:focus {
  outline: 2px solid rgba(0, 89, 161, 0.35);
  border-color: var(--color-blue);
}

.testimonios-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row--split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.form-hint {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.85rem;
}

.testimonios-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-top: 0.5rem;
}

.testimonios-form-actions .btn-whatsapp {
  align-self: center;
}

.testimonios-status {
  margin-top: 1rem;
  color: var(--color-green);
  font-weight: 600;
  min-height: 1.4em;
}

.honey-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 640px) {
  .testimonios h2 {
    font-size: 2rem;
  }

  .form-row--split {
    grid-template-columns: 1fr;
  }

  .testimonios-form-card {
    padding: 1.6rem 1.2rem;
  }
}

/* WhatsApp Call to Action */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 0.8rem 1.6rem;
  background-color: #25d366; /* Official WhatsApp Green */
  color: #ffffff;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #1ebc56;
  transform: scale(1.05);
  color: #ffffff;
}

/* Contacto y Mapa Section */
.contacto {
  padding: 5.5rem 5% 5rem;
  background-color: #f8fafc; /* Gris/azul muy clarito para que resalte el blanco */
  scroll-margin-top: 5.5rem;
}

.contacto-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* Columna más amplia a la derecha para el mapa */
  background-color: var(--color-white);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  overflow: hidden;
}

.contacto-info {
  padding: 4rem 3rem;
}

.contacto-info h2 {
  font-size: 2.2rem;
  color: var(--color-blue);
  margin-bottom: 2.5rem;
  font-family: 'Montserrat', var(--font-main);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.icon-contact {
  font-size: 1.5rem;
  background: #f0f9ff; /* Azul muy tenue institucional */
  color: var(--color-blue); /* Emoji fallback color trick/tint */
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

.info-text h4 {
  font-size: 1.15rem;
  color: var(--color-blue);
  margin-bottom: 0.3rem;
}

.info-text p {
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
}

.enlace-contacto {
  color: var(--color-green);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 0.5rem;
}

.enlace-contacto:hover {
  text-decoration: underline;
}

.contacto-mapa {
  width: 100%;
  height: 100%;
  min-height: 400px; /* Asegura altura mínima para tablet/desktop de 400px */
}

.contacto-mapa iframe {
  display: block;
}

.map-embed {
  border: 0;
}

/* Modal video — campaña verano */
.video-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.88);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.video-modal.is-open {
  display: flex;
}

.video-modal__panel {
  position: relative;
  width: min(960px, 100%);
  margin: auto;
  flex-shrink: 0;
}

.video-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  color: #ffffff;
  font-size: clamp(1.5rem, 4vw, 2rem);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  padding: 8px 14px;
  line-height: 1;
  border-radius: 8px;
}

.video-modal__close:hover {
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.65);
}

.video-modal__video-wrap {
  width: 100%;
  margin-top: 44px;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal__video-wrap video {
  width: 100%;
  height: auto;
  max-height: min(82vh, 82dvh);
  display: block;
  object-fit: contain;
}

@media (max-width: 640px) {
  .video-modal__video-wrap {
    margin-top: 48px;
    border-radius: 8px;
  }

  .video-modal__video-wrap video {
    max-height: min(72vh, 72dvh);
  }

  .video-modal__close {
    padding: 10px 16px;
  }
}

/* Footer portada (bloque azul con crédito) */
.site-footer {
  background-color: #004a99;
  color: #ffffff;
  padding: 40px 0;
  text-align: center;
  width: 100%;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer-text {
  font-size: 16px;
}

.site-footer-mark {
  height: 6rem;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
}

.btn-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffd700;
  color: #333333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: 0.3s;
}

.btn-top:hover {
  transform: translateY(-2px);
}

/* WhatsApp flotante — visible en todas las secciones */
.btn-whatsapp-float {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-main);
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-whatsapp-float:hover {
  color: #ffffff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
  filter: brightness(1.05);
}

.btn-whatsapp-float svg {
  flex-shrink: 0;
  display: block;
}

.btn-whatsapp-float__label {
  line-height: 1;
}

@media (max-width: 480px) {
  .btn-whatsapp-float {
    padding: 0.9rem;
    border-radius: 50%;
  }

  .btn-whatsapp-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* Bloque fototeca (opcional en home) */
#fototeca {
  background: #ffffff;
  padding: 60px 20px;
  color: #222222;
}

#fototeca h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.5rem;
  color: #111111;
}

.fototeca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.fototeca-card {
  overflow: hidden;
  border-radius: 16px;
  background: #f8f8f8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.fototeca-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.fototeca-card span {
  display: block;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: #333333;
}

/* Subpágina Fototeca */
.page-fototeca {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
}

.page-fototeca .page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 50px;
}

.page-fototeca .back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-white);
  background: var(--color-blue);
  border: 2px solid var(--color-blue);
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 89, 161, 0.35);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.page-fototeca .back-link:hover {
  color: var(--color-white);
  background: #004080;
  border-color: #004080;
  transform: translateY(-1px);
}

.page-fototeca .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.page-fototeca .gallery-card {
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.page-fototeca .gallery-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.page-fototeca .gallery-card span {
  display: block;
  padding: 16px;
  font-size: 0.95rem;
  color: #444444;
}

.page-fototeca .page-title {
  margin: 30px 0 20px;
  font-size: 2.6rem;
  color: var(--color-blue);
  text-align: center;
  font-family: 'Montserrat', var(--font-main);
}

@media (max-width: 640px) {
  .page-fototeca .page-title {
    font-size: 2rem;
  }

  .page-fototeca .gallery-card img {
    height: 220px;
  }
}

/* Footer Minimalista */
.footer {
  background-color: var(--color-blue);
  color: var(--color-white);
  padding: 1.5rem 5%;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
}

.footer-genaia {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.75rem;
}

.footer-genaia-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-genaia span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  letter-spacing: 0.03em;
}

.footer-genaia img {
  max-height: 80px;
  width: auto;
  opacity: 0.92;
  filter: brightness(0) invert(1); /* Blanco sobre fondo azul */
  transition: opacity 0.3s ease;
  vertical-align: middle;
}

.footer-genaia img:hover {
  opacity: 1;
}

/* Responsive — Tablet / iPad exclusivo (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .navbar {
    flex-direction: row;      /* Mantiene logo e items en la misma fila */
    flex-wrap: nowrap;
    align-items: center;
    padding: 0 3%;
    padding-top: 0 !important;
    margin-top: 0 !important;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 72px;         /* Altura fija y delgada */
  }

  .logo-container {
    flex-direction: row;      /* Logo e imagen en fila — no apilados */
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;           /* Cancela el -2rem del escritorio */
    gap: 10px;
    overflow: hidden;
  }

  .nav-logo {
    height: 64px;             /* Compacto para no engordar la barra */
    flex-shrink: 0;
  }

  .logo-text {
    display: block;           /* Flujo de bloque: el texto se extiende horizontalmente */
    width: auto;
    min-width: 0;
    overflow: hidden;
  }

  .logo-title {
    display: block;
    font-size: 0.85rem;       /* Caben las palabras en 2 renglones máximo */
    line-height: 1.1;         /* Compacto verticalmente */
    white-space: normal;
    word-break: break-word;
    max-width: 300px;
    margin: 0;
    padding: 0;
  }

  .logo-subtitle {
    display: block;
    font-size: 0.8rem;
    line-height: 1.2;
    margin-top: 2px;
  }

  .navbar nav {
    flex: 0 0 auto;
  }

  .navbar nav ul {
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
    font-size: 0.88rem;
  }

  .mensaje-directora {
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
  }
}

/* Responsive — Móvil (hasta 768px) */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
    width: 100%;
  }
  
  .logo-container {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
    margin-left: 0;
    width: 100%;
  }

  .logo-title {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .navbar nav ul {
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero-section .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-section .hero-content h2.hero-subtitle {
    font-size: 1.5rem;
  }

  .hero-section .hero-content p {
    font-size: 1.2rem;
  }
  
  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .director-container {
    flex-direction: column;
  }
  
  .contacto-wrapper {
    grid-template-columns: 1fr;
  }
  
  .contacto-mapa {
    min-height: 350px;
  }

  .mensaje-directora {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 5%;
  }

  .md-image-col {
    max-height: 350px;
  }
}

/* iPhone y pantallas muy pequeñas */
@media (max-width: 480px) {
  .navbar {
    padding: 0.75rem 1rem;
  }

  .logo-container {
    margin-left: 0;
    gap: 0.4rem;
  }

  .nav-logo {
    height: 100px;
  }

  .logo-title {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .logo-subtitle {
    font-size: 0.82rem;
  }

  .navbar nav ul {
    gap: 0.6rem;
    font-size: 0.85rem;
  }

  .hero-section .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-section .hero-content h2.hero-subtitle {
    font-size: 1.2rem;
    white-space: normal;
  }

  .hero-section .hero-content p {
    font-size: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .trayectoria-grid {
    grid-template-columns: 1fr;
  }
}

