/* Travle: cabecera universal (menú + barra para compartir).
   Todas las reglas están dentro de .site-header para no afectar a los estilos existentes. */
.site-header {
  --sn-ink: #13141c;
  --sn-muted: #4b5063;
  --sn-line: #e2e8f0;
  --sn-accent: #ffbf5a;      /* ámbar del menú existente (.header_menu_link.active) */
  --sn-hover: #edeadb;       /* fondo de hover del menú existente */
  --sn-bg: #ffffff;
  --sn-btn: #f1f5f9;
  --sn-focus: #1d4ed8;
  position: relative;
  z-index: 40;
  display: block;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--sn-bg);
  border-bottom: 1px solid var(--sn-line);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--sn-ink);
  text-align: left;
}
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header ul { list-style: none; margin: 0; padding: 0; }
.site-header li { margin: 0; padding: 0; }
.site-header a { text-decoration: none; font-weight: inherit; }
.site-header button { font: inherit; }
.site-header svg { display: block; }

.site-header .site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.site-header .site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sn-ink);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .01em;
  padding: 4px 0;
  flex-shrink: 0;
}
.site-header .site-brand-logo { display: block; width: 32px; height: 32px; border-radius: 50%; }
.site-header .site-brand:hover { opacity: .75; }

/* Selector de idioma (último elemento del menú) */
.site-header .site-lang-flag {
  display: block;
  width: 24px;
  height: 16px;
  object-fit: cover;
  border: 1px solid var(--sn-line);
  border-radius: 2px;
  flex-shrink: 0;
}
.site-header .site-lang-globe { width: 18px; height: 18px; flex-shrink: 0; }
.site-header .site-nav-lang .site-nav-sub { left: auto; right: 0; min-width: 230px; }
.site-header .site-nav-sub .site-lang-link { display: flex; align-items: center; gap: 10px; }

/* Botón hamburguesa: solo en móvil y solo cuando el JavaScript está activo. */
.site-header .site-nav-toggle { display: none; }

.site-header .site-nav-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
}
.site-header .site-nav-list { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
.site-header .site-nav-link,
.site-header .site-nav-subtoggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sn-ink);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.site-header .site-nav-link:hover,
.site-header .site-nav-subtoggle:hover { background: var(--sn-hover); }
.site-header .site-nav-item.is-active > .site-nav-link,
.site-header .site-nav-item.is-active > .site-nav-subtoggle { background: var(--sn-accent); font-weight: 700; }
.site-header .site-nav-link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.site-header .site-nav-caret { width: 12px; height: 12px; transition: transform .15s ease; }
.site-header .site-nav-subtoggle[aria-expanded="true"] .site-nav-caret { transform: rotate(180deg); }

.site-header a:focus-visible,
.site-header button:focus-visible { outline: 3px solid var(--sn-focus); outline-offset: 2px; }

/* Desplegable */
.site-header .site-nav-has-sub { position: relative; }
.site-header .site-nav-sub {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 210px;
  padding: 6px;
  background: var(--sn-bg);
  border: 1px solid var(--sn-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(19, 20, 28, .12);
  z-index: 50;
}
.site-header .site-nav-subtoggle[aria-expanded="true"] + .site-nav-sub { display: block; }
/* Sin JavaScript: se abre al pasar el ratón o con el foco del teclado. */
.site-header:not(.sn-js) .site-nav-has-sub:hover .site-nav-sub,
.site-header:not(.sn-js) .site-nav-has-sub:focus-within .site-nav-sub { display: block; }
.site-header .site-nav-sublink {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--sn-ink);
  white-space: nowrap;
}
.site-header .site-nav-sublink:hover { background: var(--sn-hover); }
.site-header .site-nav-sublink[aria-current="page"] { background: var(--sn-accent); font-weight: 700; }

/* Barra para compartir */
.site-header .header-share-subbar { display: flex; align-items: center; gap: 8px; }
.site-header .share-subbar-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--sn-muted); }
.site-header .share-subbar-icons { display: flex; gap: 6px; }
.site-header .share-subbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sn-btn);
  border: 1px solid var(--sn-line);
  color: var(--sn-muted);
  box-shadow: 0 1px 2px rgba(19, 20, 28, .06);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.site-header .share-subbar-icon svg { width: 14px; height: 14px; fill: currentColor; }
.site-header .share-subbar-icon:hover,
.site-header .share-subbar-icon:focus-visible { color: #fff; transform: translateY(-2px); }
.site-header .share-subbar-facebook:hover, .site-header .share-subbar-facebook:focus-visible { background: #1877F2; border-color: #1877F2; }
.site-header .share-subbar-x:hover, .site-header .share-subbar-x:focus-visible { background: #000; border-color: #000; }
.site-header .share-subbar-pinterest:hover, .site-header .share-subbar-pinterest:focus-visible { background: #BD081C; border-color: #BD081C; }
.site-header .share-subbar-whatsapp:hover, .site-header .share-subbar-whatsapp:focus-visible { background: #128C4B; border-color: #128C4B; }
.site-header .share-subbar-telegram:hover, .site-header .share-subbar-telegram:focus-visible { background: #1C7FB0; border-color: #1C7FB0; }
.site-header .share-subbar-linkedin:hover, .site-header .share-subbar-linkedin:focus-visible { background: #0A66C2; border-color: #0A66C2; }
.site-header .share-subbar-email:hover, .site-header .share-subbar-email:focus-visible { background: var(--sn-ink); border-color: var(--sn-ink); }

/* Móvil: 768px o menos */
@media (max-width: 768px) {
  .site-header .site-header-inner { flex-wrap: wrap; align-items: center; padding: 8px 16px; }
  .site-header.sn-js .site-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--sn-line);
    border-radius: 8px;
    background: var(--sn-bg);
    color: var(--sn-ink);
    font-weight: 600;
    cursor: pointer;
  }
  .site-header .site-nav-toggle-bars,
  .site-header .site-nav-toggle-bars::before,
  .site-header .site-nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; position: relative; content: "";
  }
  .site-header .site-nav-toggle-bars::before { position: absolute; top: -6px; }
  .site-header .site-nav-toggle-bars::after { position: absolute; top: 6px; }
  .site-header .site-nav-panel { flex-basis: 100%; align-items: stretch; gap: 0; }
  .site-header.sn-js .site-nav-panel { display: none; }
  .site-header.sn-js.is-open .site-nav-panel { display: flex; }
  .site-header .site-nav-list { flex-direction: column; align-items: stretch; flex-wrap: wrap; padding: 6px 0; }
  .site-header .site-nav-link,
  .site-header .site-nav-subtoggle { width: 100%; justify-content: space-between; min-height: 44px; }
  .site-header .site-nav-sub { position: static; box-shadow: none; border: 0; padding: 0 0 4px 12px; min-width: 0; }
  .site-header .site-nav-lang .site-nav-sub { min-width: 0; }
  .site-header .site-nav-lang .site-nav-subtoggle { justify-content: flex-start; }
  .site-header .site-nav-lang .site-nav-caret { margin-left: auto; }
  .site-header .site-brand { font-size: 18px; }
  .site-header .header-share-subbar {
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--sn-line);
    padding: 12px 0 6px;
    width: 100%;
  }
  .site-header .share-subbar-icons { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .site-header .share-subbar-icon { width: 36px; height: 36px; }
  .site-header .share-subbar-icon svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .share-subbar-icon,
  .site-header .site-nav-caret { transition: none; }
  .site-header .share-subbar-icon:hover,
  .site-header .share-subbar-icon:focus-visible { transform: none; }
}

/* Pie común: mismo aspecto que el pie de la portada (.footer2 en style3.css / main.min.css).
   Propiedades explícitas para no heredar reglas genéricas de "footer" de cada página. */
.site-footer {
  display: block;
  width: auto;
  max-width: none;
  margin: 32px 0 0;
  padding: 20px 16px 10px;
  border: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  color: #2c2f3e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.site-footer * { box-sizing: border-box; }
.site-footer .site-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 0; }
.site-footer .site-footer-copy { color: #2c2f3e; font-size: 13px; margin: 0 10px 0 0; }
.site-footer .site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-footer .site-footer-links li { margin: 0 0 0 10px; padding: 0 0 0 10px; border-left: 1px solid #75798d; line-height: 1.2; }
.site-footer .site-footer-links li:first-child { margin-left: 0; padding-left: 0; border-left: 0; }
.site-footer .site-footer-links a { color: #2c2f3e; font-weight: 400; text-decoration: none; }
.site-footer .site-footer-links a:hover { color: #b7791f; text-decoration: underline; }
.site-footer a:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.site-footer .site-footer-message { max-width: 960px; margin: 16px auto 10px; color: #6b6f85; font-size: 13px; line-height: 24px; }
@media (max-width: 479px) {
  .site-footer .site-footer-bottom { flex-direction: column; }
  .site-footer .site-footer-copy { margin: 0 0 6px; }
  .site-footer .site-footer-links { gap: 8px 0; }
}

/* Escritorio estrecho (769–1024px): menú más compacto para que no choque con la marca. */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-header .site-header-inner { gap: 10px; }
  .site-header .site-nav-list { gap: 0; }
  .site-header .site-nav-link,
  .site-header .site-nav-subtoggle { padding: 8px 9px; font-size: 14px; }
  .site-header .site-brand { font-size: 17px; gap: 6px; }
  .site-header .site-brand-logo { width: 28px; height: 28px; }
  .site-header .site-nav-lang .site-nav-subtoggle > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Submenú de continentes antes del pie (todas las páginas). */
.site-continents {
  display: block; margin: 40px 0 0; padding: 28px 16px 30px; background: #13141c; color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: left;
}
.site-continents * { box-sizing: border-box; }
.site-continents .site-continents-inner { max-width: 1100px; margin: 0 auto; }
.site-continents .site-continents-title { margin: 0 0 14px; font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .01em; }
.site-continents .site-continents-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.site-continents .site-continents-list li { margin: 0; padding: 0; }
.site-continents .site-cont-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 96px; padding: 14px 16px;
  border-radius: 14px; color: #fff; text-decoration: none; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .15s ease, box-shadow .15s ease;
}
.site-continents .site-cont-tile:hover, .site-continents .site-cont-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.site-continents .site-cont-tile:focus-visible { outline: 3px solid #ffbf5a; outline-offset: 3px; }
.site-continents .site-cont-name { font-size: 18px; font-weight: 800; line-height: 1.2; }
.site-continents .site-cont-count { font-size: 13px; opacity: .92; }
.site-continents .site-cont-go { position: absolute; top: 10px; right: 14px; font-size: 20px; opacity: .85; }
.site-continents .site-cont-africa { background: linear-gradient(135deg, #9a3412, #b45309); }
.site-continents .site-cont-asia { background: linear-gradient(135deg, #831843, #be185d); }
.site-continents .site-cont-europe { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.site-continents .site-cont-north-america { background: linear-gradient(135deg, #14532d, #15803d); }
.site-continents .site-cont-south-america { background: linear-gradient(135deg, #713f12, #a16207); }
.site-continents .site-cont-oceania { background: linear-gradient(135deg, #164e63, #0e7490); }
.site-continents .site-continents-all { display: inline-block; margin-top: 14px; color: #ffbf5a; font-weight: 700; text-decoration: none; }
.site-continents .site-continents-all:hover { text-decoration: underline; }
.site-continents + .site-footer, .site-continents + footer { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .site-continents .site-cont-tile { transition: none; } .site-continents .site-cont-tile:hover { transform: none; } }

/* Tarjetas de los juegos propios en «Alternatives to Travle» (tools/seo/apply_game_cards.py):
   logo centrado sobre un fondo suave del color del juego, en el hueco de 200x133 de la tarjeta heredada. */
.game-item--travle .game-item__img { display: flex; align-items: center; justify-content: center; }
.game-item--travle .game-item__img img { width: 104px; height: 104px; max-width: none; }
.tg-flag-quiz .game-item__img { background: linear-gradient(135deg, #eef2ff, #c7d2fe); }
.tg-capital-city-quiz .game-item__img { background: linear-gradient(135deg, #fff1f2, #fecdd3); }
.tg-find-a-flag .game-item__img { background: linear-gradient(135deg, #f0fdf4, #bbf7d0); }
.tg-travle-hints .game-item__img { background: linear-gradient(135deg, #f0fdfa, #99f6e4); }
.tg-random-country-generator .game-item__img { background: linear-gradient(135deg, #fff7ed, #fed7aa); }
.tg-3d-map-of-the-world .game-item__img { background: linear-gradient(135deg, #f0f9ff, #bae6fd); }
.tg-country-codes .game-item__img { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); }
@media (max-width: 767px) { .game-item--travle .game-item__img img { width: 84px; height: 84px; } }
/* En móvil, dos tarjetas por fila en esos bloques (antes, una por fila). */
@media (max-width: 420px) {
  .section .games .game-item { width: calc(50% - 12px); max-width: 170px; margin: 6px; }
  .section .games .game-item__info { padding: 8px 8px 12px; }
  .section .games .game-item__play { padding: 8px 0; width: 100%; }
}
