/* --- ESTILOS GLOBALES --- */
:root {
    --verde-betis: #008A38;
    --negro: #111111;
    --blanco: #ffffff;
    --gris-oscuro: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--negro);
    color: var(--blanco);
}

/* --- UTILIDADES --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* --- NAVEGACIÓN --- */
header {
    background-color: var(--negro);
    color: var(--blanco);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--verde-betis);
}

.logo-nav {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--blanco);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    height: 45px; /* Ajusta la altura según tu logo */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--verde-betis);
}

/* --- HAMBURGER MENU --- */
.hamburger-menu {
    display: none; /* Oculto en escritorio */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--blanco);
    transition: all 0.3s ease;
}
/* --- PORTADA (HERO) --- */
.hero {
    background-color: var(--negro);
    /* background-image: linear-gradient(rgba(0, 138, 56, 0.9), rgba(17, 17, 17, 0.9)); */
    color: var(--blanco);
    text-align: center;
    padding: 120px 20px;
}

.hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 900;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    background-color: transparent;
    color: var(--blanco);
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s;
    border: 2px solid var(--blanco);
}

.btn:hover {
    background-color: var(--blanco);
    color: var(--negro);
}

/* --- SECCIONES GLOBALES --- */
section {
    padding: 80px 50px;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 50px;
    color: var(--blanco);
    padding-bottom: 15px;
    text-align: center;
    border-bottom: 4px solid var(--verde-betis);
    display: inline-block;
}

/* --- IDIOSINCRASIA --- */
.idiosincrasia-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.idiosincrasia-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.7;
}

.idiosincrasia-text p:not(:last-child) {
    margin-bottom: 1.5em;
}

.idiosincrasia-img {
    flex: 1;
    background-color: var(--gris-oscuro);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--verde-betis);
    font-weight: bold;
    color: #666;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.idiosincrasia-text {
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    /* Añadimos un pequeño retraso para que aparezca después de la imagen */
    transition-delay: 0.2s;
}

/* --- LA SEDE --- */
#sede {
    background-color: var(--gris-oscuro); /* Changed to gris-oscuro for contrast with body */
}

.sede-content {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.sede-gallery {
    /* Added a background color for the gallery itself, in case there's empty space */
    background-color: var(--negro);
    padding: 15px; /* Added padding around the grid of photos */
    border: 1px solid #333; /* Added a subtle border */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Added a subtle shadow */

    flex: 1.5; /* Más espacio para las fotos */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sede-photo {
    width: 100%;
    padding-top: 75%; /* Aspect ratio 4:3 */
    background-color: var(--gris-oscuro);
    border: 1px solid #333; /* Changed border color for consistency */
    position: relative; /* Crucial for absolute positioning of img */
    overflow: hidden; /* Ensures image doesn't spill out */
}

.sede-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
}

.sede-photo:first-child {
    grid-column: 1 / -1; /* La primera foto ocupa todo el ancho */
}

.sede-info {
    flex: 1;
    background-color: var(--gris-oscuro);
    padding: 30px;
    border-left: 4px solid var(--verde-betis);
}

.sede-info h3 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: var(--verde-betis);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.sede-info p, .sede-info ul { line-height: 1.7; }
.sede-info .address { margin-bottom: 30px; }
.sede-info ul { list-style: none; }
.sede-info ul li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.sede-info ul li::before { content: '✓'; color: var(--verde-betis); position: absolute; left: 0; font-weight: bold; }

/* --- TIENDA --- */
.tienda {
    background-color: var(--gris-oscuro);
}

.grid-tienda {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.producto {
    background-color: var(--negro);
    padding: 20px;
    border: 1px solid #333;
    text-align: center;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out, border-color 0.3s;
}

.producto:hover { border-color: var(--verde-betis); transform: translateY(-5px); } /* Added transform for hover */

.producto-img {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    background-color: #222; /* Added for tienda.html products */
}

.producto h3 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 10px;
}

.precio {
    font-size: 1.5rem;
    color: var(--verde-betis);
    font-weight: bold;
    margin-bottom: 15px;
}

/* --- HAZTE SOCIO --- */
.socios {
    background-color: var(--negro);
    color: var(--blanco);
    text-align: center;
}

.socios .section-title {
    color: var(--blanco);
}

.form-socios {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-socios input {
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #555;
    border-radius: 0;
    background-color: var(--gris-oscuro);
    color: var(--blanco);
}

.form-socios input:focus { outline: 2px solid var(--verde-betis); border-color: var(--verde-betis); }

.btn-verde {
    background-color: var(--verde-betis);
    color: var(--blanco);
    border: none;
    cursor: pointer;
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 0;
    text-transform: uppercase;
    display: block;
    text-decoration: none;
    width: 100%;
}

.btn-verde:hover {
    background-color: #006629;
}

/* --- FOOTER --- */
footer {
    background-color: var(--negro);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    border-top: 5px solid var(--verde-betis);
}

footer p {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

/* --- ANIMACIONES SCROLL --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- GALERÍA MODAL --- */
.modal-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-gallery.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh; /* Límite de altura para que no ocupe toda la pantalla en vertical */
}

.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--blanco);
    font-size: 3rem;
    cursor: pointer;
}

/* --- MEDIA QUERIES PARA RESPONSIVE --- */
@media (max-width: 768px) {
    /* --- AJUSTES GENERALES --- */
    section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-title-container {
        text-align: center;
    }

    /* --- NAVEGACIÓN MÓVIL --- */
    header {
        padding: 15px 20px;
    }

    .logo-nav {
        font-size: 1.2rem;
    }

    .nav-links {
        position: fixed;
        top: 73px; /* Altura del header: 15+40+15+3 = 73px */
        left: 0;
        width: 100%;
        height: calc(100vh - 73px);
        background-color: var(--negro);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hamburger-menu {
        display: flex; /* Visible en móvil */
    }

    /* Animación del hamburger a 'X' */
    .hamburger-menu.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger-menu.is-active .bar:nth-child(2) { opacity: 0; }
    .hamburger-menu.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* --- OTROS AJUSTES RESPONSIVE --- */
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.2rem; }
    .sede-content { flex-direction: column; }
    .idiosincrasia-content { flex-direction: column; }
}