* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f1f5f9;
  color: #1e293b;
}

/* ENCABEZADO OFICIAL */
header.header-oficial {
  background-color: #111827;
  border-bottom: 3px solid #d32f2f;
}

/* BANNER DE IMAGEN PRINCIPAL (SUPERIOR) */
.banner-imagen-full {
  width: 100%;
  background-color: #0b0f19;
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #1f2937;
}

.banner-img-container {
  max-width: 1350px;
  width: 100%;
  padding: 0 15px;
  text-align: center;
}

.header-banner-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* MENÚ DE NAVEGACIÓN COMPACTO */
header nav {
  background-color: #111827;
  padding: 8px 10px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid #1f2937;
}

header nav a {
  color: #f3f4f6;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

header nav a:hover,
header nav a.active {
  color: #38bdf8;
}

header nav a.active {
  border-bottom: 2px solid #38bdf8;
  padding-bottom: 2px;
}

/* CONTENEDOR PRINCIPAL CON PUBLICIDAD LATERAL */
.layout-principal {
  max-width: 1350px;
  margin: 30px auto;
  padding: 0 15px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.bloque-central {
  flex-grow: 1;
  min-width: 0;
}

/* BANNERS LATERALES (170px) - ACTUALIZADO PARA 2 ESPACIOS CADA UNO */
.columna-publicidad {
  width: 170px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px; /* Espacio vertical exacto entre el banner superior e inferior */
}

.columna-publicidad span {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: bold;
  text-align: center;
  margin-bottom: 5px;
}

.caja-banner-vertical {
  background-color: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 6px;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-align: center;
  padding: 0; /* Sin padding interno para que la imagen o GIF ocupe toda la caja */
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden; /* Evita que las imágenes se salgan de los bordes redondeados */
}

/* Ajuste para que las imágenes o GIFs llenen perfectamente los espacios de 600px */
.caja-banner-vertical img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.caja-banner-vertical a:hover img {
  transform: scale(1.02); /* Sutil efecto de zoom al pasar el mouse */
}

.caja-banner-vertical p {
  font-weight: bold;
  font-size: 0.85rem;
}

.caja-banner-vertical small {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* REJILLA DE NOTICIAS RELEVANTES */
.contenedor-noticias {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

.noticia {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid transparent;
}

.noticia img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin: 12px 0;
}

.noticia h2 {
  font-size: 1.25rem;
  margin-top: 8px;
  color: #0f172a;
}

.noticia p {
  color: #475569;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* CATEGORÍAS */
.categoria {
  display: inline-block;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.categoria.seguridad { background-color: #b91c1c; }
.categoria.economia { background-color: #15803d; }
.categoria.politica { background-color: #6b21a8; }
.categoria.tecnologia { background-color: #2563eb; }
.categoria.ambiente,
.categoria.medio-ambiente { background-color: #0d9488; }
.categoria.historia { background-color: #b45309; }
.categoria.migracion { background-color: #ea580c; }
.categoria.clima { background-color: #0284c7; }
.categoria.cultura { background-color: #db2777; }

/* SECCIÓN CRONOLÓGICA DESLIZABLE */
.seccion-cronologica {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-top: 4px solid #111827;
}

.cronologica-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.cronologica-header h3 {
  font-size: 1.2rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cronologica-header h3 span {
  background-color: #b91c1c;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.carrusel-deslizable {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.carrusel-deslizable::-webkit-scrollbar {
  height: 6px;
}

.carrusel-deslizable::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 10px;
}

.tarjeta-cronologica {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tarjeta-cronologica .hora {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b91c1c;
}

.tarjeta-cronologica h4 {
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.3;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .columna-publicidad {
    display: none;
  }
}

@media (max-width: 900px) {
  .contenedor-noticias {
    grid-template-columns: 1fr;
  }
}

footer {
  text-align: center;
  padding: 20px;
  background-color: #111827;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 40px;
  border-top: 3px solid #38bdf8;
}

/* ==========================================
   MODAL DE NOTICIA COMPLETA
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.modal-contenedor {
  background: #1e293b;
  color: #fff;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  border-radius: 12px;
  border: 1px solid #334155;
  overflow-y: auto;
  padding: 25px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-btn-cerrar {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #334155;
  color: #fff;
  border: none;
  font-size: 1.2rem;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.modal-btn-cerrar:hover {
  background: #475569;
}

.modal-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-tag {
  background: #2563eb;
  color: #fff;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
}

.modal-date {
  color: #94a3b8;
  font-size: 0.85rem;
}

.modal-title {
  font-size: 1.5rem;
  color: #f8fafc;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.modal-body-content {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 20px;
}
