/* ==========================================================================
   Stackz Gaming — rebuilt theme
   Palette pulled from the original logo: navy #202030, green #30c870,
   red #c83030. Self-contained (no external fonts/requests).
   ========================================================================== */

:root {
  --navy:      #202030;
  --navy-2:    #2a2a3d;
  --navy-3:    #33334a;
  --green:     #30c870;
  --green-dk:  #24a85c;
  --red:       #c83030;
  --red-br:    #e84a43;
  --page:      #f4f5f7;
  --card:      #ffffff;
  --ink:       #202030;
  --muted:     #6a6a76;
  --line:      #e5e6ea;
  --shadow:    0 2px 4px rgba(32,32,48,.06), 0 8px 24px rgba(32,32,48,.08);
  --radius:    14px;
  --wrap:      1120px;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ------------------------------ Header ---------------------------------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 4px 20px rgba(0,0,0,.18);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 44px; height: 44px; background: #fff; border-radius: 10px; padding: 4px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: .2px; }
.brand-tag { font-size: .72rem; color: #b9b9c8; font-weight: 500; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: #d7d7e2; font-weight: 600; font-size: .92rem;
  padding: 8px 14px; border-radius: 8px; transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--navy-3); color: #fff; text-decoration: none; }

.nav-toggle {
  display: none; margin-left: auto; background: var(--navy-3); color: #fff;
  border: 0; font-size: 1.2rem; width: 44px; height: 40px; border-radius: 8px; cursor: pointer;
}

.site-main { padding: 40px 20px 64px; min-height: 60vh; }

/* -------------------------------- Hero ---------------------------------- */
.hero {
  text-align: center;
  background:
    linear-gradient(160deg, rgba(32,32,48,.82), rgba(42,42,61,.88)),
    url("../images/hero.jpg") center/cover no-repeat,
    linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #fff;
  border-radius: 20px;
  padding: 96px 24px;
  margin-bottom: 44px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 5px;
  background: linear-gradient(90deg, var(--green) 0 33%, var(--red) 33% 66%, var(--green) 66% 100%);
}
.hero-title { margin: 0; font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; letter-spacing: -.5px; }
.hero-tagline { margin: 10px 0 0; font-size: 1.15rem; color: #c7c7d6; }

/* ------------------------------- Why ------------------------------------ */
.section-heading {
  font-size: 1.4rem; font-weight: 800; margin: 0 0 20px;
  display: inline-block; position: relative; padding-bottom: 8px;
}
.section-heading::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 4px;
  border-radius: 4px; background: var(--green);
}
.why { margin-bottom: 52px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow); position: relative;
}
.why-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 12px;
}
.why-item:nth-child(2) .why-num { background: var(--green); }
.why-item:nth-child(3) .why-num { background: var(--red); }
.why-item p { margin: 0; color: #3a3a48; }

/* ------------------------- Section header row --------------------------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.see-all { font-weight: 700; }

/* ------------------------------- Cards ---------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 12px rgba(32,32,48,.10), 0 18px 40px rgba(32,32,48,.14); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--navy-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media--empty { display: grid; place-items: center; height: 100%; color: #55556e; font-weight: 900; letter-spacing: 3px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-cats, .post-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--green-dk); background: rgba(48,200,112,.12); padding: 3px 9px; border-radius: 999px;
}
.tag:hover { text-decoration: none; background: rgba(48,200,112,.2); }
.card-title { margin: 0; font-size: 1.12rem; line-height: 1.3; font-weight: 800; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--green-dk); text-decoration: none; }
.card-excerpt { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.card-meta { color: #9a9aa6; font-size: .8rem; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.dot { opacity: .5; }

/* ---------------------------- Listing head ------------------------------ */
.list-head { margin-bottom: 28px; }
.page-title { font-size: 2rem; font-weight: 900; margin: 0 0 16px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-filter a {
  font-weight: 700; font-size: .9rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line); padding: 7px 16px; border-radius: 999px;
}
.cat-filter a:hover { text-decoration: none; border-color: var(--green); }
.cat-filter a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.empty { color: var(--muted); }

/* ------------------------------ Pager ----------------------------------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 44px; }
.pager-btn {
  font-weight: 700; background: var(--navy); color: #fff; padding: 10px 20px; border-radius: 10px;
}
.pager-btn:hover { text-decoration: none; background: var(--navy-2); }
.pager-info { color: var(--muted); font-size: .9rem; }

/* ------------------------------- Post ----------------------------------- */
.post { max-width: 760px; margin: 0 auto; }
.post-header { margin-bottom: 22px; }
.post-title { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.15; margin: 12px 0 14px; }
.post-meta { color: var(--muted); font-size: .9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-cover { margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-cover img { width: 100%; }

.post-body { font-size: 1.08rem; color: #26262f; }
.post-body h2 { font-size: 1.5rem; font-weight: 800; margin: 2em 0 .6em; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.post-body h3 { font-size: 1.2rem; font-weight: 800; margin: 1.6em 0 .5em; }
.post-body p { margin: 0 0 1.15em; }
.post-body ul, .post-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.post-body li { margin: .3em 0; }
.post-body a { color: var(--green-dk); text-decoration: underline; }
.post-body strong { color: var(--navy); }
.post-body blockquote {
  margin: 1.4em 0; padding: 4px 20px; border-left: 4px solid var(--green);
  background: #eefaf2; border-radius: 0 10px 10px 0; color: #2c3b33;
}
.post-body code { background: #eceef1; padding: 2px 6px; border-radius: 5px; font-size: .92em; }
.post-body figure { margin: 1.6em 0; }
.post-body figure img { border-radius: 10px; box-shadow: var(--shadow); }
.post-body figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 8px; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.post-footer { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.back-link { font-weight: 700; }

/* ------------------------------ 404 ------------------------------------- */
.notfound { text-align: center; padding: 80px 20px; }
.notfound h1 { font-size: 5rem; margin: 0; color: var(--navy); font-weight: 900; }
.btn, .notfound .btn {
  display: inline-block; margin-top: 16px; background: var(--green); color: #fff;
  font-weight: 700; padding: 12px 24px; border-radius: 10px;
}
.btn:hover { text-decoration: none; background: var(--green-dk); }

/* ----------------------------- Footer ----------------------------------- */
.site-footer { background: var(--navy); color: #c7c7d6; margin-top: 40px; }
.site-footer::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--green), var(--red)); }
.footer-inner { padding: 40px 20px; display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 46px; height: 46px; background: #fff; border-radius: 10px; padding: 4px; }
.footer-brand strong { color: #fff; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a { color: #c7c7d6; font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.copyright { margin: 0; color: #8a8a9a; font-size: .85rem; }
.muted { color: #8a8a9a; }

/* --------------------------- Responsive --------------------------------- */
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    background: var(--navy-2); flex-direction: column; align-items: stretch; padding: 8px;
    box-shadow: 0 12px 24px rgba(0,0,0,.3);
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .card-grid { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
}
