/* --- Configuración Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1. Ramabhadra para el fondo y textos normales */
#cuerpo-principal {
    font-family: "Ramabhadra", sans-serif;
    overflow-x: hidden; 
    scroll-behavior: smooth; 
    text-align: justify;
}

/* 2. Archivo Black EXCLUSIVAMENTE para los títulos */
h1, h2 {
    font-family: "Archivo Black", sans-serif;
    font-weight: normal;
}

/* 3. Ramabhadra forzado para los botones */
button {
    font-family: "Ramabhadra", sans-serif;
}

/* --- 1ra Sección: Hero --- */
#seccion-inicio {
    /* ... tus reglas anteriores ... */
    padding-top: 70px; /* Empuja el contenido debajo del header */
    width: 100%;
    height: 100vh; /* Ocupa el 100% del alto de la pantalla */
    background-color: #000000;
    color: #FFFFFF;
    position: relative; /* Permite posicionar las figuras absolutas en su interior */
    overflow: hidden;
}

#titulo-inicio {
    position: absolute;
    left: 100px; /* Borde izquierdo de 100px */
    top: 50%;
    transform: translateY(-50%);
    font-size: 120px;
    font-weight: normal;
    line-height: 1.1;
    z-index: 10;
}

#autor-inicio {
    position: absolute;
    right: 100px; /* Borde derecho de 100px */
    bottom: 80px;
    font-size: 24px;
    z-index: 10;
}

#rectangulo-gris-oscuro {
    position: absolute;
    width: 35vw;
    height: 60vh;
    background-color: #6E6E6E; /* Gris oscuro solicitado */
    top: 0;
    left: 0;
    z-index: 1;
}

#rectangulo-gris-claro {
    position: absolute;
    width: 35vw;
    height: 25vh;
    background-color: #D9D9D9; /* Gris claro solicitado */
    bottom: 0;
    left: 25vw;
    z-index: 1;
}

#seccion-introduccion {
    width: 100%;
    min-height: 60vh; /* Ocupa toda la altura de la pantalla como las demás secciones */
    background-color: #FFFFFF; /* Fondo blanco consistente */
    color: #000000;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 120px 100px; /* Margen superior/inferior y los 100px laterales solicitados */
    align-content: center; /* Centra verticalmente los elementos dentro del grid */
    font-size: 25px;
    font-weight: normal;
    line-height: 1.4; /* Aumentado ligeramente para mejor lectura en bloques largos */
    z-index: 10;
    position: relative;
}

/* --- 2da Sección: Alexander Hamilton --- */
#seccion-hamilton {
    width: 100%;
    min-height: 80vh;
    background-color: #FFFFFF; /* Cambio a fondo blanco */
    color: #000000;
    position: relative;
    display: flex;
    align-items: center; /* Centra el contenido verticalmente */
}

#imagen-hamilton {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 80vh; /* Ajustable según el tamaño de tu PNG */
    object-fit: contain;
    z-index: 1;
    
    /* Nueva propiedad CSS añadida para la sombra de la silueta */
    filter: drop-shadow(25px 15px 15px rgba(0, 0, 0, 0.3));
}

#contenedor-texto-hamilton {
    margin-left: 300px; /* Borde izquierdo de 100px */
    max-width: 500px;
    z-index: 10;
}

#titulo-hamilton {
    font-size: 55px;
    font-weight: normal;
    margin-bottom: 40px;
    line-height: 1.1;
}

#parrafo-hamilton {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 60px;
}

#boton-hamilton {
    width: 200px;
    height: 53px;
    background-color: #1E1E1E;
    color: #FFFFFF;
    font-size: 14px;
    border: none;
    border-radius: 8px; /* Leve redondeo típico de botones de diseño */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#boton-hamilton:hover {
    background-color: #6E6E6E;
}

#enlace-hamilton {
    text-decoration: none;
}
/* --- Animaciones Reutilizables --- */
@keyframes fadeInText {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes latido-regular {
    0% { transform: scale(1); }
    50% { transform: scale(1.20); }
    100% { transform: scale(1); }
}

@keyframes latido-acelerado {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes rotacion-rapida {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* --- 3ra Sección: ¡Boom! --- */
#seccion-boom {
    width: 100%;
    min-height: 80vh;
    background-color: #000000;
    color: #FFFFFF;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Nueva animación exclusiva para que crezca mucho más */
@keyframes latido-boom {
    0% { transform: scale(0.5)}
    50% { transform: scale(0.8)} 
    100% { transform: scale(0.5)}
}

#circulo-boom {
    position: absolute;
    left: -30vh; /* Lo desplazamos hacia la izquierda para que asome como un semicírculo gigante */
    width: 100vh; /* Base mucho más grande (casi el alto de la pantalla) */
    height: 100vh;
    background-color: #FFFFFF;
    border-radius: 50%;
    animation: latido-boom 3s ease-in-out infinite; 
    z-index: 1;
}

/* Solo asegúrate de que el texto mantenga su z-index superior por si el círculo lo toca */
#contenedor-texto-boom {
    margin-left: 55vw; 
    max-width: 500px;
    z-index: 10;
    position: relative; /* Agregado para respetar el z-index frente al círculo expandido */
    animation: fadeInText 2s ease-out forwards;
}

#contenedor-texto-boom {
    margin-left: 55vw; /* Posiciona el texto en la mitad derecha */
    max-width: 500px;
    z-index: 10;
    animation: fadeInText 2s ease-out forwards; /* Animación Fade In */
}

#titulo-boom {
    font-size: 55px;
    font-weight: normal;
    margin-bottom: 40px;
}

#parrafo-boom {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 60px;
}

#boton-boom {
    width: 200px;
    height: 53px;
    background-color: #FFFFFF;
    color: #1E1E1E;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#boton-boom:hover {
    background-color: #6E6E6E;
    color: #FFFFFF;
}

#enlace-boom {
    text-decoration: none;
}


/* --- 4ta Sección: Sparkles --- */
#seccion-sparkles {
    width: 100%;
    min-height: 80vh;
    background-color: #FFFFFF;
    color: #000000;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#contenedor-grafico-sparkles {
    position: absolute;
    left: -20vh;
    width: 80vh;
    height: 100vh;
    display: flex;
    align-items: center;
}

#circulo-central-sparkles {
    width: 60vh;
    height: 60vh;
    background-color: #000000;
    border-radius: 50%;
    position: absolute;
    left: 0;
    animation: latido-acelerado 1s ease-in-out infinite; /* Corazón acelerado */
}

#orbita-sparkles {
    width: 100vh;
    height: 100vh;
    border-radius: 50%;
    border: 10px solid transparent; /* Órbita invisible en el resultado final */
    position: absolute;
    left: -10vh;
}

/* Satélites orbitando */
#satelite-1, #satelite-2, #satelite-3 {
    width: 120px;
    height: 120px;
    background-color: #000000;
    border-radius: 50%;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: latido-acelerado 0.8s ease-in-out infinite;
}

/* Posiciones fijas en la órbita (recreando la referencia visual) */
#satelite-1 { top: 5%; right: 15%; }
#satelite-2 { top: 40%; right: -5%; }
#satelite-3 { bottom: 10%; right: 15%; }

#cuadrado-rotatorio-1, #cuadrado-rotatorio-2, #cuadrado-rotatorio-3 {
    width: 60px;
    height: 60px;
    background-color: #FFFFFF;
    animation: rotacion-rapida 2s linear infinite; /* Cuadrados rotando rápido */
}

#contenedor-texto-sparkles {
    margin-left: 55vw; 
    max-width: 500px;
    z-index: 10;
    animation: fadeInText 2s ease-out forwards;
}

#titulo-sparkles {
    font-size: 55px;
    font-weight: normal;
    margin-bottom: 40px;
}

#parrafo-sparkles {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 60px;
}

#boton-sparkles {
    width: 200px;
    height: 53px;
    background-color: #1E1E1E;
    color: #FFFFFF;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#boton-sparkles:hover {
    background-color: #6E6E6E;
}

#enlace-sparkles {
    text-decoration: none;
}
/* --- Animaciones para Bloque 3 --- */
@keyframes serpenteo {
    0% { transform: translateX(0); }
    50% { transform: translateX(-40px); }
    100% { transform: translateX(0); }
}

@keyframes ascender-agua {
    0% { transform: translateY(110vh); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(-20vh); opacity: 0; }
}

/* --- 5ta Sección: Sneaky Snake --- */
#seccion-snake {
    width: 100%;
    min-height: 80vh;
    background-color: #000000;
    color: #FFFFFF;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#contenedor-texto-snake {
    margin-left: 300px; /* Borde izquierdo de 100px */
    max-width: 500px;
    z-index: 10;
}

#titulo-snake {
    font-size: 55px;
    font-weight: normal;
    margin-bottom: 40px;
}

#parrafo-snake {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 60px;
}

#boton-snake {
    width: 200px;
    height: 53px;
    background-color: #FFFFFF;
    color: #1E1E1E; /* Letras grises oscuras como solicitaste */
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#boton-snake:hover {
    background-color: #6E6E6E;
    color: #FFFFFF;
}

#enlace-snake {
    text-decoration: none;
}

#contenedor-figura-snake {
    position: absolute;
    right: -10vh; /* Esconde una parte para que parezca que asoman desde el borde */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#cuerpo-snake-1, #cuerpo-snake-2, #cuerpo-snake-3, #cuerpo-snake-4 {
    width: 35vh;
    height: 35vh;
    background-color: #FFFFFF;
    border-radius: 50%;
    animation: serpenteo 3s ease-in-out infinite;
}

/* Retrasos escalonados para generar el efecto de la serpiente */
#cuerpo-snake-1 { animation-delay: 0s; }
#cuerpo-snake-2 { animation-delay: 0.3s; }
#cuerpo-snake-3 { animation-delay: 0.6s; }
#cuerpo-snake-4 { animation-delay: 0.9s; }


/* --- 6ta Sección: Partículas --- */
#seccion-particulas {
    width: 100%;
    min-height: 80vh;
    background-color: #FFFFFF;
    color: #000000;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#contenedor-particulas-ascendentes {
    position: absolute;
    left: 10vw;
    width: 30vw;
    height: 100%;
    z-index: 1;
}

/* --- Corrección 6ta Sección: Partículas Uniformes y Rápidas --- */
#particula-1, #particula-2, #particula-3, #particula-4, #particula-5, #particula-6 {
    position: absolute;
    background-color: #000000;
    border-radius: 50%;
    width: 120px; /* Tamaño uniforme para todas */
    height: 120px;
    animation: ascender-agua linear infinite;
}

/* Duraciones reducidas (entre 1.5s y 3s) para que el "agua hierva" más rápido */
#particula-1 { left: 0%; animation-duration: 2s; animation-delay: 0s; }
#particula-2 { left: 40%; animation-duration: 2.5s; animation-delay: 0.5s; }
#particula-3 { left: 20%; animation-duration: 1.8s; animation-delay: 1s; }
#particula-4 { left: 70%; animation-duration: 2.2s; animation-delay: 0.2s; }
#particula-5 { left: 10%; animation-duration: 2.8s; animation-delay: 0.8s; }
#particula-6 { left: 55%; animation-duration: 1.5s; animation-delay: 1.5s; }

#contenedor-texto-particulas {
    margin-left: 55vw; /* Posicionado al lado derecho */
    max-width: 500px;
    z-index: 10;
}

#titulo-particulas {
    font-size: 55px;
    font-weight: normal;
    margin-bottom: 40px;
}

#parrafo-particulas {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 60px;
}

#boton-particulas {
    width: 200px;
    height: 53px;
    background-color: #1E1E1E;
    color: #FFFFFF;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#boton-particulas:hover {
    background-color: #FFFFFF;
    color: #6E6E6E;
}

#enlace-particulas {
    text-decoration: none;
}
/* --- Animaciones Bloque 4 --- */
@keyframes ascender-diagonal {
    0% { transform: translate(-10vw, 110vh) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translate(40vw, -20vh) scale(0.5); opacity: 0; } /* Suben y se achican */
}

@keyframes mecer-viento {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); } /* Inclinación leve a la derecha */
    100% { transform: rotate(0deg); }
}


/* --- 7ma Sección: Juego de Semillas --- */
#seccion-semillas {
    width: 100%;
    min-height: 80vh;
    background-color: #505050; /* Gris solicitado */
    color: #FFFFFF;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#contenedor-particulas-diagonales {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#particula-diag-1, #particula-diag-2, #particula-diag-3, #particula-diag-4 {
    position: absolute;
    background-color: #FFFFFF;
    border-radius: 50%;
    width: 60px; /* Partículas más pequeñas */
    height: 60px;
    animation: ascender-diagonal linear infinite;
}

#particula-diag-1 { left: 10%; animation-duration: 4s; animation-delay: 0s; }
#particula-diag-2 { left: 30%; animation-duration: 5s; animation-delay: 1s; }
#particula-diag-3 { left: 5%; animation-duration: 3.5s; animation-delay: 2s; }
#particula-diag-4 { left: 20%; animation-duration: 4.5s; animation-delay: 0.5s; }

#contenedor-diente-leon {
    position: absolute;
    left: -10vh; /* Ajustado al lado izquierdo */
    bottom: -10vh;
    height: 110vh;
    transform-origin: bottom center; /* El eje de rotación está en la base (tallo) */
    animation: mecer-viento 6s ease-in-out infinite;
    z-index: 5;
}

#imagen-diente-leon {
    height: 100%;
    object-fit: contain;
}

#contenedor-texto-semillas {
    margin-left: 55vw; /* Alineado a la derecha */
    max-width: 500px;
    z-index: 10;
}

#titulo-semillas {
    font-size: 55px;
    font-weight: normal;
    margin-bottom: 40px;
}

#parrafo-semillas {
    font-size: 24px;
    line-height: 1.4;
    margin-bottom: 60px;
}

#boton-semillas {
    width: 200px;
    height: 53px;
    background-color: #1E1E1E; /* Fondo oscuro */
    color: #FFFFFF; /* Letras blancas */
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#boton-semillas:hover {
    background-color: #000000;
}

#enlace-semillas {
    text-decoration: none;
}


/* --- 8va Sección: Hero Invertido --- */
#seccion-final {
    width: 100%;
    height: 100vh;
    background-color: #FFFFFF;
    color: #000000; /* Texto en negro */
    position: relative;
    overflow: hidden;
}

#titulo-final {
    position: absolute;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 120px;
    font-weight: normal;
    line-height: 1.1;
    z-index: 10;
}

#autor-final {
    position: absolute;
    right: 100px;
    bottom: 80px;
    font-size: 24px;
    z-index: 10;
}

/* Colores intercambiados según referencia */
#rectangulo-claro-final {
    position: absolute;
    width: 35vw;
    height: 60vh;
    background-color: #D9D9D9; 
    top: 0;
    left: 0;
    z-index: 1;
}

#rectangulo-oscuro-final {
    position: absolute;
    width: 35vw;
    height: 25vh;
    background-color: #6E6E6E; 
    bottom: 0;
    left: 25vw;
    z-index: 1;
}

/* --- Botón Volver (Interacción Compleja) --- */
#enlace-volver {
    position: absolute;
    right: 15vw;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    z-index: 20;
}

#boton-volver {
    width: 120px;
    height: 120px;
    background-color: #000000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: latido-regular 2s ease-in-out infinite;
    transition: all 0.4s ease; /* Suaviza el cambio de forma al pasar el mouse */
}

#texto-volver {
    color: #000000; /* Mismo color que el fondo, por lo que es invisible */
    font-size: 35px;
    transition: color 0.4s ease;
}

/* Estado Hover: Se aplana, ensancha y revela el texto */
#boton-volver:hover {
    width: 200px;
    border-radius: 30px; /* Pasa de círculo a rectángulo redondeado */
    animation: none; /* Detiene la palpitación */
}

#boton-volver:hover #texto-volver {
    color: #FFFFFF; /* Revela la palabra "Volver" */
}

#boton-volver:active #texto-volver {
    color: transparent;
}

/* --- ENCABEZADO PRINCIPAL (HEADER) --- */
#encabezado-principal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 40px;
    z-index: 1000; /* Asegura que el header esté por encima de todo */
    border-bottom: 2px solid #1E1E1E;
}

/* Ocultar el checkbox funcional */
#interruptor-indice {
    display: none;
}

/* Estilos de los enlaces del header */
#boton-indice, 
#link-wiki-general, 
#link-wiki-proyecto {
    font-family: "Archivo Black", sans-serif;
    font-size: 20px;
    color: #000000;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

/* Efecto de subrayado al pasar el mouse (referencia mdn/x) */
#boton-indice:hover, 
#link-wiki-general:hover, 
#link-wiki-proyecto:hover {
    text-decoration: underline;
    text-underline-offset: 8px; /* Separa la línea del texto */
    text-decoration-thickness: 3px;
}

/* --- PANEL DESPLEGABLE (ÍNDICE) --- */
#panel-desplegable {
    position: absolute;
    top: 70px; /* Justo debajo del header */
    left: 0;
    width: 100%;
    height: 400px; /* Altura del panel desplegado */
    background-color: #1E1E1E;
    display: flex;
    /* Animación de deslizamiento vertical */
    transform: translateY(-120%); 
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
    border-bottom: 2px solid #1E1E1E;
}

/* La magia: Cuando el checkbox está marcado (clic en Indice), el panel baja */
#interruptor-indice:checked ~ #panel-desplegable {
    transform: translateY(0);
}

/* --- TARJETAS DEL ÍNDICE --- */
/* Cada tarjeta ocupa el mismo ancho (flex: 1) basándonos en tu boceto */
#tarjeta-indice-1, #tarjeta-indice-2, #tarjeta-indice-3, 
#tarjeta-indice-4, #tarjeta-indice-5, #tarjeta-indice-6 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Alinea el texto abajo */
    padding: 20px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: filter 0.3s ease;
    border-right: 1px solid #FFFFFF; /* Líneas divisorias sutiles */
}

/* Efecto Hover para las tarjetas tipo carrusel */
#tarjeta-indice-1:hover, #tarjeta-indice-2:hover, #tarjeta-indice-3:hover, 
#tarjeta-indice-4:hover, #tarjeta-indice-5:hover, #tarjeta-indice-6:hover {
    filter: brightness(0.7); /* Oscurece la tarjeta al pasar el mouse */
}

/* Colores de fondo específicos según el boceto de columnas */
#tarjeta-indice-1 { background-color: #FFFFFF; }
#tarjeta-indice-2 { background-color: #000000; }
#tarjeta-indice-3 { background-color: #FFFFFF; }
#tarjeta-indice-4 { background-color: #000000; }
#tarjeta-indice-5 { background-color: #000000; }
#tarjeta-indice-6 { background-color: #505050; border-right: none; }

/* Tipografía de los títulos inferiores de las tarjetas */
#texto-indice-1, #texto-indice-2, #texto-indice-3, 
#texto-indice-4, #texto-indice-5, #texto-indice-6 {
    font-family: "Ramabhadra", sans-serif;
    font-size: 22px;
    z-index: 10;
}

/* Colores de texto contrastantes */
#texto-indice-1, #texto-indice-3 { color: #000000; }
#texto-indice-2, #texto-indice-4, #texto-indice-5, #texto-indice-6 { color: #FFFFFF; }

/* Ajuste de las imágenes miniatura dentro de las tarjetas */
#miniatura-1, #miniatura-6 {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 60%;
    object-fit: contain;
}

/* Contenedor flexible para poner los botones en fila */
#contenedor-botones-hamilton {
    display: flex;
    gap: 15px; /* Espacio entre el botón del proyecto y el de música */
    align-items: center;
}

/* Estilo para el nuevo botón de audio (haciendo juego con el diseño) */
#boton-audio-hamilton {
    width: 160px;
    height: 53px;
    background-color: #FFFFFF;
    color: #1E1E1E;
    border: 2px solid #1E1E1E;
    font-family: "Ramabhadra", sans-serif;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#boton-audio-hamilton:hover {
    background-color: #1E1E1E;
    color: #FFFFFF;
}
