@charset "utf-8";

/* =========================================================
   FONT
========================================================= */

@font-face {
  font-family: 'Fredoka One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/fredokaone/v8/k3kUo8kEI-tA1RRcTZGmTlHGCac.woff2) format('woff2');
}

/* =========================================================
   VARIABLES
========================================================= */

:root {
  --bg:     #8d5775;
  --bg2:    #5c3f50;   /* ligeramente más oscuro para el aside */
  --red:    #ed2e3e;
  --orange: #fc9b38;
  --gold:   #FFD38A;
  --light:  #F5EFFF;
  --white:  #ffffff;
  --font:   'Fredoka One', system-ui, sans-serif;
  --nav-h:  56px;
  --radius: 12px;
  --pad-x:  clamp(14px, 4vw, 48px);
  --max-w:  1280px;
}

/* =========================================================
   RESET / BASE
========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font); }
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; color: inherit; }
.clearfloat { clear: both; }


/* =========================================================
   NAV  — idéntico al resto del sitio
========================================================= */

.main-nav {
  position: sticky;
  top: 0; z-index: 200;
  width: 100%;
  background: var(--white);
  border-bottom: 4px solid var(--orange);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad-x);
  position: relative;
}

.nav-links {
  list-style: none; margin: 0; padding: 0;
  display: flex;
  gap: clamp(2px, 1.2vw, 18px);
}

.nav-links a {
  font-family: var(--font);
  font-size: clamp(.82rem, 1.3vw, 1.05rem);
  color: var(--bg);
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--orange);
  color: var(--white);
}

/* oculto por defecto (desk + tablet) */
.nav-logo { display: none; }

.nav-inicio a {
  color: var(--orange);
}

/* solo en móvil */
@media (max-width: 560px) {
  .nav-logo {
    display: block;
    position: absolute;
    left: var(--pad-x);
    font-family: var(--font);
    font-size: 1.25rem;
    color: var(--bg);
    white-space: nowrap;
  }
     .nav-inicio { display: none; }
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none; cursor: pointer; padding: 0;
  position: absolute; right: var(--pad-x);
  top: 50%; transform: translateY(-50%);
}

.hamburger span {
  display: block; width: 100%; height: 3px;
  background: var(--bg); border-radius: 3px;
  transition: transform .25s ease, opacity .2s ease;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }


/* =========================================================
   BREADCRUMB BAR
========================================================= */

.breadcrumb-bar {
  width: 100%;
  background: rgba(0,0,0,.15);
  padding: 8px 0;
}

.breadcrumb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: .9rem;
}

.breadcrumb-inner a { color: var(--gold); transition: color .15s; }
.breadcrumb-inner a:hover { color: var(--white); }
.breadcrumb-sep { color: var(--orange); }
.breadcrumb-current { color: var(--white); }


/* =========================================================
   GAME PAGE WRAPPER
========================================================= */

.juego-page-wrap {
  width: 100%;
  background: var(--bg);
}

.juego-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 200px;
  padding: 24px var(--pad-x) 28px;
  align-items: flex-start;
  justify-content: center;  /* centra el conjunto juego+ad */
}


/* =========================================================
   GAME COLUMN (izquierda)
========================================================= */

.juego-wrap {
  flex: 0 0 510px;
}

/* canvas con sombra para darle presencia */
.canvas-area {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(0,0,0,.45),
              0 0 0 3px rgba(252,155,56,.25);
  position: relative;
}

/* link de vuelta a la categoría — debajo del canvas */
.back-cat-link {
  display: block;
  text-align: center;
  background: rgba(0,0,0,.2);
  color: var(--gold);
  font-family: var(--font);
  font-size: .95rem;
  padding: 11px 16px;
  letter-spacing: .04em;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: background .2s, color .2s;
}

.back-cat-link:hover {
  background: var(--orange);
  color: var(--white);
}


/* =========================================================
   ASIDE (derecha): solo el ad
========================================================= */

.juego-aside {
  flex: 0 0 300px;
  padding-top: 4px;
}




/* =========================================================
   TEXTO — fondo blanco de lado a lado
   (siempre fuera de .juego-page-wrap / .container)
========================================================= */

.home-text {
  width: 100%;
  background: var(--white);
  padding: 36px 0 44px;
}

.textoFluo {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  font-family: system-ui, Arial, sans-serif;
  line-height: 1.65;
  font-size: 1rem;
}

.textoFluo h1 {
  font-family: var(--font);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: var(--bg);
  font-weight: 400;
  margin: 0 0 1rem;
}

.textoFluo h2 {
  font-family: var(--font);
  font-size: 1.25rem;
  color: var(--bg);
  font-weight: 400;
  margin: 1.4rem 0 .5rem;
}

.textoFluo p {
  color: #333;
  margin: .7rem 0;
}

.textoFluo a {
  color: var(--bg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}

.textoFluo a:hover { color: var(--orange); }

/* imagen del juego dentro del texto */
.imagen-juegos {
  float: left;
  margin: 0 20px 16px 0;
}

.imagen-juegos img {
  width: 200px;
  height: auto;
  border-radius: var(--radius);
  border: 5px solid var(--orange);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}


/* =========================================================
   FOOTER
========================================================= */

footer { width: 100%; }

.pie_creditos {
  width: 100%;
  background: var(--bg);
  padding: 14px var(--pad-x);
}

.pie_creditos p,
.pie_creditos a {
  color: #c0b1b1;
  text-decoration: none;
  font-size: .9rem;
}


/* =========================================================
   AD RECTANGLE (mismo helper que en submenues)
========================================================= */

.ad-rectangle {
  display: block;
  width: 300px;
  height: 600px;
}


/* =========================================================
   TABLET / COLUMNA ÚNICA  (≤ 880px)
========================================================= */

@media (max-width: 880px) {

  .juego-layout {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px var(--pad-x) 20px;
  }

  .juego-wrap {
    flex: none;
    width: 100%;
    max-width: 510px;
  }

  .back-cat-link {
    border-radius: 0;  /* sin radio al quedar pegado al aside */
  }

  .juego-aside {
display: none;
  }

      .nav-links a {
    text-transform: uppercase;
  }

}


/* =========================================================
   MOBILE  (≤ 560px)
========================================================= */

@media (max-width: 560px) {

  /* nav */
  .hamburger { display: flex; }
  .nav-inner  { justify-content: flex-start; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 6px;
    padding: 16px 16px 22px;
    border-bottom: 3px solid var(--orange);
    box-shadow: 0 8px 20px rgba(0,0,0,.15);
  }

  .nav-links li { display: block; }

  .nav-links a {
    display: block;
    font-size: 1.15rem;
    padding: 16px 14px;
    border-radius: 8px;
  }

  .nav-links.is-open { display: flex; }

  .breadcrumb-inner { font-size: .8rem; }

  .juego-layout { padding: 12px 0 16px; }

  /* canvas ocupa todo el ancho */
  .canvas-area { border-radius: 0; box-shadow: none; }

  .back-cat-link { border-radius: 0; font-size: .9rem; }

  .textoFluo h1 { font-size: 1.15rem; }
}


/* =========================================================
   HAMBURGER JS — pegar antes de </body>:

  <script>
    var btn  = document.getElementById('burger');
    var menu = document.getElementById('navLinks');
    if (btn && menu) {
      btn.addEventListener('click', function () {
        btn.classList.toggle('is-open');
        menu.classList.toggle('is-open');
        btn.setAttribute('aria-expanded', menu.classList.contains('is-open'));
      });
    }
  </script>

========================================================= */
