/* =========================================================
   ÚLTIMAS NOTICIAS — CSS (CORREGIDO)
========================================================= */

/* ---------- IMPORTAR FUENTE ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* ---------- CONTENEDOR PRINCIPAL ---------- */
.ft-latest-wrapper {
  width: 100%;
  background: #fff;
  margin: 20px auto 40px auto;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  box-sizing: border-box;

  /* FIX: asegura que nunca se superponga al header */
  position: relative;
  z-index: 10;
}

.latest-news {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 28px;
  max-width: 1200px;
  width: 100%;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ---------- NOTICIA DESTACADA (IZQUIERDA) ---------- */
.news-featured {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.12);
}

.news-featured a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-featured img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.4s ease;
}

.news-featured:hover img {
  transform: scale(1.04);
}

.news-featured .news-content {
  padding: 14px 6px;
}

.news-featured .news-title {
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #111;
  margin: 6px 0;
  line-height: 1.2;
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
}

.news-featured:hover .news-title {
  color: #0070f3;
}

.news-featured .news-excerpt {
  font-family: "Cairo", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  margin-top: 8px;
}

/* ---------- REJILLA DE NOTICIAS SECUNDARIAS (DERECHA) ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.news-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.news-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

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

.news-item-title {
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #111;
  line-height: 1.4;
  padding: 8px 4px;
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

.news-item:hover .news-item-title {
  color: #0070f3;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 1100px) {
  .latest-news {
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
  }

  .news-featured img {
    height: 360px;
  }
}

@media (max-width: 900px) {
  .latest-news {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .news-featured img {
    height: 380px;
  }

  .news-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .news-featured img {
    height: 280px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-item img {
    height: 180px;
  }
}

/* ---------- AJUSTE PARA MÓVIL (HEADER FIJO) ---------- */
@media (max-width: 768px) {
  .ft-latest-wrapper {
    margin-top: 80px;
  }
}

/* ---------- FIX DE INTERACCIÓN (clics en enlaces) ---------- */
.ft-latest-wrapper a,
.latest-news a,
.news-featured a,
.news-item a {
  position: relative;
  z-index: 20;
  pointer-events: auto;
  display: block;
}

.ft-latest-wrapper,
.latest-news,
.news-featured,
.news-item,
.elementor-shortcode {
  pointer-events: auto !important;
}

/* ---------- OPTIMIZACIÓN VISUAL ---------- */
.latest-news img {
  user-select: none;
  -webkit-user-drag: none;
}

.latest-news a {
  text-decoration: none;
}

.latest-news h2,
.latest-news h3 {
  margin: 0;
}
