/* La Mar de Luanco — marco común de las páginas PHP (guía, foro, tiempo, mareas, playas, surf, fiestas…).
   Las viste con el sistema de la web nueva (azul noche, dorado y marfil; Fraunces, Inter y Barlow Condensed)
   sin tocar su contenido ni sus funciones. Lo carga public_html/nav-lib.php (lmlMarco) después del estilo
   propio de cada página. Las fuentes son las mismas de la web nueva, con nombre fijo en /fuentes/. */

/* ---------- Fuentes (latín y latín extendido: español, asturiano, francés, alemán, portugués) ---------- */
@font-face { font-family: 'Fraunces Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fuentes/fraunces-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fuentes/fraunces-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces Variable'; font-style: italic; font-display: swap; font-weight: 100 900; src: url(/fuentes/fraunces-latin-wonk-italic.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces Variable'; font-style: italic; font-display: swap; font-weight: 100 900; src: url(/fuentes/fraunces-latin-ext-wonk-italic.woff2) format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fuentes/inter-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fuentes/inter-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fuentes/barlow-condensed-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fuentes/barlow-condensed-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fuentes/barlow-condensed-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fuentes/barlow-condensed-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Sistema visual (copia de web/src/styles/global.css) ---------- */
:root {
  --navy-950: #050f1c; --navy-900: #081a2d; --navy-800: #0d2640; --navy-700: #163a5c;
  --gold: #c9a45c; --gold-2: #e3c88e; --ivory: #f7f2e8; --sea: #7fd6ea; --live: #ff5a5f;
  --text: #f3eee4; --text-2: #a9b9ca;
  --surface: rgba(255, 255, 255, .045); --surface-2: rgba(255, 255, 255, .08);
  --serif: 'Fraunces Variable', 'Fraunces', Georgia, 'Times New Roman', serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', 'Inter Variable', sans-serif;
  --sans: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.22, .8, .2, 1);
  color-scheme: dark;
}

/* ---------- Colores de la web actual → sistema nuevo ----------
   Cada página PHP define sus propias variables en :root; html:root pesa más y las sustituye. */
html:root {
  --azul: var(--navy-950); --fondo: var(--navy-950); --bg: var(--navy-950);
  --card: #0b2036; --glass: rgba(255, 255, 255, .045); --glass2: rgba(255, 255, 255, .03); --vidrio: rgba(13, 38, 64, .55);
  --line: rgba(227, 200, 142, .16); --linea: rgba(227, 200, 142, .16);
  --cyan: var(--gold-2); --cian: var(--gold-2); --ci: var(--gold-2); --azulc: var(--sea); --oro: var(--gold-2);
  --ink: var(--text); --tinta: var(--text); --muted: var(--text-2); --tinta2: var(--text-2); --dim: var(--text-2); --gr: var(--text-2); --ink-dim: var(--text-2);
  --tenue: #7d8fa3;
  --serif: 'Fraunces Variable', 'Fraunces', Georgia, serif;
}

/* ---------- Base ---------- */
html { background: var(--navy-950); }
body {
  background: var(--navy-950) radial-gradient(1100px 520px at 85% -8%, rgba(201, 164, 92, .10), transparent 65%) no-repeat;
  color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body, button, input, select, textarea { font-family: var(--sans); }
h1, h2 { font-family: var(--serif) !important; font-weight: 500 !important; letter-spacing: -.015em !important; }
h1 em, h2 em, h1 i, h2 i { font-style: italic; color: var(--gold-2); }
::selection { background: rgba(227, 200, 142, .35); color: var(--ivory); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
[hidden] { display: none !important; }
@media (max-width: 640px) { html, body { overflow-x: clip; } }

/* ---------- Aviso del laboratorio (solo en la copia local: APP_ENV=local) ---------- */
.lml-lab { margin: 0; padding: 7px var(--gutter); text-align: center; font: 500 13px/1.4 var(--sans); color: #f7e2b0; background: #2e2208; border-bottom: 1px solid rgba(227, 200, 142, .3); }

/* ---------- Cabecera (igual que la de la web nueva) ---------- */
.lml-bar {
  position: sticky; top: 0; z-index: 100; padding-top: env(safe-area-inset-top);
  background: rgba(5, 15, 28, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgba(227, 200, 142, .14); color: var(--text);
}
.lml-in { height: 64px; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.lml-marca { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ivory); text-decoration: none; min-width: 0; }
.lml-marca img { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--ivory); padding: 2px; object-fit: contain; }
.lml-marca span { font-family: var(--serif); font-size: 20px; letter-spacing: -.01em; white-space: nowrap; }
.lml-marca i { font-style: italic; color: var(--gold-2); }
.lml-links { display: flex; gap: 4px; }
.lml-links a { color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: background .3s; white-space: nowrap; }
.lml-links a:hover { background: rgba(247, 242, 232, .07); }
.lml-links a[aria-current] { color: var(--gold-2); background: rgba(227, 200, 142, .09); }
.lml-acc { display: flex; align-items: center; gap: 10px; }
.lml-idioma { position: relative; }
.lml-idioma summary {
  list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text);
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid rgba(247, 242, 232, .22);
}
.lml-idioma summary::-webkit-details-marker { display: none; }
.lml-idioma ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 2; margin: 0; padding: 8px; list-style: none; min-width: 170px;
  background: rgba(8, 26, 45, .97); border: 1px solid rgba(227, 200, 142, .16); border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.lml-idioma a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.lml-idioma a:hover, .lml-idioma a[aria-current] { background: var(--surface-2); }
.lml-cta {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: var(--gold); color: var(--navy-950); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .3s, transform .4s var(--ease);
}
.lml-cta:hover { background: var(--gold-2); transform: translateY(-1px); }
.lml-punto { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: lmlLatido 2s infinite; }
@keyframes lmlLatido { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .6); } 70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .lml-punto { animation: none; } }

/* ---------- Botón "← Volver" de algunas páginas (vuelve atrás en la propia web) ---------- */
.lml-volver {
  display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 0; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid rgba(227, 200, 142, .25); color: var(--text-2); font: 600 13.5px/1.2 var(--sans); transition: border-color .2s, color .2s;
}
.lml-volver:hover { border-color: var(--gold-2); color: var(--text); }

/* ---------- Enlaces pequeños fáciles de tocar en el móvil (sin mover nada: el hueco crece hacia fuera) ---------- */
@media (max-width: 900px) {
  nav[aria-label="Ruta"] a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
}

/* ---------- Barra inferior en móvil ---------- */
.lml-tabbar { display: none; }
@media (max-width: 1180px) { .lml-links a { padding: 8px 10px; } .lml-in { gap: 16px; } }
@media (max-width: 1040px) { .lml-cta { display: none; } }
@media (max-width: 900px) {
  .lml-links { display: none; }
  .lml-marca span { font-size: 19px; }
  .lml-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 95; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 22px; background: rgba(5, 15, 28, .9); color: var(--ivory);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(227, 200, 142, .18); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5);
  }
  .lml-tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 8px 2px;
    color: inherit; font-size: 11px; font-weight: 500; text-decoration: none; border-radius: 16px; opacity: .8;
  }
  .lml-tabbar a[aria-current] { opacity: 1; color: var(--gold-2); background: rgba(255, 255, 255, .06); }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}
@media (max-width: 380px) { .lml-marca span { font-size: 17px; } .lml-idioma summary { padding: 8px 10px; } }

/* ---------- Menú del móvil (igual que en la web nueva: web/src/components/Nav.astro) ----------
   El idioma pasa dentro del menú: en el móvil no caben los dos botones. */
.lml-menu { display: none; }
@media (max-width: 900px) {
  .lml-idioma { display: none; }
  .lml-menu { display: block; }
  .lml-menu summary {
    list-style: none; display: flex; align-items: center; min-height: 44px; padding: 0 15px 0 12px; cursor: pointer;
    border-radius: 999px; border: 1px solid rgba(247, 242, 232, .22); color: var(--text);
    font: 600 14px/1 var(--sans); -webkit-tap-highlight-color: transparent;
  }
  .lml-menu summary::-webkit-details-marker { display: none; }
  .lml-menu summary > span { display: flex; align-items: center; gap: 7px; }
  .lml-menu:not([open]) .lml-m-cerrar, .lml-menu[open] .lml-m-abrir { display: none; }
  .lml-menu[open] summary { background: var(--ivory); border-color: var(--ivory); color: var(--navy-950); }
  /* Cuelga de la cabecera y llena la pantalla por debajo; se desplaza por dentro */
  .lml-menu-panel {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 3; height: calc(100dvh - 64px - env(safe-area-inset-top));
    overflow-y: auto; overscroll-behavior: contain; text-align: left;
    padding: 18px var(--gutter) calc(40px + env(safe-area-inset-bottom));
    background: var(--navy-950); color: var(--ivory); border-top: 1px solid rgba(227, 200, 142, .14);
    animation: lmlMenuIn .32s var(--ease);
  }
  html:has(.lml-menu[open]) { overflow: hidden; }
  body:has(.lml-menu[open]) .lml-tabbar { visibility: hidden; }
  .lml-menu-panel ul { list-style: none; margin: 0; padding: 0; }
  .lml-menu-grandes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .lml-menu-grandes a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 4px;
    border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(227, 200, 142, .14);
    color: var(--ivory); text-decoration: none; font: 600 14px/1.2 var(--sans); text-align: center;
  }
  .lml-menu-grandes svg { color: var(--gold-2); }
  .lml-menu-grandes a[aria-current] { border-color: rgba(227, 200, 142, .55); background: rgba(227, 200, 142, .1); color: var(--gold-2); }
  .lml-menu-h {
    display: flex; align-items: center; gap: 7px; margin: 26px 0 4px;
    font: 600 12px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2);
  }
  .lml-menu-l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .lml-menu-l a {
    display: flex; align-items: center; min-height: 46px; padding: 6px 0;
    border-bottom: 1px solid rgba(247, 242, 232, .08); color: rgba(247, 242, 232, .9);
    text-decoration: none; font: 400 15px/1.25 var(--sans);
  }
  .lml-menu-l a[aria-current] { color: var(--gold-2); }
  .lml-menu-fuera { color: var(--text-2); font-size: 13px; white-space: pre; }
  .lml-menu-idioma { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px !important; }
  .lml-menu-idioma a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
    border: 1px solid rgba(247, 242, 232, .2); color: var(--ivory); text-decoration: none; font: 400 14px/1 var(--sans);
  }
  .lml-menu-idioma a[aria-current] { background: var(--ivory); border-color: var(--ivory); color: var(--navy-950); }
}
@media (max-width: 380px) { .lml-in { gap: 10px; } .lml-marca { gap: 9px; } .lml-marca img { width: 36px; height: 36px; } .lml-menu summary { padding: 0 12px 0 10px; } }
@media (max-width: 359px) { .lml-menu-l { grid-template-columns: minmax(0, 1fr); } }
@keyframes lmlMenuIn { from { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .lml-menu-panel { animation: none; } }
