/* ══════════════════════════════════════════════════════
   emvoes.org — Design v2 Enhancements
   Design Critique + UX Copy + Design System improvements
   ══════════════════════════════════════════════════════ */

/* ── Nav link hover states ──────────────────────────── */
.main-nav a,
.skeleton-nav a {
  transition: color 180ms ease !important;
}
.main-nav a:hover,
.skeleton-nav a:hover {
  color: var(--accent-deep) !important;
}
/* Active / current page indicator */
.main-nav a[aria-current="page"] {
  color: var(--ink) !important;
  position: relative;
}
.main-nav a[aria-current="page"]::after {
  content: "";
  display: block;
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent-deep);
  border-radius: 1px;
}

/* ── CTA hero buttons ───────────────────────────────── */
a.cta-primary,
a.cta-secondary {
  transition: opacity 180ms ease, background 180ms ease, color 180ms ease !important;
  border-radius: 2px;
}
a.cta-primary:hover {
  opacity: 0.82;
}
a.cta-secondary:hover {
  background: var(--paper-deep) !important;
}

/* ── Featured article "Διαβάστε" link ──────────────── */
.featured-read-link {
  transition: border-color 180ms ease, color 180ms ease;
}
.featured-read-link:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent-deep) !important;
}

/* ── Landing pillars: number badge glow ─────────────── */
.landing-pillar-kicker {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── Back-to-top button ─────────────────────────────── */
.back-to-top {
  transition: background 180ms ease, color 180ms ease, transform 180ms ease !important;
}
.back-to-top:hover {
  transform: translateY(-2px);
}

/* ── Article card: title transition already in app ──── */
/* Subtle focus ring for keyboard users */
.article-card:focus-visible,
a.landing-guide-card:focus-visible,
a.cat-card:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Footer links: slightly warmer hover ────────────── */
.footer-link {
  color: var(--muted-strong);
  transition: color 160ms ease;
}
.footer-link:hover {
  color: var(--ink) !important;
  text-decoration: underline;
}

/* ── Smooth scroll for anchor links ────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ══════════════════════════════════════════════════════
   Article sources accordion — new role="group" structure
   Mirrors the editorial styling of the legacy
   details.article-sources block, adapted for the
   <div role="group"> <h3><button> <div role="region">
   markup used by static articles. The toggle JS just sets
   display:none/block on [role="region"] and swaps + / − in
   the icon span.
   ══════════════════════════════════════════════════════ */

.article-body .article-content div[role="group"] {
  margin: 48px 0 24px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  counter-reset: src;
}
.article-body .article-content div[role="group"] > div {
  margin: 0;
}
/* Cancel the editorial .article-body h3 styling (large serif,
   left border) — the button is the real visible label. */
.article-body .article-content div[role="group"] > div > h3 {
  margin: 0;
  padding: 0;
  border-left: 0;
  font-weight: normal;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
}
.article-body .article-content div[role="group"] > div > h3 > button {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 18px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-strong);
  user-select: none;
  text-align: left;
  transition: color 150ms, border-color 150ms;
}
.article-body .article-content div[role="group"] > div > h3 > button:hover {
  color: var(--ink);
}
.article-body .article-content div[role="group"] > div > h3 > button:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 2px;
}
/* The "Πηγές & Βιβλιογραφία" <strong> kicker inside the button
   should inherit the mono/uppercase look, not be bold-black. */
.article-body .article-content div[role="group"] > div > h3 > button > span:first-child,
.article-body .article-content div[role="group"] > div > h3 > button > span:first-child strong {
  font-weight: inherit;
  color: inherit;
  font-family: inherit;
  letter-spacing: inherit;
}
/* The + / − icon span */
.article-body .article-content div[role="group"] > div > h3 > button > span[aria-hidden] {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
  color: var(--muted);
  flex-shrink: 0;
}
/* Open state — JS sets the region's inline display to 'block'.
   Use :has() to react. (Chrome 105+ / Safari 15.4+ / Firefox 121+
   — fine for a 2026 audience.) */
.article-body .article-content div[role="group"]:has(> div > [role="region"][style*="block"]) > div > h3 > button {
  color: var(--ink);
  border-bottom: 1px dashed var(--rule);
}
.article-body .article-content div[role="group"]:has(> div > [role="region"][style*="block"]) > div > h3 > button > span[aria-hidden] {
  color: var(--ink);
}

/* Region body */
.article-body .article-content div[role="group"] > div > [role="region"] {
  padding: 8px 4px 22px;
}
.article-body .article-content div[role="group"] > div > [role="region"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
}
.article-body .article-content div[role="group"] > div > [role="region"] ul li {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted-strong);
  padding: 12px 0 12px 28px;
  margin: 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  text-indent: 0;
}
.article-body .article-content div[role="group"] > div > [role="region"] ul li:last-child {
  border-bottom: 0;
}
/* Override the global .article-body ul li::before "→" — number counter instead. */
.article-body .article-content div[role="group"] > div > [role="region"] ul li::before {
  content: counter(src);
  counter-increment: src;
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-deep);
  letter-spacing: 0.04em;
  font-weight: 500;
  width: auto;
  height: auto;
  background: none;
  transform: none;
}
.article-body .article-content div[role="group"] > div > [role="region"] ul a {
  word-break: break-word;
  color: var(--accent-deep);
}
.article-body .article-content div[role="group"] > div > [role="region"] ul a:hover {
  color: var(--ink);
}
