body {
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

.font-bubblegum {
  font-family: "Bubblegum Sans", cursive;
}

/* Estilos para el menú desplegable */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #4059aa;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  visibility: visible;
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s;
}

.dropdown-content a:hover {
  background-color: #1e3a8a;
}

.dropdown::after {
  content: "";
  position: absolute;
  height: 20px;
  width: 100%;
  bottom: -20px;
  left: 0;
}

/* Efecto de subrayado para los elementos del menú */
.nav-link {
  position: relative;
  padding: 0.5rem 0;
  color: #1e40af;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #1e40af;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #ef4444;
}

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

/* Animaciones para elementos */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Estilos para la galería de imágenes */
.gallery-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.gallery-slides {
  display: flex;
  transition: transform 0.5s ease;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Estilos para las tarjetas de características */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 20px;
}

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

/* Estilos para la rutina diaria */
.daily-routine-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 1.5rem;
}

.daily-routine-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background-color: #3b82f6;
  border-radius: 50%;
}

.daily-routine-item::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 20px;
  width: 2px;
  height: calc(100% + 10px);
  background-color: #93c5fd;
}

.daily-routine-item:last-child::after {
  display: none;
}

/* Estilos para las tarjetas de actividades */
.activity-card {
  overflow: hidden;
  position: relative;
  border-radius: 20px;
}

.activity-card img {
  transition: transform 0.5s ease;
}

.activity-card:hover img {
  transform: scale(1.05);
}

/* Estilos para las nubes animadas */
.cloud {
  position: absolute;
  opacity: 0.8;
  animation: float 30s linear infinite;
}

.cloud-1 {
  top: 10%;
  left: -100px;
  animation-duration: 35s;
}

.cloud-2 {
  top: 30%;
  left: -150px;
  animation-duration: 45s;
  animation-delay: 10s;
}

.cloud-3 {
  top: 15%;
  left: -80px;
  animation-duration: 40s;
  animation-delay: 5s;
}

@keyframes float {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(100vw + 200px));
  }
}

/* Estilos para el arcoiris */
.rainbow {
  position: relative;
  height: 80px;
  overflow: hidden;
}

.rainbow-arc {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 200px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(
    to bottom,
    #ff0000,
    #ff7f00,
    #ffff00,
    #00ff00,
    #0000ff,
    #4b0082,
    #8b00ff
  );
  opacity: 0.7;
}

/* Estilos para los elementos flotantes */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Estilos para la línea de tiempo del día típico */
.timeline-day {
  position: relative;
  padding: 2rem 0;
}

.timeline-day::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 4px;
  background: linear-gradient(
    to bottom,
    #ff6b6b,
    #feca57,
    #48dbfb,
    #1dd1a1,
    #ff9ff3
  );
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  margin-bottom: 2rem;
  position: relative;
}

.timeline-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  z-index: 10;
  border: 4px solid white;
}

.timeline-content {
  width: 45%;
  margin-left: auto;
  position: relative;
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 0;
  margin-right: auto;
}

.timeline-content::before {
  content: "";
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  right: 100%;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid white;
}

.timeline-item:nth-child(even) .timeline-content::before {
  left: 100%;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid white;
}

@media (max-width: 768px) {
  .timeline-day::before {
    left: 40px;
  }

  .timeline-dot {
    left: 40px;
  }

  .timeline-content {
    width: calc(100% - 80px);
    margin-left: 80px;
  }

  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 80px;
    margin-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
    border-left: none;
  }
}

/* Estilos para los botones infantiles */
.btn-kids {
  border-radius: 30px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.1);
  position: relative;
  top: 0;
}

.btn-kids:hover {
  top: -3px;
  box-shadow: 0 7px 0 0 rgba(0, 0, 0, 0.1);
}

.btn-kids:active {
  top: 4px;
  box-shadow: none;
}

/* Estilos para los proyectos especiales */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-content {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.project-icon-column {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.project-text-column {
  flex: 1;
}

/* =========================================
   GALERÍA EN PÁGINA (2 / 3 / 5 por fila)
========================================= */
.insta-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .insta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .insta-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.insta-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.12);
  transform: translateZ(0);
  position: relative;
}

.insta-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.25s ease;
}
.insta-item:hover .insta-thumb {
  transform: scale(1.04);
}

.insta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}
.insta-item:hover .insta-overlay {
  background: rgba(0, 0, 0, 0.25);
}

/* =========================================
   MODAL (IGUAL AL DE instalaciones.html)
========================================= */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.gallery-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
  pointer-events: auto;
}

.gallery-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 28px;
  line-height: 1;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.gallery-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 36px;
  line-height: 1;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-arrow.left {
  left: 24px;
}
.gallery-arrow.right {
  right: 24px;
}

.gallery-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .gallery-arrow {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  .gallery-image {
    max-width: 94vw;
    max-height: 78vh;
  }
  .gallery-close {
    top: 16px;
    right: 16px;
  }
}
