
/* header.css */
/* ============================================
   HEADER PRINCIPAL - ESTILOS GLOBALES
   ============================================ */

/* ---------- AJUSTE PARA HEADER FIJO ---------- */
body {
    padding-top: 70px; /* Espacio para el header fijo */
}
.modo-prueba-rol {
    display: flex;
    position: relative;
    z-index: 1001;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    box-sizing: border-box;
    color: #334155;
    font-size: .9rem;
    justify-content: space-between;
    padding: 9px;
}
.modo-prueba-rol--activo { border-color: #f59e0b; background: #fffbeb; }
.modo-prueba-rol__estado { white-space: nowrap; }
.modo-prueba-rol form { display: flex; align-items: center; gap: .45rem; margin: 0; }
.modo-prueba-rol__selector select { min-width: 12rem; }
.modo-prueba-rol :is(select, button) { min-height: 38px; padding: .4rem .65rem; border: 1px solid #94a3b8; border-radius: .35rem; }
.modo-prueba-rol button { background: #1d4ed8; color: #fff; cursor: pointer; font-weight: 700; }
.modo-prueba-rol__volver button { background: #fff; color: #92400e; }
.modo-prueba-rol button:hover { filter: brightness(.94); }
@media (max-width: 600px) {
    .modo-prueba-rol { align-items: stretch; flex-direction: column; }
    .modo-prueba-rol__estado { text-align: center; }
    .modo-prueba-rol__selector { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; }
    .modo-prueba-rol__selector select { min-width: 0; width: 100%; }
    .modo-prueba-rol__volver button { width: 100%; }
}

/* Header fijo en la parte superior */
.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

/* ---------- CONTENEDOR PRINCIPAL ---------- */
.header-contenedor {
    max-width: 1200px;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

.header-contenedor.menu-abierto {
    transform: translateX(300px);
}

/* ---------- CABECERA SUPERIOR ---------- */
.header-saltar-contenido {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 11000;
    padding: 0.75rem 1rem;
    border-radius: 0.35rem;
    background: #fff;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 0.15s ease;
}

.header-saltar-contenido:focus {
    transform: translateY(0);
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.header-back-btn:focus-visible,
.header-logo a:focus-visible,
.header-menu-btn:focus-visible,
.header-menu-lateral-cerrar:focus-visible,
.header-user-link:focus-visible,
.menu li a:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}

.header-cabecera-superior {
  padding: 7px;
  background: linear-gradient(270deg, #d4ffe3 0%, #bfd9ff 100%);
  color: white;
  display: flex;
  border-bottom: 2px groove #fffefe;
  margin-bottom: 2px;
}
/* ---------- BARRA DE NAVEGACIÓN PRINCIPAL ---------- */
.header-navbar {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* ---------- SECCIÓN IZQUIERDA: LOGO + BOTÓN MENÚ ---------- */
.header-left {
    display: flex;
    align-items: center;
}

/* LOGO */
.header-logo {
    display: flex;
    align-items: center;
}

.header-logo a {
    text-decoration: none;
}

.header-logo-img {
    height: 45px;
    width: auto;
    background: #fff;
    border-radius: 50%;
    border: 1px inset #f9f9f9;
    transition: transform 0.3s;
    margin-right: 4px;
}

.header-logo-img:hover {
    transform: scale(1.05);
}

/* BOTÓN MENÚ HAMBURGUESA */
.header-menu-btn {
    border: none;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 1.9rem;
    background: none;
    padding: 7px;
    margin-top: -7px;
}

.header-menu-btn:hover {
    background: none;
    transform: scale(1.02);
    color: #008220;
    opacity: 1;
    font-weight: bold;
    margin-top: -1rem;
}

/* BOTÓN VOLVER */
.header-back-btn {
    background: none;
    color: #040404;
    border: none;
    transition: all 0.3s;
    padding: 0 10px 0 4px;
}

.header-back-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.02);
    color: #00800e;
    background: none;
    margin-right: -8px;
    font-weight: 700;
}

/* ---------- SECCIÓN CENTRAL: TÍTULO DE LA APP ---------- */
.header-center {
    text-align: center;
    display: flex;
    align-items: center;
}

.header-app-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.1;
    text-align: center;
}

.header-app-title a {
  color: #ff8484;
  text-shadow: 1px 1px 0px #393838;
  letter-spacing: 2px;
}

.header-app-title a:hover {
    opacity: 0.9;
    color: #01861c;
}

/* Subtítulo */
.subtitulo {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0.8;
    color: #353030;
    text-align: center;
}

/* ---------- SECCIÓN DERECHA: AVATAR + ENLACES + NOMBRE ---------- */
.header-right {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-direction: row-reverse;
}

/* Avatar del usuario */
.header-avatar {
    display: flex;
    align-items: center;
}

.header-avatar-img {
  width: auto;
  height: 55px;
  border-radius: 50%;
  border: 1px inset #7c7c7c;
  transition: transform 0.3s;
  padding: 2px 3px;
  background: white;
}

.header-avatar-img:hover {
    transform: scale(1.05);
}

/* Nombre del usuario */
.header-user-name {
    color: #0371ff;
}

/* Enlaces de usuario */
.header-user-link {
    padding: 7px;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: #171616;
    text-decoration: none;
}

.header-user-link:hover {
    background: rgba(170, 255, 183, 0.6);
    border-radius: 4px;
    color: green;
    font-weight: bold;
}

.header-link-logout {
    color: #ff0505;
}

.header-link-logout:hover {
    color: rgb(0, 134, 34);
}

/* ============================================
   MENÚ LATERAL (PANTALLA COMPLETA)
   ============================================ */
.header-menu-lateral {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    color: white;
    width: 320px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.header-menu-lateral.abierto {
    transform: translateX(0);
}

/* HEADER DEL MENÚ */
.header-menu-lateral-header {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-menu-lateral-titulo {
    font-size: 1.3rem;
    font-weight: bold;
}

.header-menu-lateral-cerrar {
    background: none;
    border: 2px solid white;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.header-menu-lateral-cerrar:hover {
    background: white;
    color: #2c3e50;
}

/* CONTENIDO DEL MENÚ */
.header-menu-lateral-contenido {
    padding: 1.5rem;
}

/* ---------- MENÚ UNIFICADO ---------- */
.menu {
    width: 100%;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin: 0;
    padding: 0;
}

.menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
    border-radius: 6px;
}

.menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu .separador {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0.5rem 0;
}

.menu .menu-seccion span {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

/* Enlaces dentro del menú lateral */
.header-menu-lateral-contenido .menu a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    font-size: 1rem;
}

.header-menu-lateral-contenido .menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 0.5rem;
}

/* ---------- OPCIONES DE AUTENTICACIÓN EN EL MENÚ ---------- */
.header-menu-auth {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.header-menu-auth a {
    display: block;
    padding: 0.75rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.header-menu-auth a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-menu-auth-registro {
    background: #2196F3;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablets y móviles grandes (≤768px) */
@media (max-width: 768px) {
    /* Ajuste del padding del body para móvil */
    body {
        padding-top: 70px;
    }

    .header-navbar {
        align-items: center;
        flex-wrap: nowrap;
    }

    .header-app-title {
        font-size: 1.5rem;
    }

    .header-app-title a {
        font-size: 1.4rem;
    }

    .header-user-name {
        font-size: 0.8rem;
        display: none;
    }

    .header-user-link {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }

    .header-avatar-img {
        height: 50px;
        width: 50px;
        margin-right: 2%;
    }

    .header-menu-lateral {
        width: 280px;
    }

    .header-user-links {
        display: none;
    }

    .header-menu-btn {
        padding: 6px 7px;
    }

    button {
        font-size: 0.9em;
    }

    .home-contenido-principal h1 {
        font-size: 0.95rem;
    }
}

/* Móviles pequeños (≤480px) */
@media (max-width: 480px) {
    .header-menu-btn {
        font-size: 1.4rem;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-left {
        gap: 0;
    }

    .header-user-name {
        font-size: 0.8rem;
        display: none;
    }

    .header-avatar-img {
        height: 40px;
        width: 40px;
    }

    .header-menu-btn span {
        display: none;
    }

    .header-app-title a {
        font-size: 1.07rem;
    }

    button {
        font-size: 0.9rem;
    }

    .subtitulo {
        margin-top: 0.1rem;
        font-size: 0.62rem;
    }

    .home-grid-noticias {
        padding: 0;
    }
}


/* general.css */
/* ============================================================================
   BASE - Variables y estilos fundamentales
   ============================================================================ */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --gray-color: #6b7280;
    --border-color: #e5e7eb;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f9fafb;
  margin: 0 auto !important;
  max-width: 1200px;
}
.contenedor {
    max-width: 1200px;
    margin: 0 auto;
}

/* Agregados */

button {
  padding: 7px 2rem;
  font-size: 1em;
}
a {
    text-decoration: none;
    cursor: pointer;
}

button {
    cursor: pointer;
}

ul {
   list-style-type: none;
}

.clean {
    clear: both;
}

/* ======================================== */
/* PAGINACIÓN */
/* ======================================== */

/* PAGINACIÓN - Estilos para navegación entre páginas */

.paginacion {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.paginacion a,
.paginacion span {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.paginacion a:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.paginacion .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
/* De index  */
.paginacion {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-pagina {
    padding: 0.5rem 0.75rem;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-pagina:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-pagina.active {
    background: var(--primary-color);
    color: white;
}

.btn-pagina.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.paginacion-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 0.5rem;
}

/* public/ultimas.php  */

/* ========================================
   PAGINACIÓN
   ======================================== */

.paginacion a,
.paginacion span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

.paginacion a {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.paginacion a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.paginacion span.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    font-weight: 600;
}

/* Paginación moderna */

.paginacion-moderna {
    margin-top: 10px;
    padding: 1.5rem;
    border-bottom: 1px solid #a8a8a8;
}

.paginacion-info {
    text-align: center;
    margin-bottom: 10px;
}

.paginacion-botones {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.paginacion-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 2rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s;
}

.paginacion-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.paginacion-btn .btn-icon {
    font-size: 1rem;
}

.paginacion-numeros {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s;
}

.page-number:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.page-number.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* PAGINACIÓN DENTRO DEL MODAL */

.paginacion-modal {
    background: none;
}

.info-pagina {
    font-weight: 500;
}


/* CONTENIDO HTML DEL EDITOR */

.contenido-html {
    font-family: inherit;
}

.contenido-html h1,
.contenido-html h2,
.contenido-html h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--dark-color);
}

.contenido-html p  {
  padding: 10px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.4rem;
}

.contenido-html img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1em 0;
}

.contenido-html ul,
.contenido-html ol {
    margin: 1em 0;
    padding-left: 2em;
}

.contenido-html blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1em;
    margin: 1em 0;
    color: #666;
    font-style: italic;
}

.contenido-html a {
    color: var(--primary-color);
    text-decoration: none;
}

.contenido-html a:hover {
    text-decoration: underline;
}

.contenido-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.contenido-html th,
.contenido-html td {
    border: 1px solid #ddd;
    padding: 0.5em;
}

.contenido-html th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Estilos específicos para contenido HTML en comentarios */
.comentario-contenido.contenido-html {
    line-height: 1.6;
    word-wrap: break-word;
}

.comentario-contenido.contenido-html p {
    margin: 0.5em 0;
}

.comentario-contenido.contenido-html strong {
    font-weight: 600;
    color: #333;
}

.comentario-contenido.contenido-html em {
    font-style: italic;
}

.comentario-contenido.contenido-html u {
    text-decoration: underline;
}

.comentario-contenido.contenido-html a {
    color: #0066cc;
    text-decoration: none;
}

.comentario-contenido.contenido-html a:hover {
    text-decoration: underline;
}

.comentario-contenido.contenido-html ul,
.comentario-contenido.contenido-html ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.comentario-contenido.contenido-html li {
    margin: 0.2em 0;
}

/* Paleta común de errores en vistas públicas */
.public-login-alerta-error,
.public-registro-alerta-error,
.public-buscador-alerta-error,
.public-buscar-comentarios-alerta-error,
.public-categorias-alerta-error,
.public-contacto-alerta-error,
.public-periodistas-alerta-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Paleta común de información en vistas públicas */
.public-buscador-alerta-info,
.public-buscar-comentarios-alerta-info,
.public-categorias-alerta-info {
    background: #e0f2fe;
    color: #0369a1;
    border-left: 4px solid #0ea5e9;
}

/* Paleta común de errores en vistas administrativas */
.act-alert-danger,
.atk-alerta-error,
.backup-error,
.admin-nueva-categoria-alerta-error,
.admin-editar-categoria-alerta-error,
.admin-categorias-alerta-error,
.edit-categoria-alerta-error,
.admin-comentarios-alerta-error,
.admin-editar-noticia-alerta-error,
.admin-periodistas-alerta-error,
.gfuente-alerta-error,
.relacionadas-alerta-error,
.admin-noticias-alerta-error,
.panel-admin-alerta-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Paleta común de confirmaciones administrativas */
.act-alert-success,
.atk-alerta-success,
.backup-success,
.admin-periodistas-alerta-success,
.gfuente-alerta-success,
.relacionadas-alerta-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

/* Paletas comunes de información y advertencia administrativas */
.act-badge-warning,
.act-alert-warning,
.atk-alerta-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* Foco común de controles con prefijos inequívocos */
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) input:focus,
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) textarea:focus,
.edit-categoria-campo input:focus,
.edit-categoria-campo textarea:focus,
.admin-editar-noticia-campo input:focus,
.admin-editar-noticia-campo select:focus,
.admin-editar-noticia-campo textarea:focus,
.admin-noticias-filtros-form input[type="text"]:focus,
.admin-noticias-filtros-form select:focus,
.footer-newsletter-input:focus,
.perfiles-campo-form input:focus,
.perfiles-campo-form textarea:focus,
.editar-noticia-campo-form input:focus,
.editar-noticia-campo-form select:focus,
.editar-noticia-campo-form textarea:focus,
.edit-noticia-campo input:focus,
.edit-noticia-campo select:focus,
.edit-noticia-campo textarea:focus,
.usuario-editar-comentario-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Etiquetas comunes de formularios */
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) label,
.admin-editar-noticia-campo label,
.public-contacto-label,
.public-registro-campo label,
.usuario-editar-comentario-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

/* Controles comunes de formularios */
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) input[type="text"],
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) input[type="number"],
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) textarea,
.admin-editar-noticia-campo input[type="text"],
.admin-editar-noticia-campo select,
.admin-editar-noticia-campo textarea,
.public-login-campo input,
.public-registro-campo input[type="text"],
.public-registro-campo input[type="email"],
.public-registro-campo input[type="tel"],
.public-registro-campo input[type="date"],
.public-registro-campo input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: inherit;
}

/* Ayuda común bajo campos */
:is(.admin-nueva-categoria-campo, .admin-editar-categoria-campo) small,
.admin-editar-noticia-campo small,
.perfiles-campo-form small,
.edit-noticia-campo small,
.public-registro-campo small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Estructura común de paginación de listados de personas */
.public-periodistas-paginacion,
.usuario-comentarios-paginacion,
.privados-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.public-periodistas-pagina-btn,
.usuario-comentarios-pagina-btn,
.privados-pagina-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.public-periodistas-pagina-numeros,
.usuario-comentarios-pagina-numeros,
.privados-pagina-numeros {
    display: flex;
    gap: 0.25rem;
}

.public-periodistas-pagina-numero,
.usuario-comentarios-pagina-numero,
.privados-pagina-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .public-periodistas-paginacion,
    .usuario-comentarios-paginacion,
    .privados-paginacion {
        flex-direction: column;
        gap: 0.75rem;
    }

    .public-periodistas-pagina-numeros,
    .usuario-comentarios-pagina-numeros,
    .privados-pagina-numeros {
        order: -1;
    }
}

/* Base común de botones de edición administrativa */
:is(.admin-nueva-categoria-btn, .admin-editar-categoria-btn),
.edit-categoria-btn,
.admin-editar-noticia-btn,
.usuario-editar-comentario-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    flex: 1;
}


/* footer.css */
/* ============================================ */
/* FOOTER - ESTILOS RESPONSIVE */
/* ============================================ */

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
  background: #e1e1e1;
  border-top: 1px inset #d5d5d5;
}

/* Columnas */
.footer-columna {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Títulos */
.footer-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px groove #3b82f6;
  display: inline-block;
  text-align: center;
}

/* Lista de enlaces */
.footer-lista {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 0;
}
    
.footer-lista li a  {
  color: #0051d7;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
}
.footer-lista li a:hover {
    color: #3b82f6;
    transform: translateX(4px);
}

/* Newsletter */
.footer-newsletter-texto {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.footer-newsletter-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-newsletter-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.footer-newsletter-btn {
    padding: 0.6rem 1.2rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.footer-newsletter-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.new-redes-sociales {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .footer-grid {
        gap: 1.5rem;
        padding: 9px;
    }
    
    .footer-titulo {
        font-size: 1.1rem;
    }
    
    .footer-newsletter-form {
        flex-direction: column;
    }
    
    .footer-newsletter-btn {
        width: 100%;
        justify-content: center;
    }
    .footer-lista {
    text-align: left;
}
     
}

/* Móvil */
@media (max-width: 480px) {
    .footer-grid {
        gap: 9px;
        padding: 4px;
        display: flex;
    }
    
    .footer-columna {
        text-align: center;
        width: 50%;
    }
    
    .footer-titulo {
        font-size: 1rem;
    }
    
    .footer-lista li a {
       font-size: 0.8rem;
    }
    .footer-newsletter-texto {
        text-align: center;
    }
    
    .footer-newsletter-input {
        width: 100%;
    }
}


/* public-portada.css */
/* ============================================ */
/* PORTADA - TuPortalNews v2.1 */
/* ============================================ */
.buscador-form {
  display: flex;
  gap: 7px;
  justify-content: center;
}
.portada-container {
    max-width: 1200px;
    margin: 0 auto;
}
.sin-imagen {
    width: 100%;
    height: 150px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}
/* ============================================ */
/* HERO SLIDER */
/* ============================================ */
.hero-slider {
    position: relative;
    z-index: 0;
    isolation: isolate;
    width: 100%;
    height: 300px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px inset white;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    opacity: 0;

    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.hero-imagen-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-size: 5rem;
    color: rgba(255,255,255,0.8);
}

.hero-slide-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 4rem 9% 2rem 1rem;
}

.hero-slide-titulo {
    font-size: 1.6rem;
    margin: 0.5rem 0;
    line-height: 1.3;
    text-align: center;
    margin-top: 3rem;
}

.hero-slide-titulo a {
    color: white;
    text-decoration: none;
    padding: 0.12em 0.35em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.hero-slide-subtitulo {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    color: white;
    text-align: center;
}

.hero-slide-meta {
    display: flex;
    gap: 1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    color: yellow;
}

.hero-categoria {
    display: inline-block;
    background: #fff;
    color: #006dce;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    display: none;
}

.hero-prev, .hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.3s;
}

.hero-prev:hover, .hero-next:hover {
    background: rgba(0,0,0,0.8);
}

.hero-prev { left: 1rem; }
.hero-next { right: 1rem; }

.hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.hero-dot.active {
    background: white;
}

.hero-btn {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 1.1rem;
    float: right;
}

.hero-btn:hover {
    background: #2563eb;
    transform: translateX(4px);
}

.link-todas-noticias {
    margin-bottom: 1rem;
    text-align: center;
    background: #6aa1fb;
    padding: 7px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.link-todas-noticias a {
    color: #fff;
}

/* ============================================ */
/* SECUNDARIAS */
/* ============================================ */
.secundarias-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
}

.secundaria-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
}

.secundaria-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.secundaria-imagen {
    height: 180px;
    overflow: hidden;
}

.secundaria-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.secundaria-card:hover .secundaria-imagen img {
    transform: scale(1.05);
}

.secundaria-contenido {
    padding: 4px 1rem;
    display: flex;
    flex-direction: column;
}

.secundaria-categoria {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: left;
    opacity: 0.7;
}

.secundaria-titulo {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    text-align: center;
}

.secundaria-titulo a {
    color: #1f2937;
    text-decoration: none;
}

.secundaria-titulo a:hover {
    color: #3b82f6;
}

.secundaria-meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ============================================ */
/* MAIN CONTENT */
/* ============================================ */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 10px;
    margin: 1rem;
    max-width: 1200px;
}

.section-header {
    display: flex;
    justify-content: space-around;
    align-items: baseline;
    border-bottom: 2px solid #f9fafb;
    padding: 7px 0;
    gap: 4px;
}

.section-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
}

.section-ver-todas {
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
}

.section-ver-todas:hover {
    text-decoration: underline;
}

.ultimas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.ultima-card:hover {
    background: #f8fafc;
}

.ultima-imagen {
  width: 100%;
  height: 220px;
  border-radius: 4px;
}

.ultima-categoria {
    font-size: 0.75rem;
    color: #1d4ed8;
    text-transform: uppercase;
    font-weight: 600;
}

.ultima-titulo {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 7px 0;
    text-align: center;
}

.ultima-titulo a:hover {
    color: #3b82f6;
}

.ultima-meta {
    gap: 0.5rem;
    font-size: 0.85rem;
    flex-direction: row;
    justify-content: space-around;
}

/* ============================================ */
/* SIDEBAR */
/* ============================================ */
.popular-section {
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    padding: 10px;
}

.popular-lista {
    display: flex;
    flex-direction: column;
}

.popular-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-posicion {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #6ca0fb;
    color: white;
    text-align: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.popular-imagen {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.popular-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.popular-contenido {
    flex: 1;
    min-width: 0;
}

.popular-titulo {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
    text-decoration: none;
    color: #333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-titulo:hover {
    color: #2a5298;
}

.popular-meta {
    font-size: 0.85rem;
    color: #595959;
    margin-top: 5px;
    text-align: right;
}

.popular-subtitulo {
    font-size: 0.7rem;
    color: #666;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-links {
    background: #ffffff;
    border-radius: 4px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

.sidebar-links h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.sidebar-link-item {
    display: block;
    padding: 0.4rem 0;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-link-item:last-child {
    border-bottom: none;
}

/* ============================================ */
/* CATEGORÍAS */
/* ============================================ */
.categoria-section {
    margin-bottom: 2.5rem;
}

.categoria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
}

.categoria-card {
    background: #ffffff;
    border-radius: 7px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
}

.categoria-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.categoria-imagen {
    height: 140px;
    overflow: hidden;
}

.categoria-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.categoria-card:hover .categoria-imagen img {
    transform: scale(1.05);
}

.categoria-contenido {
    padding: 10px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.categoria-titulo {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    text-align: center;
}

.categoria-titulo a {
    color: #1f2937;
    text-decoration: none;
}

.categoria-titulo a:hover {
    color: #3b82f6;
}

.categoria-fecha {
    font-size: 0.8rem;
    color: #82858a;
}

/* ============================================ */
/* FORMULARIO DE BÚSQUEDA */
/* ============================================ */
.busqueda-container {
    margin: 0 auto;
}

.buscador-input {
    padding: 7px 12px;
    border: 1px inset #fff;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    background: #d0d0d0;
    color: #18181a;
    font-weight: bold;
}

.buscador-btn {
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.buscador-btn-avanzado {
    background: #2a5298;
    color: white;
    padding: 8px;
    font-weight: bold;
    transition: background 0.2s;
    text-decoration: none;
    display: block;
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

.buscador-btn:hover {
    background: none;
    color: #2a5298;
}

.buscador-btn-avanzado:hover {
    background: #5a6268;
}

/* ============================================ */
/* TEMAS DESTACADOS */
/* ============================================ */
.temas-destacados-section {
    padding: 0 1rem;
}

.temas-destacados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20%, 1fr));
  gap: 7px;
  margin-top: 4px;
}

.tema-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.tema-header {
    color: white;
    text-align: center;
}

.tema-header h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
}

.tema-noticia {
    padding: 1px 0;
}

.tema-imagen {
    width: 100%;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 4px;
}

.tema-imagen img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    transition: transform 0.3s;
    border-radius: 0 0 4px 4px;
}

.tema-card:hover .tema-imagen img {
    transform: scale(1.03);
}

.tema-titulo {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    text-align: center;
}

.tema-titulo a {
    text-decoration: none;
    color: #333;
}

.tema-titulo a:hover {
    color: #2a5298;
}

.tema-subtitulo {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    text-align: center;
}

.tema-meta {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 1rem;
}

.btn-tema {
    display: inline-block;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    width: 100%;
}

.btn-tema:hover {
    background: #e9ecef;
}

/* ============================================ */
/* RSS EXTERNAS */
/* ============================================ */
.rss-externas-section {
    margin: 2rem 0;
}

.rss-externas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.rss-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 100, 255, 0.5);
    transition: transform 0.2s;
}

.rss-card:hover {
    transform: translateY(-4px);
}

.rss-card-header {
    padding: 10px 12px;
    border-bottom-style: solid;
}

.rss-card-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.rss-noticias {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rss-noticias li {
    border-bottom: 1px solid #eee;
}

.rss-noticias li:last-child {
    border-bottom: none;
}

.rss-item-link {
    display: flex;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.rss-item-link:hover {
    background: #d9ecff;
}

.rss-item-img {
  flex-shrink: 0;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}

.rss-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rss-item-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.rss-item-content small {
    font-size: 0.7rem;
    color: #595959;
    display: block;
    margin-bottom: 6px;
}

.rss-item-content p {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* En móvil, el texto aprovecha el espacio libre y rodea la miniatura. */
@media (max-width: 600px) {
    .rss-item-link {
        display: block;
        min-height: 100px;
        padding: 10px;
    }

    .rss-item-link::after {
        display: block;
        clear: both;
        content: "";
    }

    .rss-item-img {
        float: left;
        width: 112px;
        height: 76px;
        margin: 0 10px 5px 0;
        border-radius: 4px;
    }

    .rss-item-content strong {
        line-height: 1.3;
    }

    .rss-item-content p {
        line-height: 1.4;
    }
}

@media (max-width: 380px) {
    .rss-item-img {
        width: 96px;
        height: 68px;
    }
}

.rss-footer-link {
    text-align: center;
    margin-bottom: 1rem;
}

.btn-rss {
    display: inline-block;
    background: linear-gradient(180deg, #d2d2d2 0%, #ececec 100%);
    color: #1d69fc;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
    width: 99%;
}

.btn-rss:hover {
    background: none;
    color: green;
    font-size: 1.1rem;
}

/* ============================================ */
/* LISTADO DE NOTICIAS */
/* ============================================ */
.listado-section {
    margin: 2rem 0;
    padding: 0 1rem;
}

/* Evita calcular en la carga inicial las secciones que aún están fuera de
   pantalla. El tamaño intrínseco conserva estable la longitud de la página. */
.temas-destacados-section,
.rss-externas-section,
.listado-section,
.main-content {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.listado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 7px;
}

.listado-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s;
}

.listado-card:hover {
    transform: translateY(-4px);
}

.listado-img {
    height: 180px;
    overflow: hidden;
}

.listado-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listado-card:hover .listado-img img {
    transform: scale(1.05);
}

.listado-contenido {
  text-align: center;
}
.listado-categoria {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #2a5298;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.listado-titulo {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.listado-titulo a {
    text-decoration: none;
    color: #333;
}

.listado-titulo a:hover {
    color: #2a5298;
}

.listado-subtitulo {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.listado-meta {
    font-size: 0.7rem;
    color: #777;
}

.btn-ver-todas:hover {
  background: none;
  color: green;
  font-size: 1rem;
}
.btn-ver-todas {
  display: inline-block;
  margin-top: 1.5rem;
  background: linear-gradient(180deg, #d2d2d2 0%, #ececec 100%);
  color: #045aff;
  padding: 10px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
  width: 99%;
  text-transform: uppercase;
  font-size: 0.95rem;
}
/* ============================================ */
/* ESTILOS ADICIONALES */
/* ============================================ */
.ultima-card .ultima-subtitulo {
    font-size: 0.8rem;
    color: #666;
    margin: 5px 0;
    line-height: 1.3;
    text-align: center;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 1024px) {
    .categoria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ultimas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tema-header h3 {
        font-size: 0.95rem;
        gap:4px;
    }    
    .hero-slider {
        height: 300px;
    }
    
    .hero-slide-titulo {
        font-size: 1.2rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .secundaria-imagen img {
        width: 100%;
        height: 120px;
    }
    .destacada-imagen img {
        width: 100%;
        height: 170px;
    }
    .secundaria-imagen {
        height: auto;
        overflow: hidden;
    }
    
    .sidebar-links {
        display: flex;
        justify-content: space-around;
    }
    
    .secundarias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .temas-destacados-grid {
  grid-template-columns: repeat(auto-fit, minmax(30%, 1fr));

}
}

@media (max-width: 480px) {
    .portada-container {
        padding: 2px;
    }
    
    .hero-slider {
        height: 300px;
    }
    
    .hero-slide-titulo {
        font-size: 1.1rem;
    }
    
    .hero-prev, .hero-next {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .ultima-titulo a {
        display: -webkit-box;
        position: relative;
        max-height: 2.8em;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .ultima-titulo a.ultima-titulo-largo::after {
        content: "....";
        position: absolute;
        right: 0;
        bottom: 0;
        padding-left: 0.15em;
        background: var(--news-card-surface, #fff);
    }
    
    .ultima-imagen {
        width: 100%;
        height: 120px;
    }
    
    .categoria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .secundarias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-slide-meta {
  display: none;
}
.hero-btn {
  font-size: 1rem;
}
.hero-categoria {
  display: none;
}
    .temas-destacados-grid {
  grid-template-columns: repeat(auto-fit, minmax(45%, 1fr));

}
}

 /* ============================================
   NOTICIA DESTACADA PRINCIPAL
   ============================================ */
.destacada-principal {
    border-radius: 7px;
    overflow: hidden;
    margin: 2rem 0;
    position: relative;
}

.destacada-badge {
  position: absolute;
  left: 5%;
  z-index: 10;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  padding: 5px 24px;
  border-radius: 30px;
  border: 1px inset #fff7b4;
}

.destacada-badge span {
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.destacada-contenido {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
    margin-left: 1%;
}

.destacada-imagen {
    overflow: hidden;
}

.destacada-imagen img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
    border: 1px inset white;
    border-radius: 1rem;
}

.destacada-imagen img:hover {
    transform: scale(1.2);
}

.destacada-sin-imagen {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
    background: #f3f4f6;
}

.destacada-categoria {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.destacada-titulo {
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    text-transform: uppercase;
    text-align: center;
}

.destacada-titulo a {
    color: #a52516;
    text-decoration: none;
    font-size: 0.9rem;
}

.destacada-titulo a:hover {
    color: #2563eb;
}

.destacada-subtitulo {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.destacada-extracto {
    color: #4b5563;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.destacada-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    justify-content: center;
}

.destacada-btn {
    background: #ececec;
    color: #8f2115;
    padding: 5px 14px;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    display: block;
    text-align: center;
    margin: 0 9%;
    font-size: 0.94rem;
}

.destacada-btn:hover {
    background: #26aa01;
    margin-left: 2%;
}

@media (max-width: 768px) {
    .destacada-contenido {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    .destacada-titulo {
        font-size: 1.2rem;
    }
    .destacada-badge {
        left: 9%;
        top: 20px;
    }
}

/* =============================================
   TAGS DE REGIÓN Y TEMA (clasificación dual)
   ============================================= */

/* Hero slider tags */
.hero-tags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.hero-region {
    display: inline-block;
    background: #10b981;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.hero-categoria {
    display: none;
}

/* Destacada tags */
.destacada-tags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.destacada-region {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* Listado tags */
.listado-tags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.listado-region {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #059669;
    font-weight: 600;
}

/* Últimas noticias tags */
.ultima-contenido {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.ultima-tags {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: auto;
    text-align: right;
}
.ultima-region {
    font-size: 0.75rem;
    color: #047857;
    text-transform: uppercase;
    font-weight: 600;
}    


/* news-cards.css */
/* =============================================
   BASE COMPARTIDA — Solo propiedades visuales
   ============================================= */
.news-card {
    --news-card-accent: #2563eb;
    --news-card-surface: #ffffff;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--news-card-surface);
    border: 1px solid #dbe3ef;
    border-top: 4px solid var(--news-card-accent);
    border-radius: 4px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(15, 23, 42, 0.18);
}

.news-card:focus-within {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

/* =============================================
   MODIFICADORES DE LAYOUT — Por tipo de card
   ============================================= */

/* Estructura compartida: el eje se elige con un modificador explícito. */
.news-card--vertical,
.news-card--horizontal {
    display: flex;
}

.news-card--vertical {
    flex-direction: column;
}

.news-card--horizontal {
    flex-direction: row;
}

/* Densidad compacta, independiente de la dirección de la tarjeta. */
.news-card--compact {
    gap: 9px;
    padding: 0.5rem;
}

/* =============================================
   COLORES POR ESTADO/FUENTE
   ============================================= */
.news-card--public {
    --news-card-accent: #2563eb;
}

.news-card--external {
    --news-card-accent: #0f766e;
    --news-card-surface: #f8fffd;
}

.news-card--private {
    --news-card-accent: #7c3aed;
    --news-card-surface: #fcfaff;
}

.news-card--draft {
    --news-card-accent: #64748b;
}

.news-card--pending {
    --news-card-accent: #d97706;
    --news-card-surface: #fffbeb;
}

.news-card--archived {
    --news-card-accent: #475569;
    --news-card-surface: #f8fafc;
}

/* =============================================
   COMPONENTES INTERNOS
   ============================================= */

/* Imagen */
.news-card__media {
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.news-card__media a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.news-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card img {
    object-fit: cover;
}

.news-card:hover .news-card__media img {
    transform: scale(1.05);
}

/* Contenido */
.news-card__body {
    flex: 1;
    min-width: 0;
}

.news-card__title {
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.news-card__title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card__title a:hover {
    color: #2563eb;
}

.news-card__subtitle {
    color: #6b7280;
    font-weight: 400;
}

/* Metadatos */
.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.news-card .news-card__meta--standard {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
    margin-top: auto;
    padding: 0.75rem 1rem;
    border: solid #dbe3ef;
    border-width: 1px 0 0;
    border-radius: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.35;
}

.news-card .news-card__meta--standard > * {
    display: inline-flex;
    flex: 1 1 9rem;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.news-card .news-card__meta--standard.news-card__meta--inline > * {
    flex: 0 1 auto;
    width: auto;
}

.news-card .news-card__meta--standard a {
    color: #1d4ed8;
    text-decoration: none;
}

.news-card .news-card__meta--standard a:hover {
    text-decoration: underline;
}

.news-card .news-card__meta--standard a:focus-visible {
    border-radius: 3px;
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Acciones */
.news-card__actions {
    text-align: center;
}

.news-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
    .news-card .news-card__meta--standard {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        padding: 0.7rem 0.8rem;
    }

    .news-card .news-card__meta--standard > * {
        flex-basis: auto;
        width: 100%;
    }

    .news-card .news-card__meta--standard.news-card__meta--inline {
        flex-direction: row;
        align-items: center;
    }

    .news-card .news-card__meta--standard.news-card__meta--inline > * {
        flex-basis: auto;
        width: auto;
    }
}


/* adsense.css */
.adsense-block {
    display: block;
    width: 100%;
    min-height: 60px;
    min-width: 0;
    margin: .75rem auto;
    overflow: hidden;
    text-align: center;
}

.adsense-block .adsbygoogle {
    display: block;
    width: 100%;
    min-height: 60px;
}

.adsense-block--sidebar {
    margin-top: 0;
    min-height: 250px;
    max-width: 336px;
}

.adsense-block .adsbygoogle[data-ad-status="filled"] {
    min-height: 60px;
}

.adsense-block--portada,
.adsense-block--portada .adsbygoogle {
    min-height: 280px;
}

.adsense-block--sidebar .adsbygoogle[data-ad-status="filled"] {
    min-height: 250px;
}

.adsense-block--listado {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .adsense-block {
        margin: .5rem auto;
    }
}

