/* ========================================
   CONFIGURACIÓN GENERAL
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {

    overflow-y: scroll;

}

:root {

    /* Medidas */
    --ancho-pagina: 1400px;
    --ancho-revista: 120px;
    --alto-portada: 180px;
    --separacion: 31px;
    --radio-esquinas: 5px;

    /* Colores */
    --color-texto: #222;
    --color-secundario: #666;

}


/* ========================================
   BODY
======================================== */

body {

    font-family: Arial, Helvetica, sans-serif;
    color: var(--color-texto);

    background-image: url("../imagenes/fondo.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    scrollbar-gutter: stable;

}


/* ========================================
   CABECERA
======================================== */

header {
    padding: 0;
    margin: 0;
    line-height: 0;
    background: none;
}

.cabecera {

    display: block;
    width: 100%;
    height: auto;

}

.oculto {

    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;

}


/* ========================================
   CONTENIDO
======================================== */

main {

    max-width: var(--ancho-pagina);
    margin: 0 auto;

}


/* ========================================
   GALERÍA
======================================== */

.galeria {

    width: 95%;
    margin: 70px auto;

    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;

    gap: var(--separacion);

}


/* ========================================
   REVISTAS
======================================== */

.revista {

    flex: 0 0 var(--ancho-revista);

    display: flex;
    flex-direction: column;

    text-decoration: none;
    color: var(--color-texto);

    opacity: 0;
    transform: translateY(20px);
    animation: aparecer .6s ease forwards;
    animation-delay: var(--retraso);

}


/* ========================================
   PORTADAS
======================================== */

.portada {

    height: var(--alto-portada);

    display: flex;
    justify-content: center;
    align-items: flex-end;

}

.portada img {

    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;

    border-radius: var(--radio-esquinas);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);

    transition: transform .2s ease;

}

.portada img:hover {

    transform: scale(1.05);

}


/* ========================================
   INFORMACIÓN
======================================== */

.datos {

    margin-top: 18px;
    text-align: left;

}

.datos h3 {

    font-size: 14px;
    margin-bottom: 6px;

}

.datos p {

    font-size: 12px;
    color: var(--color-secundario);

}

/* ========================================
   DISEÑO RESPONSIVE
======================================== */

/* Tablets */
@media (max-width: 900px) {

    :root {
        --ancho-revista: 150px;
    }

    .galeria {
        justify-content: center;
    }

}

/* Móviles */
@media (max-width: 600px) {

    body {
        background-image: url("../imagenes/fondomovil.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        scrollbar-gutter: stable;
    }

    :root {
        --ancho-revista: 130px;
        --alto-portada: 190px;
        --separacion: 35px;
    }

    header {
        padding: 0px 0px 20px;
    }

    .cabecera {
        max-width: 100%;
    }

    .galeria {

        width: 95%;

        justify-content: center;

    }

}

/* ========================================
   ANIMACIONES
======================================== */

@keyframes aparecer {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* ========================================
   BUSCADOR
======================================== */

.buscador {

    display: flex;
    justify-content: center;

    margin: 40px 0 20px;

}

#busqueda {

    width: 90%;
    max-width: 500px;

    padding: 14px 18px;

    font-size: 16px;

    border: none;
    border-radius: 30px;

    outline: none;

    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);

    transition: box-shadow .2s ease;

}

#busqueda:focus {

    box-shadow: 0 0 0 2px rgba(0, 120, 255, .30);

}

.no-resultados {
    text-align: center;
    font-size: 20px;
    color: var(--color-texto);
    margin-top: 0px;
    font-weight: 400;
    opacity: 0.8;
}

/* ========================================
   PROGRESO DE LA HEMEROTECA
======================================== */

.progreso {

    width: 70%;
    max-width: 450px;

    margin: 30px auto 20px;

}

.progreso-info {

    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 8px;

    font-size: 13px;
    color: var(--color-secundario);

}

.progreso-barra {

    width: 100%;
    height: 5px;

    background: rgba(0, 0, 0, 0.1);

    border-radius: 10px;

    overflow: hidden;

}

#progreso-relleno {

    width: 0%;

    height: 100%;

    background: #439886;

    border-radius: 10px;

    transition: width 1.5s ease;

}

/* ========================================
   INTRODUCCIÓN
======================================== */

.introduccion {

    width: 90%;
    max-width: 800px;
    margin: 15px auto 80px;

    text-align: center;

}

.introduccion h2 {

    font-size: 18px;
    margin-bottom: 8px;

}

.introduccion p {

    font-size: 15px;
    line-height: 1.6;
    color: var(--color-secundario);

}