/*
  Ensany v2 — the "news/articles" page family: /all_news (grid, #v2News)
  and the single-article detail page /news/{id} (#v2NewsDetail). One file
  for both since they're the same content type, same as v2-campaigns.css
  covering both campaigns.blade.php and campaigns_ngo.blade.php.

  The .v2n-* card classes (used by resources/views/components/
  article-card.blade.php) are written as a combined selector list scoped
  under BOTH #v2News and #v2NewsDetail (and #v2Search, which reuses this
  component inside its own #v2News-labelled wrapper — see search.blade.php)
  so the exact same card looks identical everywhere it's used.
*/

#v2News, #v2NewsDetail, #v2Search { background: #F7F4EC; font-family: 'Inter', sans-serif; }

/* ---------- /all_news grid page ---------- */
#v2News .v2n-head { max-width: 1280px; margin: 0 auto; padding: 28px 16px 20px; }
#v2News .v2n-title { font-size: 22px; font-weight: 800; color: #12332A; margin: 0; }
#v2News .v2n-title span {
  display: block; font-size: 12px; font-weight: 700; color: #D4A94B;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
#v2News .v2n-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 16px 60px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
@media (max-width: 991px) { #v2News .v2n-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { #v2News .v2n-grid { grid-template-columns: 1fr; gap: 16px; } }

#v2News .v2n-empty { max-width: 1280px; margin: 0 auto; padding: 60px 16px; text-align: center; color: #5B6660; font-size: 15px; font-weight: 600; }

#v2News .pagination, #v2NewsDetail .pagination {
  display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; flex-wrap: wrap;
}
#v2News .page-item .page-link, #v2NewsDetail .page-item .page-link {
  display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid #E7E1D2; border-radius: 9999px; background: #fff; color: #12332A; font-size: 13px; font-weight: 700; text-decoration: none;
}
#v2News .page-item.active .page-link, #v2NewsDetail .page-item.active .page-link { background: #578021; border-color: #578021; color: #fff; }
#v2News .page-item.disabled .page-link, #v2NewsDetail .page-item.disabled .page-link { color: #9AA39C; background: #F1ECDF; cursor: not-allowed; }

/* ---------- shared article card (article-card.blade.php) ---------- */
#v2News .v2n-card, #v2NewsDetail .v2n-card, #v2Search .v2n-card {
  background: #fff; border: 1px solid #E7E1D2; border-radius: 16px; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
#v2News .v2n-card:hover, #v2NewsDetail .v2n-card:hover, #v2Search .v2n-card:hover {
  transform: translateY(-4px); box-shadow: 0 20px 50px -20px rgba(18,51,42,.35);
}
#v2News .v2n-img-wrap, #v2NewsDetail .v2n-img-wrap, #v2Search .v2n-img-wrap {
  position: relative; aspect-ratio: 16/9; overflow: hidden; background: #F1ECDF;
}
#v2News .v2n-img-skel, #v2NewsDetail .v2n-img-skel, #v2Search .v2n-img-skel {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, #F1ECDF 28%, #FBF8F1 48%, #F1ECDF 68%);
  background-size: 250% 100%; animation: v2nShimmer 1.4s ease-in-out infinite; transition: opacity .35s ease;
}
#v2News .v2n-img-skel.is-hidden, #v2NewsDetail .v2n-img-skel.is-hidden, #v2Search .v2n-img-skel.is-hidden { opacity: 0; pointer-events: none; }
@keyframes v2nShimmer { 0% { background-position: 250% 0; } 100% { background-position: -250% 0; } }
#v2News .v2n-img, #v2NewsDetail .v2n-img, #v2Search .v2n-img {
  width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s ease, transform .35s ease;
}
#v2News .v2n-img.is-loaded, #v2NewsDetail .v2n-img.is-loaded, #v2Search .v2n-img.is-loaded { opacity: 1; }
#v2News .v2n-card:hover .v2n-img.is-loaded, #v2NewsDetail .v2n-card:hover .v2n-img.is-loaded, #v2Search .v2n-card:hover .v2n-img.is-loaded { transform: scale(1.06); }

#v2News .v2n-body, #v2NewsDetail .v2n-body, #v2Search .v2n-body { padding: 14px; }
#v2News .v2n-title-link, #v2NewsDetail .v2n-title-link, #v2Search .v2n-title-link { text-decoration: none; }
#v2News .v2n-title, #v2NewsDetail .v2n-title, #v2Search .v2n-title {
  font-size: 14.5px; font-weight: 800; color: #12332A; line-height: 1.4; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#v2News .v2n-date, #v2NewsDetail .v2n-date, #v2Search .v2n-date {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #9AA39C; margin-bottom: 10px;
}
#v2News .v2n-readmore, #v2NewsDetail .v2n-readmore, #v2Search .v2n-readmore {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 800; color: #578021; text-decoration: none;
}
#v2News .v2n-readmore:hover, #v2NewsDetail .v2n-readmore:hover, #v2Search .v2n-readmore:hover { color: #12332A; }

/* ---------- /news/{id} detail page ---------- */
#v2NewsDetail .v2nd-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 16px 60px; display: grid; grid-template-columns: 1.65fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 991px) { #v2NewsDetail .v2nd-wrap { grid-template-columns: 1fr; } }

#v2NewsDetail .v2nd-title { font-size: 24px; font-weight: 800; color: #12332A; line-height: 1.3; margin: 0 0 18px; }
#v2NewsDetail .v2nd-cover {
  width: 100%; border-radius: 18px; overflow: hidden; margin-bottom: 22px;
  aspect-ratio: 16/9; position: relative; background: #F1ECDF;
}
#v2NewsDetail .v2nd-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
#v2NewsDetail .v2nd-body {
  background: #fff; border: 1px solid #E7E1D2; border-radius: 18px; padding: 26px;
  font-size: 15px; line-height: 1.9; color: #303935;
}
#v2NewsDetail .v2nd-body img { max-width: 100%; height: auto; border-radius: 12px; }
#v2NewsDetail .v2nd-body h1, #v2NewsDetail .v2nd-body h2, #v2NewsDetail .v2nd-body h3 { color: #12332A; font-weight: 800; }

#v2NewsDetail .v2nd-widget {
  background: #fff; border: 1px solid #E7E1D2; border-radius: 16px; padding: 18px; margin-bottom: 18px;
}
#v2NewsDetail .v2nd-widget-title { font-size: 14px; font-weight: 800; color: #12332A; margin: 0 0 14px; }
#v2NewsDetail .v2nd-search { display: flex; gap: 8px; }
#v2NewsDetail .v2nd-search input {
  flex: 1 1 auto; border: 1px solid #E7E1D2; border-radius: 9999px; padding: 10px 16px; font-size: 13px; outline: none;
}
#v2NewsDetail .v2nd-search input:focus { border-color: #7FB239; box-shadow: 0 0 0 3px rgba(127,178,57,.18); }
#v2NewsDetail .v2nd-search button {
  width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 9999px;
  background: #578021; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

#v2NewsDetail .v2nd-latest-list { display: flex; flex-direction: column; gap: 12px; }
#v2NewsDetail .v2nd-latest-item { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; }
#v2NewsDetail .v2nd-latest-thumb {
  position: relative; flex: 0 0 76px; width: 76px; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: #F1ECDF;
}
#v2NewsDetail .v2nd-latest-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#v2NewsDetail .v2nd-latest-title { font-size: 12.5px; font-weight: 700; color: #12332A; line-height: 1.35; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#v2NewsDetail .v2nd-latest-date { font-size: 11px; font-weight: 600; color: #9AA39C; }
