/* ==========================================================================
   HOJA DE ESTILOS EXTERNA COMPARTIDA - MIRADAMX
   ========================================================================== */

/* --- 1. AJUSTES GENERALES Y NAVEGACIÓN --- */
.logo-marca {
  font-weight: 900;
  letter-spacing: -1px;
}

.logo-marca span:first-child {
  background-color: #000000;
  color: #ffffff;
  padding: 4px 12px;
}

.logo-marca span:last-child {
  background-color: #f44336;
  color: #ffffff;
  padding: 4px 12px;
}

.contenedor-principal {
  max-width: 1200px;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- 2. PORTADA (index.html) - HERO Y DESTACADOS --- */
.hero-card {
  position: relative;
  overflow: hidden;
  max-height: 480px;
}

.hero-imagen {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0) 100%);
}

/* --- 3. PORTADA (index.html) - GRID DE SECCIONES --- */
.titulo-seccion {
  font-weight: 800;
}

.grid-dos-columnas {
  display: flex;
  flex-wrap: wrap;
}

.grid-dos-columnas::before,
.grid-dos-columnas::after {
  display: none !important;
}

.tarjeta-noticia {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tarjeta-imagen-contenedor {
  height: 240px;
  overflow: hidden;
  width: 100%;
}

.tarjeta-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tarjeta-cuerpo {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.titulo-noticia {
  font-weight: 700;
  margin-top: 0;
  line-height: 1.25;
}

.resumen-noticia {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 0;
}

.boton-ver-mas {
  font-weight: 600;
}


/* ==========================================================================
   4. PÁGINA DE ARTÍCULO (articulo.html / articulo.php) - REDISEÑADO
   ========================================================================== */

/* Fondo dinámico con imagen y blur */
/* 1. Estira la imagen para cubrir toda la pantalla sin repetirse */
.contenedor-articulo-fondo {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed;
  position: relative;
  width: 100%;
}

/* 2. Capa de difuminado universal (funciona 100% en Firefox, Chrome y Safari) */
.capa-blur {
  background-color: rgba(255, 255, 255, 0.42); /* Capa translúcida blanca */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  width: 100%;
  min-height: 100vh;
  padding-top: 24px;
  padding-bottom: 40px;
}

.contenedor-articulo {
  margin-top: 20px;
  margin-bottom: 30px;
  padding-bottom: 32px;
}

.cabecera-articulo {
  padding-top: 16px;
  padding-bottom: 16px;
}

.titulo-articulo-principal {
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

/* Layout de Bloques con Imagen Sticky */
.cuerpo-articulo {
  padding-top: 16px;
}

.bloque-articulo {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
  align-items: flex-start; /* Necesario para activar el comportamiento sticky */
}

.columna-imagen {
  flex: 0 0 42%;
  max-width: 42%;
  position: -webkit-sticky;
  position: sticky;
  top: 20px; /* Se congela en pantalla mientras el texto de la derecha baja */
}

.imagen-articulo {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.columna-texto {
  flex: 1 1 50%;
  min-width: 280px;

}

.parrafo-articulo {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #ffffff; important;/* Cambiado a blanco para legibilidad sobre fondo oscuro */
  margin: 0;

  /* Fondo oscuro translúcido (Negro al 80% de opacidad) */
  background-color: rgba(0, 0, 0, 0.8) !important;

/* 4. Forzar creación de capa propia en GPU para evitar glitches en Firefox */
  will-change: transform;
  transform: translateZ(0);
  /* Espacio interno para que el texto respire */
  padding: 20px; 

  /* Opcional pero recomendado para dar un acabado fino */
  border-radius: 4px; /* Suaviza las esquinas */
  box-sizing: border-box; /* Asegura que el padding no rompa los anchos */
}
/* Sección Más Artículos */
.seccion-mas-articulos {
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
}

.titulo-mas-articulos {
  font-size: 1.1rem;
  font-weight: 700;
  color: #666666;
  margin-bottom: 20px;
}

.grid-relacionados {
  display: flex;
  flex-wrap: wrap;
}

.grid-relacionados::before,
.grid-relacionados::after {
  display: none !important;
}

.tarjeta-relacionada {
  border: 1px solid #e2e2e2;
  background-color: #ffffff;
  padding: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.relacionada-imagen-contenedor {
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 8px;
}

.relacionada-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.relacionada-info {
  padding: 4px;
  flex: 1 1 auto;
}

.relacionada-titulo {
  font-size: 0.85rem;
  font-weight: 800;
  color: #444444;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  line-height: 1.3;
}

.relacionada-fecha {
  display: block;
  font-size: 0.75rem;
  color: #888888;
}

/* --- 5. RESPONSIVO GENERAL (Móviles / Tablets) --- */
@media (max-width: 768px) {
  .columna-imagen,
  .columna-texto {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .columna-imagen {
    position: static; /* Desactiva el sticky en pantallas pequeñas */
  }

  .grid-dos-columnas,
  .grid-relacionados {
    display: block;
  }
}

/* ==========================================================================
   6. PÁGINA DE LISTADO / GALERÍA DE ARTÍCULOS (articulos.html)
   ========================================================================== */

.contenedor-galeria {
  margin-top: 20px;
  margin-bottom: 30px;
  padding-bottom: 32px;
}

.cabecera-categoria {
  padding-top: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #222222;
  margin-bottom: 24px;
}

.titulo-categoria {
  font-weight: 900;
  font-size: 2.2rem;
  margin: 0;
  color: #111111;
}

.listado-articulos {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.item-lista-articulo {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dotted #ccc;
}

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

.item-imagen-contenedor {
  flex: 0 0 220px;
  height: 140px;
  overflow: hidden;
  background-color: #e0e0e0;
}

.item-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.item-titulo {
  margin: 0 0 8px 0;
  font-weight: 700;
  line-height: 1.25;
}

.item-titulo a {
  text-decoration: none;
  color: #222222;
  transition: color 0.2s ease;
}

.item-titulo a:hover {
  color: #d9534f;
}

.item-meta {
  font-size: 0.9rem;
  color: #777777;
  display: flex;
  align-items: center;
}

.estrellas {
  color: #2196F3;
  letter-spacing: 2px;
  font-size: 1rem;
}

.fecha-item {
  color: #888888;
}

@media (max-width: 600px) {
  .item-lista-articulo {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .item-imagen-contenedor {
    flex: 0 0 auto;
    width: 100%;
    height: 180px;
  }
}