/* ============================================================
   LightGames — global.css
   Estándar LightGames:
   1) Valores modificables (paleta, tipografías, alturas, sombras)
   2) Reset / Base
   3) Layout (navbar, filtros, grid, footer)
   4) Componentes (chips, cards)
   5) Utilidades (visibilidad, accesibilidad, animaciones suaves)
   ============================================================ */

/* =========================
   1) VALORES CONFIGURABLES
   ========================= */
:root{
  /* Paleta base (ajustable) */
  --turquoise: #22d3ee;          /* Turquesa (logo) */
  --gold: #f6c453;               /* Dorado (logo) */
  --anthracite: #0f172a;         /* Azul muy oscuro / antracita para textos */
  --ink-700: #1f2937;            /* Gris-azulado medio (títulos) */
  --ink-500: #334155;            /* Gris-azulado para cuerpo */
  --ink-300: #94a3b8;            /* Borde suave */

  /* Colores por categoría */
  --cat-sensory: var(--turquoise);
  --cat-explore: var(--gold);
  --cat-target: #3b82f6;   /* Azul vivo */
  --cat-choose: #8b5cf6;   /* Violeta suave */
  --cat-control: #14b8a6;  /* Verde-azulado */

  /* Fondo general claro (no blanco puro) */
  --bg: #f7fafc;

  /* Tipografía */
  --font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  --font-size-base: 16px;

  /* Alturas y layout */
  --nav-h: 80px;            /* Altura navbar desktop (máx 10% vh) */
  --nav-h-mobile: 64px;     /* Móvil/tablet */
  --filters-h: 64px;        /* Altura barra de filtros */
  --container-max: 1200px;

  /* Sombras (3D sutil) */
  --shadow-1: 0 6px 18px rgba(0,0,0,.08);
  --shadow-2: 0 10px 28px rgba(0,0,0,.12);
  --shadow-inset: inset 0 -3px 0 rgba(0,0,0,.08);

  /* Radios / transiciones */
  --radius-2xl: 16px;
  --radius-xl: 12px;
  --radius-lg: 10px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* Fuentes autohospedadas */
@font-face{
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Variable.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* =========================
   2) RESET / BASE
   ========================= */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--anthracite);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; height: auto; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4{ margin: .25rem 0 .5rem; line-height: 1.2; color: var(--ink-700); }
p{ margin: .25rem 0 .75rem; color: var(--ink-500); }

.skip-link{
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus{
  left: 16px; top: 16px; width: auto; height: auto; padding: 8px 12px; background: white; box-shadow: var(--shadow-1); border-radius: 8px;
}

/* =========================
   3) LAYOUT
   ========================= */

/* NAVBAR */
.site-header{
  position: sticky;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: white;
  box-shadow: var(--shadow-inset);
  z-index: 50;
  transition: transform .35s var(--ease);
}
@media (max-width: 768px){
  .site-header{ height: var(--nav-h-mobile); }
}

/* Estado auto-oculto (aplicado por JS) */
.site-header.nav--hidden{
  transform: translateY(calc(-1 * var(--nav-h)));
}
@media (max-width: 768px){
  .site-header.nav--hidden{
    transform: translateY(calc(-1 * var(--nav-h-mobile)));
  }
}

/* Barra de navegación */
.nav-container{
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

/* Cuando el título centrado no está (≤1024px), usa 2 columnas: marca izquierda + menú derecha */
@media (max-width: 1024px){
  .nav-container{
    grid-template-columns: 1fr auto;
	margin-right: 12px; /* margen a la derecha en pantallas medianas */
  }
  .main-nav{
    justify-self: end;   /* fuerza la alineación a la derecha */
    margin-left: auto;   /* por si el navegador ignora justify-self en grid */
	margin-right: max(12px, env(safe-area-inset-right)); /* margen a la derecha */
  }
}

/* En móvil, asegura que el dropdown ancle al borde derecho del contenedor del menú */
@media (max-width: 768px){
  .menu-items{
    right: 0;
    left: auto;          /* evita que quede descentrado si alguna regla añade 'left' */
  }
}

/* (Opcional) Evita overflow en móviles muy estrechos ajustando el logo */
@media (max-width: 420px){
  .brand img{
    width: clamp(140px, 35vw, 196px);
    height: auto;
  }
}

.brand{ display: inline-flex; align-items: center; gap: 8px; }

/* Título centrado (solo desktop) */
.nav-title{ text-align: center; font-weight: 700; font-size: clamp(1rem, 1.6vw, 1.35rem); color: var(--ink-700); }
@media (max-width: 1024px){
  .nav-title{ display: none; }
}

/* Menú a la derecha */
.main-nav{ justify-self: end; position: relative; }
.menu-toggle{
  display: none; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; font-weight: 700;
}
.menu-items{ display: flex; gap: 16px; }
.menu-items a{
  padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--anthracite);
}
.menu-items a:hover{ background: #f1f5f9; }
@media (max-width: 768px){
  .menu-toggle{ display: inline-flex; }
  .menu-items{
    position: absolute; right: 0; top: calc(100% + 8px);
    flex-direction: column; gap: 8px; padding: 10px;
    background: white; border: 1px solid var(--ink-300); border-radius: 12px; box-shadow: var(--shadow-1);
    min-width: 160px; display: none;
  }
  .menu-items.is-open{ display: flex; }
}

/* FILTROS (sticky debajo de navbar) */
.filters{
  position: sticky;
  top: var(--filters-top, var(--nav-h));
  z-index: 40;
  background: linear-gradient(180deg, white 0%, rgba(255,255,255,0.9) 100%);
  box-shadow: var(--shadow-inset);
}
@media (max-width: 768px){
  .filters{ top: var(--filters-top, var(--nav-h-mobile)); }
}
.filters-inner{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: center;
}

/* GRID de juegos */
.games{
  max-width: var(--container-max);
  margin: 16px auto 40px;
  padding: 0 16px;
}
.grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px){
  .grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}

/* CTA previo al footer */
.cta{ padding: 40px 16px; }
.cta-inner{
  max-width: var(--container-max); margin: 0 auto;
  background: linear-gradient(135deg, rgba(34,211,238,.15), rgba(246,196,83,.15));
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--radius-2xl);
  padding: clamp(16px, 4vw, 32px);
  text-align: center;
  box-shadow: var(--shadow-1);
}
.cta h2{ margin: 0; font-size: clamp(1rem, 2.4vw, 1.4rem); }

/* FOOTER */
.site-footer{
  border-top: 1px solid rgba(15,23,42,.08);
  background: #fff;
}
.footer-inner{
  max-width: var(--container-max); margin: 0 auto; padding: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: .95rem;
}
.footer-right a{ color: var(--ink-700); font-weight: 600; }
.footer-right a:hover{ text-decoration: underline; }

/* =========================
   Variables de enlace (ajústalas si quieres otro tono)
   ========================= */
:root{
  /* Comentario (ES): Azul acorde a la identidad (ligero y accesible) */
  --link:        #1b78e0;
  --link-hover:  #165fb4;
  --link-visited:#134e95;

  /* Dorado de acento por si no existe aún */
  --accent-gold: #f6c945;
}

/* =========================
   Enlaces en contenido (no afecta navbar ni footer)
   ========================= */
/* Comentario (ES): aplicamos color de enlace solo en áreas de contenido */
.page a:not(.btn-cta),
.section a:not(.btn-cta),
.card-3d a:not(.btn-cta) {
  color: var(--link);
  text-decoration: none;      /* sin subrayado */
  cursor: pointer;            /* puntero como pediste */
}
.page a:not(.btn-cta):hover,
.section a:not(.btn-cta):hover,
.card-3d a:not(.btn-cta):hover {
  color: var(--link-hover);
}
.page a:not(.btn-cta):visited,
.section a:not(.btn-cta):visited,
.card-3d a:not(.btn-cta):visited {
  color: var(--link-visited);
}
/* Accesibilidad: focus claro sin subrayado */
.page a:focus-visible,
.section a:focus-visible,
.card-3d a:focus-visible {
  outline: 3px solid var(--focus, #7cc3ff);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =========================
   4) COMPONENTES
   ========================= */

/* Chips (botones filtro) — usados en la barra y dentro de las tarjetas */
.chip{
  --bg: #fff;
  --bd: var(--ink-300);
  --tx: var(--anthracite);
  appearance: none;
  border: 2px solid var(--bd);
  background: var(--bg);
  color: var(--tx);
  padding: 10px 14px;
  border-radius: 12px; /* borde de los botones de los filtros superiores */
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.chip:hover{ transform: translateY(-1px); box-shadow: var(--shadow-2); }
.chip:focus{ outline: 3px solid rgba(34,211,238,.5); outline-offset: 2px; }
.chip.is-active{ box-shadow: var(--shadow-2); transform: translateY(-1px); }

/* Colores por categoría (comparten estilo en filtros y tarjetas) */
.chip-sensory{ --bg: rgba(34,211,238,.12); --bd: rgba(34,211,238,.6); }
.chip-explore{ --bg: rgba(246,196,83,.12); --bd: rgba(246,196,83,.6); }
.chip-target{  --bg: rgba(59,130,246,.12); --bd: rgba(59,130,246,.6); }
.chip-choose{  --bg: rgba(139,92,246,.12); --bd: rgba(139,92,246,.6); }
.chip-control{ --bg: rgba(20,184,166,.12); --bd: rgba(20,184,166,.6); }
.chip-all{     --bg: rgba(15,23,42,.07);   --bd: rgba(15,23,42,.45); }

/* Tarjeta de juego */
.game-card{
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--radius-2xl);
  overflow: clip;
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

/* Chips más pequeños SOLO dentro de las tarjetas (reduce/aumenta estos valores a tu gusto) */
.game-card .category-chip{
  padding: 5px 9px;
  font-size: 0.8rem;
  border-width: 1.5px; /* el borde por defecto es 2px */
  border-radius: 8px; /* borde de los botones de los filtros de las tarjetas */
}

/* Si también quieres reducir el tamaño de los #tags (#Music/#Relax) */
.game-card .tag{
  font-size: 0.8rem;
  padding: 3px 6px;
  border-radius: 7px; /* borde de las etiquetas de las tarjetas */
}

.game-card:hover{ transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-2); }

/* Transición suave también para el color del borde */
.game-card{
  border: 2px solid rgba(15,23,42,.08); /* borde dorado de la tarjeta 2px */
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .15s var(--ease);
}

/* Al pasar el ratón: color dorado del borde */
.game-card:hover{
  border-color: #f6c453;
}

.card-link{ display: block; color: inherit; }

/* Miniatura */
.thumb{ aspect-ratio: 16 / 10; background: #fff; }
.thumb img{ width: 100%; height: 100%; object-fit: cover; }

/* Meta: categoría (chip) a la izquierda + tags a la derecha */
.meta{
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px 0;
}
.tags{ display: flex; gap: 6px; align-items: center; }
.tag{
  border: 0; background: transparent; color: var(--ink-700); font-weight: 800;
  padding: 4px 6px; cursor: pointer; border-radius: 8px;
}
.tag:hover{ background: #f1f5f9; }

/* Título y descripción */
.title{ padding: 6px 12px 2px; font-size: 1.05rem; font-weight: 800; }
.desc{ padding: 0 12px 12px; }

/* Mensaje sin JS */
.noscript{
  max-width: var(--container-max); margin: 16px auto; padding: 12px;
  background: #fffbe6; border: 1px solid #facc15; border-radius: 10px;
}

/* Botón hamburguesa (visible solo en móvil) */
.menu-toggle{
  display: none; /* desktop oculto */
  width: 44px; height: 44px;                 /* objetivo táctil mínimo */
  border: 1px solid var(--ink-300);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  align-items: center; justify-content: center;
  color: var(--anthracite);
  cursor: pointer;
}
.menu-toggle .icon{ display: block; width: 24px; height: 24px; }
.menu-toggle .icon-close{ display: none; }  /* por defecto se ve hamburguesa */
.menu-toggle[aria-expanded="true"] .icon-menu{ display: none; }
.menu-toggle[aria-expanded="true"] .icon-close{ display: block; }

.menu-toggle:focus{ outline: 3px solid rgba(34,211,238,.45); outline-offset: 2px; }

@media (max-width: 768px){
  .menu-toggle{ display: inline-flex; }
  /* Dropdown ya lo tienes, por si acaso: */
  .menu-items{
    position: absolute; right: 0; top: calc(100% + 8px);
    flex-direction: column; gap: 8px; padding: 10px;
    background: white; border: 1px solid var(--ink-300); border-radius: 12px; box-shadow: var(--shadow-1);
    min-width: 180px; display: none;
  }
  .menu-items.is-open{ display: flex; }
  .menu-items a{ padding: 10px 12px; border-radius: 10px; }
  .menu-items a:hover{ background: #f1f5f9; }
}

/* =========================
   5) UTILIDADES / ACCESIBILIDAD
   ========================= */
.visually-hidden{
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}


/* ===================================================================
   6) BARRA DE NAVEGACIÓN VISIBLE (páginas estáticas, excepto "Home")
   =================================================================== */
  
  /* Header fijo en páginas sin autohide */
.site-header.nav--fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}

/* Si tu autohide usa transform para ocultar, nos aseguramos de que no se aplique en modo fijo */
.site-header.nav--fixed.nav--hidden { 
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}


/* =========================
   7.1) PÁGINA ABOUT.HTML
   ========================= */

  .hero { padding: 4rem 1rem; text-align:center; }
  .hero--gradient { background: linear-gradient(135deg, var(--turquoise), var(--gold)); color: var(--on-hero); }
  .hero .subtitle { max-width: 64ch; margin: 0 auto; opacity:.9; }

  .section { padding: 3rem 1rem; }
  .container { max-width: 1100px; margin: 0 auto; }

  .bullet-2col { columns: 2; column-gap: 2rem; }
  @media (max-width: 800px){ .bullet-2col { columns: 1; } }

  .category-grid { display:grid; grid-template-columns: repeat(5,1fr); gap:1rem; }
  @media (max-width: 1100px){ .category-grid { grid-template-columns: repeat(3,1fr); } }
  @media (max-width: 700px){ .category-grid { grid-template-columns: repeat(1,1fr); } }

  .category-card { background: var(--surface-1); padding:1rem 1.25rem; border-radius: 1rem; box-shadow: var(--shadow-1); }
  .tags-explainer .note { font-size:.95rem; opacity:.85;  }

  .tags-explainer { 
  margin-top: 2rem;            /* Comentario (ES): separa el título de Tags de las tarjetas */
}

  .last-updated { padding: 0 1rem 2rem; }


/* ===== FAQ visible (sin detalles) ===== */
/* Comentario (ES): Layout cómodo y legible para preguntas/answers en abierto */
.faq-list {
  display: grid;
  gap: 1rem;
}
.faq-item {
  background: var(--surface-1);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-1);
}
.faq-item h3 {
  font-size: 1.1rem;
  margin: 0 0 .5rem 0;
}
.faq-item p {
  margin: 0;
  line-height: 1.55;
}


/* =========================
   7.2) PÁGINA CONTACT.HTML
   ========================= */

  .cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
  @media (max-width: 1100px){ .cards-grid { grid-template-columns: repeat(2,1fr); } }
  @media (max-width: 700px){ .cards-grid { grid-template-columns: 1fr; } }

  .card-3d {
    background: var(--surface-1);
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: var(--shadow-2); /* sombra un poco más profunda que la de las category cards */
  }
  .card-3d header h3 { margin: 0 0 .25rem 0; }
  .card-3d .muted { margin: 0 0 .75rem 0; opacity: .85; }
  .card-3d .placeholder { font-size: .9rem; opacity: .75; margin: .5rem 0 .5rem; }

  .checklist { margin: 0 0 .75rem 1.1rem; }
  .checklist li { margin: .25rem 0; }

  .btn-cta {
    display: inline-block;
    padding: .65rem 1rem;
    border-radius: .75rem;
    background: var(--brand-600);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-1);
    transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease;
  }
  .btn-cta:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  .btn-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
  .btn-cta:active { transform: translateY(0); box-shadow: var(--shadow-1); opacity: .9; }


/* =========================
   Botón CTA con borde dorado de 2px (como las cards de Home)
   ========================= */
.btn-cta{
  border: 2px solid var(--accent-gold); /* 2px gold border */
  color: #f7be02;
  background: #fff;
  /* el resto de estilos del botón ya los tienes (bg, sombras…) */
}

/* =========================
   Emojis decorativos en títulos (H2/H3)
   ========================= */
/* Comentario (ES): tamaño y alineación suaves; heredan el color del texto */
.emoji{
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","EmojiOne Color",system-ui,sans-serif;
  font-size: 1.2em;
  line-height: 1;
  display: inline-block;
  margin-right: .5rem;
  transform: translateY(.07em); /* pequeño ajuste vertical */
}


/* ===============================
   AJUSTES ADICIONALES PERSONALES
   =============================== */  

  #forms-title { margin-bottom: 1.5em; }