/* --- Estilos 
       Generales --- */
body,
html {
  margin: 0;
  padding: 0;
  font-family: var(--font-documento);
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth !important;
}

/* Colores */

:root {
  --acento: #db7c00;
  --enlaces: #352b1d;
  --color-fondo: #f4f4f4;
  --color-texto: #1a1a1a;
  --color-acento: #bb6a00;  
  --color-redactado: #000000;
  --font-data: "Inter", sans-serif;
  --font-documento: "Courier Prime", monospace;
}

/* --- Estilos del Header --- */
header {
  background-color: rgba(42, 23, 58, 0.6);
  color: white;
  padding: 0px 5%;  
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;  
  top: 0;
  left: 0;
  width: 90%;  
  z-index: 1000;  
}

.logo a {
  color: white;
  text-decoration: none;
  font-size: 1.8em;
  font-weight: bold;
}

/* Menu de navegacion*/
.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin-left: 25px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-optical-sizing: auto;
  font-weight: normal;
  font-style: normal;
  font-size: 0.8em;
  padding: 5px 0;
  position: relative;
  display: inline-block;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #fddc00; /* Color para el subrayado */
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Iconos sociales*/
.navbar-nav .nav-item {
  display: inline-block;
}

.social-icons {
  align-items: center;
  display: inline-block;
}

.social-icons a {
  margin-left: 15px;
}

.social-icons a svg {
  color: #fff;
  width: 18px;  
  height: 18px;
}

.hamburger {
  display: none;  
  cursor: pointer;
  padding: 10px;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* --- Estilos Hero Section Parallax 3D --- */
.hero-parallax {
  width: 100%;
  height: 100vh;
  position: relative;

  padding-top: 0px; /* Ajustar según la altura real del header */
  box-sizing: border-box;

  /* PERSPECTIVE: Define cuán pronunciado es el efecto 3D.
               Valores más bajos (ej. 500px) = efecto más exagerado.
               Valores más altos (ej. 2000px) = efecto más sutil.
               Un buen punto de partida es entre 800px y 1200px. */
  perspective: 1000px;
  /* perspective-origin: 50% 50%; /* Dónde está el "ojo" del espectador. Por defecto es el centro. */
}

.image-container {
  display: block;
  padding-top: 30px;
}

.layer {
  position: absolute;
  top: 60%;
  left: 50%;
  /* El transform inicial se aplicará en JS junto con el parallax */
  /* transform: translate(-50%, -50%); */
  transition: transform 0.08s ease-out;
  display: flex;
  justify-content: center;
  align-items: center;

  /* TRANSFORM-STYLE: Necesario para que las transformaciones 3D anidadas funcionen correctamente.
                */
  transform-style: preserve-3d;
  padding-top: 50px;
}

.layer img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
}

.layer-1 {
  width: 450px;
  height: 399px;
  z-index: 1;
}
.layer-2 {
  width: 282px;
  height: 249px;
  z-index: 2;
}
.layer-3 {
  width: 152px;
  height: 134px;
  z-index: 3;
}
.layer-4 {
  width: 85px;
  height: 75px;
  z-index: 4;
}
.layer-5 {
  width: 49px;
  height: 43px;
  z-index: 5;
}
.layer-6 {
  width: 29px;
  height: 25px;
  z-index: 6;
}
.layer-7 {
  width: 17px;
  height: 15px;
  z-index: 7;
}

.fecha {
  display: block;
  text-align: center;
  margin-top: 0px;
}

.fecha img {
  max-width: 50%;
}

/* --- Estilos Responsivos para el Header --- */
@media (max-width: 992px) {
  .layer {
    position: absolute;
    top: 45%;
    left: 50%;
    /* El transform inicial se aplicará en JS junto con el parallax */
    /* transform: translate(-50%, -50%); */
    transition: transform 0.08s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;

    /* TRANSFORM-STYLE: Necesario para que las transformaciones 3D anidadas funcionen correctamente.
 */
    transform-style: preserve-3d;
    padding-top: 0px;
  }

  .layer img {
    max-width: 80%;
    height: auto;
  }

  #logo img {
    max-width: 72%;
  }

  .fecha img {
    margin-top: 30px;
    max-width: 70%;
  }

  /* Estilos capa con informacion*/

  .dossier-image {
    display: block;
    width: 100%;
    height: auto;
    border: 10px solid #fff;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    filter: grayscale(100%) contrast(1.1);
    transition: transform 0.3s ease, filter 0.3s ease;
  }

  .dossier-image:hover {
    transform: rotate(0) scale(1.02);
    filter: grayscale(20%) contrast(1.2);
    z-index: 10;
  }

  .workshop-image {
    transform: rotate(2deg);
    margin-bottom: 2.5rem;
  }

  .instructor-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    transform: rotate(-3deg);
    float: left;
    margin: 0.2rem 1.5rem 0.5rem 0;
    shape-outside: margin-box;  
  }
  /* --- FIN DE ESTILOS DE IMAGEN --- */

  .content-title {
    font-family: var(--font-data);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.2rem;
    color: var(--color-acento);
    margin-bottom: 1rem;
  }

  .content-list {
    list-style: none;
  }

  .content-list li {
     
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;  
    margin-bottom: 0.75rem;
    position: relative;
    cursor: pointer;
  }

  .redacted-bullet {
    width: 12px;
    height: 12px;
    background-color: var(--color-redactado);
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 6px;  
  }

  .content-list li .text {
    position: relative;
    display: inline-block;
  }
  .content-list li .text::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 60%;
    background-color: var(--color-redactado);
    transform: scaleX(0) translateY(-50%);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
  }
  .content-list li:hover .text::after {
    transform: scaleX(1) translateY(-50%);
  }

  /* --- ESTILOS PARA LA CAPA DE INFORMACIÓN ADICIONAL  --- */
  .additional-info {
    width: 100%;
    background-color: #f9f9f9;
    border-left: 3px solid var(--color-acento);
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 0.85rem;
    font-family: var(--font-data);
    color: #333;
  }

  .additional-info p {
    margin-bottom: 5px;
    line-height: 1.4;
  }

  .additional-info strong {
    color: var(--color-texto);
    font-weight: 700;
  }
  /* --- FIN ESTILOS CAPA ADICIONAL --- */

  .instructor-section {
    grid-area: instructor;
    transition: filter 0.5s ease;
    overflow: hidden;  
  }

  .instructor-name {
    font-family: var(--font-data);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--color-acento);
    margin-bottom: 0.5rem;
  }

  .instructor-bio {
    max-width: 60ch;
    font-size: 0.95rem;
    filter: blur(5px);
    transition: filter 0.4s ease;
  }
  .instructor-section:hover .instructor-bio {
    filter: blur(0px);
  }

  .details-section {
    grid-area: details;
    border-top: 1px dashed #ccc;
    margin-top: 1rem;
    padding-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    font-family: var(--font-data);
  }

  .detail-item {
    font-size: 0.9rem;
  }
  .detail-item strong {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-texto);
    margin-bottom: 0.2rem;
  }
  .detail-item span {
    color: var(--color-acento);
    font-weight: 700;
  }

  .registration-section {
    grid-area: registration;
    text-align: center;
    margin-top: 1rem;
  }
  .register-button {
    display: inline-block;
    background-color: var(--color-redactado);
    color: #fff;
    font-family: var(--font-data);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1rem 3.5rem;
    border: 2px solid var(--color-redactado);
    transition: all 0.3s ease;
  }
  .register-button:hover {
    background-color: var(--color-acento);
    color: var(--color-fondo);
    border-color: var(--color-acento);
    transform: translateY(-3px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  }

  @media (max-width: 900px) {
    #document-section {
      grid-template-columns: 1fr;
      grid-template-areas: "header" "description" "content" "instructor" "details" "registration";
      padding: 2rem;
    }
    #document-section::before {
      top: 1rem;
      right: 1rem;
      font-size: 0.8rem;
    }
    .instructor-image {
      float: none;
      width: 100%;
      height: auto;
      margin: 0 0 1rem 0;
      transform: rotate(-1deg);
    }
  }

  /**/

  footer {
    margin-bottom: 0px;
    padding-bottom: 0px;
    height: 100%;
    background: #000;
  }

  footer img {
    max-width: 90%;
  }

  .fecha {
    margin-top: 345px;
    padding-bottom: 20px;
  }

  #grain-canvas {
    height: 100% !important;
  }
}

@media (max-width: 448px) {
  #grain-canvas {
    height: 90% !important;
  }
  .layer {
    top: 50%;
  }

  .layer img {
    max-width: 60%;
    height: auto;
  }

  #logo img {
    max-width: 74%;
  }

  .fecha img {
    max-width: 90%;
  }

  footer {
    margin-bottom: 0px;
    padding-bottom: 45px;
  }

  footer img {
    max-width: 90%;
  }

  .fecha {
    margin-top: 0px;
    padding-bottom: 20px;
  }
}

/* Logo Vartex*/

#logo {
  padding-top: 90px;
  text-align: center;
  display: block;
}

/* --- Estilos Responsivos para el Header --- */
@media (max-width: 992px) {
   
  .nav-links {
    position: fixed; /* Ocupa toda la pantalla cuando está activo */
    left: 100%; /* Inicialmente fuera de la pantalla */
    top: 0px; /* Debajo del header */
    padding-top: 70px; /* Para no solaparse con el header si se hace fixed desde top 0 */
    background-color: rgba(42, 23, 58, 0.6);
    width: 70%; /* Ancho del menú desplegable */
    max-width: 300px; /* Ancho máximo */
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: left 0.5s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    padding-top: 30px; /* Espacio superior dentro del menú */
  }

  .nav-links.active {
    left: 0; /* Muestra el menú */
  }

  .nav-links li {
    margin: 20px 0;
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    font-size: 1.2em;
  }

  .hamburger {
    display: block; /* Muestra el botón hamburguesa */
    z-index: 1001; /* Encima del nav-links cuando está cerrado */
  }

  /* Animación del botón hamburguesa a "X" */
  .hamburger.active .line1 {
    transform: rotate(-45deg) translate(-6px, 7px);
  }
  .hamburger.active .line2 {
    opacity: 0;
  }
  .hamburger.active .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  .social-icons {
 
    margin-left: auto; /* Empuja los iconos a la derecha del logo en móvil */
    margin-right: 10px; /* Espacio antes del hamburguer */
  }
 
}

@media (max-width: 480px) {
  .logo a {
    font-size: 1.5em;
  }
  .social-icons img {
    width: 20px;
    height: 20px;
  }
  .social-icons a {
    margin-left: 10px;
  }

  .versiones {
    background-color: white !important;
    padding: 2em;
    margin: 0px;
  }

  .versiones a {
    text-decoration: none !important;
    font-weight: 100;
    font-size: 0.9em;
    color: var(--enlaces);
  }

  .versiones ul {
    padding-top: 0.3em;
  }

  .versiones li {
    list-style-type: none;
    margin: 0.3em;
  }
}

/* Ondas*/

#waterCanvas {
  display: block; /* Elimina espacio extra debajo del canvas */
  position: absolute;
  top: 0;
  left: 0;
  /* El tamaño se establecerá en JS para que coincida con la ventana */
}

/* Grano animado*/

.background-container {
  background: linear-gradient(110deg, #6d1127, #fddc00);
}

#grain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: overlay; /* This is key for the "fusion" like effect */
  /* Other good options: soft-light, multiply, screen */
  pointer-events: none; /* Allows clicking through the canvas */
  opacity: 0.5; /* Adjust grain visibility. 0.05 to 0.25 is usually good */
}

/* Versiones*/

#versiones {
  display: flex;
  justify-content: center;
  max-width: 1100px;
  background-color: #fff;
  margin: 0 auto;
}

.versiones {
  padding: 2em;
  margin: 0px;
  max-width: 800px !important;
}

.versiones a {
  text-decoration: none;
  font-weight: 100;
  font-size: 0.9em;
  color: var(--enlaces);
  transition: color 0.9s ease;
}

.versiones a:hover {
  text-decoration: underline dotted;
  font-weight: 100;
  font-size: 0.9em;
  color: var(--acento);
  transition: color 0.2s ease;
}

.versiones ul {
  padding-top: 0.3em;
}

.versiones li {
  list-style-type: none;
  margin: 0.3em;
}

.svg-inline--fa.fa-w-14 {
  width: 1em;
  color: #fff;
  margin-right: 3px;
}

/* Footer*/
footer {
  background-color: #fff;
  display: flex;
  flex-direction: row;
  justify-content: center;
  text-align: center;
  position: relative; /* Cambiado de fixed */
  padding-top: 40px;
  max-width: 1100px;
  background-color: #fff;
  margin: 0 auto;
  border-top: solid 1px var(--acento);
}

footer img {
  max-width: 450px;
}


@media (max-width: 992px) {
  footer {
    flex-direction: column;
  }
}


/* video*/

        /* 
         * ESTILOS PARA EL VIDEO RESPONSIVO DE YOUTUBE
         * Este bloque está diseñado para ser "a prueba de balas" y resistir
         * los estilos de una página existente.
        */

        /* 1. Contenedor <section> principal */
        .yt-responsive-container-section {
            /* 
             * 'width: 100%' asegura que la sección intente ocupar todo el ancho de su contenedor padre.
             * 'max-width: 1024px !important' es la regla principal. Limita el ancho MÁXIMO a 1024px
             * de forma imperativa, anulando otros 'max-width'.
            */
            width: 100%;
            max-width: 1024px !important;
            
            /* Centra la sección horizontalmente si el espacio disponible es mayor a 1024px */
            margin-left: auto !important;
            margin-right: auto !important;
            
            /* Resto de estilos para que se vea bien (opcional) */
            padding: 15px;
            box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
        }

        /* 2. El wrapper que mantiene la proporción (aspect-ratio) */
        .yt-responsive-wrapper {
            position: relative !important;
            overflow: hidden !important;
            width: 100% !important;
            
            /* 
             * El truco para la proporción 16:9 (9 / 16 = 0.5625).
             * Fuerza una altura basada en el ancho.
            */
            padding-top: 56.25% !important; 
        }

        /* 3. El iframe del video de YouTube */
        .yt-responsive-wrapper iframe {
            position: absolute !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 100% !important;
            border: 0 !important;
        }
