/* SN Times — category page (snc) and news page (snd) */

/* ---------- Category ---------- */
.snc { padding-top: 24px; }
.snc-title { font-size: 32px; color: var(--sn-red); margin-bottom: 8px; }
.snc-subs { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--sn-line); }
.snc-subs a { font-weight: 600; font-size: 15px; position: relative; padding-left: 12px; }
.snc-subs a::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--sn-red); }
.snc-subs a:hover { color: var(--sn-red); }
.snc-stamp { display: block; color: var(--sn-muted); font-size: 13px; margin-top: 8px; }

.snc-lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.snc-lead .sn-img { border-radius: 10px; aspect-ratio: 16 / 10; }
.snc-lead h2 { font-size: 28px; line-height: 1.35; }
.snc-lead p { color: #555; font-size: 16px; margin: 12px 0 0; line-height: 1.7; }
.snc-lead:hover h2 { color: var(--sn-red); }

.snc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.snc-card { background: #f1f1f1; padding: 8px 8px 14px; border-radius: 4px; transition: background .2s; }
.snc-card:hover { background: #e9e9e9; }
.snc-card .sn-img { border-radius: 8px; aspect-ratio: 16 / 10; }
.snc-card h3 { font-size: 17px; line-height: 1.45; margin: 12px 4px 0; }
.snc-card .snc-stamp { margin-left: 4px; }
.snc-card:hover h3 { color: var(--sn-red); }

.snc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--sn-line); }
.snc-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--sn-line); align-items: start; }
.snc-row h3 { font-size: 18px; line-height: 1.45; }
.snc-row p { color: #555; font-size: 15px; margin: 8px 0 0; line-height: 1.6; }
.snc-row .sn-img { border-radius: 8px; aspect-ratio: 16 / 10; }
.snc-row:hover h3 { color: var(--sn-red); }

.snc-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 26px 0 6px; }
.snc-pager a, .snc-pager span.off { padding: 9px 18px; border-radius: 30px; border: 1px solid var(--sn-line); font-weight: 700; }
.snc-pager a:hover { background: var(--sn-red); border-color: var(--sn-red); color: #fff; }
.snc-pager span.off { color: #bbb; }
.snc-page { color: var(--sn-muted); }
.snc-empty { text-align: center; padding: 60px 0; color: var(--sn-muted); }
.snc-empty i { font-size: 48px; }

/* ---------- News page ---------- */
.snd { padding-top: 18px; }
.snd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.snd-crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sn-muted); margin-bottom: 12px; }
.snd-crumb a:hover { color: var(--sn-red); }
.snd-crumb i.fa-angle-right { font-size: 11px; }
.snd-title { font-size: 34px; line-height: 1.38; margin-bottom: 16px; }
.snd-figure { position: relative; margin: 0 0 14px; border-radius: 6px; overflow: hidden; background: var(--sn-soft); }
.snd-figure img { width: 100%; height: auto; }
.snd-figure figcaption { position: absolute; right: 0; bottom: 0; max-width: 85%; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; padding: 4px 10px; border-top-left-radius: 6px; }

.snd-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 10px 0 14px; border-bottom: 1px solid var(--sn-line); margin-bottom: 18px; }
.snd-author { font-weight: 700; color: var(--sn-ink); margin-bottom: 4px; }
.snd-author i, .snd-time i { color: var(--sn-red); margin-right: 4px; }
.snd-time { color: var(--sn-muted); font-size: 14px; }
.snd-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.snd-share { display: flex; gap: 5px; flex-wrap: wrap; }
.snd-share a, .snd-share button {
  width: 30px; height: 30px; border-radius: 6px; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; border: 0; cursor: pointer; transition: transform .15s, opacity .15s;
}
.snd-share button { background: #374151; }
.snd-share a:hover, .snd-share button:hover { transform: translateY(-2px); opacity: .9; }
.snd-font { display: flex; gap: 5px; }
.snd-font button, .snd-font a {
  min-width: 34px; height: 30px; border-radius: 50%; border: 1px solid var(--sn-line); background: #fff; cursor: pointer;
  font-family: var(--sn-body); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; color: var(--sn-ink);
}
.snd-font button:hover, .snd-font a:hover { border-color: var(--sn-red); color: var(--sn-red); }

.snd-video { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 8px 14px; border-radius: 8px; background: #fdecee; color: var(--sn-red); font-weight: 700; }
.snd-body { font-size: 18px; line-height: 1.9; color: #222; word-wrap: break-word; }
.snd-body p { margin: 0 0 18px; }
.snd-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 10px auto; }
.snd-body iframe { max-width: 100%; }
.snd-body a { color: var(--sn-red); text-decoration: underline; }
.snd-body .post-reporter { font-size: .9em; color: var(--sn-ink); }
.snd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.snd-tags a { background: var(--sn-soft); padding: 4px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.snd-tags a:hover { background: var(--sn-red); color: #fff; }

.snd-h { font-size: 20px; margin: 10px 0 12px; }
.snd-h i { color: #1877f2; margin-right: 6px; }
.snd-comments { margin: 22px 0; padding: 16px; border: 1px solid var(--sn-line); border-radius: 10px; }
.snd-related { margin-top: 10px; }
.snd-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.snd-side { position: sticky; top: 60px; }
.snd-side-box { border: 1px solid var(--sn-line); border-radius: 6px; padding: 0 14px 6px; }
.snd-side-h { font-size: 18px; text-align: center; padding: 12px 0 10px; border-bottom: 2px solid var(--sn-red); margin-bottom: 4px; position: relative; }
.snd-side-item { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--sn-line); align-items: center; }
.snd-side-item .sn-img { aspect-ratio: 4 / 3; border-radius: 4px; }
.snd-side-item span { font-size: 14.5px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.snd-side-item:hover span { color: var(--sn-red); }
.snd-side-more { display: block; text-align: center; padding: 10px 0; font-weight: 700; color: var(--sn-red); font-size: 14px; }

@media (max-width: 1024px) {
  .snd-grid { grid-template-columns: minmax(0, 1fr); }
  .snd-side { position: static; }
  .snc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .snc-title { font-size: 26px; }
  .snc-lead { grid-template-columns: minmax(0, 1fr); }
  .snc-lead h2 { font-size: 22px; }
  .snc-list { grid-template-columns: minmax(0, 1fr); }
  .snc-row { grid-template-columns: minmax(0, 1fr) 120px; }
  .snc-row p { display: none; }
  .snd-title { font-size: 25px; }
  .snd-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snd-body { font-size: 17px; }
}
@media (max-width: 480px) {
  .snc-grid { grid-template-columns: minmax(0, 1fr); }
  .snd-rel-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Admin tools on the news page (only for logged-in admins) */
.snd-admin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 14px; border: 1px dashed #f3b4bd; border-radius: 8px; background: #fff7f8; }
.snd-admin > span { font-size: 13px; font-weight: 700; color: var(--sn-muted); margin-right: auto; }
.snd-admin > span i { color: var(--sn-red); }
.snd-admin a, .snd-admin button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; font-family: var(--sn-body); font-size: 14px; font-weight: 700; cursor: pointer; border: 0; }
.snd-admin-edit { background: #16a34a; color: #fff !important; }
.snd-admin-edit:hover { background: #15803d; }
.snd-admin-del { background: #fff; color: #dc2626; border: 1px solid #fecaca !important; }
.snd-admin-del:hover { background: #fee2e2; }

/* Text size buttons: everything inside the news body follows --snd-fs */
.snd-body { font-size: var(--snd-fs, 18px) !important; line-height: 1.9 !important; }
.snd-body p, .snd-body span, .snd-body div, .snd-body li, .snd-body font, .snd-body td, .snd-body blockquote, .snd-body a, .snd-body strong, .snd-body b, .snd-body em {
  font-size: inherit !important; line-height: inherit !important; font-family: inherit !important;
}
.snd-body h2, .snd-body h3, .snd-body h4 { font-size: 1.15em !important; line-height: 1.5 !important; margin: 18px 0 10px; }
.snd-font button.snd-card-btn { border-radius: 20px; padding: 0 12px; gap: 6px; background: #c8102e; color: #fff; border-color: #c8102e; }
.snd-font button.snd-card-btn:hover { background: #9e0b23; color: #fff; }

/* Photo card popup */
.snd-cardm { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.6); padding: 16px; }
.snd-cardm.show { display: flex; }
.snd-cardm-box { position: relative; background: #fff; border-radius: 14px; padding: 18px; width: min(520px, 100%); max-height: 96vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.snd-cardm-box h3 { font-size: 20px; margin: 0 0 12px; }
.snd-cardm-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f3f4f6; font-size: 24px; cursor: pointer; line-height: 1; }
.snd-cardm-prev { aspect-ratio: 1 / 1; background: #f3f4f6; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.snd-cardm-prev img { width: 100%; height: 100%; object-fit: contain; }
.snd-cardm-wait { color: #6b7280; }
.snd-cardm-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.snd-cardm-act a, .snd-cardm-act button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 8px; font-weight: 700; font-family: var(--sn-body); font-size: 16px; cursor: pointer; border: 0; }
.snd-cardm-dl { background: #c8102e; color: #fff !important; }
.snd-cardm-share { background: #1877f2; color: #fff; }

/* News photo: full width, real shape; caption below (only when present) */
.snd-figure { background: transparent; border-radius: 0; overflow: visible; }
.snd-figure img { width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 6px; display: block; }
.snd-figure figcaption { position: static; max-width: none; background: transparent; color: var(--sn-muted); font-size: 14px; padding: 8px 2px 0; border-radius: 0; border-bottom: 1px solid var(--sn-line); padding-bottom: 8px; }
.snd-figure figcaption i { color: var(--sn-red); margin-right: 5px; }
