/* --- 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);
}

.nav-proximamente {
    color: #888; /* Un color más apagado para indicar que no es un enlace */
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* --- 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;
    border: 2px solid var(--verde-betis);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    overflow: hidden; /* Para asegurar que la imagen no se desborde */
}

.idiosincrasia-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Clave para que la imagen cubra el espacio sin deformarse */
}

.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);
}

/* --- TG POR EL MUNDO --- */
#tg-mundo {
    background-color: var(--negro);
    overflow: hidden; /* Oculta los slides que se salen */
    padding-top: 80px;
    padding-bottom: 80px;
}

.intro-text {
    text-align: center;
    font-size: 1.2rem;
    max-width: 700px;
    margin: -20px auto 40px auto;
    padding: 0 20px;
}

.tg-mundo-slider {
    display: flex;
    width: calc(280px * 10); /* (Ancho de slide + gap) * número de slides duplicados */
    animation: scroll 40s linear infinite;
}

.tg-mundo-slider:hover {
    animation-play-state: paused;
}

.slide {
    width: 250px;
    height: 350px;
    margin: 0 15px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid var(--blanco);
}

.slide:hover {
    transform: scale(1.05);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-280px * 5)); } /* (Ancho de slide + gap) * número de slides originales */
}

/* --- COMPROMETIDOS (BLOG) --- */
#comprometidos {
    background-color: var(--gris-oscuro);
}

.comprometidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-card {
    background-color: var(--negro);
    border: 1px solid #333;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--verde-betis);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    background-color: #222;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
}

.blog-card h3 {
    font-family: 'Oswald', sans-serif;
    margin-bottom: 10px;
    color: var(--verde-betis);
}

.blog-card .excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1; /* Empuja el botón "Leer más" hacia abajo */
    margin-bottom: 20px;
}

/* --- TIENDA (SHARED STYLES) --- */
.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);
}

.campaign-subtitle, .campaign-slogan {
    text-align: center;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.campaign-subtitle {
    font-size: 1.2rem;
    color: #aaa;
    margin-top: -40px;
    margin-bottom: 10px;
}

.campaign-slogan-img-container {
    text-align: center;
    margin-bottom: 80px;
}

.campaign-slogan-img-container img {
    max-width: 100%;
    height: auto;
    max-height: 280px; /* Ajusta esta altura según tu imagen */
}

.ball-icon {
    color: var(--verde-betis);
}

.campaign-section {
    max-width: 1200px;
    margin: 0 auto 80px auto;
}

.campaign-section-title {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--verde-betis);
    border-bottom: 2px solid #444;
    padding-bottom: 15px;
    display: inline-block;
    width: 100%;
}

.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tariff-link {
    text-decoration: none;
    color: var(--blanco);
    display: flex; /* Ensure the link fills the grid cell */
}

.tariff-card {
    background-color: var(--gris-oscuro);
    border: 1px solid #333;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
    width: 100%; /* Make the card fill the link wrapper */
}

.tariff-card:hover {
    transform: translateY(-5px);
    border-color: var(--verde-betis);
}

.tariff-icon {
    font-size: 2.5rem;
    color: var(--verde-betis);
    margin-bottom: 15px;
    height: 50px;
}

.tariff-icon img {
    height: 100%;
    width: auto;
}

.tariff-card h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    min-height: 40px; /* To align titles */
}

.tariff-card .price {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--blanco);
}

.tariff-card .note {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: -5px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 80px; /* Espacio antes de los obsequios */
}

.benefit-item {
    background-color: var(--gris-oscuro);
    padding: 20px;
    border-left: 4px solid var(--verde-betis);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, background-color 0.3s;
}

.benefit-item:hover {
    transform: translateY(-5px);
    background-color: #2a2a2a;
}

.benefit-icon {
    font-size: 2rem;
    line-height: 1;
}

.benefit-item p {
    font-size: 1rem;
    line-height: 1.5;
    color: #ddd;
}

.gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gift-img-double {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.gift-img-double .gift-img {
    width: 50%;
    height: 200px; /* Altura ajustada para mejor proporción */
    margin-bottom: 0;
}

.gift-item {
    text-align: center;
}

.gift-img {
    width: 100%;
    height: 250px;
    background-color: var(--gris-oscuro);
    border: 1px solid #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
    overflow: hidden;
    cursor: pointer;
}

.gift-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gift-img:hover img {
    transform: scale(1.05);
}

.gift-item h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.gift-item .note {
    font-size: 0.9rem;
    color: #aaa;
}

.campaign-details {
    background-color: var(--gris-oscuro);
    text-align: center;
    padding: 40px;
    border: 1px solid #333;
}

.campaign-details p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.campaign-details .office-hours {
    margin-top: 20px;
    font-weight: bold;
    color: var(--verde-betis);
}

.campaign-cta {
    text-align: center;
    margin-top: -30px;
}

/* --- INSTAGRAM FEED --- */
#instagram-feed {
    background-color: var(--gris-oscuro);
}

.instagram-widget-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilos para el iframe que genera Lightwidget */
.instagram-widget-container iframe {
    width: 100% !important;
    border: none !important;
    box-sizing: border-box !important;
}

/* --- FORMULARIO SOCIO PAGE --- */
#form-page {
    background-color: var(--gris-oscuro);
    text-align: center;
}

.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(--negro);
    color: var(--blanco);
}

.form-socios input:focus {
    outline: 2px solid var(--verde-betis);
    border-color: var(--verde-betis);
}

.form-socios fieldset {
    border: 2px solid #333;
    padding: 20px;
    margin-bottom: 15px;
    text-align: left;
}

.form-socios legend {
    padding: 0 10px;
    font-weight: bold;
    color: var(--verde-betis);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.talla-otro-container {
    display: none;
    margin-top: 15px;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    text-align: left;
    margin-top: -10px; /* Lo acerca al input de arriba */
    margin-bottom: 5px; /* Espacio antes del siguiente elemento */
    display: none; /* Oculto por defecto */
}

/* Estilos para los mensajes del formulario */
#form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    display: none; /* Oculto por defecto */
}
.form-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-socios input.invalid {
    border-color: #ff6b6b;
}
.form-socios input.invalid:focus {
    border-color: #ff6b6b;
    outline-color: #ff6b6b;
}
.form-socios select,
.form-socios input[type="text"],
.form-socios input[type="tel"],
.form-socios input[type="date"],
.form-socios input[type="file"] {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #555;
    border-radius: 0;
    background-color: var(--negro);
    color: var(--blanco);
    font-family: 'Roboto', sans-serif;
}

.form-socios input[type="file"] {
    padding: 12px; /* Slight adjustment for file input */
}

.form-socios select:focus,
.form-socios input[type="date"]:focus {
    outline: 2px solid var(--verde-betis);
    border-color: var(--verde-betis);
}

.form-description {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 15px;
}

.form-description p {
    margin-bottom: 10px;
}

.payment-info {
    background-color: var(--gris-oscuro);
    border: 1px solid #333;
    padding: 20px;
    text-align: left;
    margin-bottom: 15px;
}

.payment-info h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    text-transform: uppercase;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.payment-info p {
    margin-bottom: 8px;
}

.payment-notice {
    background-color: var(--gris-oscuro);
    border: 2px solid var(--verde-betis);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.payment-notice h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    text-transform: uppercase;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.payment-notice p {
    line-height: 1.6;
}

.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;
}

/* Estilo para el spinner de carga en el botón */
.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* --- 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;
}

footer a {
    color: var(--verde-betis);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* --- 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%;
    position: relative; /* Para posicionar la descripción */
}

.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 */
    border: 4px solid var(--blanco);
    box-shadow: 0 0 30px rgba(0,0,0,0.7);
}

.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--blanco);
    font-size: 3rem;
    cursor: pointer;
}

.modal-description {
    position: absolute;
    bottom: 4px; /* Alineado con el borde de la imagen */
    left: 4px;
    right: 4px;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.95), transparent);
    color: var(--blanco);
    padding: 50px 20px 20px 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease-out 0.2s, transform 0.4s ease-out 0.2s;
    pointer-events: none; /* Para poder hacer clic 'a través' de él y cerrar el modal */
}

.modal-gallery.is-open .modal-description {
    opacity: 1;
    transform: translateY(0);
}

/* --- GALLERY PAGE --- */
#gallery-full {
    background-color: var(--gris-oscuro);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    background-color: var(--negro);
    border: 1px solid #333;
    overflow: hidden;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-item .title {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination button {
    font-family: 'Oswald', sans-serif;
    background-color: transparent;
    border: 2px solid var(--verde-betis);
    color: var(--verde-betis);
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 45px;
}

.pagination button:hover,
.pagination button.active {
    background-color: var(--verde-betis);
    color: var(--blanco);
}

.pagination button:disabled {
    border-color: #555;
    color: #555;
    cursor: not-allowed;
    background-color: transparent;
}

/* --- ARTICLE PAGE --- */
.article-container {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
}

.article-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    color: var(--verde-betis);
    line-height: 1.2;
    margin-bottom: 10px;
}

.article-meta {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 30px;
}

.article-image {
    margin-bottom: 40px;
}

.article-image img {
    width: 100%;
    height: auto;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body blockquote {
    margin: 30px 0;
    padding-left: 20px;
    border-left: 4px solid var(--verde-betis);
    font-style: italic;
    font-size: 1.2rem;
    color: #ccc;
}

.article-body ul {
    list-style-position: inside;
    padding-left: 20px;
    margin-bottom: 1.5em;
}

.article-body ul li {
    margin-bottom: 0.5em;
    line-height: 1.8;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--gris-oscuro);
    color: var(--blanco);
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    z-index: 3000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
    flex-wrap: wrap;
}

.cookie-consent-banner.is-visible {
    transform: translateY(0);
}

.cookie-consent-text {
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--verde-betis);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.cookie-btn-accept {
    background-color: var(--verde-betis);
    color: var(--blanco);
}

.cookie-btn-accept:hover { background-color: #006629; }

.cookie-btn-decline {
    background-color: #444;
    color: #ccc;
}

.cookie-btn-decline:hover { background-color: #555; }

@media (max-width: 768px) {
    .article-container {
        margin: 40px auto;
    }
    .article-header h1 {
        font-size: 2.2rem;
    }
}

/* --- CONTACT PAGE (REDESIGN) --- */
#contact-full {
    padding: 0; /* Remove padding to make the map container full-width */
}

#contact-full .section-title-container {
    background-color: var(--gris-oscuro);
    padding: 80px 50px;
    text-align: center;
}

.contact-container {
    position: relative;
    height: 65vh;
    min-height: 550px;
    background-color: var(--negro);
}

.contact-info {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px;
    border: 2px solid var(--verde-betis);
    width: 450px;
    max-width: 90%;
}

.contact-info h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    text-transform: uppercase;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.contact-info p {
    margin-bottom: 25px;
    line-height: 1.7;
    font-size: 1.1rem;
}

.contact-info p strong {
    display: block;
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    text-transform: uppercase;
    margin-bottom: 5px;
    font-size: 1rem;
}

.contact-info a {
    color: var(--blanco);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--verde-betis);
}

.contact-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.contact-map iframe {
    filter: grayscale(1);
    transition: filter 0.4s ease;
}

.contact-map:hover iframe {
    filter: grayscale(0);
}

/* --- 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; }

    /* Ajustes para la campaña de abonados en móvil */
    .campaign-slogan-img-container img {
        max-height: 150px;
    }
    .campaign-section-title {
        font-size: 1.8rem;
    }
    .tariffs-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .tariff-card .price {
        font-size: 2.2rem;
    }
    .gifts-grid {
        grid-template-columns: 1fr; /* Una columna para los regalos en móvil */
    }

    /* Ajustes para la página de blog en móvil */
    .blog-list-item {
        flex-direction: column;
    }
    .blog-list-item-img {
        flex-basis: 200px; /* Altura fija en móvil */
    }

    /* Ajustes para la página de contacto en móvil */
    .contact-container {
        position: static;
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .contact-map {
        position: static;
        order: 2; /* Map below info */
        height: 400px;
    }
    .contact-info {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        border: none;
    }

    /* Cookie banner responsive */
    .cookie-consent-banner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* --- ADMIN CHART --- */
.admin-chart-container {    
    background-color: var(--negro);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #444;
    margin-bottom: 40px;
    height: 400px;
    position: relative;
}

.admin-chart-container h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

/* --- ADMIN STATS MODAL --- */
.admin-stats-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1500; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.admin-stats-modal-content {
    background-color: var(--gris-oscuro);
    margin: auto;
    padding: 40px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    position: relative;
    border-radius: 5px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-stats-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
}

.close-stats-modal:hover,
.close-stats-modal:focus {
    color: var(--blanco);
    text-decoration: none;
    cursor: pointer;
}

/* --- ADMIN SUMMARIES --- */
.admin-summaries {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.summary-box {
    flex: 1;
    min-width: 300px;
    background-color: var(--negro);
    padding: 20px;
    border: 1px solid #444;
    border-radius: 5px;
}

.summary-box h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.admin-summaries h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.admin-summaries ul {
    list-style: none;
    padding-left: 10px;
}

.admin-summaries li {
    margin-bottom: 5px;
}

.admin-summaries li.total {
    margin-top: 10px;
    border-top: 1px solid #333;
    padding-top: 5px;
}
/* --- ADMIN PANEL STYLES --- */
.admin-form-container {
    max-width: 700px;
    margin: 0 auto 50px auto;
    padding: 30px;
    background-color: var(--negro);
    border: 1px solid #444;
    border-radius: 5px;
}

.admin-form-container h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.admin-form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form-container label {
    font-weight: bold;
    margin-bottom: -5px;
}

.admin-form-container input[type="text"],
.admin-form-container input[type="date"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #555;
    background-color: #333;
    color: var(--blanco);
    border-radius: 4px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    font-weight: normal;
    margin-bottom: 0;
}

.admin-form-container input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #555;
    background-color: #333;
    color: var(--blanco);
    border-radius: 4px;
}

.admin-login-page, .admin-panel-page {
    background-color: var(--gris-oscuro);
    color: var(--blanco);
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: var(--negro);
    border: 2px solid var(--verde-betis);
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 138, 56, 0.5);
}

.login-container h2 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    margin-bottom: 30px;
    text-transform: uppercase;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-container label {
    text-align: left;
    font-weight: bold;
    margin-bottom: -10px; /* Ajuste para acercar label a input */
}

.login-container input[type="text"],
.login-container input[type="password"] {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #555;
    background-color: #333;
    color: var(--blanco);
    border-radius: 4px;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    outline: 2px solid var(--verde-betis);
    border-color: var(--verde-betis);
}

.login-container .btn-verde {
    width: auto;
    align-self: center;
    padding: 12px 30px;
    margin-top: 10px;
}

.admin-header {
    background-color: var(--negro);
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--verde-betis);
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-nav a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.admin-nav a:not(.btn-logout):hover {
    background-color: #333;
}

.admin-nav a.active {
    background-color: var(--verde-betis);
    color: var(--blanco);
}

.admin-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--verde-betis);
}

.btn-logout {
    background-color: #dc3545; /* Rojo para logout */
    color: var(--blanco);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #c82333;
}

.admin-main {
    padding: 40px 20px;
    max-width: 100%;
}

.admin-controls {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form .filter-select {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #555;
    background-color: #333;
    color: var(--blanco);
    border-radius: 4px;
    height: 41px; /* Align with search button */
}

.search-form input[type="text"] {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #555;
    background-color: #333;
    color: var(--blanco);
    border-radius: 4px;
    width: 300px;
}

.search-form input[type="text"]:focus {
    outline: 2px solid var(--verde-betis);
    border-color: var(--verde-betis);
}

.search-form .btn-verde {
    padding: 10px 20px;
    font-size: 1rem;
    width: auto;
}

.btn-clear-search {
    background-color: #6c757d;
    color: var(--blanco);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
}

.admin-main-actions {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.admin-main-actions .btn-verde,
.admin-main-actions .btn-stats {
    max-width: 250px;
    text-align: center;
}

.btn-stats {
    background-color: #6c757d; /* Gris */
    color: var(--blanco);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-stats:hover {
    background-color: #5a6268;
}

.btn-cancel {
    background-color: #6c757d;
    color: var(--blanco);
    padding: 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}
.btn-cancel:hover {
    background-color: #5a6268;
}

.btn-export {
    background-color: #17a2b8; /* Azul 'info' */
    color: var(--blanco);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
}
.btn-export:hover {
    background-color: #117a8b;
}

.socios-table-container {
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 1000px; /* Asegura que la tabla no se comprima demasiado */
}

table th, table td {
    border: 1px solid #444;
    padding: 10px;
    text-align: left;
    vertical-align: middle; /* Centra verticalmente el contenido */
}

table td {
    font-size: 0.9rem;
}

table th {
    background-color: var(--verde-betis);
    color: var(--blanco);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
}

table th a {
    color: inherit;
    text-decoration: none;
}

table th a:hover {
    text-decoration: underline;
}

table tr:nth-child(even) {
    background-color: #2a2a2a;
}

table tr:hover {
    background-color: #3a3a3a;
}

.status-cell {
    text-align: center !important;
    width: 120px;
}

.status-pending {
    color: #ffc107; /* Amarillo/Ámbar */
    font-weight: bold;
}

.actions-cell {
    text-align: center !important;
    width: 180px; /* Ancho fijo para la columna de acciones */
    white-space: nowrap;
}

.action-form {
    display: inline-block;
    margin: 0 2px;
    padding: 0;
    vertical-align: middle;
}

.btn-action {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    border: none;
    margin: 2px;
    text-align: center;
}

.btn-edit {
    background-color: #007bff; /* Azul */
}
.btn-edit:hover { background-color: #0056b3; }

.btn-delete {
    background-color: #dc3545; /* Rojo */
}

.btn-delete:hover { background-color: #c82333; }

.btn-view {
    background-color: #007bff; /* Azul */
}

.btn-view:hover { background-color: #0056b3; }

.btn-confirm {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    width: auto;
}

.btn-confirm:hover {
    background-color: #218838; /* Darker green */
}

.status-confirmed {
    color: #28a745;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.status-confirmed::before {
    content: '✔';
    margin-right: 5px;
}

/* Mensajes de error en el login */
.login-container .error-message {
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 20px;
}

.bulk-actions-container {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.bulk-actions-container .btn-verde {
    width: auto;
    padding: 10px 20px;
}

.bulk-actions-container {
    max-width: 1200px;
    margin: 20px auto 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.bulk-actions-container .btn-verde {
    width: auto;
    padding: 10px 20px;
}

/* --- DASHBOARD --- */
.dashboard-title {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--blanco);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.kpi-card {
    background-color: var(--negro);
    padding: 25px;
    border: 1px solid #444;
    border-left: 5px solid var(--verde-betis);
    display: flex;
    flex-direction: column;
}

.kpi-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #ccc;
    margin-bottom: 15px;
}

.kpi-value {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--blanco);
    margin-bottom: auto; /* Pushes link to the bottom */
}

.kpi-value.kpi-warning { color: #ffc107; }
.kpi-value.kpi-success { color: #28a745; }

.kpi-info {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

.kpi-link {
    margin-top: 15px;
    font-weight: bold;
    color: var(--verde-betis);
    text-decoration: none;
    transition: color 0.3s;
}
.kpi-link:hover {
    color: #00b348;
}

/* --- PROFILE PAGE --- */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.profile-card {
    background-color: var(--negro);
    padding: 30px;
    border: 1px solid #444;
    border-radius: 5px;
    align-self: start; /* Para que no se estire */
}

.profile-header {
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.profile-header h2 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 1rem;
}

.profile-details div strong {
    color: #aaa;
    min-width: 150px;
    display: inline-block;
}

.history-container {
    background-color: var(--negro);
    padding: 30px;
    border: 1px solid #444;
    border-radius: 5px;
}

.history-container h3 {
    font-family: 'Oswald', sans-serif;
    color: var(--verde-betis);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.history-item {
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.history-item-header {
    background-color: #2a2a2a;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-header h4 { font-size: 1.2rem; }
.history-item-header span { font-weight: bold; color: #ccc; }

.history-item-body {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.payment-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    color: var(--blanco);
    padding: 8px 15px;
    text-decoration: none;
    border: 1px solid #555;
    transition: background-color 0.3s, border-color 0.3s;
}

.pagination a:hover {
    background-color: var(--verde-betis);
    border-color: var(--verde-betis);
}

.pagination .pagination-active {
    background-color: var(--verde-betis);
    border-color: var(--verde-betis);
    font-weight: bold;
}

.pagination .pagination-disabled {
    color: #666;
    border-color: #444;
}

/* Responsive para la tabla de administración */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }
    .admin-header h1 {
        font-size: 1.5rem;
    }
    .profile-container {
        grid-template-columns: 1fr;
    }
    .history-item-body {
        grid-template-columns: 1fr;
    }
    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .admin-main {
        padding: 20px 10px;
    }
    .admin-controls {
        justify-content: center;
        margin-bottom: 20px;
    }
}