/* ============================================================
   Equitable Futures — content.css
   Layout · Cards · Slider · News · Entry · Sidebar · Pagination
   ============================================================ */

/* ── Layout (overrides the simple .row-content of main.css) ── */
.row-content {
  display: flex;
  align-items: stretch;   /* the single-post card grows to the bottom */
  gap: 40px;
}

.content-primary {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  gap: 24px;
}

.content-sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: fit-content;   /* as wide as the widest button needs */
  min-width: 260px;
  max-width: 380px;
  gap: 24px;
}
.content-sidebar .link-card-title { text-align: center; }

/* ── Shared card ── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 1s ease;
}
.card:hover { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.10); }

.section-title {
  padding: 0 4px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 20px;
  line-height: 26px;
}

/* ── Slider ── */
.slider { position: relative; overflow: hidden; background: #E8EDE6; }

.slider-track { display: flex; flex-direction: column; }   /* no JS: slides are stacked */
.js .slider-track { flex-direction: row; height: 100%; transition: transform 0.5s ease; }
.js .slider { height: 380px; }

.slide {
  position: relative;
  isolation: isolate;          /* image + overlay live at z-index -1 inside this slide */
  flex: 0 0 100%;
  min-width: 0;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 56px 64px;
  color: #FFFFFF;
}
.slide--v1 { background: linear-gradient(135deg, #E5243B 0%, #C0392B 100%); }
.slide--v2 { background: linear-gradient(135deg, #4C9F38 0%, #276A17 100%); }
.slide--v3 { background: linear-gradient(135deg, #E4501E 0%, #C2410C 100%); }

.slide-img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide::after {   /* readability overlay; must come AFTER the img in tree order */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.68) 100%);
}

.slide-badge {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slide-title {
  margin-bottom: 8px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.25;
}
.slide-title a { color: inherit; text-decoration: none; }
.slide-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }   /* whole slide is clickable */
.slide-title a:focus-visible { outline: none; }
.slide:has(.slide-title a:focus-visible) { outline: 3px solid #FFFFFF; outline-offset: -6px; }

.slide-text { max-width: 560px; font-size: 15px; line-height: 1.55; }

.slider-controls {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
html:not(.js) .slider-controls { display: none; }
.slider :focus-visible { outline-color: #FFFFFF; }

.slider-dots { display: flex; }
.slider-dot {
  padding: 7px;               /* 24px hit area around a 10px dot */
  background: none;
  border: 0;
  cursor: pointer;
}
.slider-dot::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
  transition: width 0.25s, background 0.25s;
}
.slider-dot[aria-current="true"]::before { width: 28px; background: #FFFFFF; }

.slider-pause {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  border-radius: 50%;
  color: #FFFFFF;
  cursor: pointer;
}
.slider-pause:hover { background: rgba(0, 0, 0, 0.7); }
.slider-pause .icon-play { display: none; }
.slider-pause.is-paused .icon-play { display: block; }
.slider-pause.is-paused .icon-pause { display: none; }

/* ── News ── */
.news-section { display: flex; flex-direction: column; gap: 16px; }
.news-cards { display: flex; flex-direction: column; gap: 20px; }

.news-card { position: relative; overflow: hidden; }

/* Header band */
.news-card-head {
  padding: 18px 24px 16px;
  background: #FDF0E8;
  border-bottom: 1px solid #F3D9C8;
}
.news-card-meta {
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-accent-dark);
}
.news-card-title { margin-top: 6px; font-weight: 700; font-size: 21px; line-height: 1.25; }
.news-card-title a { color: var(--c-text); text-decoration: none; }
.news-card-title a:hover { color: var(--c-accent-dark); }

/* Body: picture (optional) + text */
.news-card-body { display: flex; gap: 20px; padding: 18px 24px 22px; }
.news-card-img { flex: none; width: 200px; height: 135px; overflow: hidden; border-radius: 8px; }
.news-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-card-text { flex: 1; min-width: 0; }
.news-card-excerpt { margin-bottom: 10px; font-size: 15px; line-height: 1.55; color: var(--c-text-2); }
.news-card-more { display: inline-block; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--c-green); }
.news-card-more:hover { text-decoration: underline; }

/* ── Page title ── */
.page-title { padding: 8px 4px 0; }
.page-title-eyebrow {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent-dark);
}
.page-title h1 {
  margin-top: 8px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.15;
  color: var(--c-text);
}
.page-title h1::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 16px;
  background: var(--c-accent);
  border-radius: 2px;
}
@media (max-width: 900px) {
  .page-title h1 { font-size: 28px; }
}

/* ── Archive header ── */
.archive-header { padding: 28px; }
.archive-title { font-family: var(--f-head); font-weight: 700; font-size: 28px; line-height: 1.25; }
.archive-description { margin-top: 8px; font-size: 14px; color: var(--c-text-2); }

/* ── Entry (single post / page) ── */
.entry { flex: 0 0 auto; overflow: hidden; }
.entry-cover img { display: block; width: 100%; aspect-ratio: 1200 / 530; object-fit: cover; }
.entry-body { padding: 40px; }

.entry-meta {
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--c-accent);
}
.entry-title {
  margin-bottom: 24px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.25;
}

.entry-content { display: flow-root; font-size: 16px; line-height: 1.7; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  margin-top: 1.8em;
  font-family: var(--f-head);
  line-height: 1.3;
}
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }
.entry-content h4 { font-size: 17px; }
.entry-content a { color: var(--c-green); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: 0.35em; }
.entry-content blockquote {
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--c-accent);
  color: var(--c-text-2);
}
.entry-content img { border-radius: 6px; }
.entry-content hr { border: 0; border-top: 1px solid var(--c-border); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); text-align: left; }
.entry-content pre, .entry-content code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.entry-content pre { padding: 16px; overflow-x: auto; background: var(--c-bg); border-radius: 6px; }

/* Classic-editor alignment, captions, galleries */
.alignleft  { float: left;  margin: 4px 24px 12px 0; }
.alignright { float: right; margin: 4px 0 12px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; max-width: 100%; height: auto; }
.wp-caption-text, .entry-content figcaption { margin-top: 6px; font-size: 13px; color: var(--c-text-3); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery-item { margin: 0; }
.page-links { margin-top: 24px; font-weight: 600; }

/* ── Sidebar link cards ── */
.link-card { padding: 28px 28px 24px; }
.link-card-title {
  margin-bottom: 20px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
}
.link-card-list { list-style: none; }

.link-card--list .link-card-list { display: flex; flex-direction: column; gap: 1px; }

.link-card--tiles { padding-bottom: 32px; }
.link-card--tiles .link-card-title { margin-bottom: 16px; }
.link-card--tiles .link-card-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.partner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  padding: 8px;
  background: var(--c-bg);
  border: 1px dashed #D4D4D3;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  color: var(--c-text-3);
  text-decoration: none;
  transition: all 0.2s;
}
.partner-card:hover { border-color: var(--c-green); background: #F2F7F0; color: var(--c-green); }

/* ── Pagination ── */
.pagination { margin-top: 4px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--c-text);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.pager a.page-numbers:hover { border-color: var(--c-green); color: var(--c-green); }
.pager .page-numbers.current { background: var(--c-green); border-color: var(--c-green); color: #FFFFFF; }
.pager .page-numbers.dots { background: none; border: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .row-content { flex-direction: column; gap: 24px; min-height: 0; }
  .content-primary, .content-sidebar { flex: none; width: 100%; }

  .js .slider { height: 240px; }
  .slide { padding: 24px 20px 56px; }
  .slide-title { font-size: 20px; }
  .slide-text { font-size: 13px; }
  .slider-controls { left: 20px; right: 20px; bottom: 10px; }

  .archive-header { padding: 20px; }
  .entry-body { padding: 24px 20px; }
  .entry-title { font-size: 26px; }
  .link-card { padding: 24px 20px; }
  .content-sidebar { display: none; }
}

@media (max-width: 600px) {
  .news-card-head { padding: 16px 20px 14px; }
  .news-card-title { font-size: 19px; }
  .news-card-body { flex-direction: column; gap: 14px; padding: 16px 20px 20px; }
  .news-card-img { width: 100%; height: 180px; }
}

.action-list { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 32px;
  border-radius: 6px;
  background: var(--c-accent);
  font-weight: 700;
  font-size: 14px;
  line-height: 19px;
  text-align: center;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s;
}
.btn-action:hover { filter: brightness(0.9); }