/* ===============================
   SECCIONES PRINCIPALES
================================= */
.hero-section,
.banner-section,
.info-section,
.cards-section,
.activities-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* ===============================
   HERO SECTION
================================= */
.hero {
  background: linear-gradient(135deg, #003366, #0055aa);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 3rem;
  text-align: center;
  margin-top: 100px;
  margin-bottom: 15px;
}

.hero h1 {
  line-height: 1.2;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  margin-top: 10px;
  opacity: 0.95;
}

/* ===============================
   BANNER SIN PARALLAX
================================= */
.banner {
  position: relative;
  height: 700px;
  border-radius: 15px;
  overflow: hidden;
  width: 100%;
  background-image: url('/static/img/banner/banner_inicio.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 35px;
  box-sizing: border-box;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 51, 102, 0.35);
  border-radius: 15px;
}

/* ===============================
   INFO SECTION (DEBAJO DEL BANNER)
================================= */
.info-section {
  background: linear-gradient(135deg, #003366, #0055aa);
  color: white;
  border-radius: 15px;
  padding: 2.5rem 4rem;
  /* 🔹 espacio interno moderado */
  margin: 0 auto 45px auto;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}

.info-section p {
  font-size: 1.1rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ===============================
   FLIP CARDS - WEB HORIZONTAL + RESPONSIVE
================================= */
.cards-container {
  display: flex;
  flex-wrap: wrap;           /* por defecto permite wrap en móvil */
  justify-content: center;
  gap: 25px;
  padding: 10px 0;
  width: 100%;
}


/* Flip card general */
.flip-card {
  background: transparent;
  perspective: 1000px;
  width: 240px;              /* tamaño estándar para pantallas medianas */
  height: 320px;
  flex: 0 1 240px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  backface-visibility: hidden;
  overflow: hidden;
}

/* Imagen nítida */
.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
}

/* Overlay del título */
.card-title-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  padding: 8px 0;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Reverso */
.flip-card-back {
  position: absolute;
  inset: 0;
  color: white;
  transform: rotateY(180deg);
  text-align: center;
  border-radius: 15px;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden; /* evita scroll visual */
}

.flip-card-back > div {
  flex: 1;                 /* ocupa todo el espacio posible */
  overflow-y: auto;         /* permite scroll vertical si es necesario */
  -webkit-overflow-scrolling: touch; /* scroll suave en móvil */
  scrollbar-width: none;    /* Firefox: oculta scrollbar */
  -ms-overflow-style: none; /* IE 10+ */
  margin-bottom: 10px;      /* espacio antes del botón */
}

/* Fondo borroso igual al frontal */
.flip-card-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(6px) brightness(0.8);
  transform: none; /* mismo tamaño que el frontal */
  z-index: 0;
}

/* Capa oscura */
.flip-card-back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 15px;
  z-index: 1;
}

.flip-card-back > * {
  position: relative;
  z-index: 2;
}


/* ===============================
   BUTTONS
================================= */
.btn-outline-light:hover {
  background-color: white;
  color: #003366;
  transition: all 0.3s ease-in-out;
}

/* Botón dentro del flip card back */
.flip-card-back .btn {
  flex-shrink: 0; /* no se comprima */
  position: relative;
  z-index: 3;
  background-color: rgba(255, 255, 255, 0.85);
  color: #003366;
  border: 1px solid #fff;
  padding: 5px 12px;
  font-size: 0.85rem;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

/* Hover del botón */
.flip-card-back .btn:hover {
  background-color: white;
  color: #003366;
  transform: scale(1.05);
}


/* ===============================
   ACTIVIDADES SECTION
================================= */
.activities-section {
  text-align: center;
  padding: 30px 0;
  margin-top: 20px;
}

.activities-section .card {
  border: none;
  border-radius: 10px;
}

.activities-section h3 {
  color: #003366;
}

/* ===============================
   RESPONSIVE
================================= */

/* En pantallas grandes: 5 cards en fila, sin wrap */
@media (min-width: 1200px) {
  .cards-container {
    flex-wrap: nowrap;       /* fila única */
  }

  .flip-card {
    width: 200px;            /* tamaño más compacto para que quepan 5 */
    height: 280px;
    flex: 0 1 200px;
  }
}

@media (max-width: 992px) {
  .hero {
    margin-top: 80px;
  }

  .banner {
    height: 340px;
  }

  .flip-card {
    width: 220px;
    height: 290px;
  }

    .info-section {
    max-width: 95%;
    padding: 2rem 3rem;
    
  }
}

@media (max-width: 768px) {
  .banner {
    height: 300px;
  }

  .flip-card {
    width: calc(50% - 20px);
    height: 260px;
  }

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

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

  .info-section {
    max-width: 95%;
    padding: 2rem;
    padding: 1.8rem 2.5rem; /* ajusta padding en móvil */
    
  }
}

@media (max-width: 576px) {
  .banner {
    height: 220px;
  }

  .flip-card {
    width: 100%;
    height: 220px;
  }

  .hero {
    margin-top: 70px;
  }

  .info-section {
    padding: 1.5rem 1rem;;
    margin: 25px auto;
    width: calc(100% - 20px);   
  }

    .info-section p {
    font-size: 0.95rem;
  }
}