/* ==========================================================================
   Alawin review — offer showcase + layout corrections
   Loaded last on purpose: it repairs legacy theme rules without touching
   the three original stylesheets.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Legacy variables that are referenced but never defined in the theme.
      Without these, several rules resolve to "invalid" (e.g. the mobile menu
      had a transparent background with light text on it).
   -------------------------------------------------------------------------- */
:root {
  --color-primary-dark: #123f37;
  --color-accent: #16a34a;
  --accent-dark: #13853d;
  --accent-secondary: #0f766e;
  --bg-page: #f5f3ee;
  --text-primary: #17201d;
  --text-secondary: #5c6662;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: inherit;
  --font-md: 0.95rem;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --gap: 16px;
  --img-radius: 16px;
  --max-width: 1160px;
  --shadow-md: 0 10px 24px rgba(0, 0, 0, .08);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-xl: 32px;
  --transition: .2s ease;
}

/* --------------------------------------------------------------------------
   2. Header: readable contrast + no clipped navigation at wide widths.
      The old bar (#42840b) left the last menu item cut at 1440px and gave
      the cream menu text a ~3:1 contrast ratio.
   -------------------------------------------------------------------------- */
.site-header {
  background: #164f45;
}

.header-nav {
  padding-inline: 24px;
  gap: 24px;
}

.main-menu,
.nav-menu {
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.15rem;
}

.nav-menu a,
.main-menu a {
  color: #ffe9bf;
}

.nav-menu a:hover,
.main-menu a:hover {
  color: #ffffff;
}

@media (max-width: 1400px) {
  .nav-menu a,
  .main-menu a {
    font-size: 0.95rem;
  }
}

@media (max-width: 1100px) {
  .main-navigation,
  .main-navigation.active {
    background: #0f3a33;
  }
}

/* Menu items: keyboard focus must stay visible. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #16a34a;
  outline-offset: 3px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   3. Hero sizing — the H1 used to break "2026" onto a line of its own and
      left ~200px of dead space before the intro copy.
   -------------------------------------------------------------------------- */
.main {
  padding-top: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.65rem);
  text-wrap: balance;
  max-width: 20ch;
  margin-inline: auto;
}

@media (min-width: 900px) {
  h1 {
    max-width: none;
  }
}

.wrap.hero.shell {
  padding-block: 30px 40px;
  align-items: start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 24px;
}

.hero-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

/* Anchors must clear the sticky header. */
h2[id],
section[id],
[id^="toc"] {
  scroll-margin-top: 92px;
}

/* --------------------------------------------------------------------------
   4. Offer showcase
   -------------------------------------------------------------------------- */
.offer {
  position: relative;
  margin: 26px 0 22px;
  background: #ffffff;
  border: 1px solid #e2e6e1;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(22, 79, 69, .10);
  overflow: hidden;
}

.offer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #16a34a, #164f45 55%, #f59e0b);
}

.offer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) 260px;
  gap: 28px;
  align-items: center;
  padding: 28px 28px 26px;
}

.offer-brand {
  min-width: 0;
}

.offer-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e7f6ec;
  color: #14663c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.offer-logo {
  display: block;
  width: auto;
  height: 46px;
  margin-bottom: 10px;
  border-radius: 0;
}

.offer p {
  text-align: left;
}

.offer-sub {
  margin: 0 0 12px;
  color: #5c6662;
  font-size: 14px;
  line-height: 1.45;
}

.offer-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer-facts li {
  margin: 0;
  padding: 4px 9px;
  border: 1px solid #e2e6e1;
  border-radius: 8px;
  color: #3f4a46;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.offer-deal {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid #e8ebe7;
}

.offer-label {
  margin: 0 0 4px;
  color: #5c6662;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.offer-amount {
  margin: 0;
  color: #10201b;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.offer-amount .offer-pct {
  color: #16a34a;
}

.offer-amount .offer-up {
  font-size: .58em;
  font-weight: 700;
  color: #5c6662;
  letter-spacing: 0;
}

.offer-spins {
  margin: 6px 0 0;
  color: #10201b;
  font-size: 1.05rem;
  font-weight: 700;
}

.offer-note {
  margin: 12px 0 0;
  color: #67716c;
  font-size: 11.5px;
  line-height: 1.45;
}

.offer-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.offer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 14px;
  background: #164f45;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 12px 24px rgba(22, 79, 69, .22);
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}

.offer-cta:hover {
  background: #1d6b5c;
  box-shadow: 0 14px 28px rgba(22, 79, 69, .28);
}

.offer-cta:active {
  transform: scale(.99);
}

.offer-cta span[aria-hidden] {
  font-size: 1.1em;
  transition: transform .15s ease;
}

.offer-cta:hover span[aria-hidden] {
  transform: translateX(3px);
}

.offer-link {
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: #164f45;
}

.offer-lic {
  margin: 2px 0 0;
  color: #67716c;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

/* Card CTA in the closing banner uses the inverted palette. */
.offer-cta--invert {
  background: #ffffff;
  color: #164f45 !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}

.offer-cta--invert:hover {
  background: #f2efe7;
  color: #123f37 !important;
}

/* --------------------------------------------------------------------------
   5. Trust strip + closing banner
   -------------------------------------------------------------------------- */
.tc-trust-header {
  margin-bottom: 6px;
}

.offer-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 54px auto 8px;
  padding: 30px 32px;
  border-radius: 22px;
  background: linear-gradient(120deg, #123f37 0%, #164f45 55%, #1d6b5c 100%);
  color: #f3f1e9;
}

.offer-close h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: -.02em;
}

.offer-close p {
  margin: 0;
  max-width: 58ch;
  color: #d9e5df;
  font-size: 14.5px;
  line-height: 1.55;
}

.offer-close .offer-cta {
  flex: 0 0 auto;
  min-width: 220px;
}

.offer-close small {
  display: block;
  margin-top: 10px;
  color: #b9cbc3;
  font-size: 11.5px;
}

/* --------------------------------------------------------------------------
   6. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .offer-inner {
    grid-template-columns: minmax(0, 1fr) 260px;
    row-gap: 22px;
  }

  .offer-deal {
    padding-left: 0;
    border-left: 0;
  }

  .offer-buy {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
  }

  .offer-buy {
    justify-content: flex-start;
  }

  .offer-buy .offer-cta {
    flex: 0 1 380px;
  }

  .offer-link,
  .offer-lic {
    text-align: left;
  }

  .offer-lic {
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .offer {
    margin: 20px 0 18px;
    border-radius: 18px;
  }

  .offer-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px 20px;
  }

  .offer-logo {
    height: 38px;
  }

  .offer-buy {
    flex-direction: column;
    align-items: stretch;
  }

  .offer-buy .offer-cta {
    flex: none;
    width: 100%;
  }

  .offer-link,
  .offer-lic {
    text-align: center;
  }

  .offer-close {
    flex-direction: column;
    align-items: stretch;
    margin-top: 38px;
    padding: 24px 20px;
    border-radius: 18px;
  }

  .offer-close .offer-cta {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer-cta,
  .offer-cta span[aria-hidden] {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   7. Small-screen corrections
   -------------------------------------------------------------------------- */

/* The theme hides the trust-strip labels below 640px, which left five
   unlabelled icons. Keep the labels and let the strip wrap instead. */
@media (max-width: 640px) {
  .tc-trust-header--s1 {
    flex-wrap: wrap;
    gap: 6px 2px;
    padding: 8px 6px;
    justify-content: center;
  }

  .tc-trust-header--s1 .tc-trust-badge {
    padding: 4px 8px;
    gap: 5px;
    font-size: 11px !important;
  }

  .tc-trust-header--s1 .tc-trust-badge--license,
  .tc-trust-header--s1 .tc-trust-badge--geo,
  .tc-trust-header--s1 .tc-trust-badge--payouts,
  .tc-trust-header--s1 .tc-trust-badge--age {
    font-size: 11px !important;
  }
}

/* Justified copy without hyphenation turns into rivers on a phone. */
@media (max-width: 760px) {
  main [class] p,
  main [class] li {
    text-align: left !important;
  }

  .eyebrow {
    letter-spacing: .05em;
    font-size: .76rem;
  }

  .hero-actions {
    justify-content: center;
  }
}

/* Secondary hero link: same hit area and shape as the primary button. */
.hero-actions .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #cfd8d3;
  border-radius: 999px;
  color: #164f45;
  text-decoration: none;
}

.hero-actions .text-link:hover {
  border-color: #164f45;
  text-decoration: none;
}

/* Keep the five trust badges on one row on small tablets — otherwise the
   last one (18+) drops onto a line of its own. */
@media (min-width: 641px) and (max-width: 980px) {
  .tc-trust-header--s1 {
    padding: 4px;
  }

  .tc-trust-header--s1 .tc-trust-badge {
    padding: 6px 9px;
    font-size: 12px;
  }

  .tc-trust-header--s1 .tc-trust-badge-icon svg {
    width: 14px;
    height: 14px;
  }
}

/* The 1100px+ rule in style.css sets a 15px inline padding with a later
   source order, which left the last menu item almost touching the edge. */
@media (min-width: 1100px) {
  .header-nav {
    padding: 13px 26px;
  }
}

/* Headings were hyphenating mid-word ("with-drawal") on narrow screens. */
h1, h2, h3, .offer-amount, .offer-close h2 {
  -webkit-hyphens: manual;
  hyphens: manual;
}

/* The "Recommend" cards put white copy straight onto a screenshot; the inline
   gradient was not strong enough once the cards stack on a phone. */
.child-pages-showcase a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .58) 100%);
  pointer-events: none;
  z-index: 1;
}

.child-pages-showcase a > div {
  z-index: 2;
}
