/* pages.css */

/* =========================
   MISION - FULLSCREEN SWIPER PRO
========================= */

#mision.section {
  padding: 0 !important;
  height: 100vh;
  height: 100dvh;

  display: flex;
  align-items: stretch;

  overflow: hidden;
}

/* Swiper container */
#mision .mission-swiper {
  width: 100%;
  height: 100%;
}

/* Swiper wrapper fix */
#mision .swiper-wrapper {
  height: 100%;
}

/* Slides fullscreen real */
#mision .swiper-slide {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
  background-size: cover;
  background-position: center;
}

/* Overlay oscuro elegante */
#mision .slide-overlay {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* Contenido centrado */
#mision .slide-content {
  position: relative;
  z-index: 2;

  text-align: center;
  color: #fff;

  max-width: 700px;
  padding: 20px;

  opacity: 0;
  transform: translateY(40px);

  transition: all 0.6s ease;
}

/* animación activa */
#mision .slide-content.active {
  opacity: 1;
  transform: translateY(0);
}

/* ICONO */
#mision .slide-content i {
  margin-bottom: 15px;
}

/* TITULO */
#mision .slide-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* TEXTO */
#mision .slide-content p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* =========================
   PAGINATION (Swiper)
========================= */

#mision .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}

#mision .swiper-pagination-bullet-active {
  background: #ff3b3b;
  opacity: 1;
}

/* =========================
   NAVIGATION (Swiper arrows)
========================= */

#mision .swiper-button-next,
#mision .swiper-button-prev {
  color: #fff;
}

/* =========================
   BACKGROUNDS
========================= */

#mision .slide-mision {
  background: url('../img/mision.jpg') center/cover no-repeat;
}

#mision .slide-vision {
  background: url('../img/vision.jpg') center/cover no-repeat;
}

#mision .slide-valores {
  background: url('../img/valores.jpg') center/cover no-repeat;
}

#mision .slide-exitos {
  background: url('../img/exitos.jpg') center/cover no-repeat;
}

/* =========================
   MOBILE FIX
========================= */

@media (max-width: 768px) {
  #mision .slide-content h2 {
    font-size: 2rem;
  }

  #mision .slide-content p {
    font-size: 1rem;
  }
}

/* COUNTERS */
.counter {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s ease;
}

.stat.active .counter {
  color: #ff3b3b; /* 👈 rojo */
  transform: scale(1.2);
}

.stat {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.stat.active {
  opacity: 1;
  transform: translateY(0);
}

.counter-section {
  position: relative;
  min-height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.counter-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.counter-section .parallax-bg {
  background: url('../img/nosotros.jpg') center/cover no-repeat;
  position: absolute;
  inset: 0;
  z-index: -2;
}

.counter-section .counter-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: -1;
}

.counter-section .counter-content h2 {
  margin-bottom: 2rem;
}

.counter-section .stat {
  margin-bottom: 2rem;
}

.counter-section .stat i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.counter-section .row {
  justify-content: center;
}

/* ESPECIALIDADES */
.especialidades-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* VIDEOS */
.video-carousel {
  position: absolute;
  inset: 0;
}

.video-carousel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.video-carousel video.active {
  opacity: 1;
}

/* OVERLAY */
.video-carousel .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2;
}

/* TEXTO */
.carousel-text {
  position: absolute;
  inset: 0;
  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.carousel-text .text {
  display: none;
  max-width: 800px;
  color: #fff;
}

.carousel-text .text.active {
  display: block;
}

/* PAGOS */
.pagos-section {
  background: url('../img/pagos.jpg') center/cover no-repeat;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  padding: 0;
  color: #fff;
  text-align: center;
}
.pagos-section .overlay {
  position: absolute;
  top:0; left:0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: -1;
}

/* DESCARGAS */
.descargas-section .file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.descargas-section .file p {
  font-weight: 500;
}

/* Especialidades Carousel */
.video-carousel .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.carousel-text {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  color: #fff;
  text-align: center;
  padding: 1rem 2rem;
  border-radius: 8px;
}
.carousel-text .text {
  display: none;
  transition: opacity 0.5s;
}
.carousel-text .text.active {
  display: block;
  opacity: 1;
}
@media (max-width: 768px){
  .video-carousel video { max-height: 300px; }
  .carousel-text { font-size: 0.9rem; bottom: 20px; padding: 0.8rem 1rem; }
}

/* HERO FIX */
.hero {
  position: relative;
  min-height: 100vh;
  height: 100dvh;
  overflow: hidden;
  scroll-snap-align: start;
}

.hero .bg-video {
  position: absolute;
  top:0; left:0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero .overlay {
  position: absolute;
  top:0; left:0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: -1;
}

.hero-content {
  position: relative;
  height: 100%;
  z-index: 2;
}

/* SLIDES */
.hero-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(40px);
  opacity: 0;
  visibility: hidden; /* 👈 CLAVE */
  transition: transform 0.8s ease, opacity 0.8s ease;
  width: 100%;
  padding: 0 20px;
  text-align: center;
  color: #fff;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible; /* 👈 CLAVE */
  transform: translate(-50%, -50%) translateY(0);
}

/* TEXTOS */
.hero-slide h1 {
  font-size: 3rem;
  font-weight: 700;
}

.hero-slide p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* BOTÓN SOLO EN ACTIVO */
.hero-slide:not(.active) .btn {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-slide h1 {
    font-size: 2rem;
  }

  .hero-slide p {
    font-size: 1rem;
  }
}

/* ===== GALERÍA PRO ===== */

#imagenes {
  background: #111;
  color: #fff;
}

.gallery-grid {
  gap: 30px 0;
}

/* ITEM */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
}

/* IMAGEN */
.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* HOVER ZOOM */
.gallery-item:hover img {
  transform: scale(1.1);
}

/* OVERLAY */
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: 0.4s;
}

.gallery-item:hover::before {
  opacity: 1;
}

/* TÍTULO */
.gallery-item h4 {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transition: 0.4s;
}

/* SHOW TITLE ON HOVER */
.gallery-item:hover h4 {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== MODAL PREMIUM ===== */

.gallery-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);

  opacity: 0;
  visibility: hidden;
  transition: 0.4s ease;
}

.gallery-modal.active {
  opacity: 1;
  visibility: visible;
}

/* IMAGEN PRINCIPAL */
.modal-img {
  max-width: 85%;
  max-height: 70vh;
  border-radius: 12px;
  object-fit: contain;
  transition: 0.4s ease;
}

/* TEXTO */
.modal-desc {
  margin-top: 15px;
  color: #fff;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}

/* BOTÓN CERRAR */
.gallery-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  z-index: 1002;
}

/* FLECHAS */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  z-index: 1002;
}

/* MINIATURAS */
.modal-thumbs {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  max-width: 90%;
}

/* IMAGEN MINI */
.modal-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  opacity: 0.5;
  cursor: pointer;
  transition: 0.3s;
}

/* ACTIVA */
.modal-thumbs img.active {
  opacity: 1;
  border: 2px solid #ff3b3b;
}

/* HOVER */
.modal-thumbs img:hover {
  opacity: 1;
}

/* ===== VIDEO SECTION PRO ===== */

.videos-section {
  background: #0d0d0d;
  color: #fff;
  padding: 6rem 2rem;
}

/* TITULOS */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  text-align: center;
}

.section-title::after {
  content: "";
  width: 60px;
  height: 3px;
  background: var(--accent);
  display: block;
  margin: 10px auto 0;
}

.section-subtitle {
  opacity: 0.7;
  margin-bottom: 2rem;
}

/* CARD */
.video-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease;
}

/* VIDEO */
.video-card video {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: 0.4s;
}

/* OVERLAY */
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
  transition: 0.4s;
}

/* TITULO */
.video-title {
  font-size: 1.1rem;
  margin-top: 10px;
  text-align: center;
}

/* PLAY BUTTON */
.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  backdrop-filter: blur(10px);
  transition: 0.3s;
}

/* HOVER EFECTOS */
.video-card:hover {
  transform: scale(1.05);
}

.video-card:hover video {
  transform: scale(1.1);
}

.video-card:hover .play-btn {
  background: #ff3b3b;
  transform: scale(1.2);
}

/* SWIPER BOTONES */
.swiper-button-next,
.swiper-button-prev {
  color: #fff;
}

.video-modal video {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
}

.video-modal {
  backdrop-filter: blur(10px);
}

/* NOTICIAS */
.noticias-section{
  min-height: 100vh;
  padding: 80px 0;
  background: #0d0d0d;
  color: #fff;
}

/* TITULO */
.section-title{
  font-size: 2.5rem;
  font-weight: 700;
}

.section-subtitle{
  opacity: 0.6;
}

/* =========================
   TOP LAYOUT (1 GRANDE + 2 PEQUEÑAS)
========================= */

.news-top{
   display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 30px;

  min-height: 500px;
  height: auto;
}

/* laterales */
.news-side{
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  height: 100%;
}

/* CARDS PREMIUM */
.noticia-card{
  position: relative;
  border-radius: 16px;
  overflow: hidden;

  min-height: 220px;
}

.noticia-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.noticia-card:hover img{
  transform: scale(1.05);
}

/* overlay elegante */
.noticia-card .overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: background 0.3s ease;
}

.noticia-card:hover .overlay{
  background: linear-gradient(to top, rgba(0,0,0,.95), rgba(0,0,0,.3));
}

/* =========================
   CAROUSEL SECUNDARIO
========================= */

.news-carousel{
  margin-top: 25px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.news-carousel::-webkit-scrollbar{
  display: none;
}

.news-carousel .noticia-card{
  min-width: 280px;
  height: 180px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* =========================
   MODAL PREMIUM APPLE STYLE
========================= */

.noticia-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 9999;
}

.noticia-modal.active{
  opacity: 1;
  visibility: visible;
}

.noticia-content{
  background: #111;
  color: #fff;
  width: 95%;
  max-width: 1100px;
  height: 85vh;

  border-radius: 10px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

/* LAYOUT SPLIT */
.noticia-layout{
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

/* IZQUIERDA TEXTO */
.noticia-info{
  padding: 20px;
  overflow-y: auto; /* 🔥 CLAVE */
}

.noticia-info h2{
  font-size: 2rem;
  color: #fff;
}

.noticia-info p{
  line-height: 1.6;
  color: #fff;
  overflow-y: auto;
}

/* DERECHA GALERIA */
.noticia-gallery{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.noticia-gallery .main-img{
  width: 100%;
  height: 350px;
  object-fit: cover;
}

/* IMAGEN */
.main-img{
  max-width: 100%;
  max-height: 60%;
  object-fit: cover;
  border-radius: 10px;
}

/* THUMBS */
.noticia-thumbs{
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
}

.noticia-thumbs img{
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  border-radius: 5px;
}

.noticia-thumbs img.active{
  opacity: 1;
  border: 2px solid #fff;
}

/* BOTÓN CERRAR */
.close-noticia{
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
}

/* EVENTOS */

/* =========================
   EVENTOS SECTION - CLEAN APPLE STYLE
========================= */

.eventos-section{
  min-height: 100vh;
  height: auto;
  padding: 80px 16px;
  display: flex;
  align-items: center;
  background: #0d0d0d;
  color: #fff;
}

/* container */
.eventos-section .container{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* titles */
.eventos-section .section-title{
  font-size: 2.5rem;
  font-weight: 700;
}

.eventos-section .section-subtitle{
  opacity: 0.6;
}

/* ================= GRID ================= */

.eventos-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ================= CARD ================= */

.evento-card{
  position: relative;
  height: 340px;
  border-radius: 16px;
  overflow: hidden;
  cursor: default; /* sin modal */
  transition: transform .4s ease;
}

.evento-card:hover{
  transform: translateY(-6px);
}

/* image */
.evento-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.evento-card:hover img{
  transform: scale(1.08);
}

/* overlay */
.evento-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

/* badge */
.tipo{
  display: inline-block;
  font-size: .72rem;
  padding: 5px 12px;
  border-radius: 50px;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 10px;
}

/* colors */
.academico{ background:#3b82f6; }
.cientifico{ background:#8b5cf6; }
.deportivo{ background:#22c55e; }
.musical{ background:#f97316; }
.taller{ background:#74CDF2; }

/* text */
.evento-overlay h3{
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.fecha{
  font-size: 0.85rem;
  color: #ff4d4d;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lugar{
  font-size: 0.8rem;
  opacity: 0.75;
  font-weight: 400;
}

/* countdown */
.countdown{
  margin-top: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: #ff3b3b;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1200px){
  .eventos-grid{
    gap: 16px;
  }
}

@media (max-width: 768px){
  .evento-card{
    height: 260px;
  }
}

@media (max-width: 600px){
  .eventos-grid{
    grid-template-columns: 1fr;
  }

  .evento-card{
    height: 240px;
  }
}

/* =========================
   DESCARGAS SECTION PREMIUM
========================= */
.descargas-section{
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;

  justify-content: center;

  padding: 80px 20px;
  background: #0d0d0d;
  color: #fff;
}

/* CONTENEDOR */
.descargas-section .container{
  flex: 1;
  width: 100%;

  display: flex;
  flex-direction: column;
  justify-content: center; /* 🔥 CENTRADO REAL */
  gap: 30px;
}

/* GRID CORRECTO (TU CLASE REAL) */
.downloads-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* CARD */
.download-card{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;
  border-radius: 14px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);

  transition: .3s ease;
  backdrop-filter: blur(10px);
}

.download-card:hover{
  transform: translateY(-3px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,59,59,0.3);
}

/* ICONO */
.download-card .icon{
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,59,59,0.12);
  color: #ff3b3b;

  border-radius: 10px;

  font-size: 16px;
}

/* INFO */
.download-card .info{
  flex: 1;
  margin-left: 14px;
}

.download-card .info h3{
  font-size: 0.95rem;
  font-weight: 600;
}

/* BOTÓN */
.btn-download{
  background: linear-gradient(135deg, #ff3b3b, #ff1e1e);
  color: white;

  padding: 8px 12px;
  border-radius: 8px;

  font-size: .8rem;
  font-weight: 600;

  transition: .3s ease;
}

.btn-download:hover{
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(255,59,59,0.25);
}

@media (max-width: 768px){
  .downloads-grid{
    grid-template-columns: 1fr;
  }
}


/* =========================
   FLOATING SOCIAL SYSTEM
========================= */

.social{
  position: fixed;
  top: 50%;
  right: 18px;

  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  gap: 10px;

  z-index: 99999;
  isolation: isolate;
}

/* =========================
   SOCIAL ICON BUTTONS
========================= */

.social a{
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: rgba(0,0,0,0.55);
  color: #fff;

  border: 1px solid rgba(255,255,255,0.12);

  backdrop-filter: blur(10px);

  transition: all .3s ease;
  font-size: 16px;
}

.social a:hover{
  transform: translateX(-6px);
}

/* COLORES POR RED */
.social .whatsapp:hover{
  background: #25D366;
  border-color: #25D366;
}

.social .facebook:hover{
  background: #1877F2;
  border-color: #1877F2;
}

.social .instagram:hover{
  background: linear-gradient(45deg,#f9ce34,#ee2a7b,#6228d7);
  border-color: transparent;
}

.social .tiktok:hover{
  background: #000;
  border-color: #fff;
}

/* =========================
   LANGUAGE DROPDOWN
========================= */

.lang-dropdown{
  position: relative;
}

/* BOTÓN IDIOMA */
#langBtn{
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 4px;

  border-radius: 12px;

  background: rgba(0,0,0,0.55);
  color: #fff;

  border: 1px solid rgba(255,255,255,0.12);

  backdrop-filter: blur(10px);

  cursor: pointer;
  transition: .3s ease;

  font-size: 12px;
}

#langBtn:hover{
  background: #ff3b3b;
  border-color: #ff3b3b;
}

/* DROPDOWN */
.lang-options{
  position: absolute;
  right: 55px;
  top: 0;

  display: none;
  flex-direction: column;

  background: rgba(0,0,0,0.9);
  border: 1px solid rgba(255,255,255,0.12);

  border-radius: 12px;

  overflow: hidden;
  min-width: 140px;

  z-index: 100000;
}

.lang-options li{
  padding: 10px 12px;
  font-size: 13px;
  color: #fff;

  cursor: pointer;
  transition: .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-options li:hover{
  background: #ff3b3b;
}


@media (max-width: 768px){

  .social{
    right: 10px;
    gap: 8px;
  }

  .social a,
  #langBtn{
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .lang-options{
    right: 45px;
    min-width: 120px;
  }
}