/* =========================================================
   RSUD BULUKUMBA — Portal Berita & Informasi
   Identity: "Garis Vital" (the vital line) — a heartbeat/ECG
   motif used as the one signature device throughout: divider,
   watermark, rank markers. Everything else stays quiet.

   Token system
   Ink      #1B2420   Paper   #F3F5F1
   Deep     #0F3B44   Deep-2  #0A2830
   Pulse    #D6483F   Sage    #6E9C82   Sand   #C7A76C
   Gray     #5B655F   Line    #DDE3DE

   Display  'Fraunces'      — editorial serif, used with restraint
   Body     'IBM Plex Sans' — clean clinical-humanist sans
   Utility  'IBM Plex Mono' — readouts, timestamps, rank chips
   ========================================================= */

:root {
  --ink: #1B2420;
  --paper: #F3F5F1;
  --deep: #0F3B44;
  --deep-2: #0A2830;
  --pulse: #D6483F;
  --sage: #6E9C82;
  --sand: #C7A76C;
  --gray: #5B655F;
  --line: #DDE3DE;

  --wave-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='16' viewBox='0 0 60 16'%3E%3Cpath d='M0 8 H20 L24 2 L28 14 L32 2 L36 14 L40 8 H60' fill='none' stroke='%230F3B44' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.4'/%3E%3C/svg%3E");
  --wave-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='16' viewBox='0 0 60 16'%3E%3Cpath d='M0 8 H20 L24 2 L28 14 L32 2 L36 14 L40 8 H60' fill='none' stroke='%23F3F5F1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.3'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(15,59,68,.045) 0%, transparent 40%),
    radial-gradient(circle at 100% 12%, rgba(199,167,108,.06) 0%, transparent 38%),
    var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

.container { max-width: 1240px; }

::selection { background: var(--pulse); color: #fff; }

a, .news-card, .btn, .headline-row, .popular-item, .vital-line path {
  transition: color .2s ease, background-color .2s ease, box-shadow .25s ease, transform .25s ease, border-color .2s ease;
}

a:focus-visible, button:focus-visible, input:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--pulse);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  a, .news-card, .btn, .headline-row, .popular-item { transition: none; }
}

h1, h2, h3, h4, .font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  color: var(--deep);
  letter-spacing: -0.01em;
}

a { text-decoration: none; }

.mono, .eyebrow-mono {
  font-family: 'IBM Plex Mono', monospace;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- Top info bar ---------- */
.topbar {
  background: var(--deep-2);
  color: rgba(243,245,241,.82);
  font-size: .78rem;
  font-family: 'IBM Plex Mono', monospace;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a { color: rgba(243,245,241,.82); }
.topbar a:hover { color: var(--sand); }
.topbar .topbar-item { display: inline-flex; align-items: center; gap: 7px; margin-right: 20px; }
.topbar .topbar-item svg { flex: none; opacity: .8; }

.pulse-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(214,72,63,.16);
  border: 1px solid rgba(214,72,63,.4);
  color: #F3C4C0;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 0 0 rgba(214,72,63,.6);
  animation: pulse-beat 2.2s ease-out infinite;
  flex: none;
}
@keyframes pulse-beat {
  0%   { box-shadow: 0 0 0 0 rgba(214,72,63,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(214,72,63,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,72,63,0); }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

/* ---------- Masthead ---------- */
.masthead {
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  padding: 30px 0 0;
  text-align: center;
}
.masthead .date-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
.masthead .brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.masthead .brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(15,59,68,.2), 0 0 0 1px var(--line);
}
.masthead .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.masthead .brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: 2.5rem;
  color: var(--deep);
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-align: left;
}
.masthead .brand span { color: var(--pulse); font-style: italic; font-weight: 500; }
.masthead .tagline {
  font-size: .86rem;
  color: var(--gray);
  margin-top: 8px;
  font-style: italic;
}

/* ---------- Vital divider (signature device) ---------- */
.vital-divider {
  width: 100%;
  height: 22px;
  margin: 18px 0 0;
  overflow: hidden;
  line-height: 0;
}
.vital-divider.dark { background: transparent; }
.vital-line {
  width: 100%;
  height: 22px;
  display: block;
}
.vital-line path {
  fill: none;
  stroke: var(--pulse);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-line 1.4s ease-out forwards .15s;
}
.vital-divider.dark .vital-line path { stroke: var(--sand); opacity: .8; }
@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vital-line path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Ticker ---------- */
.ticker {
  background: var(--deep);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  margin-top: 14px;
}
.ticker .ticker-label {
  background: var(--pulse);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: .7rem;
  letter-spacing: .1em;
  padding: 8px 16px;
  display: inline-block;
  text-transform: uppercase;
  vertical-align: middle;
}
.ticker-track {
  display: inline-flex;
  gap: 3rem;
  padding-left: 1.5rem;
  animation: scroll-left 34s linear infinite;
  vertical-align: middle;
}
.ticker-track a { color: var(--paper); font-size: .86rem; opacity: .9; }
.ticker-track a:hover { color: var(--sand); }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; }
}

/* ---------- Navbar ---------- */
.navbar-rsud {
  background: var(--deep);
  box-shadow: 0 6px 18px rgba(10,40,48,.16);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .25s ease, background-color .25s ease;
}
.navbar-rsud.is-scrolled {
  background: var(--deep-2);
  box-shadow: 0 10px 26px rgba(10,40,48,.28);
}

/* ---------- Reveal-on-scroll (progressive, JS-enhanced) ---------- */
.reveal-on-scroll { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
}
.navbar-rsud .nav-link {
  color: rgba(243,245,241,.82) !important;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 15px 16px !important;
  transition: color .15s ease;
  position: relative;
}
.navbar-rsud .nav-link::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 9px;
  height: 2px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.navbar-rsud .nav-link:hover::after,
.navbar-rsud .nav-link.active::after { transform: scaleX(1); }
.navbar-rsud .nav-link:hover,
.navbar-rsud .nav-link.active {
  color: #fff !important;
}
.navbar-rsud .form-control {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: .86rem;
}
.navbar-rsud .form-control::placeholder { color: rgba(255,255,255,.5); }
.navbar-rsud .form-control:focus {
  background: rgba(255,255,255,.13);
  border-color: var(--sand);
  box-shadow: none;
  color: #fff;
}
.navbar-rsud .navbar-toggler {
  border-color: rgba(255,255,255,.3);
  padding: 6px 10px;
}
.navbar-rsud .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(199,167,108,.35); }
@media (max-width: 991.98px) {
  .navbar-rsud .navbar-collapse {
    background: var(--deep-2);
    margin: 12px -12px -1px;
    padding: 8px 12px 16px;
    border-radius: 0 0 10px 10px;
  }
  .navbar-rsud .nav-link { padding: 12px 8px !important; }
  .navbar-rsud .nav-link::after { left: 8px; right: 8px; }
  .navbar-rsud form.d-flex { margin-top: 10px; }
}

/* ---------- Category stamp ---------- */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pulse);
  border: 1px solid rgba(214,72,63,.4);
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(214,72,63,.06);
}
.stamp::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  flex: none;
}
.stamp.navy { color: var(--deep); border-color: rgba(15,59,68,.35); background: rgba(15,59,68,.06); }
.stamp.gold { color: #8a6d1a; border-color: rgba(201,167,108,.5); background: rgba(201,167,108,.1); }

/* ---------- Eyebrow section label ---------- */
.eyebrow-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.eyebrow-row .eyebrow-tick { width: 22px; height: 3px; background: var(--pulse); border-radius: 2px; flex: none; }
.eyebrow-row .eyebrow { color: var(--deep); font-size: .8rem; }

/* ---------- Hero slider (carousel) ---------- */
.hero-slider {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 440px;
  isolation: isolate;
  box-shadow: 0 24px 60px rgba(10,40,48,.24), 0 2px 0 rgba(255,255,255,.5) inset;
  background-color: var(--deep);
  border: 1px solid rgba(255,255,255,.5);
}
.hero-slider--wide { min-height: 480px; }
.hero-slider .slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 1;
  transition: opacity .9s ease;
}
.hero-slider .slide.is-active { opacity: 1; z-index: 2; animation: kenburns var(--autoplay-ms, 5500ms) ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.055); } }
@media (prefers-reduced-motion: reduce) {
  .hero-slider .slide.is-active { animation: none; }
}
.hero-slider .slide h1 a { transition: opacity .2s ease; }
.hero-slider .slide h1 a:hover { opacity: .85; }
.hero-slider .slide::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(6,28,33,.97) 4%, rgba(8,34,40,.72) 42%, rgba(10,40,48,.18) 78%, rgba(10,40,48,.08) 100%);
  z-index: 1;
}
.hero-slider .slide::after {
  content: "";
  position: absolute;
  right: -10px; bottom: -6px;
  width: 260px; height: 90px;
  background-image: var(--wave-dark);
  background-repeat: repeat-x;
  background-size: 90px 24px;
  opacity: .5;
  z-index: 1;
  pointer-events: none;
}
.hero-slider .hero-body {
  position: relative; z-index: 2;
  padding: 40px 38px 34px;
  color: #fff;
  max-width: 640px;
  background: linear-gradient(180deg, rgba(10,40,48,0) 0%, rgba(8,28,33,.4) 55%, rgba(6,22,26,.62) 100%);
  backdrop-filter: blur(2px);
}
.hero-slider--wide .hero-body { max-width: 760px; }
.hero-slider h1 {
  color: #fff;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem);
  line-height: 1.16;
  margin: 14px 0 10px;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
.hero-slider .meta { color: rgba(255,255,255,.72); font-size: .8rem; font-family: 'IBM Plex Mono', monospace; }
.hero-slider p.lead-text { color: rgba(255,255,255,.88); font-size: 1rem; margin-bottom: 0; text-shadow: 0 1px 10px rgba(0,0,0,.3); }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(10,40,48,.45);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(2px);
}
.slider-arrow:hover { background: var(--pulse); border-color: var(--pulse); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.slider-dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: none; padding: 0; cursor: pointer;
  transition: all .25s ease;
}
.slider-dots .dot.is-active { width: 24px; border-radius: 5px; background: var(--pulse); }

/* ---------- Side headline list (thumbnail) ---------- */
.headline-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.headline-row:first-child { padding-top: 0; }
.headline-thumb {
  flex: none;
  width: 92px; height: 68px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: var(--deep);
}
.headline-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.headline-row:hover .headline-thumb img { transform: scale(1.08); }
.headline-row h3 {
  font-size: .98rem;
  line-height: 1.32;
  margin-bottom: 4px;
  font-weight: 600;
}
.headline-row a.title-link { color: var(--ink); }
.headline-row a.title-link:hover { color: var(--pulse); }

/* ---------- Article Card ---------- */
.news-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  position: relative;
  transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}
.news-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--deep);
  transition: background .25s ease;
  z-index: 2;
}
.news-card:hover::before { background: var(--pulse); }
.news-card:hover { box-shadow: 0 22px 46px rgba(15,59,68,.18); transform: translateY(-6px); border-color: transparent; }
.news-card .thumb img { transition: transform .45s ease; }
.news-card:hover .thumb img { transform: scale(1.06); }
.news-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--deep); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .card-body h3 { font-size: 1.06rem; line-height: 1.32; margin: 10px 0 8px; font-weight: 600; }
.news-card .card-body a.title-link { color: var(--ink); }
.news-card .card-body a.title-link:hover { color: var(--pulse); }
.news-card .excerpt { color: var(--gray); font-size: .88rem; line-height: 1.55; }
.news-card .meta { color: var(--gray); font-size: .74rem; font-family: 'IBM Plex Mono', monospace; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }

.section-title {
  display: flex; align-items: center; gap: 16px;
  margin: 52px 0 26px;
}
.section-title h2 { font-size: 1.55rem; margin: 0; white-space: nowrap; font-weight: 600; }
.section-title .rule {
  height: 16px; flex: 1;
  background-image: var(--wave-light);
  background-repeat: repeat-x;
  background-position: left center;
  opacity: .9;
}

/* ---------- Sidebar ---------- */
.widget { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 24px; transition: box-shadow .3s ease, transform .3s ease; }
.widget:hover { box-shadow: 0 16px 36px rgba(15,59,68,.1); transform: translateY(-2px); }
.widget-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--deep);
  padding-bottom: 12px;
  margin-bottom: 16px;
  background-image: var(--wave-light);
  background-repeat: repeat-x;
  background-position: left bottom;
  background-size: 60px 16px;
}
.popular-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.popular-item:last-child { border-bottom: none; }
.popular-item .rank {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600; font-size: .76rem;
  color: #fff;
  background: var(--pulse);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  margin-top: 2px;
}
.cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--ink); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; font-weight: 500;
}
.cat-list a:hover { color: var(--pulse); }
.cat-list a span.count {
  color: var(--deep);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .74rem;
  background: rgba(15,59,68,.08);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ---------- Article Detail ---------- */
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 20px 50px rgba(15,59,68,.08);
}
.article-head { margin-bottom: 4px; }
.article-detail h1 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.15rem); line-height: 1.22; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--gray);
  font-family: 'IBM Plex Mono', monospace;
}
.article-meta-item svg { flex: none; color: var(--pulse); opacity: .85; }
.article-detail .cover {
  width: 100%;
  border-radius: 12px;
  margin: 22px 0 6px;
  max-height: 480px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(15,59,68,.14);
}
.article-detail .content { font-size: 1.08rem; line-height: 1.85; color: #262626; overflow-wrap: break-word; margin-top: 22px; }
.article-detail .content p { margin-bottom: 1.2em; }
.article-detail .content > p:first-of-type:first-letter {
  font-family: 'Fraunces', serif;
  font-size: 3.5rem;
  font-weight: 700;
  float: left;
  line-height: .8;
  padding: 6px 10px 0 0;
  color: var(--pulse);
}
/* Every embedded image/table/iframe gets a consistent, tidy frame,
   regardless of the original file's own dimensions or content.
   !important guards against inline width/height styles the rich-text
   editor may carry over from pasted content. */
.article-detail .content img {
  display: block !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 560px;
  margin: 1.6em auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15,59,68,.14);
  object-fit: contain;
  background: #fff;
  clear: both;
}
.article-detail .content table {
  display: block;
  max-width: 100% !important;
  width: auto !important;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .94rem;
  -webkit-overflow-scrolling: touch;
}
.article-detail .content table th,
.article-detail .content table td {
  border: 1px solid var(--line);
  padding: 8px 12px;
}
.article-detail .content table th { background: rgba(15,59,68,.06); }
.article-detail .content iframe,
.article-detail .content video { max-width: 100%; border-radius: 10px; }
.article-detail .content h1,
.article-detail .content h2,
.article-detail .content h3 { clear: both; margin-top: 1.4em; }
.article-detail .content blockquote {
  clear: both;
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--pulse);
  background: rgba(15,59,68,.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--gray);
}

/* ---------- Share buttons ---------- */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.share-btn:hover { transform: translateY(-2px); opacity: .92; }
.share-btn--whatsapp { background: #25D366; box-shadow: 0 8px 18px rgba(37,211,102,.3); }
.share-btn--facebook { background: #1877F2; box-shadow: 0 8px 18px rgba(24,119,242,.3); }
.share-btn--x { background: var(--ink); box-shadow: 0 8px 18px rgba(27,36,32,.25); }

/* ---------- Related articles (sidebar) ---------- */
.related-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  align-items: flex-start;
  color: inherit;
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-thumb {
  flex: none;
  width: 68px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--deep);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.related-item:hover .related-thumb img { transform: scale(1.08); }
.related-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.related-title {
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-item:hover .related-title { color: var(--pulse); }
.related-date { font-size: .72rem; color: var(--gray); font-family: 'IBM Plex Mono', monospace; }

/* ---------- Footer ---------- */
.footer-rsud { background: var(--deep-2); color: rgba(243,245,241,.72); margin-top: 64px; }
.footer-rsud h5 { color: #fff; font-family: 'Fraunces', serif; font-weight: 600; }
.footer-rsud a { color: rgba(243,245,241,.62); transition: color .15s ease, padding-left .15s ease; }
.footer-rsud a:hover { color: var(--sand); padding-left: 3px; }
.footer-rsud .brand-mini { display: flex; align-items: center; gap: 10px; }
.footer-rsud .brand-mini .mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  padding: 3px;
}
.footer-rsud .brand-mini .mark img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 50%;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .76rem;
  padding: 16px 0;
  text-align: center;
  color: rgba(243,245,241,.45);
}

.btn-navy { background: var(--deep); color: #fff; border: none; }
.btn-navy:hover { background: var(--deep-2); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,59,68,.25); }
.btn-navy:focus-visible { outline: 2px solid var(--pulse); outline-offset: 3px; }

.form-control:focus, .form-select:focus {
  border-color: var(--deep);
  box-shadow: 0 0 0 .2rem rgba(15,59,68,.12);
}

.alert { border-radius: 10px; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray); }

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--deep); border-color: var(--line); font-family: 'IBM Plex Mono', monospace; font-size: .86rem; }
.pagination .page-item.active .page-link { background: var(--deep); border-color: var(--deep); }
.pagination .page-link:hover { color: var(--pulse); }

/* ---------- Responsive: tablet ---------- */
@media (min-width: 768px) and (max-width: 991.98px) {
  .masthead .brand { font-size: 2.1rem; }
  .hero-slider { min-height: 380px; }
  .hero-slider h1 { font-size: 1.85rem; }
  .section-title h2 { font-size: 1.4rem; }
  .article-card { padding: 26px; }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 767px) {
  .topbar .container { justify-content: center; text-align: center; }
  .topbar .topbar-item { margin-right: 12px; }
  .masthead { padding-top: 22px; }
  .masthead .brand { font-size: 1.7rem; }
  .masthead .brand-mark { width: 44px; height: 44px; }
  .hero-slider { min-height: 300px; border-radius: 10px; }
  .hero-slider h1 { font-size: 1.5rem; }
  .hero-slider .hero-body { padding: 22px; max-width: 100%; }
  .slider-arrow { width: 34px; height: 34px; font-size: 1.1rem; }
  .slider-arrow.prev { left: 10px; }
  .slider-arrow.next { right: 10px; }
  .headline-thumb { width: 76px; height: 56px; }
  .section-title { margin: 38px 0 20px; gap: 10px; }
  .section-title h2 { font-size: 1.3rem; }
  .article-card { padding: 20px; border-radius: 14px; }
  .article-meta { gap: 6px 14px; }
  .share-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Responsive: small phones ---------- */
@media (max-width: 420px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .masthead .brand { font-size: 1.4rem; }
  .masthead .brand-mark { width: 38px; height: 38px; }
  .masthead .tagline { font-size: .78rem; }
  .hero-slider, .hero-slider--wide { min-height: 260px; }
  .hero-slider .hero-body { padding: 16px; }
  .hero-slider h1 { font-size: 1.25rem; }
  .headline-row { gap: 10px; }
  .headline-thumb { width: 64px; height: 48px; }
  .headline-row h3 { font-size: .88rem; }
  .widget { padding: 16px; }
  .news-card .card-body h3 { font-size: .98rem; }
  .topbar .topbar-item { font-size: .72rem; margin-right: 8px; }
  .article-detail .content img { max-height: 320px; }
  .article-card { padding: 16px; }
  .article-meta-item { font-size: .76rem; }
  .share-btn { padding: 7px 13px; font-size: .8rem; }
}

/* ---------- Ensure images/embeds never overflow on any breakpoint ---------- */
.headline-thumb img,
.news-card .thumb img,
.related-thumb img,
.article-detail .cover,
.article-detail .content img {
  display: block;
}
table { max-width: 100%; }