/*
Theme Name: Affiliate Home (GeneratePress Child)
Theme URI: https://generatepress.com
Description: Custom magazine-style homepage for an affiliate review blog. Hand-coded front page with AJAX category filtering, review cards and deal blocks. No page builder required.
Author: Built with Claude Code
Template: generatepress
Version: 1.0.0
Text Domain: affiliate-home
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
  --ah-bg:            #ffffff;
  --ah-bg-soft:       #f6f7f9;
  --ah-bg-sunk:       #eef0f4;
  --ah-surface:       #ffffff;
  --ah-border:        #e3e6ec;
  --ah-border-strong: #cfd4de;

  --ah-text:          #14181f;
  --ah-text-soft:     #4e5867;
  --ah-text-faint:    #7c8595;

  --ah-brand:         #1f5eff;
  --ah-brand-dark:    #1546c7;
  --ah-brand-tint:    #eaf0ff;
  --ah-accent:        #ff4d2e;
  --ah-gold:          #f5a623;
  --ah-green:         #16a34a;

  --ah-radius:        14px;
  --ah-radius-sm:     8px;
  --ah-shadow:        0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .14);
  --ah-shadow-lg:     0 2px 4px rgba(16, 24, 40, .05), 0 24px 48px -20px rgba(16, 24, 40, .22);

  --ah-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ah-gap: 28px;
  --ah-max: 1240px;
}

/*
 * Dark mode is OPT-IN, not automatic.
 *
 * GeneratePress renders single posts, archives and the header/footer in light
 * mode, so auto-switching only the homepage gave visitors a dark home page and
 * light articles. Light is the default and matches the rest of the site.
 *
 * To follow the visitor's device setting instead, add data-ah-theme="auto" to
 * the <html> tag (see README). To force dark, use data-ah-theme="dark".
 */
@media (prefers-color-scheme: dark) {
  :root[data-ah-theme="auto"] {
    --ah-bg:            #0d1017;
    --ah-bg-soft:       #141922;
    --ah-bg-sunk:       #1b212c;
    --ah-surface:       #141922;
    --ah-border:        #252c39;
    --ah-border-strong: #343d4d;

    --ah-text:          #eef1f6;
    --ah-text-soft:     #a8b2c1;
    --ah-text-faint:    #7a8494;

    --ah-brand:         #5b86ff;
    --ah-brand-dark:    #7da0ff;
    --ah-brand-tint:    #19233c;

    --ah-shadow:        0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --ah-shadow-lg:     0 2px 4px rgba(0, 0, 0, .4), 0 24px 48px -20px rgba(0, 0, 0, .7);
  }
}

:root[data-ah-theme="dark"] {
  --ah-bg:            #0d1017;
  --ah-bg-soft:       #141922;
  --ah-bg-sunk:       #1b212c;
  --ah-surface:       #141922;
  --ah-border:        #252c39;
  --ah-border-strong: #343d4d;

  --ah-text:          #eef1f6;
  --ah-text-soft:     #a8b2c1;
  --ah-text-faint:    #7a8494;

  --ah-brand:         #5b86ff;
  --ah-brand-dark:    #7da0ff;
  --ah-brand-tint:    #19233c;

  --ah-shadow:        0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --ah-shadow-lg:     0 2px 4px rgba(0, 0, 0, .4), 0 24px 48px -20px rgba(0, 0, 0, .7);
}

/* ==========================================================================
   2. Homepage shell
   ========================================================================== */

/*
 * Background goes on <body>, but NOT the text colour: GeneratePress's header
 * and footer sit outside .ah-front and would inherit it, which produced white
 * text on GP's white header bar. Text colour is scoped to our own wrapper.
 */
.ah-home {
  font-family: var(--ah-font);
  background: var(--ah-bg);
  -webkit-font-smoothing: antialiased;
}

.ah-front { color: var(--ah-text); }

.ah-front * { box-sizing: border-box; }

.ah-wrap {
  max-width: var(--ah-max);
  margin: 0 auto;
  padding: 0 16px;
}

.ah-section { padding: 48px 0; }
.ah-section--soft { background: var(--ah-bg-soft); }

.ah-front a { text-decoration: none; color: inherit; }
.ah-front img { max-width: 100%; height: auto; display: block; }

/* Section heading */
.ah-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ah-border);
}
.ah-head__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.ah-head__title span { color: var(--ah-brand); }
.ah-head__sub {
  margin: 6px 0 0;
  font-size: .9rem;
  color: var(--ah-text-soft);
}
.ah-head__more {
  flex: none;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ah-brand);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.ah-head__more:hover { color: var(--ah-brand-dark); }

/* ==========================================================================
   3. Trending ticker
   ========================================================================== */

.ah-ticker {
  background: var(--ah-text);
  color: #fff;
  font-size: .85rem;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root[data-ah-theme="auto"] .ah-ticker { background: var(--ah-bg-sunk); }
}
:root[data-ah-theme="dark"] .ah-ticker { background: var(--ah-bg-sunk); }
.ah-ticker__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 44px;
  max-width: var(--ah-max);
  margin: 0 auto;
  padding: 0 16px;
}
.ah-ticker__label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ah-accent);
  color: #fff;
  font-weight: 800;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 11px;
  border-radius: 100px;
}
.ah-ticker__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: ah-pulse 1.6s ease-in-out infinite;
}
@keyframes ah-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.ah-ticker__list {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.ah-ticker__list::-webkit-scrollbar { display: none; }
.ah-ticker__list a { color: rgba(255,255,255,.82); font-weight: 500; }
.ah-ticker__list a:hover { color: #fff; }

/* ==========================================================================
   4. Hero
   ========================================================================== */

.ah-hero { padding: 36px 0 8px; }
.ah-hero__grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: var(--ah-gap);
}

.ah-lead {
  position: relative;
  display: block;
  border-radius: var(--ah-radius);
  overflow: hidden;
  min-height: 460px;
  background: var(--ah-bg-sunk);
  box-shadow: var(--ah-shadow);
}
.ah-lead__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ah-lead__media img,
.ah-lead__media svg {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.ah-lead:hover .ah-lead__media img,
.ah-lead:hover .ah-lead__media svg { transform: scale(1.04); }

/* Placeholder SVG behaves like a cover image wherever it is used. */
.ah-ph { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Pastel placeholders are far too bright against a dark page. */
@media (prefers-color-scheme: dark) {
  :root[data-ah-theme="auto"] .ah-ph { filter: brightness(.42) saturate(.7); }
}
:root[data-ah-theme="dark"] .ah-ph { filter: brightness(.42) saturate(.7); }
.ah-lead__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,11,17,.94) 0%, rgba(8,11,17,.6) 38%, rgba(8,11,17,.05) 72%);
}
.ah-lead__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px;
  color: #fff;
}
.ah-lead__title {
  margin: 12px 0 10px;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.ah-lead__excerpt {
  margin: 0 0 14px;
  font-size: .98rem;
  line-height: 1.6;
  color: rgba(255,255,255,.8);
  max-width: 58ch;
}

.ah-hero__side {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 14px;
}

/* ==========================================================================
   5. Badges / meta
   ========================================================================== */

.ah-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 5px 10px;
  border-radius: 100px;
  background: var(--ah-brand);
  color: #fff;
}
.ah-badge--soft {
  background: var(--ah-brand-tint);
  color: var(--ah-brand);
}
.ah-badge--accent { background: var(--ah-accent); color: #fff; }
.ah-badge--gold   { background: var(--ah-gold);   color: #1a1403; }
.ah-badge--green  { background: var(--ah-green);  color: #fff; }

.ah-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .78rem;
  color: var(--ah-text-faint);
}
.ah-meta--light { color: rgba(255,255,255,.72); }
.ah-meta__sep { opacity: .45; }
.ah-meta__author { font-weight: 600; color: var(--ah-text-soft); }
.ah-meta--light .ah-meta__author { color: rgba(255,255,255,.9); }

/* ==========================================================================
   6. Post cards
   ========================================================================== */

/* Horizontal card (hero side rail, sidebar) */
.ah-mini {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius-sm);
  padding: 10px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.ah-mini:hover {
  border-color: var(--ah-brand);
  transform: translateY(-2px);
  box-shadow: var(--ah-shadow);
}
.ah-mini__thumb {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ah-bg-sunk);
}
.ah-mini__thumb img,
.ah-mini__thumb svg { width: 100%; height: 100%; object-fit: cover; }
.ah-mini__title {
  margin: 0 0 6px;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ah-mini:hover .ah-mini__title { color: var(--ah-brand); }

/* Numbered mini (popular list) */
.ah-rank {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--ah-border);
}
.ah-rank:last-child { border-bottom: 0; }
.ah-rank__num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ah-border-strong);
  letter-spacing: -.04em;
}
.ah-rank:hover .ah-rank__num { color: var(--ah-brand); }
.ah-rank__title {
  margin: 0 0 5px;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.4;
}
.ah-rank:hover .ah-rank__title { color: var(--ah-brand); }

/* Standard vertical card (grids) */
.ah-card {
  display: flex;
  flex-direction: column;
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius);
  overflow: hidden;
  transition: border-color .2s, transform .25s, box-shadow .25s;
}
.ah-card:hover {
  border-color: var(--ah-brand);
  transform: translateY(-4px);
  box-shadow: var(--ah-shadow-lg);
}
.ah-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ah-bg-sunk);
}
.ah-card__media img,
.ah-card__media svg {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.ah-card:hover .ah-card__media img,
.ah-card:hover .ah-card__media svg { transform: scale(1.05); }
.ah-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
}
.ah-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  flex: 1;
}
.ah-card__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
}
.ah-card:hover .ah-card__title { color: var(--ah-brand); }
.ah-card__excerpt {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ah-text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ah-card__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ah-border);
}

/* ==========================================================================
   7. Review / deal cards  (the affiliate-specific blocks)
   ========================================================================== */

.ah-reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ah-gap);
}

.ah-review {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius);
  padding: 22px;
  transition: border-color .2s, transform .25s, box-shadow .25s;
}
.ah-review:hover {
  border-color: var(--ah-brand);
  transform: translateY(-4px);
  box-shadow: var(--ah-shadow-lg);
}
.ah-review--top {
  border-color: var(--ah-gold);
  border-width: 2px;
}
.ah-review__flag {
  position: absolute;
  top: -11px; left: 22px;
}
.ah-review__logo {
  width: 56px; height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ah-bg-sunk);
  margin-bottom: 14px;
}
.ah-review__name {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.ah-review__tag {
  margin: 0 0 14px;
  font-size: .85rem;
  color: var(--ah-text-soft);
}

.ah-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ah-score__num {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.ah-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--ah-gold);
  font-size: .95rem;
  letter-spacing: 1px;
}
.ah-score__count { font-size: .78rem; color: var(--ah-text-faint); }

.ah-review__list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: .88rem;
  color: var(--ah-text-soft);
}
.ah-review__list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  line-height: 1.5;
}
.ah-review__list li::before {
  content: "✓";
  color: var(--ah-green);
  font-weight: 800;
}

.ah-review__foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
}
.ah-review__price {
  font-size: .85rem;
  color: var(--ah-text-faint);
}
.ah-review__price b {
  font-size: 1.05rem;
  color: var(--ah-text);
  letter-spacing: -.02em;
}

.ah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--ah-radius-sm);
  font-size: .9rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.ah-btn--primary { background: var(--ah-brand); color: #fff; }
.ah-btn--primary:hover { background: var(--ah-brand-dark); color: #fff; }
.ah-btn--ghost {
  background: transparent;
  color: var(--ah-text);
  border-color: var(--ah-border-strong);
}
.ah-btn--ghost:hover { border-color: var(--ah-brand); color: var(--ah-brand); }
.ah-btn--block { width: 100%; }

/* Disclosure strip — affiliate programs look for this */
.ah-disclosure {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--ah-radius-sm);
  background: var(--ah-bg-sunk);
  border: 1px dashed var(--ah-border-strong);
  font-size: .8rem;
  line-height: 1.5;
  color: var(--ah-text-soft);
}
.ah-disclosure a { color: var(--ah-brand); text-decoration: underline; }

/* ==========================================================================
   8. Category tabs + AJAX grid
   ========================================================================== */

.ah-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 26px;
}
.ah-tabs::-webkit-scrollbar { display: none; }
.ah-tab {
  flex: none;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--ah-border);
  background: var(--ah-surface);
  color: var(--ah-text-soft);
  font-family: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.ah-tab:hover { border-color: var(--ah-brand); color: var(--ah-brand); }
.ah-tab.is-active {
  background: var(--ah-brand);
  border-color: var(--ah-brand);
  color: #fff;
}

.ah-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ah-gap);
  transition: opacity .2s;
}
.ah-grid.is-loading { opacity: .35; pointer-events: none; }

.ah-grid__empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: var(--ah-text-faint);
  border: 1px dashed var(--ah-border-strong);
  border-radius: var(--ah-radius);
}

.ah-more { text-align: center; margin-top: 32px; }
.ah-more__btn { min-width: 220px; }
.ah-more__btn[hidden] { display: none; }
.ah-spin {
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ah-spin .7s linear infinite;
}
@keyframes ah-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   9. Two-column category spotlight
   ========================================================================== */

.ah-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}
.ah-duo__col > .ah-card { margin-bottom: 18px; }
.ah-duo__list { display: grid; gap: 12px; }

/* ==========================================================================
   10. Main + sidebar row
   ========================================================================== */

.ah-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: start;
}
.ah-split__side {
  display: grid;
  gap: 26px;
  position: sticky;
  top: 24px;
}
.ah-widget {
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
  border-radius: var(--ah-radius);
  padding: 20px;
}
.ah-widget__title {
  margin: 0 0 14px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ah-text-faint);
}
.ah-split__main .ah-grid { grid-template-columns: repeat(2, 1fr); }

/* Category cloud widget */
.ah-cats { display: grid; gap: 8px; }
.ah-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--ah-radius-sm);
  background: var(--ah-bg-soft);
  font-size: .89rem;
  font-weight: 600;
  transition: background .18s, color .18s;
}
.ah-cats a:hover { background: var(--ah-brand); color: #fff; }
.ah-cats__count {
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--ah-surface);
  color: var(--ah-text-faint);
}
.ah-cats a:hover .ah-cats__count { background: rgba(255,255,255,.22); color: #fff; }

/* ==========================================================================
   11. Newsletter
   ========================================================================== */

.ah-news {
  border-radius: var(--ah-radius);
  padding: 44px 36px;
  background: linear-gradient(135deg, #14181f 0%, #1f2b4a 100%);
  color: #fff;
  text-align: center;
}
.ah-news__title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -.025em;
}
.ah-news__sub {
  margin: 0 auto 24px;
  max-width: 52ch;
  font-size: .95rem;
  line-height: 1.6;
  color: rgba(255,255,255,.72);
}
.ah-news__form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.ah-news__input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border-radius: var(--ah-radius-sm);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: inherit;
  font-size: .92rem;
}
.ah-news__input::placeholder { color: rgba(255,255,255,.5); }
.ah-news__input:focus {
  outline: none;
  border-color: #fff;
  background: rgba(255,255,255,.14);
}
.ah-news__note {
  margin: 14px 0 0;
  font-size: .78rem;
  color: rgba(255,255,255,.52);
}

/* ==========================================================================
   12. Trust strip  (helps affiliate approval)
   ========================================================================== */

.ah-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.ah-trust__item {
  padding: 22px;
  border-radius: var(--ah-radius);
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
}
.ah-trust__num {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ah-brand);
  line-height: 1;
  margin-bottom: 8px;
}
.ah-trust__label {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--ah-text-soft);
}

/* ==========================================================================
   13. Site footer  (every page, not just the homepage)
   ========================================================================== */

/*
 * The footer keeps its own fixed dark palette rather than using the theme
 * tokens, so it looks identical whether the page is in light or dark mode.
 */
.ah-footer {
  --ahf-bg:     #11151c;
  --ahf-text:   #e8ecf3;
  --ahf-muted:  #9aa4b4;
  --ahf-border: #232b38;
  --ahf-brand:  #5b86ff;

  background: var(--ahf-bg);
  color: var(--ahf-text);
  font-family: var(--ah-font);
  padding: 56px 0 44px;
  border-top: 1px solid var(--ahf-border);
}

.ah-footer *  { box-sizing: border-box; }
.ah-footer a  { color: inherit; text-decoration: none; }
.ah-footer p  { margin: 0; }

.ah-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.25fr 1.25fr;
  gap: 40px;
}

.ah-footer__col { min-width: 0; }

/* Column 1 — brand */
.ah-footer__logo {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 14px;
  color: var(--ahf-text);
}
.ah-footer__logo:hover { color: var(--ahf-brand); }

.ah-footer__tagline {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--ahf-muted);
  max-width: 42ch;
}

/* Column headings */
.ah-footer__title {
  margin: 0 0 16px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ahf-text);
}

/* Column 2 — categories */
.ah-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.ah-footer__list a {
  font-size: .9rem;
  color: var(--ahf-muted);
  transition: color .18s, padding-left .18s;
}
.ah-footer__list a:hover {
  color: var(--ahf-brand);
  padding-left: 4px;
}

.ah-footer__muted {
  font-size: .85rem;
  color: var(--ahf-muted);
  line-height: 1.6;
}

/* Columns 3 & 4 — authors */
.ah-footer__bio {
  font-size: .87rem;
  line-height: 1.65;
  color: var(--ahf-muted);
  margin-bottom: 16px !important;
}

.ah-social { display: flex; gap: 10px; }

.ah-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--ahf-border);
  color: var(--ahf-muted);
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.ah-social__link:hover {
  color: #fff;
  transform: translateY(-2px);
}
.ah-social__link svg { display: block; }

/*
 * Brand colours on hover. These sit after the generic :hover above so they win
 * on source order — both selectors have the same specificity.
 */
.ah-social__link--youtube:hover {
  background: #ff0000;
  border-color: #ff0000;
}
.ah-social__link--facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}
.ah-social__link--instagram:hover {
  /* Instagram's identity is the gradient, not a single colour. */
  background: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  border-color: transparent;
}

/* GeneratePress copyright bar underneath */
.ah-copy a { text-decoration: underline; }
.ah-copy a:hover { color: var(--ah-brand); }

@media (max-width: 1080px) {
  .ah-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px 32px; }
}

@media (max-width: 600px) {
  .ah-footer { padding: 40px 0 32px; }
  .ah-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .ah-footer__tagline { max-width: none; }
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .ah-reviews { grid-template-columns: repeat(2, 1fr); }
  .ah-grid    { grid-template-columns: repeat(2, 1fr); }
  .ah-split   { grid-template-columns: 1fr; }
  .ah-split__side { position: static; grid-template-columns: repeat(2, 1fr); }
  .ah-trust   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --ah-gap: 20px; }
  .ah-hero__grid { grid-template-columns: 1fr; }
  .ah-lead { min-height: 340px; }
  .ah-hero__side { grid-template-rows: none; }
  .ah-duo { grid-template-columns: 1fr; gap: 40px; }
  .ah-section { padding: 36px 0; }
}

@media (max-width: 600px) {
  .ah-reviews,
  .ah-grid,
  .ah-split__main .ah-grid,
  .ah-split__side,
  .ah-trust { grid-template-columns: 1fr; }
  .ah-lead__body { padding: 20px; }
  .ah-news { padding: 32px 20px; }
  .ah-news__form { flex-direction: column; }
  .ah-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ah-home *,
  .ah-home *::before,
  .ah-home *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
