:root {
    --rojo-sevilla: #d4001c;
    --rojo-oscuro: #a30015;
    --blanco: #ffffff;
    --gris-fondo: #f4f5f7;
    --gris-borde: #e1e4e8;
    --texto-oscuro: #1a1a1a;
    --texto-suave: #555555;
    --fuente-titulo: 'Montserrat', sans-serif;
    --fuente-texto: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-texto);
    background-color: var(--gris-fondo);
    color: var(--texto-oscuro);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   ENCABEZADO / HEADER
   ========================================================================== */
.header {
    background-image: url('fondo.png'), url('https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Estadio_Ram%C3%B3n_S%C3%A1nchez_Pizju%C3%A1n_mosaic.jpg/1280px-Estadio_Ram%C3%B3n_S%C3%A1nchez_Pizju%C3%A1n_mosaic.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    border-bottom: 4px solid var(--rojo-sevilla);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px;
    width: 100%;
    box-sizing: border-box;
}

.logo-header {
    max-height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.5));
}

.site-tagline {
    font-family: var(--fuente-titulo);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--blanco);
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 8px 16px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    
    /* Propiedades para centrarlo entre el logo y los botones */
    flex: 1;
    text-align: center;
    max-width: fit-content;
    margin: 0 auto;
}

.header-buttons {
    display: flex !important;
    gap: 10px;
    margin-left: auto;
}

.btn-header {
    display: inline-block;
    background-color: var(--rojo-sevilla);
    color: var(--blanco);
    text-decoration: none;
    padding: 8px 16px;
    font-family: var(--fuente-titulo);
    font-size: 0.85rem;
    font-weight: 800;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-header:hover {
    background-color: var(--rojo-oscuro);
    transform: translateY(-2px);
}

/* ==========================================================================
   CONTENIDO PRINCIPAL Y NOTICIAS
   ========================================================================== */
.main-content {
    margin-top: 30px;
    margin-bottom: 50px;
}

.noticia-abrible {
    cursor: pointer;
}

.destacada {
    margin-bottom: 40px;
}

.noticia-principal {
    background: var(--blanco);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 1fr;
    transition: transform 0.2s;
}

.noticia-principal:hover {
    transform: translateY(-3px);
}

@media (min-width: 768px) {
    .noticia-principal {
        grid-template-columns: 60% 40%;
    }
}

.img-wrapper {
    position: relative;
    min-height: 300px;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--rojo-sevilla);
    color: var(--blanco);
    font-family: var(--fuente-titulo);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 4px;
    text-transform: uppercase;
}

.destacada-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.categoria {
    color: var(--rojo-sevilla);
    font-family: var(--fuente-titulo);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.destacada-info h2 {
    font-family: var(--fuente-titulo);
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 15px;
}

.destacada-info p {
    color: var(--texto-suave);
    margin-bottom: 20px;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta .fecha {
    font-size: 0.8rem;
    color: #888;
}

.meta .leer-mas {
    font-size: 0.85rem;
    color: var(--rojo-sevilla);
    font-weight: 600;
}

/* Grid de Noticias */
.section-title {
    font-family: var(--fuente-titulo);
    font-size: 1.4rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-left: 5px solid var(--rojo-sevilla);
    padding-left: 10px;
}

.noticias-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 600px) {
    .noticias-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .noticias-grid { grid-template-columns: repeat(4, 1fr); }
}

.noticia-card {
    background-color: var(--blanco);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.noticia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.card-img {
    position: relative;
    height: 180px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.categoria-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--blanco);
    font-family: var(--fuente-titulo);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-family: var(--fuente-titulo);
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--texto-suave);
    margin-bottom: 15px;
    flex-grow: 1;
}

.card-footer {
    border-top: 1px solid var(--gris-borde);
    padding-top: 10px;
}

.card-footer .fecha {
    font-size: 0.75rem;
    color: #999;
}

/* ==========================================================================
   SECCIÓN DE CONTACTO
   ========================================================================== */
.contacto-section {
    padding: 60px 20px;
    margin-bottom: 40px;
}

.contacto-header {
    text-align: center;
    margin-bottom: 40px;
}

.contacto-header h2 {
    font-family: var(--fuente-titulo);
    font-size: 2rem;
    text-transform: uppercase;
}

.contacto-header .highlight {
    border-bottom: 3px solid var(--rojo-sevilla);
    padding-bottom: 5px;
}

.section-sub {
    color: var(--texto-suave);
    margin-top: 10px;
    font-size: 0.95rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.contact-card {
    background-color: var(--blanco);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--texto-oscuro);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--gris-borde);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.mail-icon span {
    font-size: 1.8rem;
}

.contact-card h3 {
    font-family: var(--fuente-titulo);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--texto-suave);
    margin-bottom: 15px;
}

.contact-btn {
    font-family: var(--fuente-titulo);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--rojo-sevilla);
    text-transform: uppercase;
}

/* ==========================================================================
   VENTANA MODAL (NOTICIAS)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--blanco);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 8px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--blanco);
    border: none;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--rojo-sevilla);
}

.modal-header-img {
    position: relative;
    width: 100%;
    height: 300px;
}

.modal-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 30px;
}

.modal-body .fecha {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.modal-body h2 {
    font-family: var(--fuente-titulo);
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.modal-body hr {
    border: 0;
    height: 2px;
    background-color: var(--rojo-sevilla);
    margin-bottom: 20px;
    width: 50px;
}

.modal-contenido-texto {
    font-size: 1rem;
    color: var(--texto-oscuro);
    line-height: 1.8;
}

/* ==========================================================================
   PIE DE PÁGINA / FOOTER
   ========================================================================== */
.footer {
    background-color: var(--texto-oscuro);
    color: var(--blanco);
    text-align: center;
    padding: 25px 0;
    border-top: 4px solid var(--rojo-sevilla);
}

.footer a {
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--rojo-sevilla) !important;
}

/* Adaptación para pantallas móviles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column !important;
        gap: 15px;
    }
    .site-tagline {
        margin: 0;
    }
    .header-buttons {
        margin-left: 0;
    }
}