/* revista.css - VERSIÓN ÚNICA Y CORREGIDA */

/* ===== RESET Y CONTENEDOR PRINCIPAL ===== */
.revista-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    font-family: 'Inter', sans-serif;
}

/* ===== PORTADA ===== */
.revista-portada {
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.portada-superior {
    padding: 2rem 3rem;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 2px;
}

.portada-izq {
    font-weight: 600;
    color: #0a3d62;
    font-size: 1.1rem;
}

.portada-der {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.portada-titular-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 3rem;
    border-bottom: 1px solid #e0e0e0;
}

.portada-titular-principal {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    color: #1e272e;
    text-transform: uppercase;
    max-width: 1100px;
}

.linea-1, .linea-2 {
    display: block;
}

.portada-bajada {
    font-size: 1.8rem;
    color: #5f6b7a;
    max-width: 900px;
    margin: 0 auto;
}

/* Grid de imágenes */
.portada-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 3rem;
    height: 450px;
}

.grid-item {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.grid-item.grande {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-item:hover {
    transform: scale(1.02);
}

.grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.grid-categoria {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Pie de portada */
.portada-pie {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem 3rem;
    background: #f5f7fa;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    gap: 2rem;
}

.pie-item {
    color: #1e272e;
    font-weight: 500;
}

/* ===== PÁGINAS INTERIORES ===== */
.revista-pagina {
    background: white;
    border: 1px solid #e0e0e0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pagina-numero {
    position: absolute;
    bottom: 2rem;
    right: 3rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0,0,0,0.05);
    z-index: 1;
}

/* ===== EDITORIAL ===== */
.editorial-destacado {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

.editorial-imagen img {
    width: 100%;
    border-radius: 12px;
}

.imagen-credito {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    text-align: right;
}

.editorial-seccion {
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #0a3d62;
    display: block;
    margin-bottom: 1rem;
}

.editorial-titulo {
    font-size: 3.5rem;
    margin: 1rem 0;
    line-height: 1.2;
}

.editorial-autor {
    font-style: italic;
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.editorial-cuerpo p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.editorial-firma {
    font-size: 1.3rem;
    margin-top: 2rem;
}

/* ===== ARTÍCULO PRINCIPAL ===== */
.articulo-seccion-grande {
    font-size: 1rem;
    text-transform: uppercase;
    color: #0a3d62;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 1rem;
}

.articulo-titulo-principal {
    font-size: 3.5rem;
    margin: 0 0 2rem;
    line-height: 1.2;
}

.articulo-grid-moderno {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    max-width: 1300px;
    margin: 0 auto;
}

.texto-destacado {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
    color: #0a3d62;
    border-left: 4px solid #0a3d62;
    padding-left: 2.5rem;
    margin: 2rem 0;
}

.cita-visual {
    background: #f8fafd;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    position: relative;
}

.cita-comilla {
    font-size: 4rem;
    color: #0a3d62;
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 10px;
}

.visual-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.visual-card-pie {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.datos-clave {
    background: #1e272e;
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.datos-clave h4 {
    margin-top: 0;
    color: white;
    font-size: 1.3rem;
}

.datos-clave ul {
    list-style: none;
    padding: 0;
    font-size: 1.1rem;
}

.datos-clave li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ===== DEPORTES ===== */
.galeria-deportes {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.galeria-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.galeria-item.principal img {
    height: 350px;
}

.galeria-pie {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

.deportes-texto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.estadistica-destacada {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.numero-destacado {
    font-size: 3.5rem;
    font-weight: 700;
    color: #0a3d62;
    line-height: 1;
}

.etiqueta-destacado {
    font-size: 1rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* ===== CULTURA ===== */
.cultura-imagen-fondo {
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.cultura-contenido-flotante {
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    width: 100%;
    padding: 2rem;
    color: white;
    border-radius: 0 0 16px 16px;
}

.cultura-grid-inferior {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* ===== EDUCACIÓN ===== */
.educacion-infografia {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.infografia-numero {
    font-size: 3.5rem;
    font-weight: 700;
    color: #0a3d62;
}

.educacion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.educacion-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.educacion-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* ===== PUBLICIDAD ===== */
.publicidad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.publicidad-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.publicidad-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.publicidad-body {
    padding: 1.5rem;
}

.publicidad-tag {
    display: inline-block;
    background: #0a3d62;
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* ===== NAVEGACIÓN ===== */
.revista-navegacion-moderna {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 3rem;
    padding: 1rem 2rem;
    max-width: 1400px;
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 50px;
}

.nav-btn-moderno {
    background: none;
    border: 2px solid #0a3d62;
    color: #0a3d62;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 2rem;
    border-radius: 40px;
    transition: all 0.3s ease;
}

.nav-btn-moderno:hover {
    background: #0a3d62;
    color: white;
}

.nav-paginas-moderno {
    font-weight: 600;
    color: #1e272e;
}

/* ===== CARRUSEL (ÚNICO) ===== */
.carrusel-wrapper {
    position: relative;
    width: 100%;
    height: 800px;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    background: white;
}

#pages-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.revista-portada,
.revista-pagina {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 2rem;
    overflow-y: auto;
}

/* Efectos de página */
#pages-track .revista-portada,
#pages-track .revista-pagina {
    box-shadow: -5px 0 10px rgba(0,0,0,0.05), 5px 0 10px rgba(0,0,0,0.05);
    border-right: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    position: relative;
}

#pages-track .revista-portada::after,
#pages-track .revista-pagina::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: -2px;
    width: 4px;
    background: linear-gradient(to right, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}

/* ===== VERSIÓN MÓVIL - ESCALADO PROPORCIONAL ===== */
@media (max-width: 768px) {
    
    /* Escalamos todo el contenedor principal */
    .revista-container {
        transform: scale(0.85); /* Reduce TODO al 85% */
        transform-origin: top center; /* Escala desde arriba */
        margin: 0 auto;
        padding: 0;
        width: 118%; /* Compensa el escalado para que ocupe el ancho */
        max-width: 118%;
    }
    
    /* Ajustamos el carrusel para que se vea bien */
    .carrusel-wrapper {
        height: 700px; /* Altura compensada */
        margin: 0 auto;
    }
    
    /* La navegación también se escala */
    .revista-navegacion-moderna {
        transform: scale(0.9);
        margin: 0.5rem auto;
        width: 110%;
        margin-left: -5%;
    }
    
    /* Para pantallas más pequeñas, escalamos más */
    @media (max-width: 480px) {
        .revista-container {
            transform: scale(0.75); /* 75% en móviles muy pequeños */
            width: 133%;
            max-width: 133%;
            margin-left: -16.5%;
        }
        
        .carrusel-wrapper {
            height: 650px;
        }
        
        .revista-navegacion-moderna {
            transform: scale(0.85);
            width: 117%;
            margin-left: -8.5%;
        }
    }
}

/* ===== VERSIÓN ALTERNATIVA (si no quieres usar scale) ===== */
/* Si prefieres no usar scale, descomenta esto y comenta lo de arriba */

/*
@media (max-width: 768px) {
    .revista-container {
        max-width: 100%;
        padding: 0 0.5rem;
        margin: 0.5rem auto;
    }
    
    .carrusel-wrapper {
        height: auto;
        min-height: 550px;
    }
    
    .revista-portada,
    .revista-pagina {
        padding: 1rem;
        height: auto;
        min-height: 550px;
    }
    
    .portada-titular-principal {
        font-size: 2.5rem;
    }
    
    .portada-bajada {
        font-size: 1.1rem;
    }
    
    .portada-grid {
        height: auto;
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .grid-item {
        height: 160px;
    }
    
    .grid-item.grande {
        height: 200px;
    }
    
    .portada-superior {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.3rem;
    }
    
    .portada-pie {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .pie-item {
        font-size: 0.8rem;
    }
    
    .editorial-destacado,
    .articulo-grid-moderno,
    .deportes-texto-grid,
    .cultura-grid-inferior,
    .publicidad-grid,
    .educacion-grid,
    .galeria-deportes {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .galeria-item.principal img {
        height: 200px;
    }
    
    .estadistica-destacada,
    .educacion-infografia {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .numero-destacado,
    .infografia-numero {
        font-size: 2.2rem;
    }
    
    .revista-navegacion-moderna {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .nav-btn-moderno {
        width: 100%;
        padding: 0.4rem 1rem;
    }
}
*/

/* Versión para móviles pequeños */
@media (max-width: 480px) {
    .carrusel-wrapper {
        height: 500px;
    }
    
    .portada-titular-principal {
        font-size: 2.2rem;
    }
    
    .portada-bajada {
        font-size: 1rem;
    }
    
    .articulo-titulo-principal {
        font-size: 1.8rem;
    }
    
    .revista-portada,
    .revista-pagina {
        padding: 1rem;
    }
    
    .grid-item {
        height: 150px;
    }
    
    .grid-item.grande {
        height: 180px;
    }
    
    .numero-destacado {
        font-size: 2rem;
    }
}

/* ===== RESPONSIVE EXISTENTE ===== */
@media (max-width: 1200px) {
    .portada-titular-principal {
        font-size: 4.5rem;
    }
}

@media (max-width: 1024px) {
    .portada-titular-principal {
        font-size: 4rem;
    }
}