/* ================================
   🔹 ESTILOS DE PÁGINA NOTICIAS
   ================================ */

/* 🔹 HERO */
.hero-noticias {
  position: relative;
  width: 100%;
  height: 55vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.hero-noticias {
  position: relative;
  width: 100%;
  height: 45vh; /* antes 55vh */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 0; /* asegura que no quede espacio extra */
}

.hero-noticias .hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 15, 40, 0.6);
}

.hero-noticias .hero-content {
  position: absolute;
  text-align: center;
  z-index: 2;
  padding: 0 20px;
}

.hero-noticias h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-noticias p {
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  color: #b6eaff;
}

/* 🔹 SECCIÓN DE NOTICIAS */
.noticias-container {
  background-color: #ffffff;
  padding: 80px 10%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.noticia-card {
  background: #f7faff;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.noticia-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.noticia-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.noticia-card h3 {
  font-size: 1.25rem;
  color: #002855;
  font-weight: 600;
  margin: 20px 20px 10px;
}

.noticia-card p {
  font-size: 0.95rem;
  color: #333;
  margin: 0 20px 20px;
  line-height: 1.6;
  text-align: justify;
}

.btn-leer {
  display: inline-block;
  background-color: #001f3f;
  color: #00ffff;
  text-decoration: none;
  font-weight: 600;
  margin: 0 20px 20px;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-leer:hover {
  background-color: #003366;
  color: #ffffff;
}

/* 🔹 RESPONSIVE */
@media (max-width: 768px) {
  .hero-noticias {
    height: 45vh;
  }

  .hero-noticias h1 {
    font-size: 2.2rem;
  }

  .hero-noticias p {
    font-size: 1rem;
  }

  .noticias-container {
    padding: 50px 20px;
    gap: 25px;
  }

  .noticia-card img {
    height: 200px;
  }
}


/* 🔹 Paginación */
/* 🔹 Paginación */
.paginacion {
  width: 100%;                 /* ocupa todo el ancho disponible */
  display: flex;               /* activa flexbox */
  justify-content: center;     /* centra horizontalmente */
  align-items: center;         /* centra verticalmente */
  gap: 15px;
  margin: 40px auto;           /* centrado del bloque */
  text-align: center;          /* refuerzo de alineación */
}

.paginacion button {
  background: #001f3f;
  color: #00ffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.paginacion button:hover:not(:disabled) {
  background: #00ffff;
  color: #001f3f;
}

.paginacion button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.paginacion span {
  font-size: 1.1rem;
  font-weight: 600;
  color: #001f3f;
  background: #f2f7ff;
  border-radius: 6px;
  padding: 6px 12px;
  box-shadow: 0 0 6px rgba(0, 31, 63, 0.1);
}


.cargando,
.vacio,
.error {
  text-align: center;
  font-size: 1.1rem;
  color: #002855;
  margin: 60px 0;
}

/* 🔹 Información adicional de las noticias */
.noticia-info {
  padding: 0 20px 20px;
}

.noticia-card .meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 15px;
  font-size: 0.85rem;
  color: #555;
}

.noticia-card .meta-info i {
  color: #00ffff;
  margin-right: 6px;
}

.noticia-card .descripcion {
  font-size: 0.95rem;
  color: #333;
  text-align: justify;
}

/* 🔹 Buscador */
.buscador {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 30px 10px;
  background: #f2f7ff;
}

.buscador input {
  width: 60%;
  max-width: 480px;
  padding: 10px 14px;
  border: 2px solid #00ffff;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.buscador button {
  background: #001f3f;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

.buscador button:hover {
  background: #00ffff;
  color: #001f3f;
}



/* 🔹 Detalle de noticia */
.detalle-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.detalle-noticia {
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 31, 63, 0.1);
}

.detalle-noticia .categoria {
  color: #00ffff;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 10px;
}

.detalle-noticia h2 {
  font-size: 2rem;
  color: #001f3f;
  text-align: center;
  margin-bottom: 10px;
}

.detalle-noticia .descripcion {
  font-style: italic;
  color: #333;
  text-align: center;
  margin-bottom: 10px;
}

.detalle-noticia .meta {
  text-align: center;
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.detalle-noticia .imagen-detalle {
  width: 100%;
  border-radius: 10px;
  display: block;
  margin: 0 auto 25px auto;
}

.detalle-noticia .contenido {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #222;
  text-align: justify;
}


/* 🔹 Franja informativa bajo el banner */
.franja-detalle {
  background-color: #001f3f;
  color: #dce6f7;
  text-align: left;
  padding: 15px 10%;
  font-style: italic;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.franja-detalle i {
  color: #00ffff;
  margin-right: 6px;
  font-size: 1.1rem;
}


/* ENCABEZADO*/
/* ===========================
   🔹 Encabezado sin imagen
   =========================== */
.encabezado-detalle {
  background: linear-gradient(90deg, #002b44, #00385f);
  color: #eaf8ff;
  padding: 30px 10%;
  text-align: center;
  border-bottom: 2px solid #00ffff;
}

.encabezado-detalle .contenedor-detalle h1 {
  font-size: 1.9rem;
  color: #00ffff;
}

.encabezado-detalle .contenedor-detalle p {
  font-size: 1rem;
  color: #d3ebff;
}

/* ==============================
   🔹 BANNER DETALLE (FINAL AJUSTADO)
   ============================== */
.banner-detalle {
  position: relative;
  width: 100%;
  height: 25vh; /* 🔹 más bajo, muestra todo el banner horizontal */
  background: url("../assets/banner_detalle.jpg") center top / contain no-repeat;
  /* 🔸 eliminamos el background-color para evitar la franja azul */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* 🔹 Oscurecimiento leve */
.banner-detalle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 10, 25, 0.3), rgba(0, 10, 25, 0.6));
  z-index: 1;
}

/* 🔹 Contenido del banner */
.banner-detalle .banner-contenido {
  position: relative;
  z-index: 2;
  text-align: center;
}

.banner-detalle .banner-contenido h1 {
  font-size: 2rem;
  color: #00ffff;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 8px;
}

.banner-detalle .banner-contenido p {
  font-size: 1rem;
  font-style: italic;
  color: #d3ebff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 🔹 Responsive */
@media (max-width: 768px) {
  .banner-detalle {
    height: 22vh;
    background-size: cover; /* 🔹 en pantallas pequeñas usa cover para no dejar espacios */
  }

  .banner-detalle .banner-contenido h1 {
    font-size: 1.6rem;
  }

  .banner-detalle .banner-contenido p {
    font-size: 0.9rem;
  }
}

.share-container {
  margin-top: 25px;
  text-align: right; /* 👈 cambia center por left */
}

.btn-share {
  background-color: #1877f2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-share i {
  margin-right: 8px;
}

.btn-share:hover {
  background-color: #145db8;
}

/* ===============================
   🔹 Mejoras visuales en móvil
   =============================== */
@media (max-width: 768px) {
  .detalle-noticia {
    padding: 25px 18px;
    border-radius: 10px;
  }

  .detalle-noticia h2 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: center;
  }

  .detalle-noticia .descripcion {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
  }

  .detalle-noticia .contenido {
    font-size: 1rem;
    line-height: 1.9;
    text-align: justify;
    margin-top: 15px;
  }

  .detalle-noticia .contenido p {
    margin-bottom: 18px;
  }

  .imagen-detalle {
    border-radius: 10px;
    margin: 20px 0;
  }
}

/* ===============================
   🔹 Ajuste de ancho del texto en móvil
   =============================== */
@media (max-width: 768px) {

  /* Contenedor general más ancho */
  .detalle-noticia {
    padding: 20px 10px !important; /* antes 25px 18px */
  }

  /* Texto del contenido más fluido */
  .detalle-noticia .contenido {
    font-size: 1rem;
    line-height: 1.9;
    text-align: justify;
    margin-top: 15px;
    padding: 0 6px; /* margen lateral mínimo */
  }

  /* Ajuste del título y descripción */
  .detalle-noticia h2 {
    font-size: 1.4rem;
    margin: 0 10px 10px;
    line-height: 1.4;
  }

  .detalle-noticia .descripcion {
    font-size: 0.95rem;
    color: #333;
    margin: 0 12px 15px;
    text-align: center;
  }

  /* Imagen más ancha */
  .imagen-detalle {
    width: 100%;
    border-radius: 10px;
    margin: 15px 0;
  }
}

/*AMAZON  XXXXXXXXXXXXXXXXXXXXXX*/
/* ================================
   🔹 AMAZON PUBLICIDAD
================================== */
.amazon-ads {
  margin-top: 40px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.amazon-ads h3 {
  color: #001f3f;
  font-weight: 600;
  margin-bottom: 20px;
}

.amazon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.amazon-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amazon-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.amazon-grid img {
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

.amazon-grid span {
  color: #001f3f;
  font-weight: 500;
  font-size: 14px;
}

.amazon-titulo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.4rem;
  color: #232f3e;
  background: #f3f3f3;
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.amazon-titulo img.amazon-logo {
  height: 28px;
  width: auto;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2));
}
