/*
Theme Name: Teach.Land
Theme URI: https://teach.land
Author: Teach.Land
Author URI: https://teach.land
Description: A bold, dark, kid-friendly theme for Teach.Land featuring safe educational games and computer lessons.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: teachland
*/
/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #00e06a;
  --green-dark: #00a84f;
  --green-glow: rgba(0, 224, 106, 0.3);
  --blue: #4da6ff;
  --yellow: #ffd040;
  --coral: #ff6b4a;
  --purple: #b57bff;
  --teal: #00e5c0;
  --bg: #111827;
  --bg-raised: #161e30;
  --surface: #1e2740;
  --surface-2: #242e4a;
  --text: #ffffff;
  --text-muted: #c8d0e0;
  --text-subtle: #7a8aaa;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 224, 106, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 36px rgba(0, 0, 0, 0.6);
  font-size: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── NAV ── */
nav {
  background: #0f1424;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1rem;
}
.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 54px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 0.5rem;
}
.logo .custom-logo-link { display: flex; align-items: center; }
.logo .custom-logo {
  border-radius: 7px;
  object-fit: cover;
  display: block;
}
.logo-text {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  gap: 0.25rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 5px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #ffffff; }
.search-toggle {
  margin-right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 8px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.search-toggle:hover { color: var(--text); }
.nav-cta {
  flex-shrink: 0;
  background: var(--green);
  color: #0a1a0f !important;
  border-radius: 50px !important;
  padding: 6px 14px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 0 14px var(--green-glow);
}
.nav-cta:hover {
  background: var(--green-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 22px var(--green-glow) !important;
}

/* ── MAIN ── */
main { min-height: 60vh; }

/* ── HERO ── */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 224, 106, 0.12);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(0, 224, 106, 0.3);
}
.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--green); }
.hero > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.7;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.25rem;
}
.btn-primary {
  background: var(--green);
  color: #0a1a0f;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 50px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 0 20px var(--green-glow);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 32px var(--green-glow);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 50px;
  border: 2px solid var(--border);
  transition: border-color 0.15s, transform 0.1s;
}
.btn-secondary:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}
.hero-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.hero-card {
  border-radius: var(--radius);
  padding: 1.25rem 0.75rem;
  border: none;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-card:hover { transform: translateY(-6px); }
.hero-card .card-icon { font-size: 2.4rem; line-height: 1; }
.hero-card .card-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}
.hero-card.blue { background: #1a7cff; box-shadow: 0 6px 24px rgba(26,124,255,0.5); }
.hero-card.blue .card-label { color: #ffffff; }
.hero-card.blue:hover { box-shadow: 0 10px 36px rgba(26,124,255,0.7); }
.hero-card.yellow { background: #ffd040; box-shadow: 0 6px 24px rgba(255,208,64,0.5); }
.hero-card.yellow .card-label { color: #3a2800; }
.hero-card.yellow:hover { box-shadow: 0 10px 36px rgba(255,208,64,0.7); }
.hero-card.green { background: #00e06a; box-shadow: 0 6px 24px rgba(0,224,106,0.5); }
.hero-card.green .card-label { color: #003a1a; }
.hero-card.green:hover { box-shadow: 0 10px 36px rgba(0,224,106,0.7); }
.hero-card.coral { background: #ff5533; box-shadow: 0 6px 24px rgba(255,85,51,0.5); }
.hero-card.coral .card-label { color: #ffffff; }
.hero-card.coral:hover { box-shadow: 0 10px 36px rgba(255,85,51,0.7); }

/* ── SECTIONS ── */
section { padding: 3rem 2rem; }
.section-inner { max-width: 720px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.4rem;
}
.section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.section-sub {
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── PHILOSOPHY ── */
.philosophy-section { padding: 0 2rem 3rem; }
.philosophy {
  background: linear-gradient(135deg, #0a1628 0%, #0f1f3a 100%);
  border: 1px solid rgba(0, 224, 106, 0.3);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.philosophy-emoji { font-size: 2.8rem; flex-shrink: 0; }
.philosophy h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.philosophy p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.philosophy a {
  display: inline-block;
  margin-top: 0.9rem;
  background: var(--green);
  color: #0a1a0f;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 20px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 0 14px var(--green-glow);
}
.philosophy a:hover { background: var(--green-dark); transform: translateY(-1px); }

/* ── CATEGORIES ── */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.cat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}
.cat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.cat-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.cat-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.cat-link { font-size: 0.85rem; font-weight: 700; color: var(--green); margin-top: auto; }
.cat-link::after { content: ' →'; }
.cat-card.c-coral .cat-icon { background: #ff5533; }
.cat-card.c-blue .cat-icon { background: #1a7cff; }
.cat-card.c-green .cat-icon { background: #00e06a; }
.cat-card.c-yellow .cat-icon { background: #ffd040; }
.cat-card.c-purple .cat-icon { background: #b57bff; }
.cat-card.c-teal .cat-icon { background: #00e5c0; }

/* ── COPPA ── */
.coppa-strip {
  background: rgba(0, 224, 106, 0.1);
  border: 1px solid rgba(0, 224, 106, 0.25);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}
.coppa-strip .shield { font-size: 1.5rem; flex-shrink: 0; }
.coppa-strip p { font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.coppa-strip a { color: var(--green); text-decoration: underline; }

/* ── HIGHLIGHTS ── */
.highlights { background: var(--bg-raised); }
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.highlight-card {
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.highlight-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 0.85rem;
}
.pill-green { background: rgba(0,192,75,0.2); color: #4dff96; }
.pill-blue { background: rgba(26,124,255,0.2); color: #7ab8ff; }
.pill-yellow { background: rgba(255,187,0,0.2); color: #ffd966; }
.highlight-card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.highlight-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }

/* ── PAGE HEADER ── */
.page-header {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.page-header-inner {
  max-width: 720px;
  margin: 0 auto;
}
.page-header h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.page-header p { color: var(--text-muted); font-size: 0.95rem; }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 720px;
  margin: 0 auto;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .separator { color: var(--text-subtle); }
.breadcrumb .current { color: var(--green); font-weight: 600; }

.cat-badge-large {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 0.6rem;
}
.cat-badge-large.action { background: rgba(255, 85, 51, 0.2); color: #ff7a5c; }
.cat-badge-large.puzzle { background: rgba(26, 124, 255, 0.2); color: #7ab8ff; }
.cat-badge-large.lesson { background: rgba(0, 224, 106, 0.15); color: #00e06a; }
.related-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  font-size: 2rem;
}

/* ── GAMES GRID ── */
.games-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 7px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.filter-btn.active { background: var(--green); color: #0a1a0f; border-color: var(--green); }
.filter-btn .count {
  background: rgba(0,0,0,0.2);
  border-radius: 50px;
  padding: 1px 7px;
  font-size: 0.75rem;
}
.games-section { margin-bottom: 3rem; }
.games-section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.1rem;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.game-card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}
.game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.game-card:hover .game-thumb img { transform: scale(1.05); }
.cat-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 50px;
  backdrop-filter: blur(6px);
}
.cat-badge.action { background: rgba(255,107,74,0.85); color: white; }
.cat-badge.puzzle { background: rgba(77,166,255,0.85); color: white; }
.game-info {
  padding: 0.65rem 0.75rem;
  flex: 1;
  text-align: center;
}
.game-info h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

/* ── GAME PAGE ── */
/* ── FULLSCREEN CENTERING ── */
#gameFrame:-webkit-full-screen { background: #000; }
#gameFrame:-moz-full-screen { background: #000; }
#gameFrame:fullscreen { background: #000; }

.game-wrapper-outer {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
}
.game-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}
.game-wrapper {
  background: #000000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.game-title-small {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.fullscreen-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #0a1a0f;
  border: none;
  border-radius: 50px;
  padding: 5px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.fullscreen-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.game-frame-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}
.game-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── PROSE / GAME DESCRIPTION ── */
.game-description {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}
.prose h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.prose p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.prose p:last-child { margin-bottom: 0; }
.prose ul {
  list-style: disc;
  margin: 0 0 1.25rem 0;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.prose ul li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 0.5rem;
  list-style: disc;
}
.prose ul li::marker {
  color: var(--green);
  font-weight: 700;
}
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.prose ol li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; padding-left: 0.5rem; }
.prose ol li::marker { color: var(--green); font-weight: 700; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--green-dark); }

/* ── RELATED GAMES ── */
.related-games h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.related-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s;
}
.related-card:hover { transform: translateY(-4px); }
.related-thumb {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
}
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.related-card:hover .related-thumb img { transform: scale(1.05); }
.related-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

/* ── CONTENT PAGES ── */
.page-content { padding: 3rem 2rem 5rem; }
.page-inner { max-width: 720px; margin: 0 auto; }
.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.content-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.content-section:last-of-type { border-bottom: none; }
.content-section h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.content-section p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.content-section ul { list-style: none; margin-bottom: 1rem; }
.content-section ul li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 0.35rem 0 0.35rem 1.5rem;
  position: relative;
}
.content-section ul li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 0.25rem;
  list-style: disc;
}
.content-section ul li::before {
  display: none;
}
.content-section a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.content-section a:hover { color: var(--green-dark); }

/* ── PHILOSOPHY BANNER (content pages) ── */
.philosophy-banner {
  background: linear-gradient(135deg, #0a1628 0%, #0f1f3a 100%);
  border: 1px solid rgba(0, 224, 106, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 2.5rem 0;
}
.philosophy-banner .philosophy-emoji { font-size: 2.5rem; flex-shrink: 0; }
blockquote {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  font-style: italic;
}

/* ── FOOTER ── */
footer {
  background: #070a14;
  color: var(--text-muted);
  padding: 2.5rem 1.5rem 1.75rem;
  border-top: 1px solid var(--border);
}
.footer-inner { max-width: 720px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.6rem;
}
.footer-logo img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }
.footer-col > p {
  font-size: 0.83rem;
  line-height: 1.65;
  color: #a0aec0;
  margin-bottom: 0.75rem;
}
.footer-col h4 {
  font-family: 'Fredoka', sans-serif;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.footer-col a {
  display: block;
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.38rem;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #7a8aaa;
}

/* ── CONTACT FORM ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 0.75rem;
}
.form-group.textarea-group { align-items: start; }
.form-group.textarea-group label { padding-top: 0.65rem; }
label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.15s;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 120px; }
.submit-btn {
  background: var(--green);
  color: #0a1a0f;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 0 20px var(--green-glow);
}
.submit-btn:hover { background: var(--green-dark); transform: translateY(-2px); }
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.info-icon { font-size: 1.75rem; }
.info-card h3 { font-family: 'Fredoka', sans-serif; font-size: 1rem; font-weight: 600; color: var(--text); }
.info-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── SEARCH ── */
.search-drawer {
  display: none;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}
.search-drawer.open { display: block; }
.search-drawer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}
.search-drawer-inner input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
}
.search-drawer-inner input:focus { outline: none; border-color: var(--green); }
.search-drawer-inner .btn-primary {
  padding: 10px 20px;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}
.search-close:hover { color: var(--text); }
.search-form-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.search-form-inline input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
}
.search-form-inline input:focus { outline: none; border-color: var(--green); }

/* ── ARCHIVE & SEARCH RESULTS ── */
.archive-page { padding: 2rem 2rem 4rem; }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.archive-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.archive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}
.archive-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.archive-card:hover .archive-thumb img { transform: scale(1.05); }
.archive-info {
  padding: 0.65rem 0.75rem;
  flex: 1;
  text-align: center;
}
.archive-info h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

/* ── PAGINATION ── */
.pagination { margin-top: 2rem; }
.pagination ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination ul li a,
.pagination ul li span {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.pagination ul li a:hover { background: var(--surface); color: var(--text); }
.pagination ul li span.current { background: var(--green); color: #0a1a0f; border-color: var(--green); }

/* ── SINGLE POST ── */
.post-thumbnail {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}
.post-thumbnail img { width: 100%; height: auto; }
.post-meta {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}
.post-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.post-nav-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  width: calc(50% - 0.5rem);
}
.post-nav-link.next {
  margin-left: auto;
  flex-direction: row-reverse;
  text-align: right;
}
.post-nav-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.post-nav-link:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.post-nav-link.next { flex-direction: row-reverse; }
.post-nav-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
}
.post-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-nav-text {
  padding: 0.75rem 0.75rem 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}
.post-nav-link.next .post-nav-text {
  padding: 0.75rem 0 0.75rem 0.75rem;
  text-align: right;
}
.post-nav-label { font-size: 0.75rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; }
.post-nav-title { font-size: 0.88rem; color: var(--text-muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 404 PAGE ── */
.not-found-page { padding: 4rem 2rem; }
.not-found-content {
  text-align: center;
  margin-bottom: 3rem;
}
.not-found-emoji { font-size: 4rem; margin-bottom: 1rem; }
.not-found-content h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.not-found-content p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.not-found-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.not-found-search { text-align: center; }
.not-found-search p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.no-results { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.no-results a { color: var(--green); text-decoration: underline; }

/* ── RESPONSIVE ADDITIONS ── */
@media (max-width: 720px) {
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .post-nav { grid-template-columns: 1fr; }
  .search-drawer { padding: 1rem 1.25rem; }
}
@media (max-width: 720px) {
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero-visual { grid-template-columns: repeat(2, 1fr); }
  section { padding: 2.5rem 1.25rem; }
  .philosophy-section { padding: 0 1.25rem 2.5rem; }
  .categories-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .philosophy { flex-direction: column; padding: 1.5rem; }
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .game-page { padding: 1.25rem 1.25rem 3rem; }
  .page-header { padding: 2rem 1.25rem; }
  .page-content { padding: 2rem 1.25rem 4rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-group { grid-template-columns: 1fr; }
  label { text-align: left; }
  .philosophy-banner { flex-direction: column; padding: 1.5rem; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 1.9rem; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── KEYBOARDING PAGE ── */
.keyboarding-page { padding: 2rem 2rem 4rem; }
.keyboarding-intro {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

/* ── TABS ── */
.tab-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.tab-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 22px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.tab-btn.active { background: var(--green); color: #0a1a0f; border-color: var(--green); }
.tab-count {
  background: rgba(0,0,0,0.15);
  border-radius: 50px;
  padding: 1px 8px;
  font-size: 0.78rem;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── LESSON ROWS ── */
.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lesson-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.lesson-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}
.lesson-row-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
}
.lesson-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lesson-row-info {
  flex: 1;
  padding: 0.75rem 0;
  min-width: 0;
}
.lesson-row-info h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.lesson-row-info p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.lesson-row-arrow {
  font-size: 1.2rem;
  color: var(--green);
  padding-right: 1.25rem;
  flex-shrink: 0;
}
@media (max-width: 500px) {
  .tab-btn { padding: 8px 14px; font-size: 0.85rem; }
  .lesson-row-thumb { width: 64px; height: 64px; }
}

/* ── HUB PAGE ── */
.hub-page { padding: 2rem 2rem 4rem; }
.hub-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-hover);
}
.hub-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.hub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  display: block;
}
.hub-card:hover .hub-thumb img { transform: scale(1.05); }
.hub-info {
  padding: 0.65rem 0.75rem;
  text-align: center;
}
.hub-info h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.hub-link { display: none; }
@media (max-width: 720px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-page { padding: 1.5rem 1.25rem 3rem; }
}

/* ── GOOD HABITS ── */
.good-habits {
  margin-top: 2.5rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.good-habits h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.good-habits p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.good-habits a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.good-habits a:hover { color: var(--accent-dark); }

/* ── COMPUTER PARTS SECTION ── */
.parts-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* ── GUTENBERG BLOCK STYLES ── */
.entry-content .wp-block-media-text {
  max-width: 100%;
  grid-template-columns: 40% 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}
.entry-content .wp-block-media-text__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}
.entry-content .wp-block-media-text__content {
  padding: 0;
}
.entry-content .wp-block-media-text__content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.entry-content .wp-block-media-text__content h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ── COMPUTER PART POST ── */
.computer-part-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}
.computer-part-content .entry-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  min-height: 260px;
}
.computer-part-content .wp-block-image {
  flex-shrink: 0;
  width: 40%;
  max-width: 260px;
}
.computer-part-content .wp-block-image img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
  display: block;
}
.computer-part-content .wp-block-paragraph,
.computer-part-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
  flex: 1;
  padding-left: 1rem;
}
.computer-part-content::after {
  content: '';
  display: table;
  clear: both;
}
@media (max-width: 720px) {
  .computer-part-content .entry-content {
    flex-direction: column;
  }
  .computer-part-content .wp-block-image {
    width: 100%;
    max-width: 100%;
  }
}


/* ── LIST STYLES ── */
.entry-content ul,
.entry-content .wp-block-list,
.entry-content .is-style-checkmark-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.entry-content ul li,
.entry-content .wp-block-list li,
.entry-content .is-style-checkmark-list li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 0.25rem;
}
.entry-content ul li::before,
.entry-content .wp-block-list li::before,
.entry-content .is-style-checkmark-list li::before {
  display: none;
}
.entry-content ul li::marker,
.entry-content .wp-block-list li::marker,
.entry-content .is-style-checkmark-list li::marker {
  color: var(--green);
  font-weight: 700;
}

/* ── GUTENBERG BUTTONS ── */
.wp-block-button .wp-block-button__link {
  border-radius: 8px !important;
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 0.6rem 1.5rem !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
  text-decoration: none !important;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:visited,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
  background: #00e06a !important;
  color: #0a1a0f !important;
  border: 2px solid #00e06a !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: #c8d0e0 !important;
  border: 2px solid #242e4a !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #1e2740 !important;
  color: #fff !important;
  border-color: #4da6ff !important;
}

/* ── HAMBURGER & MOBILE MENU ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  padding: 1rem;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu .mobile-nav-links { list-style: none; display: flex; flex-direction: column; }
.mobile-menu a,
.mobile-menu .mobile-nav-links a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu a:hover,
.mobile-menu .mobile-nav-links a:hover {
  background: var(--surface);
  color: var(--text);
}
.mobile-cta {
  background: var(--accent) !important;
  color: #0a1a0f !important;
  text-align: center;
  margin-top: 0.5rem;
  border-radius: 8px;
}
.mobile-cta:hover { background: var(--accent-dark) !important; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}