/*
FILE SOURCE:
static/css/pages/content_list_page.css

PURPOSE:
- Shared modern list-page design for:
  announcement_list.html
  cs_list.html
  news_list.html
  policy_list.html
- Uses skeleton_base.css variables.
- Article cards use a 5:3 top media image.
*/

.common_list_box {
  width: min(calc(100% - 2rem), var(--page-wide-width));
  margin: clamp(1rem, 3vw, 2rem) auto clamp(2.2rem, 4vw, 4rem);
  padding: 0;
  color: var(--color-text);
}

.common-list-hero {
  margin-bottom: clamp(1rem, 2.5vw, 1.8rem);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border: 1px solid rgba(185, 130, 47, 0.24);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(43, 33, 24, 0.94), rgba(58, 43, 32, 0.9)),
    radial-gradient(circle at top right, rgba(185, 130, 47, 0.32), transparent 28rem);
  color: #fffaf0;
  box-shadow: 0 1rem 2.5rem rgba(43, 33, 24, 0.14);
  overflow: hidden;
}

.common-list-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255, 250, 240, 0.72);
  font-size: 0.88rem;
}

.common-list-breadcrumb a {
  color: rgba(255, 250, 240, 0.92);
  border-bottom: 1px solid rgba(255, 250, 240, 0.35);
  text-decoration: none;
}

.common-list-breadcrumb a:hover {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

.common-list-kicker {
  margin: 0 0 0.55rem;
  color: #f2c980;
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.common_list_box h1 {
  max-width: 54rem;
  margin: 0;
  color: #fffaf0;
  font-size: clamp(1.9rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.common-list-intro {
  max-width: 43rem;
  margin: clamp(0.8rem, 2vw, 1.1rem) 0 0;
  color: rgba(255, 250, 240, 0.82);
  font-size: clamp(0.96rem, 1.45vw, 1.12rem);
  line-height: 1.65;
}

.article_grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.95rem, 2vw, 1.35rem);
}

.article_contain {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;

  border: 1px solid rgba(232, 222, 208, 0.95);
  border-radius: 1.15rem;
  background: var(--color-card);
  box-shadow: 0 0.45rem 1.25rem rgba(43, 33, 24, 0.08);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.article_contain:hover {
  transform: translateY(-0.18rem);
  border-color: rgba(185, 130, 47, 0.42);
  box-shadow: 0 0.8rem 1.8rem rgba(43, 33, 24, 0.13);
}

/* ==========================================================
   ARTICLE PHOTO
   PURPOSE:
   - 5:3 top media area for modern article cards.
   - Uploaded article images stay fully visible with contain.
   - footer_logo_vi.svg / footer_logo_en.svg fallback stays fully visible with contain.
   ========================================================== */

.article_photo {
  width: 100%;
  min-width: 0;
  aspect-ratio: 5 / 3;
  overflow: hidden;

  border-bottom: 1px solid rgba(232, 222, 208, 0.95);
  background:
    radial-gradient(circle at center, rgba(185, 130, 47, 0.14), transparent 58%),
    linear-gradient(135deg, var(--color-bg), var(--color-bg-soft));
}

.article-photo-link,
.article_photo a {
  width: 100%;
  height: 100%;
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-main-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: rgba(250, 247, 241, 0.96);
}

.article-fallback-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 6vw, 2.2rem);

  background:
    radial-gradient(circle at center, rgba(185, 130, 47, 0.18), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 241, 0.9));
}

.article-fallback-img {
  width: 78%;
  height: 70%;
  max-width: 360px;
  max-height: 150px;
  display: block;
  object-fit: contain;
  object-position: center;
  opacity: 0.94;
  filter: drop-shadow(0 10px 18px rgba(43, 33, 24, 0.12));
}

.article_content {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: clamp(0.78rem, 1.45vw, 0.95rem);
}

.article_title {
  margin: 0;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(185, 130, 47, 0.25);
  font-weight: 700;
  line-height: 1.32;
}

.article_title a {
  display: -webkit-box;
  color: var(--color-primary);
  font-size: clamp(1.02rem, 1.45vw, 1.18rem);
  line-height: 1.32;
  text-decoration: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.article_title a:hover {
  color: var(--color-accent-dark);
}

.article_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0.55rem 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.article_meta_dot {
  opacity: 0.65;
}

.article_desc {
  display: -webkit-box;
  margin: 0;
  color: var(--color-muted);
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  line-height: 1.56;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.article-empty {
  padding: 2rem;
  border: 1px dashed var(--color-border);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--color-muted);
  text-align: center;
}

@media (min-width: 720px) {
  .article_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .article_grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .article_grid {
    gap: 1.1rem;
  }
}

@media (max-width: 640px) {
  .common_list_box {
    width: min(calc(100% - 1.5rem), var(--page-wide-width));
    margin-top: 0.9rem;
  }

  .common-list-hero {
    padding: 1rem;
    border-radius: 1.1rem;
  }

  .article_grid {
    gap: 0.78rem;
  }

  .article_contain {
    border-radius: 0.95rem;
  }

  .article_content {
    padding: 0.82rem;
  }

  .article_title a {
    font-size: 0.98rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .article_meta {
    margin: 0.44rem 0;
    font-size: 0.76rem;
  }

  .article_desc {
    font-size: 0.86rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .article-fallback-img {
    width: 82%;
    height: 72%;
    max-height: 115px;
  }
}

@media (max-width: 359px) {
  .common_list_box {
    width: min(calc(100% - 1rem), var(--page-wide-width));
  }

  .article_content {
    padding: 0.72rem;
  }

  .article_title a {
    font-size: 0.94rem;
  }

  .article_meta {
    font-size: 0.72rem;
  }

  .article_desc {
    font-size: 0.82rem;
  }
}
