/* =========================================================
   RESIDENCES — News Archive Stylesheet
   File:   assets/css/news-archive.css
   Loaded: only on /ta-nea-mas/ via residences_enqueue_news_archive_css()
   Stack:  Astra + Elementor Pro + DCE (dynamicposts-v2.grid-filters)
   Reqs:   Widget CSS ID = "news-loop"
   Brand:  Ivory #FAF7F2 / Bronze #B8976A / Charcoal #2C2C2C / Sand #F0EAE0
   Fonts:  EB Garamond (display) / Inter (UI + body)
   Version: bump @version in functions.php to cache-bust
   ========================================================= */

/* ---------- 1. LOOP CONTAINER ---------- */

#news-loop {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

#news-loop .dce-fix-background-loop {
  background: transparent !important;
}

/* ---------- 2. FILTER BAR ---------- */

#news-loop .dce-filters {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 auto 64px auto;
  max-width: 1100px;
  padding: 0 10px;
}

#news-loop .dce-filters .filters-separator {
  display: none !important;
}

#news-loop .dce-filters .filters-item {
  display: inline-block;
  margin: 0;
}

#news-loop .dce-filters .filters-item a {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(184, 151, 106, 0.4);
  color: #2C2C2C !important;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 11px 24px;
  border-radius: 999px;
  text-decoration: none !important;
  background-image: none !important;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#news-loop .dce-filters .filters-item a:hover {
  border-color: #B8976A;
  color: #B8976A !important;
}

#news-loop .dce-filters .filter-active a,
#news-loop .dce-filters .filter-active a:link,
#news-loop .dce-filters .filter-active a:visited {
  background: #B8976A !important;
  border-color: #B8976A !important;
  color: #FAF7F2 !important;
}

/* ---------- 3. CARDS ---------- */

#news-loop section.dce-post {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 14px !important;
  transition: transform 0.5s ease;
}

#news-loop .ast-article-post {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

#news-loop .dce-post-item:hover {
  transform: translateY(-4px);
}

#news-loop .dce-post-block {
  padding: 0 !important;
  background: transparent !important;
}

/* ---------- 4. FEATURED IMAGE ---------- */

#news-loop .dce-item_image {
  margin: 0 0 22px 0 !important;
  padding: 0 !important;
  background: #F0EAE0;
  width: 100%;
}

#news-loop .dce-post-image {
  display: block !important;
  width: 100% !important;
  padding-bottom: 66.66% !important;
  position: relative !important;
  overflow: hidden;
  height: auto !important;
}

#news-loop .dce-post-image .dce-bgimage {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  background-size: cover !important;
  background-position: center !important;
  transition: transform 0.7s ease;
}

#news-loop .dce-post-item:hover .dce-bgimage {
  transform: scale(1.05);
}

/* Placeholder for posts without featured image */
#news-loop .dce-item_image:empty {
  display: block;
  width: 100%;
  padding-bottom: 66.66%;
  background: linear-gradient(135deg, #F0EAE0 0%, #FAF7F2 100%);
  position: relative;
  margin: 0 0 22px 0 !important;
}

#news-loop .dce-item_image:empty::after {
  content: 'RESIDENCES';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  letter-spacing: 0.25em;
  color: rgba(184, 151, 106, 0.5);
}

/* ---------- 5. TAXONOMY (above title) ---------- */

#news-loop .dce-item_termstaxonomy {
  margin: 0 0 6px 0 !important;
  padding: 0 !important;
}

#news-loop .dce-post-terms {
  margin: 0 !important;
  padding: 0 !important;
}

#news-loop .dce-post-terms .dce-terms-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-block;
}

#news-loop .dce-post-terms .dce-term-item {
  display: inline-block;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#news-loop .dce-post-terms .dce-term-item::before {
  display: none !important;
}

#news-loop .dce-post-terms .dce-term {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #B8976A !important;
  line-height: 1.5 !important;
}

/* ---------- 6. DATE ---------- */

#news-loop .dce-item_date {
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
}

#news-loop .dce-post-date {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #B8976A !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---------- 7. TITLE ---------- */

#news-loop .dce-item_title {
  margin: 0 0 14px 0 !important;
  padding: 0 !important;
}

#news-loop h3.dce-post-title {
  font-family: 'EB Garamond', serif !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  font-style: normal !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  padding: 0 !important;
}

#news-loop h3.dce-post-title a,
#news-loop h3.dce-post-title a:link,
#news-loop h3.dce-post-title a:visited,
#news-loop h3.dce-post-title a:focus {
  color: #2C2C2C !important;
  text-decoration: none !important;
  background: transparent !important;
  background-image: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  transition: color 0.3s ease;
}

#news-loop .dce-post-item:hover h3.dce-post-title a,
#news-loop h3.dce-post-title a:hover {
  color: #B8976A !important;
}

/* ---------- 8. EXCERPT ---------- */

#news-loop .dce-item_content {
  margin: 0 !important;
  padding: 0 !important;
}

#news-loop .dce-post-content {
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  color: rgba(44, 44, 44, 0.72) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 9. PAGINATION ---------- */

#news-loop .dce-pagination,
#news-loop .dce-pagination-bottom {
  margin-top: 60px !important;
  padding-top: 20px;
  text-align: center;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#news-loop .dce-pagination .progression {
  display: none !important;
}

#news-loop .dce-pagination .current,
#news-loop .dce-pagination a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1px solid rgba(184, 151, 106, 0.4);
  border-radius: 999px;
  color: #2C2C2C !important;
  text-decoration: none !important;
  background: transparent;
  transition: all 0.3s ease;
}

#news-loop .dce-pagination .current {
  background: #B8976A !important;
  border-color: #B8976A !important;
  color: #FAF7F2 !important;
}

#news-loop .dce-pagination a:hover {
  border-color: #B8976A;
  color: #B8976A !important;
}

/* ---------- 10. KILL ASTRA THEME LEFTOVERS ---------- */

#news-loop .ast-article-post .entry-meta,
#news-loop .ast-article-post .post-meta,
#news-loop .ast-blog-meta-container,
#news-loop .entry-meta,
#news-loop .ast-blog-featured-section,
#news-loop .read-more,
#news-loop .ast-blog-single-element {
  display: none !important;
}

#news-loop section.dce-post::before,
#news-loop section.dce-post::after {
  display: none !important;
}

/* ---------- 11. RESPONSIVE ---------- */

@media (max-width: 1200px) {
  #news-loop {
    padding: 0 30px;
  }
  #news-loop h3.dce-post-title {
    font-size: 22px !important;
  }
}

@media (max-width: 1024px) {
  #news-loop h3.dce-post-title {
    font-size: 21px !important;
  }
  #news-loop .dce-filters {
    margin-bottom: 48px;
  }
}

@media (max-width: 767px) {
  #news-loop {
    padding: 0 16px;
  }
  #news-loop section.dce-post {
    padding: 0 !important;
  }
  #news-loop .dce-filters {
    gap: 6px;
    margin-bottom: 36px;
  }
  #news-loop .dce-filters .filters-item a {
    font-size: 11px;
    padding: 9px 16px;
    letter-spacing: 0.08em;
  }
  #news-loop h3.dce-post-title {
    font-size: 20px !important;
  }
  #news-loop .dce-post-image,
  #news-loop .dce-item_image:empty {
    padding-bottom: 62.5%;
  }
  #news-loop .dce-post-content {
    -webkit-line-clamp: 2;
    font-size: 14px !important;
  }
}

/* End */