@import url('tokens.css');

/**
 * ==============================================================================
 * PHM TECH — PHM GAMES (CSS DEDICADO & DESIGN SYSTEM DE JOGOS EDUCATIVOS)
 * Arquitetura Isolada: Consome tokens.css
 * Prof. Paulo Henrique Maciel · PHM Tech
 * ==============================================================================
 */

/* ==========================================================================
   1. SEÇÕES E ALTERNÂNCIA DE SUPERFÍCIES DO GAMES
   ========================================================================== */

/* Seção 1: Hero Principal & Pílulas de Atalho */
.games-section-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 3rem 0 2.5rem 0;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Seção 2: Catálogo dos 9 Jogos com Filtro Interativo (Superfície Alternada) */
.games-section-catalog {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 4.5rem 0;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Seção 3: Pilares da Metodologia Lúdica & Gamificação (Superfície Padrão) */
.games-section-methodology {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 4rem 0 4.5rem 0;
  position: relative;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* ==========================================================================
   2. HERO PRINCIPAL & MÉTRICAS DE GAMIFICAÇÃO
   ========================================================================== */

.games-master-hero {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.games-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.28);
  color: #ea580c;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .games-hero-badge {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fb923c;
}

[data-theme="sepia"] .games-hero-badge {
  background: rgba(194, 65, 12, 0.1);
  border-color: rgba(194, 65, 12, 0.3);
  color: #c2410c;
}

.games-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 auto 1.25rem auto;
  letter-spacing: -0.02em;
}

.games-hero-highlight {
  background: linear-gradient(135deg, #f97316 0%, #ca8a04 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.games-hero-lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 820px;
  margin: 0 auto 1.85rem auto;
}

/* Barra de Métricas (3 Cards Simétricos) */
.games-metrics-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  width: 100%;
  max-width: 900px;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .games-metrics-bar {
    grid-template-columns: 1fr;
  }
}

.games-metric-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}

.games-metric-item:hover {
  transform: translateY(-2px);
  border-color: #f97316;
}

.games-metric-number {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: #ea580c;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

[data-theme="dark"] .games-metric-number {
  color: #fb923c;
}

.games-metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Grade de Pílulas de Atalho (Grid 3x3) */
.games-pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: 900px;
}

@media (max-width: 768px) {
  .games-pills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .games-pills-grid {
    grid-template-columns: 1fr;
  }
}

.hero-pill-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.hero-pill-btn:hover {
  transform: translateY(-2px);
  border-color: #f97316;
  color: #f97316;
  box-shadow: var(--shadow-md);
}

.hero-pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   3. CABEÇALHO DO CATÁLOGO & FILTROS POR CATEGORIA
   ========================================================================== */

.games-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-bar .filter {
  padding: 0.5rem 1.05rem;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: var(--font-body);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.filter-bar .filter:hover {
  background: var(--surface-soft);
  color: var(--navy);
  border-color: #f97316;
}

.filter-bar .filter.active {
  background: #ea580c !important;
  border-color: #ea580c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

/* TEMA SÉPIA: FILTROS COM CONTRASTE */
[data-theme="sepia"] .filter-bar .filter.active {
  background: #c2410c !important;
  border-color: #c2410c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3);
}

/* TEMA NOTURNO: FILTROS */
[data-theme="dark"] .filter-bar .filter.active {
  background: #f97316 !important;
  border-color: #f97316 !important;
  color: #030712 !important;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

/* ==========================================================================
   4. GRADE DE JOGOS & CARDS
   ========================================================================== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions > *,
  .btn-header-action,
  .nav-pref-trigger,
  .project-card {
    min-width: 0;
    max-width: 100%;
  }

  .btn-header-action,
  .nav-pref-trigger {
    width: 100%;
  }
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #f97316;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.project-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--navy);
  border: 1px solid var(--line);
}

.status.pronto {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .status.pronto {
  color: #34d399;
}

.game-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

[data-theme="dark"] .game-number-badge {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.4);
}

[data-theme="sepia"] .game-number-badge {
  background: rgba(194, 65, 12, 0.1);
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.25);
}

.game-tag-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 0.18rem 0.65rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.game-card-subtitle {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ea580c;
  margin: 0.2rem 0 0.6rem 0;
  line-height: 1.4;
}

[data-theme="dark"] .game-card-subtitle {
  color: #fb923c;
}

[data-theme="sepia"] .game-card-subtitle {
  color: #c2410c;
}

.game-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.game-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--navy);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: #ea580c;
  text-decoration: none;
  margin-top: 1.25rem;
  transition: gap var(--transition), color var(--transition);
}

.card-link:hover {
  gap: 0.65rem;
  color: #c2410c;
}

[data-theme="dark"] .card-link {
  color: #fb923c;
}

/* ==========================================================================
   5. PILARES DA GAMIFICAÇÃO (ROADMAP GRID)
   ========================================================================== */

.edu-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .edu-roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .edu-roadmap-grid {
    grid-template-columns: 1fr;
  }
}

.edu-roadmap-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.edu-roadmap-card:hover {
  transform: translateY(-3px);
  border-color: #f97316;
  box-shadow: var(--shadow-md);
}

.edu-roadmap-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  font-weight: 900;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .edu-roadmap-step-num {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.2);
}

.edu-roadmap-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

.edu-roadmap-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0;
}

/* P1-10 — contraste WCAG AA em superfícies claras */
:root:not([data-theme="dark"]) .games-hero-badge,
:root:not([data-theme="dark"]) .eyebrow,
:root:not([data-theme="dark"]) .game-number-badge,
:root:not([data-theme="dark"]) .edu-roadmap-step-num,
:root:not([data-theme="dark"]) .game-card-subtitle { color: #9a3412 !important; }
:root:not([data-theme="dark"]) .filter.active { background: #9a3412 !important; border-color: #9a3412 !important; }
:root:not([data-theme="dark"]) .status.pronto { color: #047857 !important; }
:root:not([data-theme="dark"]) .brand-accent-gold { color: #7a5a0a !important; }
:root:not([data-theme="dark"]) .footer-brand-sep { color: #64748b !important; }
[data-theme="dark"] .eyebrow { color: #fdba74 !important; }
