/* Estilos específicos para el header en noticias.html */

/* Variables CSS principales */
:root {
    --bg: #ffffff;
    --bg-soft: #f5f6f7;
    --text: #1a1a1a;
    --text-soft: #4a4a4a;
    --primary: #5a6ec5;
    --border: #e6e6e6;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Reset básico */
* { 
    box-sizing: border-box; 
}

html, body { 
    height: 100%; 
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
}

/* Enlace de accesibilidad */
.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 1000;
}

/* Contenedor principal */
.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

/* ===========================================
   ESTILOS ORIGINALES DEL HEADER (SIN CAMBIOS)
   =========================================== */

/* Encabezado del sitio */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

/* Marca del sitio */
.brand { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: inherit; 
    text-decoration: none; 
}
.brand:visited { 
    color: inherit; 
}
.brand:hover { 
    color: inherit; 
    text-decoration: none; 
}
.brand:focus { 
    outline: none; 
}
.brand-logo { 
    width: 56px; 
    height: 56px; 
    object-fit: contain; 
}
.brand-link { 
    display: block; 
    text-decoration: none; 
}
.brand-link:focus { 
    outline: 2px solid #003a70; 
    outline-offset: 2px; 
}
.brand-text { 
    display: grid; 
}
.brand-top { 
    font-size: 12px; 
    color: var(--text-soft); 
    letter-spacing: .08em; 
}
.brand-name { 
    font-weight: 700; 
    font-size: 20px; 
}

/* Navegación del sitio */
.site-nav .menu {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}
.site-nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}
.site-nav a:hover { 
    color: var(--primary); 
}

/* Menú desplegable */
.menu-item-dropdown {
    position: relative;
}
.menu-item-dropdown > a {
    display: flex;
    align-items: center;
    gap: 8px;
}
.menu-item-dropdown > a i {
    font-size: 12px;
    transition: transform 0.3s ease;
}
.submenu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 8px 0;
    margin: 8px 0 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}
.menu-item-dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.menu-item-dropdown:hover > a i {
    transform: rotate(180deg);
}
.submenu li {
    margin: 0;
}
.submenu a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}
.submenu a:hover {
    background: var(--bg-soft, #f8f9fb);
    color: var(--primary);
    padding-left: 24px;
}

/* Botón de navegación móvil */
.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    font-size: 22px;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    transition: color 0.3s ease;
}
.nav-toggle:hover {
    color: var(--primary);
}

/* Clase para ocultar elementos visualmente pero mantenerlos accesibles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Media Query para dispositivos móviles y tablets del HEADER */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .site-nav.open {
        max-height: 500px;
    }
    
    .site-nav .menu {
        flex-direction: column;
        gap: 0;
        padding: 0 16px;
    }
    
    .site-nav .menu > li {
        border-bottom: 1px solid var(--border);
        padding: 12px 0;
    }
    
    .site-nav .menu > li:first-child {
        border-top: none;
    }
    
    .site-nav a {
        display: block;
        padding: 8px 0;
    }
    
    /* Menú desplegable en móviles */
    .menu-item-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    
    .submenu {
        position: static;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        background: var(--bg-soft);
        border: none;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
        transform: none;
        transition: all 0.3s ease;
        min-width: auto;
    }
    
    .menu-item-dropdown > a i {
        transition: transform 0.3s ease;
    }
    
    .menu-item-dropdown.open .submenu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        padding: 8px 0;
        margin: 8px 0;
    }
    
    .menu-item-dropdown.open > a i {
        transform: rotate(180deg);
    }
    
    .submenu li {
        padding: 0;
    }
    
    .submenu a {
        padding: 10px 16px 10px 32px;
    }
}

/* ========================
   HERO SECTION DE NOTICIAS
   ======================== */
.hero-noticias {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    color: white;
    padding: 10px 20px;  /*cambia las dimenciones del hero*/
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.95;
}

/* ========================
   CONTENEDOR DE NOTICIAS
   ======================== */
.noticias-container {
    padding: 40px 20px;
    background-color: #f8f9fa;
    min-height: 60vh;
}

/* ========================
   GRID DE TARJETAS
   ======================== */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* ========================
   TARJETA DE NOTICIA
   ======================== */
.noticia-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.noticia-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.noticia-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.noticia-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noticia-date {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.noticia-date i {
    margin-right: 8px;
    color: #0056b3;
}

.noticia-card h3 {
    font-size: 1.2rem;
    color: #0056b3;
    margin: 0 0 15px 0;
    line-height: 1.4;
    flex-grow: 1;
}

.noticia-card p {
    color: #555;
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.noticia-link {
    display: inline-block;
    color: #0056b3;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    transition: all 0.3s ease;
}

.noticia-link:hover {
    color: #003d82;
    text-decoration: underline;
}

.noticia-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.noticia-card:hover .noticia-link i {
    transform: translateX(5px);
}

/* ========================
   PAGINACIÓN
   ======================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 12px 18px;
    border: 2px solid #0056b3;
    background-color: white;
    color: #0056b3;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 50px;
}

.pagination button:hover {
    background-color: #0056b3;
    color: white;
    transform: scale(1.05);
}

.pagination button.active {
    background-color: #0056b3;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ========================
   RESPONSIVE DESIGN
   ======================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .noticia-card img {
        height: 200px;
    }

    .noticia-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-noticias {
        padding: 40px 15px;
        margin-bottom: 30px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .noticias-container {
        padding: 20px 15px;
    }

    .noticias-grid {
        gap: 15px;
    }

    .pagination {
        gap: 10px;
    }

    .pagination button {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
}

/* ========================
   VISTA DETALLADA DE NOTICIA
   ======================== */
.noticia-detalle-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: white;
    border: 2px solid #0056b3;
    color: #0056b3;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.btn-volver:hover {
    background-color: #0056b3;
    color: white;
    transform: translateX(-5px);
}

.noticia-detalle-contenido {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.noticia-detalle {
    display: flex;
    flex-direction: column;
}

.detalle-header {
    padding: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.detalle-fecha {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 15px 0;
}

.detalle-fecha::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230056b3" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

#detalleTitulo {
    font-size: 2.5rem;
    color: #0056b3;
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
}

.detalle-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 40px;
}

.detalle-contenido {
    display: flex;
    flex-direction: column;
}

.detalle-imagen {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
    display: block;
}

.detalle-texto {
    color: #555;
    font-size: 1rem;
    line-height: 1.8;
}

.detalle-texto p {
    margin: 0 0 20px 0;
    text-align: justify;
}

.detalle-sidebar {
    display: flex;
    flex-direction: column;
}

.btn-noticias-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.btn-noticias-sidebar:hover {
    background-color: #003d82;
    transform: scale(1.05);
}

.btn-noticias-sidebar i {
    font-size: 1.2rem;
}

.noticias-relacionadas {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.noticias-relacionadas ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.noticias-relacionadas li {
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
}

.noticias-relacionadas li:last-child {
    border-bottom: none;
}

.noticias-relacionadas a {
    display: block;
    padding: 15px;
    color: #0056b3;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
    cursor: pointer;
}

.noticias-relacionadas a:hover {
    background-color: #f8f9fa;
    padding-left: 20px;
    color: #003d82;
}

/* ========================
   RESPONSIVE DETALLE
   ======================== */
@media (max-width: 768px) {
    #detalleTitulo {
        font-size: 1.8rem;
    }

    .detalle-header {
        padding: 25px;
    }

    .detalle-main {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }

    .detalle-imagen {
        height: 250px;
    }

    .detalle-sidebar {
        order: -1;
    }
}

@media (max-width: 480px) {
    #detalleTitulo {
        font-size: 1.5rem;
    }

    .detalle-header {
        padding: 20px;
        border-bottom: 1px solid #f0f0f0;
    }

    .detalle-main {
        padding: 20px;
        gap: 20px;
    }

    .detalle-imagen {
        height: 200px;
        margin-bottom: 20px;
    }

    .detalle-texto {
        font-size: 0.95rem;
    }

    .btn-noticias-sidebar {
        padding: 12px;
        font-size: 0.95rem;
    }

    .noticias-relacionadas a {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.hero-noticias {
    animation: fadeInUp 0.8s ease-out forwards;
}

.noticias-grid {
    animation: fadeInUp 1s ease-out forwards;
}

