:root {
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* SECCIÓN GENERAL */
.historia-section {
    padding: 100px 8% 0 8%; /* Quitamos padding abajo */
    background-color: var(--secondary-black);
    color: white;
}

.historia-item {
    display: flex;
    align-items: center;
    gap: 100px;
    margin-bottom: 120px; /* Reducido de 180 a 120 para que no haya tanto hueco */
}

.historia-item.reverse {
    flex-direction: row-reverse;
}

/* VISUAL */
.historia-visual {
    flex: 1.2;
    position: relative;
    z-index: 1;
}

.historia-visual img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 4px;
    filter: brightness(0.8) sepia(0.2);
    transition: var(--transition-smooth);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* STICKER MEJORADO */
.historia-date-sticker {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--primary-green);
    color: white;
    padding: 10px 25px;
    font-family: 'Oswald', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    text-transform: uppercase;
    clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 100%, 0% 100%);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    z-index: 10;
}

/* INFO */
.historia-info {
    flex: 1;
}

.historia-tag {
    display: inline-block;
    color: var(--primary-green);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--primary-green);
}

.historia-info h2 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    text-transform: uppercase;
}

.historia-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.75);
    font-weight: 300;
}

/* ÚLTIMO ITEM: Sin margen para evitar el hueco */
.historia-item:last-of-type {
    margin-bottom: 0;
}

/* BLOQUE DE CIERRE: Ahora está pegado al último texto */
.historia-closure {
    text-align: center;
    padding: 60px 8% 100px 8%; 
    background-color: var(--secondary-black);
    color: white;
}

.historia-closure p {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    text-transform: uppercase;
    color: var(--primary-green);
    font-weight: 700;
    margin: 0;
}

.divider-line {
    width: 80px;
    height: 4px;
    background: var(--primary-green);
    margin: 20px auto 0;
    opacity: 0.6;
}

/* --- HERO: ANTIGUO Y SOFISTICADO (V2) --- */
.historia-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centrado horizontal */
    background-color: #1a1c1a; /* Un tono ceniza/verde muy oscuro, no negro puro */
    overflow: hidden;
    text-align: center;
}

/* Ajuste de la foto de fondo */
.historia-hero::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('Fondos/tu-foto-hero.jpg');
    background-size: cover;
    background-position: center;
    /* Filtro: Menos negro, más textura de "recuerdo" */
    filter: sepia(20%) brightness(0.4) contrast(1.1) grayscale(30%);
    z-index: 1;
}

/* Capa de color para suavizar el fondo */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado sutil que no ahoga la imagen */
    background: linear-gradient(to bottom, 
        rgba(26, 28, 26, 0.5) 0%, 
        rgba(26, 28, 26, 0.9) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los elementos internos */
}

.hero-pretitle {
    font-family: 'Oswald', sans-serif;
    color: var(--primary-green);
    letter-spacing: 12px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-weight: 400;
}


.hero-title .highlight {
    display: block;
    font-weight: 300;
    font-size: 0.6em;
    letter-spacing: 10px;
    margin-top: 5px;
    color: var(--primary-green);
}

/* --- MEJORA DE LEGIBILIDAD EN EL HERO --- */

.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    color: #f5f5f5;
    margin: 0;
    /* Sombra suave para separar del fondo */
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-lead {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #ffffff; /* Blanco puro para más contraste */
    max-width: 500px;
    margin: 30px 0;
    line-height: 1.7;
    font-weight: 400; /* Un poco más de peso */
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* EL TEXTO DE ABAJO (Explora nuestro legado) */
.hero-scroll-indicator span {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #ffffff;
    font-weight: 700; /* Más negrita para que no se pierda */
    /* Este es el truco clave: un pequeño resplandor oscuro detrás */
    background: rgba(0, 0, 0, 0.2); 
    padding: 5px 15px;
    border-radius: 50px;
    backdrop-filter: blur(5px); /* Un sutil desenfoque solo tras el texto */
}

.hero-scroll-indicator i {
    font-size: 1.8rem;
    color: var(--primary-green);
    /* Sombra para que la flecha resalte sobre el césped o zonas claras */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    animation: bounceSlow 2s infinite;
}

/* REFUERZO DEL OVERLAY INFERIOR */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Un degradado de tres puntos: arriba oscuro, centro más claro, abajo oscuro */
    background: linear-gradient(to bottom, 
        rgba(26, 28, 26, 0.7) 0%, 
        rgba(26, 28, 26, 0.3) 50%, 
        rgba(26, 28, 26, 0.8) 100%);
    z-index: 2;
}

/* LA FLECHA: Justo debajo del lead, integrada en el flujo */
.hero-scroll-indicator {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
}

.hero-scroll-indicator .arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    animation: bounceSlow 2s infinite;
}

.historia-closure, 
.historia-hero-content,
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Esto centra TODO horizontalmente */
    text-align: center;  /* Esto centra las líneas de texto */
    width: 100%;
}

/* Forzar centrado del 1982 y títulos */
.hero-pretitle, 
.hero-title, 
.hero-lead,
.divider-line {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
}

/* El texto de "Conoce nuestra historia" o similares */
.historia-closure p {
    width: 100%;
    max-width: 800px; /* Para que no se estire de lado a lado en pantallas grandes */
    margin: 0 auto;
}


@keyframes bounceSlow {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(8px); }
    60% { transform: translateY(4px); }
}

/* MOBILE */
@media (max-width: 1024px) {
    .historia-item, .historia-item.reverse {
        flex-direction: column;
        gap: 40px;
    }
    .historia-section { padding: 60px 5% 0 5%; }
}

/* 1. Desde que el navegador abre el archivo, el fondo ya es negro */
html {
    background-color: #111 !important; /* El color de tu club */
}

/* 2. Bloqueo preventivo: invisible pero con fondo oscuro */
body:not(.content-ready) {
    opacity: 0 !important;
    background-color: #111 !important;
}

/* 3. Aparición rápida */
body.content-ready {
    opacity: 1 !important;
    transition: opacity 0.2s ease-in;
    background-color: #111 !important;
}

/* 1. Evitar que el fondo de la página sea blanco */
html, body {
    background-color: #111; /* El color oscuro de tu club */
    margin: 0;
    padding: 0;
    height: 100%;
}

/* 2. Asegurar que el main ocupe toda la pantalla */
.main-content {
    background-color: var(--secondary-black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 3. La sección de equipos debe crecer para empujar el botón */
.equipos-section {
    flex: 1; 
    position: relative;
    padding-bottom: 50px; /* Espacio antes del botón */
}

/* 4. Estilo específico para el contenedor del botón */
.equipos-cta {
    background-color: var(--secondary-black);
    padding: 40px 0 100px 0; /* 100px abajo para que NO pegue al final */
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: -2px; /* Evita pequeñas líneas blancas por redondeo de píxeles */
}

/* 5. Estilo del botón (ajustado para que destaque) */
.btn-ver-equipos {
    background-color: transparent !important;
    border: 2px solid #007d4c !important; /* Verde Landetxa */
    color: #fff !important;
    padding: 12px 30px !important;
    text-decoration: none !important;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-ver-equipos:hover {
    background-color: #007d4c !important;
    color: #000 !important;
    transform: translateY(-3px);
}