/* Iberofonía — chrome compartido por las seis páginas.
   Tokens, reset, navbar, menú móvil y footer. Cárgalo antes del <style> de cada página. */

:root {
  --gold: #c9a84c; --gold-light: #e8c97a;
  --dark: #0d1117; --dark-2: #161b22; --dark-3: #21262d;
  --text: #e6edf3; --text-muted: #8b949e;
  --accent: #d4692a; --accent-2: #1a6b3a;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Georgia', serif; background: var(--dark); color: var(--text); line-height: 1.75; }

/* NAVBAR */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px;
  background: rgba(13,17,23,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,168,76,.15);
  transition: transform .35s ease, opacity .35s ease;
}
#main-nav.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.nav-brand { flex-shrink: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; color: var(--gold-light); text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 6px; }
.nav-links a {
  display: block; padding: 6px 16px; border-radius: 20px;
  font-size: .83rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { background: rgba(201,168,76,.12); color: var(--gold-light); }
#lang-bar { display: flex; gap: 4px; border: 1px solid rgba(201,168,76,.3); border-radius: 24px; padding: 4px; flex-shrink: 0; }
.lang-btn {
  cursor: pointer; border: none; background: transparent; color: var(--text-muted);
  font-size: .85rem; font-weight: 700; padding: 6px 14px; border-radius: 20px;
  letter-spacing: .06em; transition: background .2s, color .2s;
}
.lang-btn.active { background: var(--gold); color: var(--dark); }
.lang-btn:hover:not(.active) { color: var(--text); }

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(201,168,76,.25);
  color: var(--text-muted);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 1.15rem;
  line-height: 1;
  transition: color .2s, border-color .2s;
}
.nav-hamburger:hover { color: var(--gold-light); border-color: rgba(201,168,76,.5); }

/* ── MOBILE MENU DRAWER ── */
#mobile-menu {
  position: fixed;
  top: 60px; left: 0; right: 0;
  z-index: 998;
  background: rgba(13,17,23,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,.15);
  padding: 16px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform .3s ease, opacity .25s ease;
  pointer-events: none;
}
#mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.mobile-nav-links a {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active { background: rgba(201,168,76,.12); color: var(--gold-light); }
.mobile-lang-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(201,168,76,.1);
}
.mobile-lang-row .lang-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(201,168,76,.2);
  font-size: .9rem;
}
.mobile-lang-row .lang-btn.active { background: var(--gold); color: var(--dark); border-color: var(--gold); }

/* keeps five nav links from overflowing between the mobile breakpoint and ~920px */
@media (max-width: 920px) and (min-width: 721px) {
  #main-nav { padding: 0 18px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 6px 9px; font-size: .74rem; letter-spacing: .03em; }
  .lang-btn { padding: 6px 10px; font-size: .8rem; }
}
@media (max-width: 720px) {
  #main-nav { padding: 0 16px; }
  .nav-links { display: none; }
  #lang-bar { display: none; }
  .nav-hamburger { display: block; }
}

/* ── BOTÓN DE SUBIR ── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 999;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-3px); }

/* ── FOOTER ── */
footer {
  background: var(--dark-2); border-top: 1px solid var(--dark-3);
  text-align: center; padding: 40px 24px; color: var(--text-muted); font-size: .85rem;
}
footer a { color: var(--gold); text-decoration: none; }
