/* ==========================================================
   NEWS pages (/news and /news/{slug}). Loaded only on those
   pages by templates/layout/default.php. Uses the site tokens
   from style.css (--gold etc.) with fallbacks.
   ========================================================== */
.news-page .section-header { margin-bottom: 2rem; }

/* ---------- List ---------- */
.news-list {
  display: grid;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.news-item {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #eadfcd;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* Whole box clickable: the title link's ::after covers the box.
   One real link per item, so keyboard and screen-reader users get
   a single clear target. */
.news-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
.news-item:hover {
  border-color: var(--gold, #c8992a);
  background: #fffdf8;
}
.news-item:hover .news-title a { color: var(--gold, #c8992a); }
.news-item:hover .news-link { text-decoration: underline; }
.news-item:focus-within {
  outline: 2px solid var(--gold, #c8992a);
  outline-offset: 2px;
}
.news-title a:focus-visible { outline: none; }

.news-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: start;
  padding: 0.6rem 0.4rem;
  border-radius: 10px;
  background: #fbf4e8;
  border: 1px solid #efdfc2;
  text-align: center;
  line-height: 1.1;
}
.news-date-day {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold, #c8992a);
}
.news-date-month {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #6b5a48;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: #6b5a48;
}
.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.news-tag--pdf { background: #fde8e0; color: #9a3412; }
.news-tag--article { background: #f3ecdf; color: #6b4a1f; }
.news-source { font-style: italic; }
.news-issue-no { color: #6b5a48; }

.news-title {
  margin: 0.45rem 0 0.4rem;
  font-family: 'Playfair Display', 'Noto Sans Devanagari', serif;
  font-size: 1.3rem;
  line-height: 1.35;
}
.news-title a { color: inherit; text-decoration: none; }

.news-summary {
  margin: 0 0 0.6rem;
  color: #4a3f35;
  line-height: 1.7;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #b4532a;
  text-decoration: none;
}

.news-empty { text-align: center; padding: 2rem 0; }
.news-empty p { margin-bottom: 1rem; }

/* Pagination (CakePHP PaginatorHelper outputs <li> items) */
.news-pagination { margin-top: 2rem; }
.news-pagination ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.news-pagination li a {
  display: block;
  min-width: 2.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #eadfcd;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.news-pagination li.active a { background: var(--gold, #c8992a); border-color: var(--gold, #c8992a); color: #fff; }
.news-pagination li.disabled a { opacity: 0.45; pointer-events: none; }

/* ---------- Single item ---------- */
.news-article { max-width: 860px; }
.news-article--issue { max-width: 1000px; }

.news-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #6b5a48;
  text-decoration: none;
}
.news-back:hover, .news-back:focus-visible { text-decoration: underline; }

.news-article-head { margin-bottom: 1.25rem; }
.news-article-title {
  margin: 0.5rem 0 0.75rem;
  font-family: 'Playfair Display', 'Noto Sans Devanagari', serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.3;
}
.news-article-lead { font-size: 1.05rem; line-height: 1.75; color: #4a3f35; }

.news-pdf-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.news-pdf-size { font-weight: 400; opacity: 0.8; }

/* Page jump chips */
.ep-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eadfcd;
  font-size: 0.85rem;
  color: #6b5a48;
}
.ep-jump a {
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #eadfcd;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.ep-jump a:hover, .ep-jump a:focus-visible { background: #fbf4e8; border-color: var(--gold, #c8992a); }

/* E-paper pages */
.ep-pages { display: grid; gap: 1.5rem; }
.ep-page { margin: 0; scroll-margin-top: 5rem; }
.ep-page a { display: block; }
.ep-page img {
  display: block;
  width: 100%;
  height: auto;
  background: #f6f1e8;
  border: 1px solid #e2d5bf;
  border-radius: 4px;
}
.ep-page figcaption { margin-top: 0.4rem; text-align: center; font-size: 0.8rem; color: #6b5a48; }

.ep-issue-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.ep-issue-link {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid #eadfcd;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}
.ep-issue-link span { display: block; font-size: 0.8rem; color: #b4532a; margin-bottom: 0.2rem; }
.ep-issue-link strong { font-weight: 500; }
.ep-issue-link--newer { text-align: right; }
.ep-issue-link:hover, .ep-issue-link:focus-visible { background: #fbf4e8; }

/* PDF fallback when no page images exist */
.news-pdf-frame { border: 1px solid #eadfcd; border-radius: 12px; overflow: hidden; background: #f6f1e8; }
.news-pdf-frame object { display: block; width: 100%; height: 80vh; min-height: 560px; }
.news-pdf-frame p { padding: 1.5rem; }
.news-pdf-mobile-note { display: none; }

.news-article-body p { line-height: 1.85; margin-bottom: 1.1rem; }
.news-article-body h2,
.news-article-body h3 {
  margin: 1.75rem 0 0.75rem;
  font-family: 'Playfair Display', 'Noto Sans Devanagari', serif;
  line-height: 1.3;
}
.news-article-body h2 { font-size: 1.45rem; }
.news-article-body h3 { font-size: 1.2rem; }
.news-article-body ul,
.news-article-body ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.news-article-body li { line-height: 1.75; margin-bottom: 0.4rem; }
.news-article-body ul li::marker { color: var(--gold, #c8992a); }
.news-article-body a { color: #b4532a; text-decoration: underline; }

.news-article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eadfcd;
}

/* Outline buttons on these light pages: dark text and border.
   The site's .btn-outline is white-on-dark, so these pages use .btn-dark-outline. */
.news-page .btn-dark-outline {
  color: #3a2a1c;
  background: #fff;
  border: 1.5px solid #c9b79c;
}
.news-page .btn-dark-outline:hover,
.news-page .btn-dark-outline:focus-visible {
  color: #fff;
  background: #3a2a1c;
  border-color: #3a2a1c;
}

/* ---------- Phones ---------- */
@media (min-width: 769px) {
  .ep-zoom-hint { display: none; }
}
@media (max-width: 768px) {
  /* One full-width column: the date becomes a small chip on top, so the
     title and summary use the whole card width instead of a narrow strip. */
  .news-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    padding: 1rem 1.1rem;
  }
  .news-date {
    flex-direction: row;
    align-items: baseline;
    justify-self: start;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
  }
  .news-date-day { font-size: 1rem; }
  .news-date-month { margin-top: 0; font-size: 0.78rem; }
  .news-title { margin-top: 0.35rem; font-size: 1.12rem; }

  /* Summary: smaller text, cut to 3 lines; the full text is on the news page. */
  .news-summary {
    font-size: 0.92rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ep-pages { gap: 1rem; }
  .ep-page img { border-radius: 0; }

  .news-pdf-frame { display: none; }
  .news-pdf-mobile-note { display: block; font-size: 0.9rem; color: #6b5a48; }
}