/*
Theme Name: CA17 LightGrid (ACF) — Canada
Theme URI: https://example.com/
Author: Your Team
Description: Light UI with topbar + search + tabs and games grid. All links from ACF Options. Canada locale.
Version: 1.0.0
Text Domain: ca17-lightgrid-ca
Requires at least: 6.0
Requires PHP: 8.0
License: GPLv2 or later
*/

:root{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --card:#ffffff;

  --text:#0b1220;
  --muted: rgba(11,18,32,.68);
  --line: rgba(11,18,32,.10);

  --accent:#ff3b5c;
  --accent2:#ff9a2a;
  --blue:#2f6bff;

  --radius: 16px;
  --radius2: 22px;

  --shadow: 0 12px 30px rgba(11,18,32,.10);
  --shadow2: 0 10px 22px rgba(255,59,92,.10);

  --wrap: 1240px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  --display: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 70% 10%, rgba(47,107,255,.08), transparent 60%),
    radial-gradient(900px 520px at 20% 20%, rgba(255,59,92,.06), transparent 56%),
    var(--bg);
}

img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid rgba(47,107,255,.45);
  outline-offset: 2px;
  border-radius: 12px;
}
.wrap{ max-width: var(--wrap); margin:0 auto; padding: 0 16px; }

.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;
}
.flag{ display:block; border-radius:2px; box-shadow: 0 4px 10px rgba(0,0,0,.10); }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 950;
  border: 1px solid transparent;
  background: transparent;
  cursor:pointer;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active{ transform: translateY(1px) scale(.99); }

.btn--ghost{
  background: rgba(11,18,32,.04);
  border-color: rgba(11,18,32,.10);
  color: rgba(11,18,32,.92);
}
.btn--ghost:hover{ background: rgba(11,18,32,.06); border-color: rgba(47,107,255,.20); }

.btn--accent{
  background: linear-gradient(180deg, rgba(255,154,42,.98), rgba(255,59,92,.92));
  color: #fff;
  box-shadow: var(--shadow2);
}
.btn--accent:hover{ filter: brightness(1.03); }

.link{
  color: rgba(11,18,32,.92);
  text-decoration: underline;
  text-decoration-color: rgba(47,107,255,.30);
  text-underline-offset: 3px;
}
.link:hover{ text-decoration-color: rgba(47,107,255,.70); }

/* Topbar */
.topbar{
  position: sticky;
  top:0;
  z-index: 60;
  background: rgba(246,247,251,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(11,18,32,.08);
}
.trow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 0;
}
.brand{
  display:flex; align-items:center; gap:10px;
  min-width: 160px;
}
.brand__logo{ height: 28px; width:auto; }
.brand__text{
  font-family: var(--display);
  font-weight: 1000;
  letter-spacing:.6px;
  text-transform: uppercase;
}

.nav{
  display:flex; align-items:center; gap: 10px;
  overflow:auto;
  scrollbar-width:none;
}
.nav::-webkit-scrollbar{ display:none; }
.nav__a{
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.75);
  font-weight: 950;
  color: rgba(11,18,32,.92);
  white-space: nowrap;
}
.nav__a:hover{ border-color: rgba(47,107,255,.22); }

.tright{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
  min-width: 280px;
}
.iconbtn{
  width: 44px; height:44px;
  border-radius: 14px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.75);
  display:grid;
  place-items:center;
}
.iconbtn:hover{ border-color: rgba(47,107,255,.22); }
.iconbtn svg{ width:18px; height:18px; fill: currentColor; opacity:.9; }

.locale{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(11,18,32,.10);
  font-weight: 950;
  color: rgba(11,18,32,.82);
  font-size: 13px;
}

@media (max-width: 980px){
  .nav{ display:none; }
  .tright{ min-width: 0; }
}

/* Search + pills area */
.toolbar{
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow);
}
.search{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(11,18,32,.04);
  border: 1px solid rgba(11,18,32,.08);
}
.search__icon{ opacity:.75; }
.search input{
  border:0; outline:none;
  background: transparent;
  width:100%;
  font-weight: 850;
  color: rgba(11,18,32,.92);
}
.search input::placeholder{ color: rgba(11,18,32,.45); }

.pills{
  display:flex;
  gap: 10px;
  overflow:auto;
  padding: 12px 2px 2px;
  margin: 0;
  list-style:none;
  scrollbar-width:none;
}
.pills::-webkit-scrollbar{ display:none; }
.pill__a{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.80);
  font-weight: 950;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(11,18,32,.90);
}
.pill__a:hover{ border-color: rgba(47,107,255,.22); }
.pill__a--active{
  background: rgba(47,107,255,.10);
  border-color: rgba(47,107,255,.28);
}
.pill__icon svg{ width:16px; height:16px; fill: currentColor; opacity:.9; display:block; }

/* Section head */
.section{ padding-top: 14px; }
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 0 10px;
}
.section-head__title{
  margin:0;
  font-family: var(--display);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing:.25px;
  font-size: 14px;
  color: rgba(11,18,32,.88);
}
.section-head__more{
  color: rgba(11,18,32,.68);
  font-weight: 900;
  font-size: 13px;
  border-bottom: 1px solid rgba(47,107,255,.22);
}
.section-head__more:hover{ color: rgba(11,18,32,.92); border-bottom-color: rgba(47,107,255,.55); }

/* Games grid */
.gridbox{
  border-radius: var(--radius2);
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.gridbox__inner{ padding: 12px; }

.ggrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
@media (min-width: 720px){
  .ggrid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 1100px){
  .ggrid{ grid-template-columns: repeat(7, minmax(0,1fr)); }
}

.gcard{
  border-radius: 18px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.95);
  overflow:hidden;
  transition: transform .12s ease, border-color .18s ease, box-shadow .18s ease;
}
.gcard:hover{
  transform: translateY(-1px);
  border-color: rgba(47,107,255,.18);
  box-shadow: 0 14px 30px rgba(11,18,32,.10);
}
.gmedia{
  aspect-ratio: 1 / 1;
  background: rgba(11,18,32,.06);
}
.gmedia img{ width:100%; height:100%; object-fit: cover; }
.gbody{ padding: 10px 10px 12px; }
.gtitle{ margin:0; font-weight: 1000; font-size: 12px; line-height: 1.25; color: rgba(11,18,32,.92); }

/* SEO + footer */
.seo{
  margin-top: 14px;
  border-radius: var(--radius2);
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow);
  padding: 16px;
}
@media (min-width: 980px){ .seo{ padding: 22px; } }
.seo__title{
  margin:0 0 10px;
  font-family: var(--display);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing:.25px;
}
.prose{ max-width: 980px; color: rgba(11,18,32,.86); }
.prose p{ margin: 0 0 12px; line-height: 1.7; color: rgba(11,18,32,.76); }
.prose a{ color: rgba(11,18,32,.92); text-decoration: underline; text-decoration-color: rgba(47,107,255,.30); text-underline-offset: 3px; }
.prose a:hover{ text-decoration-color: rgba(47,107,255,.75); }

.site-footer{
  margin-top: 18px;
  border-top: 1px solid rgba(11,18,32,.08);
  background: rgba(255,255,255,.60);
  padding: 22px 0 30px;
}
.footer-note{ color: rgba(11,18,32,.62); font-size: 12px; line-height: 1.6; }
.footer-note__copy{ color: rgba(11,18,32,.50); font-weight: 850; margin-top: 6px; }

a {
    color: #ffd001;
}