/* =========================
   ARTICLE DETAIL (show.php)
   Fits between header/footer and matches brand
   ========================= */

/* Shared tokens (align with header/footer) */
.page-wrap.article-page{
  --brand:#800000;                 /* maroon */
  --accent:#ffba08;                /* yellow */
  --text:#1A1A1A;                  /* off-black */
  --surface:#ffffff;               /* card surface (body is #FFFDF7) */
  --border:rgba(128,0,0,.14);      /* subtle maroon-tinted border */
  --shadow:0 6px 24px rgba(0,0,0,.06);

  margin-block: clamp(16px, 3vw, 40px) clamp(28px, 5vw, 64px);
  padding-inline: clamp(12px, 2vw, 20px);
}

/* Layout */
.article-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2.2vw, 18px);
}
@media (min-width: 1000px){
  .article-grid{
    grid-template-columns: 2fr 1fr;  /* content | side */
    align-items: start;
    gap: clamp(18px, 3vw, 24px);
  }
}

/* Main header card */
.hero{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.2vw, 20px);
}

.title{
  margin: 0 0 8px;
  font-family: var(--font-site, "Bitter", Georgia, serif);
  font-weight: 900;
  color: var(--brand);
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Meta row */
.meta{
  color:#667085;
  font-size:.92rem;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}
.meta span + span::before,
.meta span + a::before,
.meta a + span::before{
  content:"•";
  margin: 0 6px;
  color:#9ca3af;
}

/* Category badge (accented) */
.badge{
  background:#fff6d1;
  color:#7a3d00;
  border:1px solid #ffe089;
  padding:3px 10px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:800;
}

/* Issue link inherits color but gets underline on hover */
.issue-link{
  color: inherit;
  text-decoration: none;
}
.issue-link:hover{
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

/* Abstract card */
.abstract{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding: clamp(14px, 2vw, 18px);
  margin-top: 14px;
}
.abstract h2{
  margin:0 0 10px;
  font-size:1rem;
  color:#111827;
  font-family: var(--font-nav, Tahoma, Geneva, Verdana, sans-serif);
  text-transform: uppercase;
  letter-spacing:.04em;
}
.abstract p{
  margin:0;
  color:#334155;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Side column */
.article-side .side-title{
  font-size:1rem;
  margin:0 0 10px;
  font-family: var(--font-nav, Tahoma, Geneva, Verdana, sans-serif);
  text-transform: uppercase;
  letter-spacing:.04em;
  color:#374151;
}

/* Media (attachments) */
.media-grid{
  display:grid;
  gap:16px;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
}

.media-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.media-link{ display:block; }

/* PDF preview pane (A-series aspect ratio) */
.media-preview{
  width:100%;
  aspect-ratio: 1 / 1.414; /* ~A4 */
  display:block;
  border:0;
  background:#fafafa;
}

/* Fallback icon slab */
.doc-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio: 1 / 1.414;
  background:#eff6ff;
  border-bottom:1px solid #e5e7eb;
  font-weight:700;
  font-size:2rem;
  color:#1e3a8a;
}

.media-body{
  padding:12px 14px;
}
.media-title{
  margin:0 0 6px;
  font-size:.95rem;
  word-break: break-word;
}
.media-meta{
  color:#667085;
  font-size:.8rem;
  margin-bottom:10px;
}

/* Primary button (same as browse) */
.btn{
  display:inline-block;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,186,8,.55);
  text-decoration: none;
  color: #4a2a00;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255,186,8,.25);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover{
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn:focus-visible{
  outline: 3px solid rgba(255,186,8,.35);
  outline-offset: 2px;
}


/* Small niceties */
@media (max-width: 560px){
  .title{ font-size: clamp(1.2rem, 4vw, 1.6rem); }
  .media-grid{ grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .btn{ transition: none; }
}
