/*
Theme Name: WSA Rwanda
Theme URI: https://writersspacerwanda.rw
Author: Writers Space Africa Rwanda
Author URI: https://writersspacerwanda.rw
Description: Official theme for Writers Space Africa — Rwanda Chapter. A literary community website for Rwandan writers.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wsa-rwanda
Tags: literary, community, blog, magazine
*/

/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  --black:       #0A0A0A;
  --dark-green:  #0D3D20;
  --forest:      #1A7A3C;
  --mid-green:   #4DBF7F;
  --cerulean:    #0077B6;
  --sky:         #5BB8F5;
  --off-white:   #F5F5F3;
  --border:      #E8E8E8;
  --text:        #1A1A1A;
  --muted:       #555;
  --faint:       #888;
  --lighter:     #aaa;
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  background: var(--off-white);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }

/* ═══════════════════════════════════════
   TYPOGRAPHY UTILITIES
═══════════════════════════════════════ */
.wsa-eyebrow {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cerulean);
  display: block;
  margin-bottom: 8px;
}
.wsa-eyebrow--green { color: var(--mid-green); }
.wsa-eyebrow--dim   { color: rgba(91,184,245,.55); }

.wsa-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--black);
  font-weight: 700;
}
.wsa-section-title--white { color: #fff; }

.wsa-rule {
  width: 44px;
  height: 2px;
  background: var(--forest);
  border: none;
  display: block;
  margin-bottom: 22px;
}

/* ═══════════════════════════════════════
   SCROLL ANIMATIONS
═══════════════════════════════════════ */
.fu {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .75s ease-out, transform .75s ease-out;
}
.fu.v { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .09s; }
.d2 { transition-delay: .18s; }
.d3 { transition-delay: .27s; }
.d4 { transition-delay: .36s; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn-green {
  background: var(--forest);
  color: #fff;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 2px;
  border: none;
  letter-spacing: .05em;
  transition: background .2s;
  display: inline-block;
  cursor: pointer;
}
.btn-green:hover { background: var(--dark-green); }

.btn-outline-green {
  background: transparent;
  color: var(--forest);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 2px;
  border: 2px solid var(--forest);
  transition: all .2s;
  display: inline-block;
  cursor: pointer;
}
.btn-outline-green:hover { background: var(--forest); color: #fff; }

.btn-white {
  background: #fff;
  color: var(--dark-green);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  display: inline-block;
}
.btn-white:hover { background: #F5FAF7; }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.65);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  padding: 13px 26px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,.2);
  cursor: pointer;
  transition: border-color .2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.5); }

/* ═══════════════════════════════════════
   GENRE TAGS
═══════════════════════════════════════ */
.genre-tag {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 1px;
  display: inline-block;
}
.gt-poetry    { border: 1px solid rgba(0,119,182,.3);  color: var(--cerulean); }
.gt-story     { border: 1px solid rgba(26,122,60,.35); color: var(--forest); }
.gt-essay     { border: 1px solid rgba(0,0,0,.15);     color: #222; }
.gt-novel     { border: 1px solid rgba(0,0,0,.15);     color: #222; }
.gt-memoir    { border: 1px solid rgba(26,122,60,.3);  color: var(--forest); }
.gt-children  { border: 1px solid rgba(91,184,245,.35); color: var(--sky); }
.gt-nonfiction{ border: 1px solid rgba(0,119,182,.3);  color: var(--cerulean); }
.gt-anthology { background: var(--forest); color: #fff; border: 1px solid var(--forest); }

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
.wsa-nav {
  background: var(--black);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.wsa-nav__logo { text-decoration: none; display: flex; flex-direction: column; }
.wsa-nav__logo-main {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  color: #fff;
  line-height: 1;
}
.wsa-nav__logo-sub {
  font-size: 10px;
  color: var(--sky);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 2px;
}
.wsa-nav__menu {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
.wsa-nav__menu li a {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  letter-spacing: .04em;
  transition: color .2s;
  font-family: 'Lato', sans-serif;
}
.wsa-nav__menu li a:hover,
.wsa-nav__menu li.current-menu-item > a,
.wsa-nav__menu li.current_page_item > a {
  color: #fff;
  border-bottom: 1px solid var(--forest);
  padding-bottom: 2px;
}
.wsa-nav__cta {
  background: var(--forest);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 2px;
  letter-spacing: .05em;
  transition: background .2s;
  font-family: 'Lato', sans-serif;
  white-space: nowrap;
}
.wsa-nav__cta:hover { background: var(--dark-green); }
.wsa-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.wsa-nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all .3s;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.wsa-footer { background: #050505; padding: 52px 48px 28px; }

.wsa-footer__palette {
  display: flex;
  height: 4px;
}
.wsa-footer__palette .seg-a { background: var(--black); flex: 3; }
.wsa-footer__palette .seg-b { background: var(--forest); flex: 1; }
.wsa-footer__palette .seg-c { background: var(--cerulean); flex: 1; }

.wsa-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-top: 36px;
  margin-bottom: 36px;
}
.wsa-footer__brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: #fff;
  display: block;
  margin-bottom: 3px;
}
.wsa-footer__brand-sub {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  color: var(--sky);
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}
.wsa-footer__brand-desc {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #2a2a2a;
  line-height: 1.8;
  font-weight: 400;
  margin: 0;
}
.wsa-footer__col-title {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6B6B6B;
  margin-bottom: 14px;
  display: block;
}
.wsa-footer__link {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #2a2a2a;
  margin-bottom: 8px;
  text-decoration: none;
  font-weight: 400;
  transition: color .2s;
}
.wsa-footer__link:hover { color: var(--mid-green); }
.wsa-footer__bottom {
  border-top: 1px solid #111;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wsa-footer__copy {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: #333;
  margin: 0;
}
.wsa-footer__tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: #222;
}

/* ═══════════════════════════════════════
   FORM ELEMENTS (shared)
═══════════════════════════════════════ */
.wsa-label {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 6px;
  display: block;
}
.wsa-input,
.wsa-select,
.wsa-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #E0E0E0;
  border-radius: 2px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  transition: border-color .18s;
  outline: none;
}
.wsa-input:focus,
.wsa-select:focus,
.wsa-textarea:focus { border-color: var(--forest); }
.wsa-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: #fff;
  cursor: pointer;
}
.wsa-textarea { resize: vertical; line-height: 1.65; }
.wsa-field-hint {
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  color: #444;
  margin-top: 5px;
  font-weight: 400;
}

/* ═══════════════════════════════════════
   STICKY FILTER BARS (shared across pages)
═══════════════════════════════════════ */
.wsa-filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 100;
}
.wsa-filter-inner {
  display: flex;
  align-items: center;
  padding: 0 48px;
  overflow-x: auto;
}
.wsa-filter-tab {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  color: #2a2a2a;
  padding: 13px 18px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color .2s, border-color .2s;
}
.wsa-filter-tab:hover { color: var(--black); }
.wsa-filter-tab.on  { color: var(--black); font-weight: 700; border-bottom-color: var(--forest); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .wsa-nav { padding: 0 24px; }
  .wsa-nav__menu { display: none; }
  .wsa-nav__hamburger { display: flex; }
  .wsa-nav__menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--black);
    padding: 20px 24px;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .wsa-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .wsa-footer { padding: 40px 24px 20px; }
}
@media (max-width: 600px) {
  .wsa-footer__grid { grid-template-columns: 1fr; }
  .wsa-footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── CUSTOM LOGO SIZE FIX ─────────────────────────────
   Constrains the WordPress uploaded logo to fit neatly
   inside the 60px nav bar, vertically centred.        */
.wsa-nav .custom-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.wsa-nav .custom-logo {
  height: 38px !important;
  width: auto  !important;
  max-width: 180px !important;
  display: block;
  object-fit: contain;
}
/* Hide the text fallback when a logo image is active */
.wsa-nav .custom-logo-link ~ .wsa-nav__logo-main,
.wsa-nav .custom-logo-link ~ .wsa-nav__logo-sub {
  display: none;
}

/* ── READABILITY FIX ──────────────────────────────────
   Ensures all body text on white/light backgrounds is
   dark enough to meet basic accessibility contrast.    */
body {
  color: #1a1a1a;
}
p, li, td, th, label, span:not([class*="eyebrow"]):not([class*="tag"]) {
  color: inherit;
}
/* Muted helper text stays readable but not pitch black */
.wsa-field-hint,
.wsa-footer-copy,
.wsa-footer-brand-desc,
.wsa-footer-menu a {
  color: #888;
}
/* Dark background sections: override back to light text */
.wsa-footer *,
[style*="background:#0A0A0A"] p,
[style*="background:#0D3D20"] p,
[style*="background:#1A7A3C"] p {
  color: rgba(255,255,255,0.75);
}

/* ── SINGLE POST PARAGRAPH SPACING (global safety net) ───
   Ensures paragraphs in any post content area always have
   breathing room between them, regardless of which template
   renders them.                                          */
.wsa-piece-content p,
.entry-content p,
article .post-content p {
  margin-bottom: 1.6em !important;
  line-height: 1.9;
}
.wsa-piece-content p:last-child,
.entry-content p:last-child {
  margin-bottom: 0 !important;
}

/* ── FORM INPUT FOCUS (global safety net) ────────────────
   Green border on any focused input across the whole site */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #1A7A3C;
  outline-offset: 1px;
  border-color: #1A7A3C !important;
}

/* ── SINGLE POST: WHITE BACKGROUND ───────────────────── */
.single {
  background: #ffffff;
}
