/* ==========================================
   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. BLOQUE EDICIÓN Y BANNER
   ========================================== */
.ruta {
    max-width: 1300px;
    margin: 0 auto;
}

.edicion {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.edicion img.fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: none;
    z-index: 1;
    filter: brightness(0.4); 
}

.edicion .ruta {
    position: absolute;
    top: 20px;
    z-index: 3; 
    color: #ffffff; 
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    width: 100%;
    max-width: 1300px; 
    padding: 0 20px; 
    box-sizing: border-box;
}

.edicion .ruta a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
}

.edicion .ruta a:hover {
    opacity: 1;
    text-decoration: underline;
}

.edicion .contenido-banner {
    position: relative;
    z-index: 2; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    gap: 20px; 
    width: 100%;
    max-width: 1300px;
    padding: 0 20px;
    margin-top: 40px; 
    box-sizing: border-box;
}

.tapa {
    width: 240px; 
    height: auto; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); 
    transform: translateY(20px) rotate(-5deg); 
}

.edicion .texto-banner {
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 2.5rem;
    margin: 0;
}

/* ==========================================
   4. TARJETAS DE NOTAS (SUMARIO)
   ========================================== */
.contenedor-sumario {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px;
    padding: 20px;
    max-width: 1300px;
    margin: 0 auto;
    box-sizing: border-box;
}

.nota-sumario {
    background-color: #ffffff;
    border: 2px solid var(--color-accent);
    border-radius: 12px;
    padding: 25px;
    box-sizing: border-box; 
    position: relative;
    overflow: hidden; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.nota-sumario .enlace-bloque::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.nota-sumario h2 {
    color: #0b0c10;
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-align: left; /* Corrige la alineación del h2 global */
}

.nota-sumario .firma,
.nota-sumario .firma a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    color: inherit;
}

.nota-sumario .bajada,
.nota-sumario .bajada h2,
.nota-sumario .bajada p {
    color: var(--color-text);
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
}

.nota-sumario .enlace-leer:link,
.nota-sumario .enlace-leer:visited {
    color: var(--color-accent); 
    text-decoration: none; 
}

.nota-sumario img {
    display: block;
    width: calc(100% + 50px);
    height: 220px;    
    margin-left: -25px;
    margin-top: -25px;
    object-fit: cover;
    border-radius: 11px 11px 0 0;
    margin-bottom: 20px;
    transition: transform 0.4s ease-in-out; 
}

/* Efectos HOVER en la tarjeta */
.nota-sumario:hover img {
    transform: scale(1.08); 
    filter: saturate(80%) sepia(50%) brightness(50%) contrast(110%); 
    opacity: 0.9;
}

.nota-sumario:hover h2,
.nota-sumario:hover .bajada,
.nota-sumario:hover .bajada h2,
.nota-sumario:hover .bajada p {
    color: var(--color-hover);
}

.nota-sumario:hover .firma,
.nota-sumario:hover .firma a,
.nota-sumario:hover .enlace-leer { 
    color: var(--color-hover-dark);
    text-decoration: underline;
} 

/* ==========================================
   5. ELEMENTOS SECUNDARIOS
   ========================================== */
#fecha_revista {
    float: right;
    text-align: right;
    margin-bottom: 15px;
    font-size: 12px;
}

a.ref:link { 
    text-decoration: none; 
}

#ruta_anteriores {
    line-height: 20px; 
    clear: both;
    font-size: 12px;
}

#ruta_anteriores ul {
    padding-left: 0;
}

#ruta_anteriores ul li { 
    background: url(../nueva/img/bg_tag.png) no-repeat 0 0; 
    float: left; 
    height: 19px; 
    padding-left: 10px; 
    list-style: none; 
    margin: 2px;
}

#ruta_anteriores ul li a { 
    background: url(../nueva/img/bg_tag.png) repeat-x 0 -38px; 
    color: #fff; 
    float: left; 
    font-weight: bold; 
    height: 19px; 
    text-decoration: none;
}

#ruta_anteriores ul li a:hover { 
    color: #fc0;
}

#ruta_anteriores ul li span { 
    background: url(../nueva/img/bg_tag.png) no-repeat 0 -19px; 
    float: left; 
    height: 19px; 
    width: 10px;
}