/*
Theme Name: Addicts Rebellion Custom
Theme URI: https://addictsrebellion.com/
Author: Demi for Addicts Rebellion
Description: Custom hand-coded theme for AddictsRebellion.com. Warm bright editorial design — cream backgrounds, white cards with tan borders, red accents. No page-builder dependencies.
Version: 1.0.16
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ar-custom
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  --ar-red: #d92b2b;
  --ar-red-dark: #b02121;
  --ar-red-form: #cc2a2a;
  --ar-dark: #161a22;
  --ar-text: #111111;
  --ar-muted: #5c5c5c;
  --ar-cream: #f7f4ec;
  --ar-border: #E3DCCB;
  --ar-beige: #EFE9DB;
  --ar-white: #FFFFFF;
  --ar-link-blue: #2BB2FC;

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Figtree', 'Helvetica Neue', Arial, sans-serif;

  --container: 1180px;
  --radius-card: 12px;
  --radius-btn: 5px;
  --gap: 20px;
  --section-pad: 72px;
}

/* ============================================================
   2. RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ar-text);
  background: var(--ar-cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ar-text);
  margin: 0 0 0.6em;
}

h1 { font-size: 52px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }

p { margin: 0 0 1.1em; }

a { color: var(--ar-red); text-decoration: none; }
a:hover { color: var(--ar-red-dark); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ar-red);
  margin: 0 0 12px;
}

.section { padding: var(--section-pad) 0; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ============================================================
   3. BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 15px 32px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn-red { background: var(--ar-red); color: #fff; border-color: var(--ar-red); }
.btn-red:hover { background: var(--ar-red-dark); border-color: var(--ar-red-dark); color: #fff; }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ============================================================
   4. HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ar-white);
  border-bottom: 1px solid var(--ar-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.site-brand img { width: 52px; height: 52px; object-fit: contain; }
.site-brand .brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--ar-text);
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
}
.main-nav a {
  font-size: 17px;
  font-weight: 600;
  color: var(--ar-text);
}
.main-nav a:hover,
.main-nav .current-menu-item a { color: var(--ar-red); }

.header-cta { flex-shrink: 0; }
.header-cta .btn { padding: 10px 22px; font-size: 14px; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.menu-toggle svg { width: 28px; height: 28px; stroke: var(--ar-text); }

/* ============================================================
   5. HERO (front page)
   ============================================================ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--ar-dark) url('assets/hero-dawn-road.jpg') center / cover no-repeat;
  overflow: hidden;
}
/* legibility gradient: darker on the left where the copy sits */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,12,16,.62) 0%, rgba(10,12,16,.28) 45%, rgba(10,12,16,.05) 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-badge {
  width: 118px; height: 118px;
  border-radius: 50%;
  background: var(--ar-white);
  padding: 10px;
  margin-bottom: 26px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.22);
}
.hero-badge img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }

.hero .eyebrow, .ar-hero-eyebrow { color: var(--ar-red); font-size: 17px; }

.hero h1, .ar-hero-title, h1.ar-hero-title {
  color: #ffffff;
  font-size: 88px;
  max-width: 700px;
  margin-bottom: 24px;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.hero-sub, .ar-hero-sub {
  color: #fff;
  font-size: 21px;
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: 36px;
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
}
.hero-buttons, .ar-hero-buttons { display: flex; gap: 18px; flex-wrap: wrap; }
.hero-buttons .btn, .ar-hero-buttons .btn {
  font-size: 16px;
  padding: 18px 40px;
}

/* ============================================================
   6. CARDS (shared)
   ============================================================ */
.card {
  background: var(--ar-white);
  border: 2px solid #d8cfb8;
  border-radius: var(--radius-card);
  padding: 34px 30px;
  box-shadow: 0 12px 32px rgba(22,26,34,.16), 0 2px 6px rgba(22,26,34,.08);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* ============================================================
   7. WHAT WE DO
   ============================================================ */
.whatwedo-head { margin-bottom: 44px; max-width: 720px; }
.whatwedo-head h2 { margin-bottom: 14px; }
.whatwedo-head p { color: var(--ar-text); font-size: 18px; margin: 0; }

.wwd-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.wwd-icon {
  width: 46px; height: 46px;
  margin-bottom: 20px;
  color: var(--ar-red);
}
.wwd-icon svg { width: 100%; height: 100%; fill: currentColor; }
.wwd-card h3 { margin-bottom: 12px; }
.wwd-card p { color: var(--ar-text); font-size: 16px; margin-bottom: 14px; }
.wwd-card .card-link { font-weight: 700; margin-top: auto; }
.wwd-card .card-link::after { content: " \2192"; }
.wwd-card .coming-soon { color: var(--ar-muted); font-weight: 600; margin-top: auto; }

/* ============================================================
   8. LATEST ARTICLES (front page) + BLOG CARDS
   ============================================================ */
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.latest-head h2 { margin: 0; }
.latest-head .view-all { font-weight: 700; white-space: nowrap; }

.post-card {
  background: var(--ar-white);
  border: 2px solid #d8cfb8;
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(22,26,34,.16), 0 2px 6px rgba(22,26,34,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(22,26,34,.20), 0 2px 8px rgba(22,26,34,.10); }
.post-card .card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ar-beige); }
.post-card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 22px; margin-bottom: 10px; }
.post-card h3 a { color: var(--ar-text); }
.post-card h3 a:hover { color: var(--ar-red); }
.post-meta {
  font-size: 13px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  color: #9a9a9a;
  margin-bottom: 12px;
}
.post-card .card-excerpt { font-size: 15.5px; color: var(--ar-text); margin-bottom: 16px; }
.post-card .read-more { font-weight: 700; margin-top: auto; }
.post-card .read-more::after { content: " \2192"; }

/* ============================================================
   9. TELL YOUR STORY band
   ============================================================ */
.tys-band { background: var(--ar-cream); }
.tys-head { margin-bottom: 30px; max-width: 720px; }
.tys-head h2 { color: var(--ar-red); font-size: 30px; margin-bottom: 14px; }
.tys-head p { color: var(--ar-text); font-size: 18px; margin: 0; }
.tys-band .card { margin-left: auto; margin-right: auto; }

/* ============================================================
   9b. RESOURCES page cards
   ============================================================ */
.resource-card { margin-bottom: 24px; }
.resource-card h3 { margin-bottom: 10px; font-size: 22px; }
.resource-card p { margin-bottom: 10px; }
.resource-card p:last-child { margin-bottom: 0; }

/* ============================================================
   10. NEWSLETTER + DONATE
   ============================================================ */
.nd-section { background: var(--ar-beige); }
.nd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: stretch;
}
.nd-card {
  background: var(--ar-white);
  border: 3px solid #d8cfb8;
  border-radius: var(--radius-card);
  padding: 34px 32px;
  box-shadow: 0 12px 32px rgba(22,26,34,.16), 0 2px 6px rgba(22,26,34,.08);
}
.nd-card h3 { font-size: 28px; margin-bottom: 12px; }
.nd-card .eyebrow { margin-bottom: 10px; }
.nd-card p { font-size: 16.5px; }

.brevo-form label { display: block; font-weight: 700; font-size: 16px; margin: 18px 0 8px; }
.brevo-form input[type="email"],
.brevo-form input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-body);
  border: 1px solid #cfc8b8;
  border-radius: 6px;
  background: #fff;
  color: var(--ar-text);
}
.brevo-form input:focus { outline: 2px solid var(--ar-red); outline-offset: 1px; border-color: var(--ar-red); }
.brevo-form .btn { margin-top: 18px; background: var(--ar-red-form); border-color: var(--ar-red-form); color: #fff; }
.brevo-form .btn:hover { background: var(--ar-red-dark); border-color: var(--ar-red-dark); color: #fff; }
.brevo-note { font-size: 13px; color: var(--ar-muted); margin-top: 12px; }

.donate-card p.support { color: var(--ar-red); font-size: 16.5px; }

/* ============================================================
   11. FOOTER
   ============================================================ */
.site-footer {
  background: var(--ar-cream);
  border-top: 1px solid var(--ar-border);
  padding: 56px 0 34px;
  text-align: center;
}
.footer-tagline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 22px;
}
.footer-nav ul {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px 30px; list-style: none; margin-bottom: 24px;
}
.footer-nav a { font-weight: 600; font-size: 16px; color: var(--ar-text); }
.footer-nav a:hover { color: var(--ar-red); }

.social-row { display: flex; justify-content: center; gap: 22px; margin-bottom: 26px; }
.social-row a {
  display: inline-flex; width: 30px; height: 30px;
  color: var(--ar-text);
}
.social-row a:hover { color: var(--ar-red); }
.social-row svg { width: 100%; height: 100%; fill: currentColor; }

.footer-donate { margin-bottom: 26px; }

.footer-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; margin-bottom: 16px; }
.footer-legal a { font-size: 14px; color: var(--ar-muted); }
.footer-legal a:hover { color: var(--ar-red); }

.footer-copy { font-size: 14px; color: var(--ar-muted); margin: 0; }

/* ============================================================
   12. BLOG ARCHIVE
   ============================================================ */
.page-hero { text-align: center; padding: 64px 0 8px; }
.page-hero h1 { font-size: 56px; margin-bottom: 14px; }
.page-hero .lede { font-size: 18px; color: var(--ar-text); max-width: 640px; margin: 0 auto; }

.blog-grid { padding: 48px 0 24px; }
.pagination { text-align: center; padding: 8px 0 64px; }
.pagination .nav-links { display: inline-flex; gap: 10px; align-items: center; }
.pagination a, .pagination span {
  display: inline-block; padding: 10px 18px;
  border: 2px solid var(--ar-border); border-radius: 6px;
  font-weight: 700; color: var(--ar-text); background: #fff;
}
.pagination a:hover { border-color: var(--ar-red); color: var(--ar-red); }
.pagination .current { background: var(--ar-red); border-color: var(--ar-red); color: #fff; }

/* ============================================================
   13. SINGLE POST + PAGES
   ============================================================ */
.single-wrap { max-width: 860px; margin: 0 auto; padding: 56px 24px 72px; }
.article-card {
  background: var(--ar-white);
  border: 2px solid var(--ar-border);
  border-radius: var(--radius-card);
  padding: 48px 52px;
}
.article-meta {
  text-align: center; margin-bottom: 26px;
  font-size: 15px; color: var(--ar-text);
}
.article-meta .meta-row { display: inline-flex; align-items: center; gap: 8px; margin: 0 10px; }
.article-meta svg { width: 17px; height: 17px; stroke: var(--ar-red); fill: none; stroke-width: 2; }
.article-card .featured-img { border-radius: 8px; overflow: hidden; margin-bottom: 34px; }
.article-card h1 { font-size: 40px; margin-bottom: 20px; }
.article-card h2 { font-size: 30px; margin-top: 1.6em; }
.article-card h3 { font-size: 23px; margin-top: 1.4em; }
.article-card ul, .article-card ol { margin: 0 0 1.1em 1.4em; }
.article-card li { margin-bottom: .45em; }
.article-card blockquote {
  border-left: 4px solid var(--ar-red);
  padding: 6px 0 6px 20px;
  margin: 1.6em 0;
  font-size: 19px; font-style: italic; color: var(--ar-dark);
}
.post-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 36px; padding-top: 28px;
  border-top: 2px solid var(--ar-border);
  font-weight: 700;
}

.page-wrap { max-width: 960px; margin: 0 auto; padding: 56px 24px 72px; }
.page-card {
  background: var(--ar-white);
  border: 2px solid var(--ar-border);
  border-radius: var(--radius-card);
  padding: 48px 52px;
}
.page-card h1 { font-size: 44px; }

/* ============================================================
   14. RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .main-nav ul { gap: 22px; }
  .hero h1 { font-size: 72px; }
  .hero-sub { font-size: 20px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ar-white);
    border-bottom: 2px solid var(--ar-border);
    box-shadow: 0 18px 30px rgba(0,0,0,.08);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .main-nav li { border-top: 1px solid var(--ar-border); }
  .main-nav a { display: block; padding: 14px 24px; }
  .header-inner { position: relative; }

  .card-grid { grid-template-columns: 1fr; }
  .latest-grid > :nth-child(n+5) { display: none; }
  .nd-grid { grid-template-columns: 1fr; }

  .hero { min-height: 78vh; }
  .hero h1 { font-size: 44px; }
  .hero-sub { font-size: 17px; }
  .hero-badge { width: 92px; height: 92px; }

  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  .page-hero h1 { font-size: 42px; }
  .article-card, .page-card { padding: 32px 24px; }
  .article-card h1 { font-size: 31px; }

  :root { --section-pad: 52px; }
  .latest-head { flex-direction: column; align-items: flex-start; }

  /* Footer nav: 3 links on first row, 2 on second for symmetry */
  .footer-nav li:nth-child(-n+3) { order: 0; }
  .footer-nav ul::after {
    content: "";
    flex-basis: 100%;
    height: 0;
    order: 1;
  }
  .footer-nav li:nth-child(n+4) { order: 2; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 36px; }
  .hero-buttons .btn { width: 100%; }
  .brand-name { font-size: 18px; }
}
