/*
Theme Name: iGaming AffHub
Theme URI: https://igamingaffhub.com
Author: iGaming AffHub
Author URI: https://igamingaffhub.com
Version: 1.0.0
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: igaming-affhub
*/

:root {
  --bg:        #0B0E14;
  --bg-2:      #0E131C;
  --surface:   #141B28;
  --surface-2: #1A2233;
  --border:    #232E42;
  --border-2:  #33405A;

  --text:      #D6DDEA;
  --muted:     #8B97AE;
  --heading:   #FFFFFF;

  --accent:    #8B7CFF;
  --accent-2:  #22D3EE;
  --grad:      linear-gradient(135deg, #7C5CFF 0%, #22D3EE 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,92,255,0.16), rgba(34,211,238,0.16));

  --radius:    16px;
  --radius-sm: 10px;
  --pill:      999px;
  --glow:      0 14px 44px -14px rgba(124,92,255,0.5);

  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --sans:    "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 50% -240px, rgba(124,92,255,0.14), transparent 62%),
    radial-gradient(900px 520px at 88% 8%, rgba(34,211,238,0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--heading); font-weight: 600; line-height: 1.2; margin: 0; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #6BE6F5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
  background: var(--grad);
  color: #08101A;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); color: #08101A; }
.btn--ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--heading);
}
.btn--ghost:hover { background: var(--surface); box-shadow: none; color: var(--heading); }

/* ---------- category labels / tags ---------- */
/* distinctive "chamfered chip" with a gradient diamond marker */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--heading);
  background: var(--surface-2);
  padding: 0.44rem 0.9rem 0.44rem 0.72rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background 0.18s ease, color 0.18s ease;
}
.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--grad);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); /* diamond */
}
a.pill:hover { background: var(--surface); color: var(--accent-2); }
a.pill:hover::before { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.85)); }

/* ---------- navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 1rem; height: 70px; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand__logo { width: 34px; height: 34px; }
.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--heading);
}
.brand__name span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav__links { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.nav__links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--heading); background: var(--surface); }
.nav__cta { margin-left: 0.5rem; }

.nav__burger {
  display: none;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  cursor: pointer;
}
.nav__burger span { display: block; width: 20px; height: 2px; background: var(--heading); border-radius: 2px; }
.nav__burger span + span { margin-top: 4px; }

.nav__mobile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem clamp(1.1rem, 4vw, 2rem) 1.2rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.nav__mobile a {
  color: var(--text);
  font-weight: 600;
  padding: 0.7rem 0.6rem;
  border-radius: var(--radius-sm);
}
.nav__mobile a:hover { background: var(--surface); color: var(--heading); }
.nav__mobile .btn { margin-top: 0.5rem; justify-content: center; }

/* ---------- hero (home) ---------- */
.hero { text-align: center; padding: 4.2rem 0 2.4rem; }
.hero__eyebrow { margin-bottom: 1.2rem; }
.hero__title {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin: 0 auto 1.1rem;
}
.hero__sub { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto 1.8rem; }
.hero__cta { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- featured post ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 3rem;
}
.featured__body { padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; gap: 1rem; }
.featured__title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}
.featured__title a { color: var(--heading); }
.featured__title a:hover { color: var(--accent-2); }
.featured__excerpt { color: var(--muted); font-size: 1.02rem; }
.featured__meta { display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.82rem; margin-top: auto; }
.featured__aside {
  background: var(--grad);
  color: #08101A;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.featured__badge { font-family: var(--display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.featured__mark { align-self: flex-end; }
.featured__mark svg { width: 108px; height: 108px; opacity: 0.9; }
.featured__cue { font-family: var(--display); font-weight: 700; font-size: 1.4rem; display: inline-flex; align-items: center; gap: 0.5rem; }

/* ---------- section head ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }
.sec-head h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 0.6rem; }
.sec-head h2::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 4px;
  background: var(--grad);
}
.sec-head a { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.sec-head a:hover { color: var(--heading); }

/* ---------- card grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: 0 18px 44px -22px rgba(0,0,0,0.85); }
.card:hover::before { opacity: 1; }
.card__title { font-size: 1.16rem; line-height: 1.32; }
.card__title a { color: var(--heading); }
.card__title a:hover { color: var(--accent-2); }
.card__excerpt { color: var(--muted); font-size: 0.92rem; flex: 1; }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.card__foot .meta { display: inline-flex; align-items: center; gap: 0.45rem; }
.card__more { color: var(--accent-2); font-weight: 700; white-space: nowrap; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-2); display: inline-block; }

/* ---------- pagination (WordPress the_posts_pagination) ---------- */
.pagination { margin: 3rem 0 0.5rem; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem; }
.pagination .page-numbers {
  min-width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
a.page-numbers:hover { border-color: var(--accent); color: var(--heading); }
.pagination .current { background: var(--grad); color: #08101A; border-color: transparent; }
.pagination .dots { border: 0; background: none; color: var(--muted); min-width: auto; }
.pagination .prev, .pagination .next { width: auto; padding: 0 1.1rem; }

/* ---------- article (single) ---------- */
.article { max-width: 760px; margin-inline: auto; padding: 2.6rem 0 1rem; }
.article__title { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0.9rem 0 1rem; }
.article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; color: var(--muted); font-size: 0.9rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border); }
.article__meta strong { color: var(--text); font-weight: 700; }

.prose { font-size: 1.08rem; line-height: 1.85; color: #C7D0E0; }
.prose > p:first-of-type { font-size: 1.18rem; color: #DCE3F0; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 { font-size: 1.55rem; margin: 2.2rem 0 0.8rem; }
.prose h3 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; color: var(--heading); font-family: var(--display); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose ul li::marker { color: var(--accent); }
.prose blockquote {
  margin: 1.8rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--grad-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: #E7EBF3;
  font-size: 1.15rem;
}
.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

/* tags row */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0; max-width: 760px; margin-inline: auto; }

/* prev / next — connected pager with a central hub node */
.postnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  margin-top: 2.6rem;
  max-width: 760px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.postnav__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  transition: background 0.2s ease;
}
.postnav__item:hover { background: var(--grad-soft); }
.postnav__next { flex-direction: row-reverse; text-align: right; }
.postnav__arrow {
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.2s ease;
}
.postnav__prev:hover .postnav__arrow { transform: translateX(-5px); }
.postnav__next:hover .postnav__arrow { transform: translateX(5px); }
.postnav__dir {
  display: block;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.4rem;
}
.postnav__ttl { display: block; color: var(--heading); font-weight: 600; font-family: var(--display); line-height: 1.3; font-size: 0.98rem; }
.postnav__hub {
  display: grid;
  place-items: center;
  padding: 0 0.5rem;
  background: var(--bg-2);
  border-inline: 1px solid var(--border);
}
.postnav__hub-disc {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px -8px rgba(124, 92, 255, 0.7);
}
.postnav__hub-disc svg { width: 26px; height: 26px; }

/* ---------- page head (category / archive) ---------- */
.page-head { padding: 3rem 0 0.5rem; }
.page-head__eyebrow { margin-bottom: 1rem; }
.page-head__title { font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; }
.page-head__desc { color: var(--muted); max-width: 640px; margin-top: 0.9rem; font-size: 1.05rem; }
.page-head__count { color: var(--muted); font-size: 0.85rem; margin-top: 0.8rem; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(3rem, 10vw, 6.5rem) 1rem; max-width: 640px; margin-inline: auto; }
.notfound__code { font-family: var(--display); font-weight: 700; font-size: clamp(6rem, 24vw, 13rem); line-height: 0.9; letter-spacing: -0.03em; }
.notfound__title { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0.4rem 0 1rem; }
.notfound__text { color: var(--muted); margin: 0 auto 2rem; max-width: 460px; }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: 4rem; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.7fr; gap: 2rem; padding: 3.2rem 0 2.4rem; }
.footer__brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.footer__blurb { color: var(--muted); font-size: 0.9rem; max-width: 34ch; }
.footer h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--heading); margin-bottom: 1.1rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.footer__links a { color: var(--muted); font-size: 0.9rem; }
.footer__links a:hover { color: var(--heading); }
.subscribe { display: flex; gap: 0.5rem; margin-bottom: 0.7rem; }
.subscribe input {
  flex: 1; min-width: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--pill); padding: 0.65rem 1rem;
  color: var(--text); font: inherit; font-size: 0.9rem;
}
.subscribe input::placeholder { color: var(--muted); }
.subscribe .btn { padding: 0.65rem 1.1rem; }
.footer__note { color: var(--muted); font-size: 0.78rem; }
.socials { display: flex; gap: 0.5rem; margin-top: 1rem; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--muted);
  font-size: 0.8rem; font-weight: 700;
}
.socials a:hover { border-color: var(--accent); color: var(--heading); }
.footer__bottom { border-top: 1px solid var(--border); }
.footer__bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; padding-block: 1.3rem; color: var(--muted); font-size: 0.84rem; }
.footer__bottom a { color: var(--muted); }
.footer__bottom a:hover { color: var(--heading); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured__aside { flex-direction: row; align-items: center; min-height: 0; }
  .featured__mark svg { width: 64px; height: 64px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer__brandcol { grid-column: 1 / -1; }
  .footer__subcol { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .postnav { grid-template-columns: 1fr; }
  .postnav__item { justify-content: space-between; }
  .postnav__hub { border-inline: 0; border-block: 1px solid var(--border); padding: 0.7rem 0; }
  .footer__top { grid-template-columns: 1fr; }
  .hero { padding-top: 2.8rem; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}


/* ============================================================
   WordPress integration helpers
   ============================================================ */

/* skip link + screen-reader text */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--heading);
  border: 1px solid var(--border-2); border-radius: 10px;
  padding: 0.7rem 1.1rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden;
  position: absolute !important; white-space: nowrap;
}

/* nav current-item highlight (mirrors [aria-current]) */
.nav__links .current-menu-item > a,
.nav__links .current_page_item > a,
.nav__links .current-cat > a { color: var(--heading); background: var(--surface); }
.nav__links .sub-menu { display: none; }
.nav__mobile .current-menu-item > a,
.nav__mobile .current-cat > a { background: var(--surface); color: var(--heading); }
.nav__mobile .sub-menu { display: none; }

/* menu markup resets for wp_nav_menu (<ul><li><a>) */
.nav__desktop { margin-left: auto; display: flex; }
.nav__links { margin: 0; padding: 0; list-style: none; }
.nav__links li { list-style: none; }
.nav__mobile-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.nav__mobile-list li { list-style: none; }

/* footer tags row */
.footer__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* newsletter response message */
.subscribe__msg { font-size: 0.82rem; margin: 0.1rem 0 0.7rem; min-height: 1.1em; }
.subscribe__msg.is-success { color: #5EE6A8; }
.subscribe__msg.is-error { color: #FF7A90; }

/* WordPress core content alignment / caption classes (post body) */
.prose .alignleft  { float: left;  margin: 0.4rem 1.4rem 1rem 0; }
.prose .alignright { float: right; margin: 0.4rem 0 1rem 1.4rem; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose img { height: auto; border-radius: 12px; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .prose figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; }
.sticky, .bypostauthor { display: block; }

/* comments are intentionally omitted to match the source design */
