/* VARIABLES Y CONFIGURACIÓN BÁSICA */
:root {
    --primary-color: #024b8d; /* Azul Baxi */
    --secondary-color: #e51d38; /* Acento rojo */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f4f4f4;
    --font-primary: 'Merriweather', serif;
    --font-secondary: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

img, video {
    max-width: 100%;
    height: auto;
}

audio {
    max-width: 100%;
    min-height: 40px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* CABECERA Y NAVEGACIÓN */
.site-header {
    background-color: var(--primary-color);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo a {
    text-decoration: none;
    color: #fff;
    font-size: 1.8rem;
    font-family: var(--font-primary);
    font-weight: 700;
}

.logo-highlight {
    color: var(--secondary-color);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.main-navigation a:hover, 
.main-navigation a:focus {
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    position: relative;
}
.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #fff;
    left: 0;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* HERO / PORTADA */
.hero {
    position: relative;
    text-align: center;
    background-color: #000;
    color: #fff;
}

.hero-image-container {
    height: 60vh;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6; /* Oscurecer para legibilidad del texto */
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
}

.category {
    background-color: var(--secondary-color);
    padding: 5px 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.main-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.meta-info {
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* CUERPO DEL REPORTAJE */
.article-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: var(--font-primary);
    font-size: 1.15rem;
    color: #222;
}

.lead {
    font-size: 1.4rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.7;
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
}

.article-content p {
    margin-bottom: 25px;
}

/* IMÁGENES INTERCALADAS */
.article-image {
    margin: 30px 0;
}

.article-image img {
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-image figcaption {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

.float-right {
    float: right;
    max-width: 50%;
    margin-left: 30px;
}

.float-left {
    float: left;
    max-width: 50%;
    margin-right: 30px;
}

.full-width {
    width: 100%;
}

/* SECCIONES: MULTIMEDIA Y GALERÍA */
.multimedia-section, 
.gallery-section,
.infographic-section,
.authors-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.gallery-section {
    background-color: #fff;
}

h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--primary-color);
}

/* MEDIA GRID */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.media-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.media-item h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.media-item p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.media-item audio, 
.media-item video {
    width: 100%;
    border-radius: 4px;
}

/* =========================================
   GALERÍA CARRUSEL Y LIGHTBOX
========================================= */

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9; /* Mantiene la proporción horizontal */
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.carousel-image:hover {
    transform: scale(1.02);
}

.carousel-btn, .lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.carousel-btn:hover, .lightbox-btn:hover {
    background-color: rgba(229, 29, 56, 0.9); /* Rojo cálido al pasar el ratón */
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* LIGHTBOX (Pantalla completa) */
.lightbox {
    display: none; /* Oculto por defecto, se maneja con JS */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* INFOGRAFÍA */
.chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.download-link {
    text-align: center;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c0182e;
}

/* AUTORES */
.author-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.author-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
}

.author-info h3 {
    margin-bottom: 10px;
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.social-links a:hover {
    text-decoration: underline;
}

/* FOOTER */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

.site-footer p {
    margin-bottom: 10px;
}

.site-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* RESPONSIVE DESIGN (Media Queries) */
@media (max-width: 800px) {
    .main-title {
        font-size: 2.2rem;
    }

    .float-right, .float-left {
        float: none;
        max-width: 100%;
        margin: 20px 0;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px;
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }
}
