/* ===============================
   PALETA BASADA EN EL COVER
================================= */
:root {
  --color-primary: #5b148f;
  /* morado principal */
  --color-primary-dark: #3e0d63;
  /* morado profundo */
  --color-accent: #c77dff;
  /* violeta brillante */
  --color-soft: #f4e9ff;
  /* lila claro */
  --color-pink-soft: #f6b3d8;
  /* rosa suave */
  --color-dark: #1c1024;
  --color-white: #ffffff;
}


/* --- CORRECCIÓN DE ANCLAS Y SCROLL --- */

html {
  /* 1. Hace que el viaje sea suave en lugar de un salto brusco */
  scroll-behavior: smooth;
}

/* 2. La magia: Aplica esto a cualquier elemento que tenga un ID */
/* (Títulos, notas al pie, referencias, acordeones) */
[id] {
  /* Este valor debe ser: Altura de tu menú + 20px de aire */
  scroll-margin-top: 120px;
}

/* ========== HERO SECTION ========== */
.hero {
  /* 1. Color base crema claro (Exacto al fondo de tu imagen) */
  background-color: #f7f3ea;

  /* Estilos necesarios */
  position: relative;
  overflow: hidden;
  /* Asegura que el contenedor tenga altura si la imagen no carga o es pequeña */
  min-height: 100px;
  /* Centrar la imagen si es necesario */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0%;
}

.hero-image {
  max-width: 100%;
  height: auto;
  margin-top: 0px;
  /*border-radius: 8px;*/
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}



/* ===============================
   SCROLL SUAVE Y ANCLAS
================================= */
html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 130px;
  padding-top: 120px;
  padding-bottom: 120px;
}


/* ===============================
   TIPOGRAFÍA
================================= */
body {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-dark);
}


/* ===============================
   TÍTULOS DE SECCIÓN
================================= */
.section-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--color-primary-dark);
  position: relative;
}

.section-title.white {
  color: var(--color-white);
}

.section-title::after {
  content: "";
  width: 80px;
  height: 4px;
  background: var(--color-accent);
  display: block;
  margin: 15px auto 0;
  border-radius: 3px;
}


/* ===============================
   FONDOS DE SECCIÓN
================================= */
.section-soft {
  background: var(--color-soft);
}

.section-gradient {
  background: linear-gradient(135deg,
      var(--color-primary-dark),
      var(--color-primary));
}


/* ===============================
   MENÚ ONE PAGE
================================= */
.menu-onepage {
  background: linear-gradient(90deg,
      var(--color-primary-dark),
      var(--color-primary));
  position: sticky;
  top: 58px;
  z-index: 999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  overflow: visible;
  /* importante */
}

.menu-onepage ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 50px;
  padding: 18px 0;
  margin: 0;
}

.menu-onepage a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  transition: 0.3s ease;
}

.menu-onepage a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 3px;
  bottom: -6px;
  left: 0;
  background: var(--color-accent);
  transition: 0.3s;
}


.menu-onepage a.active {
  color: #fff;
  text-shadow: 0 0 8px rgba(199, 125, 255, 0.6);
}

.menu-onepage a.active::after {
  width: 100%;
  background: linear-gradient(90deg, #c77dff, #ff4fa3);
}

/* ===============================
   MENÚ ONE PAGE - MÓVIL
================================= */
@media (max-width: 768px) {

  .menu-onepage {
    position: sticky;
    overflow-x: auto;
    backdrop-filter:blur(6px);
  }

  .menu-onepage::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    pointer-events: none;
    transition: opacity .3s ease;
    background: linear-gradient(to left,
        rgba(91, 15, 63, 1),
        rgba(91, 15, 63, 0));
  }

  .menu-onepage.no-fade::after {
    opacity: 0;
  }

  .menu-onepage .container {
    padding-left: 0;
    padding-right: 0;
  }

  .menu-onepage ul {
    justify-content: flex-start !important;
    /* rompe el center */
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 30px;
    padding: 15px 20px;
    scroll-snap-type: x mandatory;
  }

  .menu-onepage ul::-webkit-scrollbar {
    display: none;
  }

  .menu-onepage li {
    flex: 0 0 auto;
    scroll-snap-align: center;
  }

  .menu-onepage a {
    white-space: nowrap;
    font-size: 14px;
  }

}

.nav-link:focus, .nav-link:hover {
    color: var(--color-white);
}

@media (hover: hover) {
  .menu-onepage a:hover::after {
    width: 100%;
  }
}

/* ===============================
   CÁPSULAS (VIDEOS)
================================= */
/* ===============================
   CÁPSULAS PRO
================================= */

.video-card {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(91, 20, 143, 0.12);
  transition: all 0.35s ease;
  background: #fff;
}

/* Contenedor del video */
.video-wrapper {
  position: relative;
  overflow: hidden;
}

/* Overlay elegante */
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 60%,
    rgba(0,0,0,0.35)
  );
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Badge */
.video-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
}

/* Título */
.video-title {
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* Hover solo desktop */
@media (hover: hover) {

  .video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(91, 20, 143, 0.2);
  }

  .video-card:hover .video-overlay {
    opacity: 0.7;
  }
}
/* .video-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(91, 20, 143, 0.15);
  transition: 0.3s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(91, 20, 143, 0.25);
}

.video-card .card-body {
  padding: 20px;
} */


/* ===============================
   INFOGRAFÍAS (CARRUSEL)
================================= */
.section-gradient .carousel-item img {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ===============================
   INDICADORES PERSONALIZADOS
================================= */

.carousel-indicators-custom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.carousel-indicators-custom button {
  background: var(--color-primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 600;
  transition: 0.3s ease;
}

.carousel-indicators-custom button:hover {
  background: var(--color-accent);
}

.carousel-indicators-custom .active {
  background: var(--color-accent);
  transform: scale(1.1);
}

/* ===============================
   WRAPPER
================================= */
.carousel-wrapper {
  max-width: 1000px;
  margin: auto;
  position: relative;
}

/* ===============================
   IMAGEN
================================= */
.carousel-modern img {
  /*max-height: 600px;*/
  /*object-fit: contain;*/
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Contenedor del carrusel */
.carousel-modern .carousel-item{
  text-align:center;
}

/* En pantallas grandes reducir un poco */
@media (min-width:1200px){

  .carousel-modern img{
    max-height: 65vh;
  }

}

/* ===============================
   FLECHAS EXTERNAS PREMIUM
================================= */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 32px;
  backdrop-filter: blur(6px);
  transition: 0.3s ease;
  z-index: 10;
}

.carousel-prev {
  left: -70px;
}

.carousel-next {
  right: -70px;
}

.carousel-arrow:hover {
  background: var(--color-accent);
  box-shadow: 0 0 15px rgba(199, 125, 255, 0.7);
}

/* ===============================
   PAGINADOR MODERNO
================================= */
.carousel-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.carousel-pagination button {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 600;
  transition: all .4s ease;
}

.carousel-pagination button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* .carousel-pagination button.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  box-shadow: 0 0 12px rgba(199,125,255,0.6);
  transform: scale(1.1);
} */

.carousel-pagination button.active {
  background: linear-gradient(135deg, #c77dff, #ff4fa3);
  border: none;
  color: white;
  box-shadow:
    0 0 15px rgba(199, 125, 255, 0.7),
    0 0 30px rgba(255, 79, 163, 0.4);
  transform: scale(1.15);
}

@media (max-width: 992px) {



  .carousel-arrow {
    display: none;
  }

  .carousel-modern img {
    max-height: 420px;
  }

  /* PAGINADOR EN 2 FILAS LIMPIO */
  .carousel-pagination {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    max-width: 100%;
    justify-items: center;
  }

  .carousel-pagination button {
    width: 100%;
    max-width: 50px;
    padding: 6px 0;
    font-size: 14px;
  }

}

@media (max-width: 576px) {

  .carousel-pagination {
    grid-template-columns: repeat(5, 1fr);
  }




}

.section-gradient {
  position: relative;
  background: linear-gradient(135deg,
      #5b0f3f 0%,
      #6e1a6a 40%,
      #3a0f5c 100%);
  padding: 100px 0;
  overflow: hidden;
}

.section-gradient::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  top: -200px;
  right: -200px;
  z-index: 0;
}

.section-gradient .container {
  position: relative;
  z-index: 2;
}

/* CAPAS LUMINOSAS */
.section-gradient::before,
.section-gradient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

.section-gradient::before {
  width: 500px;
  height: 500px;
  background: #c77dff;
  top: -150px;
  right: -150px;
}

.section-gradient::after {
  width: 450px;
  height: 450px;
  background: #ff4fa3;
  bottom: -150px;
  left: -150px;
  animation-delay: 6s;
}

.section-gradient .container {
  position: relative;
  z-index: 2;
}

/* Movimiento lento */
@keyframes floatAmbient {
  0% {
    transform: translateY(0px) translateX(0px);
  }

  100% {
    transform: translateY(40px) translateX(30px);
  }
}

/* .carousel-modern img {
  border-radius: 18px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(199, 125, 255, 0.25);
} */

.carousel-modern img {
  border-radius: 22px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(199, 125, 255, 0.2);
}

.section-gradient::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 0, 150, 0.15), transparent 70%);
  bottom: -200px;
  left: -200px;
  z-index: 0;
}

.carousel-item a {
  pointer-events: none;
}

.carousel-item.active a {
  pointer-events: auto;
}

.infografia-link {
  display: block;
  touch-action: pan-y;
}

/* ===================================
   EFECTO DE ENTRADA DE IMAGEN
=================================== */

.carousel-modern .carousel-item {
  transition: opacity .8s ease-in-out !important;
}

/* Animación imagen */
.carousel-modern .carousel-item img {
  transform: scale(1.05);
  opacity: 0;
  transition: transform 1.2s ease, opacity 1.2s ease;
}

.carousel-modern .carousel-item.active img {
  transform: scale(1);
  opacity: 1;
}

/* .carousel-modern .carousel-item img {
  transform: scale(1.03);
  opacity: 0;
  transition: transform .9s ease, opacity .9s ease;
}

.carousel-modern .carousel-item.active img {
  transform: scale(1);
  opacity: 1;
} */


@media (max-width: 768px) {

  .section-gradient::before,
  .section-gradient::after {
    animation: none;
    opacity: 0.2;
  }

}

/* ===============================
   MATERIALES
================================= */
/* ===============================
   MATERIALES MODERNOS
================================= */

/* ===============================
   MATERIALES PRO
================================= */

.material-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex: 1;       /* Se estira para llenar la col-md-4 */
    width: 100%;
}

.material-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.35s ease;
  background: #fff;
  display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%; /* Obliga a la tarjeta a usar el 100% del enlace */
}

/* Imagen wrapper */
.material-img-wrapper {
  position: relative;
  overflow: hidden;
}

.material-card img {
  height: 300px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Overlay degradado elegante */
.material-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 50%,
    rgba(0,0,0,0.25)
  );
  transition: opacity 0.3s ease;
}

.materials-row {
    display: flex;
    flex-wrap: wrap;
}

.materials-row > div {
    display: flex;
}

.material-card .card-body {
  display: flex;
  flex-direction: column;
   flex-grow: 1;
  padding: 1.5rem;
}

.material-card .card-title {
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.2rem;
}

/* Acción */
.material-action {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.material-action svg {
  transition: transform 0.3s ease;
}

.btn-resource {
    margin-top: auto;
}


/* Hover solo desktop */
@media (hover: hover) {

  .material-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.15);
  }

  .material-card:hover img {
    transform: scale(1.08);
  }

  .material-card:hover .material-action {
    color: var(--color-accent);
  }

  .material-card:hover .material-action svg {
    transform: translateX(5px);
  }

  .material-card:hover .material-overlay {
    opacity: 0.6;
  }
}
/* ===============================
   RESPONSIVE
================================= */
@media (max-width: 768px) {

  .section-title {
    font-size: 30px;
  }



}


/* ===============================
   SCROLL REVEAL ANIMATION
================================= */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* animación escalonada para cards */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ===============================
   CONTADOR DE VISITAS
================================= */

#contador{
  padding:60px 0;
  background:linear-gradient(135deg,var(--color-primary),var(--color-accent));
  text-align:center;
  color:white;
}

.contador-container{
  max-width:600px;
  margin:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.contador-container .texto{
  font-size:1.1rem;
  letter-spacing:.5px;
  opacity:.9;
}

.contador-container .numero{
  font-size:3rem;
  font-weight:700;
  background:white;
  color:var(--color-primary);
  padding:12px 36px;
  border-radius:40px;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
  transition:transform .4s ease, box-shadow .4s ease;
}

#contador.reveal-visible .numero{
  transform:scale(1.08);
  box-shadow:0 15px 40px rgba(0,0,0,.25);
}

.contador-icono{
  margin-bottom:10px;
  opacity:.9;
}

.section-title{
  position:relative;
  display:inline-block;
}

.section-title::after{
  content:"";
  display:block;
  width:60px;
  height:3px;
  margin:12px auto 0;
  background:linear-gradient(90deg,var(--color-primary),var(--color-accent));
  border-radius:4px;
}

img{
  transition:transform .4s ease, box-shadow .4s ease;
}

img:hover{
  transform:scale(1.02);
}