/*
Theme Name: AKG Official
Theme URI: https://apunkagames.net
Author: ApunKaGames
Description: SEO-friendly superfast modern WordPress gaming theme.
Version: 1.0
License: GPLv2 or later
Text Domain: akg-official
*/

/* ==================================================
   THEME COLOR TOKENS (DARK DEFAULT)
================================================== */
:root{
  --bg:#0b0f14;
  --surface:#0f1620;
  --surface2:#0e141c;
  --text:#e8eef6;
  --muted:#9fb0c4;
  --border:#1b2430;
  --thumbbg:#0b0f14;

  /* Slider overlay (dark) */
  --hero-overlay:linear-gradient(180deg, transparent 0%, rgba(0,0,0,.72) 60%, rgba(0,0,0,.85) 100%);
}

/* LIGHT MODE OVERRIDES (applied via body class) */
body.akg-mode-light{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface2:#ffffff;
  --text:#0b0f14;
  --muted:#5b6778;
  --border:#e5e7eb;
  --thumbbg:#eef2f7;

  /* Slider overlay (light) */
  --hero-overlay:linear-gradient(180deg, transparent 0%, rgba(255,255,255,.72) 60%, rgba(255,255,255,.92) 100%);
}

/* ==================================================
   RESET / BASE
================================================== */
*{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.6;
}

a{color:inherit;text-decoration:none}
a:hover{opacity:.92}

img{max-width:100%;height:auto;display:block}

/* Links readability in light mode */
body.akg-mode-light a{color:#111827}

/* ==================================================
   CONTAINER
================================================== */
.container{
  max-width:1200px;
  margin:0 auto;
  padding:16px;
}

/* ==================================================
   HEADER
================================================== */
.site-header{
  background:var(--surface2);
  border-bottom:1px solid var(--border);
}
.site-header .container{
  display:flex;
  align-items:center;
}
.site-title{
  font-size:20px;
  font-weight:900;
}

/* ==================================================
   FOOTER
================================================== */
.site-footer{
  border-top:1px solid var(--border);
  margin-top:30px;
  padding:20px 0;
  color:var(--muted);
  text-align:center;
}

/* ==================================================
   APUNKA GAMES – GRID (Homepage Latest Games)
================================================== */
.apg2-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
@media (max-width:1100px){
  .apg2-grid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:768px){
  .apg2-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:480px){
  .apg2-grid{grid-template-columns:1fr}
}

/* Card */
.apg2-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
}

/* Thumb */
.apg2-thumb{
  display:block;
  aspect-ratio:16/9;
  background:var(--thumbbg);
}
.apg2-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Content */
.apg2-card-body{padding:12px}
.apg2-title{
  margin:0 0 6px;
  font-size:14px;
  font-weight:900;
  line-height:1.3;
}
.apg2-meta{
  font-size:12px;
  color:var(--muted);
}

/* ==================================================
   SINGLE POST + SIDEBAR
================================================== */
.main-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
}
@media(max-width:900px){
  .main-layout{grid-template-columns:1fr}
}

.post-box{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
}

.post-title{
  font-size:26px;
  margin:0 0 10px;
}

.post-content{
  font-size:15px;
  color:var(--text);
}

/* Sidebar */
.sidebar{
  position:sticky;
  top:90px;
}

.widget{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  margin-bottom:14px;
}

.widget-title{
  font-size:14px;
  margin:0 0 10px;
  text-transform:uppercase;
  color:var(--muted);
}


/* ================================
   Sidebar Option (Right/Left/Off)
   Works with: .container.main-layout.akg-layout
================================ */

.container.main-layout.akg-layout{
  display:flex;
  gap:18px;
  align-items:flex-start;
}

.container.main-layout.akg-layout .akg-content{
  flex:1;
  min-width:0;
}

.container.main-layout.akg-layout .akg-sidebar{
  width:320px;
  max-width:320px;
}

/* Right (default) */
body.akg-sidebar-right .container.main-layout.akg-layout{
  flex-direction:row;
}

/* Left */
body.akg-sidebar-left .container.main-layout.akg-layout{
  flex-direction:row-reverse;
}

/* Off */
body.akg-sidebar-off .container.main-layout.akg-layout .akg-sidebar{
  display:none !important;
}
body.akg-sidebar-off .container.main-layout.akg-layout .akg-content{
  width:100%;
}

/* Mobile */
@media (max-width: 900px){
  .container.main-layout.akg-layout{
    flex-direction:column;
  }
  .container.main-layout.akg-layout .akg-sidebar{
    width:100%;
    max-width:100%;
  }
}



/* ==================================================
   HERO SLIDER (Popular)
================================================== */
.akg-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:16px;
  align-items:start;
  margin: 10px 0 18px;
}
@media (max-width:900px){
  .akg-top{ grid-template-columns:1fr; }
}

.akg-hero{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  overflow:hidden;
}

.akg-hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.akg-hero-title{
  margin:0;
  font-size:16px;
  font-weight:900;
}

.akg-hero-controls{
  display:flex;
  gap:8px;
}

.akg-hero-btn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--text);
  font-size:20px;
  font-weight:900;
  cursor:pointer;
}
.akg-hero-btn:hover{ opacity:.9; }

.akg-hero-track{
  position:relative;
  height:320px;
}
@media (max-width:600px){
  .akg-hero-track{ height:240px; }
}

.akg-hero-slide{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .35s ease;
}
.akg-hero-slide.is-active{
  opacity:1;
  pointer-events:auto;
}

.akg-hero-link{
  display:block;
  height:100%;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  position:relative;
  background:var(--thumbbg);
}

.akg-hero-media{
  position:absolute;
  inset:0;
}
.akg-hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(1.05);
}

.akg-hero-overlay{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:14px;
  background:var(--hero-overlay);
}

/* Badge + title */
.akg-hero-badge{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  margin-bottom:8px;
}

.akg-hero-h3{
  margin:0 0 6px;
  font-size:18px;
  line-height:1.2;
  font-weight:900;
}

/* Meta uses tokens (fix for light mode) */
.akg-hero-meta{
  font-size:12px;
  color:var(--muted);
}

/* Dots */
.akg-hero-dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:12px;
}
.akg-hero-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--bg);
  cursor:pointer;
}
.akg-hero-dot.is-active{
  width:22px;
  background:var(--text);
}

/* Sidebar sticky on home */
.akg-home-sidebar .sidebar{
  position:sticky;
  top:90px;
}

/* Fallback cover */
.akg-hero-fallback{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#111a25,#0b0f14);
  color:var(--muted);
  font-weight:900;
  letter-spacing:.4px;
}
body.akg-mode-light .akg-hero-fallback{
  background:linear-gradient(180deg,#ffffff,#eef2f7);
}



/* Default dark base */
body.akg-mode-dark{
  background:#0b0b0f;
  color:#eaeaea;
}

/* Light base */
body.akg-mode-light{
  background:#f6f6f8;
  color:#111;
}




/* ===== TOP AREA: HERO + SIDEBAR ===== */
.akg-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:16px;
  align-items:start;
  margin: 10px 0 18px;
}
@media (max-width:900px){
  .akg-top{ grid-template-columns:1fr; }
}

/* ===== HERO SLIDER ===== */
.akg-hero{
  background:#0f1620;
  border:1px solid #1b2430;
  border-radius:18px;
  padding:14px;
  overflow:hidden;
}

.akg-hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.akg-hero-title{
  margin:0;
  font-size:16px;
  font-weight:900;
}

.akg-hero-controls{
  display:flex;
  gap:8px;
}
.akg-hero-btn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid #1b2430;
  background:#0b0f14;
  color:#e8eef6;
  font-size:20px;
  font-weight:900;
  cursor:pointer;
}
.akg-hero-btn:hover{ opacity:.9; }

.akg-hero-track{
  position:relative;
  height:320px;
}
@media (max-width:600px){
  .akg-hero-track{ height:240px; }
}

.akg-hero-slide{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .35s ease;
}
.akg-hero-slide.is-active{
  opacity:1;
  pointer-events:auto;
}

.akg-hero-link{
  display:block;
  height:100%;
  border-radius:16px;
  overflow:hidden;
  border:1px solid #1b2430;
  position:relative;
  background:#0b0f14;
}

.akg-hero-media{
  position:absolute;
  inset:0;
}
.akg-hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(1.05);
}

.akg-hero-overlay{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:14px;
  background:linear-gradient(180deg, transparent 0%, rgba(0,0,0,.72) 60%, rgba(0,0,0,.85) 100%);
}

.akg-hero-badge{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  margin-bottom:8px;
}

.akg-hero-h3{
  margin:0 0 6px;
  font-size:18px;
  line-height:1.2;
  font-weight:900;
}
.akg-hero-meta{
  font-size:12px;
  color:#cbd6e2;
}

/* Dots */
.akg-hero-dots{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:12px;
}
.akg-hero-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  border:1px solid #1b2430;
  background:#0b0f14;
  cursor:pointer;
}
.akg-hero-dot.is-active{
  width:22px;
  background:#e8eef6;
}

/* Sidebar sticky */
.akg-home-sidebar .sidebar{
  position:sticky;
  top:90px;
}

/* Ensure hero media always shows */
.akg-hero-media{
  position:absolute;
  inset:0;
}

.akg-hero-fallback{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#111a25,#0b0f14);
  color:#9fb0c4;
  font-weight:900;
  letter-spacing:.4px;
}
a{color:inherit}
.akg-mode-light a{color:#111827}



/* Boxed width (use your container class if different) */
body.akg-width-boxed .akg-container{
  max-width:1200px;
  margin:0 auto;
  padding:0 14px;
}

/* Sticky header (replace .akg-header with your header wrapper class) */
body.akg-sticky-header .akg-header{
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* Sidebar OFF (replace .akg-sidebar/.akg-content with your real classes) */
body.akg-sidebar-off .akg-sidebar{ display:none; }
body.akg-sidebar-off .akg-content{ width:100%; }

/* Force Popular Games title to WHITE in light mode */
body.akg-mode-light h2.akg-hero-title{
  color:#ffffff !important;
}


/* ================================
   AKG HEADER
================================ */

.akg-header{
  width:100%;
  background:linear-gradient(180deg,#0f0f14,#0b0b0f);
  border-bottom:1px solid rgba(255,255,255,.06);
}

/* Light mode header */
body.akg-mode-light .akg-header{
  background:#ffffff;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.akg-header-inner{
  max-width:1200px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

/* Site title */
.akg-site-title{
  font-size:20px;
  font-weight:900;
  text-decoration:none;
  letter-spacing:.3px;
  color:#fff;
}

/* Light mode title */
body.akg-mode-light .akg-site-title{
  color:#111;
}

/* Menu */
.akg-top-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:18px;
  align-items:center;
}

.akg-top-menu li{ margin:0; }

.akg-top-menu a{
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  color:#e6e6e6;
  opacity:.9;
}

/* Hover / active */
.akg-top-menu a:hover{
  opacity:1;
}

/* Light mode menu */
body.akg-mode-light .akg-top-menu a{
  color:#111;
}

/* Sticky support (from your option) */
body.akg-sticky-header .akg-header{
  position:sticky;
  top:0;
  z-index:99999;
}
.akg-site-logo{
  height:50px;
  width:auto;
  display:block;
}

@media (max-width:600px){
  .akg-site-logo{ height:30px; }
}


/* ================================
   AKG Layout Width Option (WORKING)
   Your theme uses .container + .akg-header-inner
================================ */

/* Wide = full width container */
body.akg-width-wide .container,
body.akg-width-wide .akg-header-inner{
  max-width: 1400px;
  margin-left:auto;
  margin-right:auto;
  padding-left:18px;
  padding-right:18px;
}

/* Boxed = smaller centered container */
body.akg-width-boxed .container,
body.akg-width-boxed .akg-header-inner{
  max-width: 1200px;
  margin-left:auto;
  margin-right:auto;
  padding-left:18px;
  padding-right:18px;
}

/* Optional: add “boxed feel” background spacing */
body.akg-width-boxed{
  background-attachment: fixed;
}
