/* ==========================================================================
   NEWS · LAYOUT & GRID
   Estructura de página de listado de noticias.
   Carga después de main.css — solo layout, sin colores.
   ========================================================================== */

/* --- PAGE WRAPPER --- */
.noticias-page main {
  max-width: none;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- FEATURED + SIDEBAR GRID --- */
.news-featured {
  max-width: none;
  margin: 0 0 var(--space-4xl) 0;
  padding: 0;
}

#featuredNews {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
}

/* --- HERO CARD (2/3 width) --- */
.featured-main {
  min-height: 620px;
}

.news-featured-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 620px;
  overflow: hidden;
}

.news-featured-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-5xl);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* --- SIDEBAR (1/3 width) --- */
.featured-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.sidebar-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  height: auto;
}

.sidebar-card-thumb {
  flex-shrink: 0;
  width: 100%;
  height: 130px;
  overflow: hidden;
}

.sidebar-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-md);
}

.sidebar-card-body .date {
  font-size: var(--font-size-xs);
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

.sidebar-card-body h4 {
  margin: 0 0 var(--space-sm) 0;
  font-size: var(--font-size-base);
  line-height: var(--line-height-tight);
  flex-shrink: 0;
}

.sidebar-card-body h4 a {
  text-decoration: none;
}

.sidebar-card-body p {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
}

/* --- NEWS LIST GRID --- */
.news-list {
  max-width: none;
  margin: 0 0 var(--space-6xl) 0;
  padding: 0;
}

#newsList {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-4xl);
}

/* --- SECONDARY CARDS (listing page) --- */
.news-list .home-news-card {
  display: flex;
  flex-direction: column;
  height: 400px;
  overflow: hidden;
  position: relative;
}

.news-list .home-news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.news-list .home-news-card-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  background: none;
  z-index: auto;
}

.news-list .home-news-card-content .date {
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

.news-list .home-news-card-content h3 {
  margin: 0 0 var(--space-sm) 0;
  flex-shrink: 0;
}

.news-list .home-news-card-content p {
  flex-shrink: 1;
  overflow: hidden;
}

/* --- LOAD MORE --- */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: var(--space-3xl) 0 var(--space-5xl);
}

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

@media (max-width: 1200px) {
  #newsList {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  #newsList {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  #featuredNews {
    grid-template-columns: 1fr;
  }
  .featured-main {
    min-height: 600px;
  }
  .news-featured-card {
    min-height: 600px;
  }
  .featured-sidebar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
  .sidebar-card-thumb {
    height: 100px;
  }
}

@media (max-width: 768px) {
  .noticias-page main {
    padding: 0 var(--space-md);
  }
  .news-featured-card {
    min-height: 550px;
  }
  .featured-main {
    min-height: 550px;
  }
  .news-featured-content {
    padding: var(--space-2xl);
  }
  #newsList {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
  .news-list .home-news-card {
    height: 360px;
  }
  .news-list .home-news-card img {
    height: 160px;
  }
  .news-list .home-news-card-content {
    padding: var(--space-md);
  }
  .featured-sidebar {
    grid-template-columns: repeat(2, 1fr);
  }
  .sidebar-card-thumb {
    height: 80px;
  }
}

@media (max-width: 560px) {
  .noticias-page main {
    padding: 0 var(--space-md);
  }
  .featured-sidebar {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .news-featured {
    margin-bottom: var(--space-lg);
  }
  .sidebar-card-thumb {
    height: 140px;
  }
  #newsList {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .news-list .home-news-card {
    height: 380px !important;
  }
  .news-list .home-news-card img {
    height: 180px;
  }
  .news-list .home-news-card-content {
    padding: var(--space-md);
  }
  .news-list .home-news-card-content .date,
  .news-list .home-news-card-content h3 {
    text-shadow: none;
  }
  .featured-sidebar .sidebar-card-body h4 {
    font-size: var(--font-size-lg);
  }
  .featured-sidebar .sidebar-card-body p {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .news-featured-card {
    min-height: 85vh;
  }
  .featured-main {
    min-height: 85vh;
  }
  .news-featured-content {
    padding: var(--space-2xl);
  }
}
