/* ==========================================
   1. VARIABLES Y REGLAS GENERALES
   ========================================== */
:root {
    --color-primary: #036;
    --color-accent: #6991b0;
    --color-hover: #F66;
    --color-hover-dark: #d54b4b;
    --color-text: #2d3139;
    --font-main: 'Roboto', sans-serif;
}

html {
    overflow-y: auto;
}

body {
    overflow-x: hidden;
    font-family: var(--font-main);
    margin: 0;
}

a:link { 
    color: var(--color-accent); 
    text-decoration: none; 
}

a:visited { 
    color: inherit; 
}

img, audio, video, canvas {
    width: 100%;
    height: auto;
    max-width: 1024px;
}

h1 {
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-primary);
    font-size: 26px;
    text-align: center;
}

h2 {
    font-weight: 700;
    color: #666;
    font-size: 1.05em;
    text-align: center;
}

footer {
    display: block;
    text-align: center;
    background: #fff;
    width: 100%;
    margin: 50px 0 0 0;
}

/* ==========================================
   2. HEADER Y NAVEGACIÓN
   ========================================== */
.header {
    display: flex;
    flex-direction: column;
    max-width: 1024px;
    margin: 0 auto;
}

#logo {
    background: url(../nueva/img/oyp-color.png) top left no-repeat;
    max-width: 260px;
    width: 50%;
    height: auto;
    display: block;
    margin: 2% 0;
}

.buscador-contenedor {
    display: flex;
    justify-content: center;
}

.buscador-contenedor .gcse-search {
    margin: 0 auto;
}

.direccion { 
    color: #fff; 
    font-size: 0.7em; 
}
/* ==========================================
   3. diapo
   ========================================== */
.grid-revistas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    gap: 15px;
    padding: 20px 0;
    max-width: 1300px;
    margin: 0 auto;
    box-sizing: border-box;
}
.card-revista {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    background-color: #fff;
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}
.card-revista:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.card-revista img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: #eee;
}
.card-revista.sin-tapa {
    padding: 20px 12px;
}