/* ==========================================================
   Planetario CIASIVE - Hoja de estilos principal
   Editar en FrontPage: usar siempre la vista CODIGO.
   Colores: cambiar en el bloque :root de abajo.
   ========================================================== */
:root {
  --navy: #070d31;
  --navy-2: #0c1545;
  --navy-3: #131e5c;
  --pale: #cfe3e8;
  --sky: #8fd3e6;
  --orange: #f29a4a;
  --gold: #ffd27a;
  --text: #e8eefc;
  --muted: #a9b6d8;
  --line: rgba(255, 255, 255, 0.13);
  --card: rgba(255, 255, 255, 0.055);
  --radius: 16px;
  --wrap: 1120px;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--navy);
  background-image:
    radial-gradient(1200px 600px at 85% -5%, rgba(80, 110, 220, 0.22), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, rgba(143, 211, 230, 0.08), transparent 60%);
  background-attachment: fixed;
}
img, svg, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: #fff; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; margin: 0 0 1.2em; }
li { margin-bottom: 0.35em; }
strong { color: #fff; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 999;
  background: var(--orange); color: #1a0f00; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section.alt { background: rgba(255, 255, 255, 0.03); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--pale); max-width: 62ch; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--orange); font-weight: 700; margin-bottom: 0.8em;
}
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Encabezado y menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 13, 49, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { max-width: 1240px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand-text { line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.04em; display: block; }
.brand-text span { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.nav-toggle {
  display: none; margin-left: auto; background: transparent; color: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; cursor: pointer;
}
.main-nav { margin-left: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-list > li { position: relative; margin: 0; }
.nav-list > li > a, .nav-list > li > button {
  display: block; background: none; border: 0; font: inherit; font-size: 0.95rem; color: var(--text);
  padding: 12px 12px; text-decoration: none; cursor: pointer; border-radius: 10px; white-space: nowrap;
}
.nav-list > li > a:hover, .nav-list > li > button:hover, .nav-list > li > a[aria-current="page"], .nav-list > li.is-active > button {
  background: rgba(255, 255, 255, 0.09); color: #fff;
}
.nav-list > li > button::after { content: " \25BE"; font-size: 0.8em; color: var(--muted); }
.dropdown {
  list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%;
  min-width: 250px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); display: none;
}
.dropdown li { margin: 0; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: rgba(143, 211, 230, 0.14); color: #fff; }
.nav-list > li:hover > .dropdown, .nav-list > li:focus-within > .dropdown, .nav-list > li.open > .dropdown { display: block; }
.nav-cta {
  background: var(--orange) !important; color: #1a0f00 !important; font-weight: 700;
  margin-left: 6px;
}
.nav-cta:hover { background: #ffb26b !important; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid var(--orange); background: var(--orange); color: #1a0f00; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #ffb26b; color: #1a0f00; transform: translateY(-2px); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.center .btn-row { justify-content: center; }

/* ---------- Hero portada ---------- */
.hero { position: relative; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: center; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-in { padding: 70px 20px 150px; text-align: center; width: 100%; max-width: 900px; margin: 0 auto; }
.hero-logo { width: 116px; height: 116px; border-radius: 50%; box-shadow: 0 0 60px rgba(143, 211, 230, 0.45); margin-bottom: 18px; }
.hero h1 { text-shadow: 0 3px 24px rgba(0, 0, 0, 0.7); margin-bottom: 0.3em; }
.hero .lead { margin: 0 auto 8px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.badge {
  font-size: 0.82rem; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(7, 13, 49, 0.55); color: var(--pale);
}
.tw { animation: tw 3.6s ease-in-out infinite; }
@keyframes tw { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.shoot { animation: shoot 9s linear infinite; opacity: 0; }
@keyframes shoot {
  0%, 70% { opacity: 0; transform: translate(0, 0); }
  72% { opacity: 1; }
  82% { opacity: 0; transform: translate(-380px, 190px); }
  100% { opacity: 0; transform: translate(-380px, 190px); }
}

/* ---------- Cabecera de paginas internas ---------- */
.page-hero {
  padding: 56px 0 46px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1.5px 1.5px at 12% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 28% 70%, #cfe3e8, transparent 60%),
    radial-gradient(1.5px 1.5px at 47% 25%, #fff, transparent 60%),
    radial-gradient(1px 1px at 63% 62%, #fff, transparent 60%),
    radial-gradient(2px 2px at 78% 35%, #ffd27a, transparent 60%),
    radial-gradient(1px 1px at 90% 75%, #cfe3e8, transparent 60%),
    radial-gradient(700px 300px at 80% 0%, rgba(110, 140, 255, 0.28), transparent 70%),
    linear-gradient(180deg, var(--navy-2), var(--navy));
}
.page-hero h1 { margin-bottom: 0.35em; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(255, 255, 255, 0.3); }
.crumbs a { color: var(--muted); }

/* ---------- Tarjetas y grillas ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(143, 211, 230, 0.5); }
.card img { width: 100%; height: 190px; object-fit: cover; display: block; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 0.4em; }
.card-body h3 a { color: #fff; text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card-body p { color: var(--muted); font-size: 0.98rem; flex: 1; }
.card .more { color: var(--orange); font-weight: 700; font-size: 0.92rem; }
.tile { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.shot { display: block; width: 100%; height: 220px; object-fit: cover; }
.tile h3 { margin-bottom: 0.3em; }

.split { display: grid; gap: 38px; grid-template-columns: 1.1fr 0.9fr; align-items: center; }
.split.rev { grid-template-columns: 0.9fr 1.1fr; }
.split.rev .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
figure { margin: 0; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: -70px; position: relative; z-index: 5; }
.stat { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.stat b { display: block; font-family: var(--serif); font-size: 2.1rem; color: var(--gold); line-height: 1.1; }
.stat span { font-size: 0.92rem; color: var(--muted); }

.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: "\2726"; position: absolute; left: 0; top: 0; color: var(--orange); }

.notice {
  border: 1px solid rgba(242, 154, 74, 0.55); background: rgba(242, 154, 74, 0.09); border-radius: var(--radius);
  padding: 18px 22px; margin: 26px 0;
}
.notice strong { color: var(--gold); }
.notice.info { border-color: rgba(143, 211, 230, 0.5); background: rgba(143, 211, 230, 0.08); }
.notice.info strong { color: var(--sky); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.tag-row li { margin: 0; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; color: var(--pale); background: var(--card); }

/* Datos rapidos (horario, duracion, lugar) */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 24px 0; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.fact small { display: block; color: var(--orange); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.72rem; font-weight: 700; }
.fact span { color: #fff; font-weight: 600; }

/* Tablas */
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.96rem; }
caption { text-align: left; padding: 14px 16px; color: var(--pale); font-weight: 600; }
th, td { padding: 11px 16px; text-align: left; border-top: 1px solid var(--line); }
thead th { background: rgba(255, 255, 255, 0.07); color: #fff; border-top: 0; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 12px; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: #fff; list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 1.5rem; color: var(--orange); }
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 20px 6px; color: var(--pale); }

/* Video (carga diferida) */
.video { position: relative; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button.play {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer; color: #fff; font: inherit;
  background: linear-gradient(180deg, rgba(7, 13, 49, 0.2), rgba(7, 13, 49, 0.65));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.video .play-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; }
.video .play-icon::after { content: ""; border-left: 22px solid #1a0f00; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 6px; }

.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 380px; border: 0; display: block; }

.logos { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.logos li { margin: 0; padding: 12px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 700; letter-spacing: 0.06em; color: var(--pale); }
.sponsor { background: #fff; border-radius: var(--radius); padding: 18px; display: grid; place-items: center; min-height: 150px; }
.sponsor img { max-height: 110px; width: auto; }

.timeline { list-style: none; padding: 0 0 0 22px; border-left: 2px solid rgba(143, 211, 230, 0.35); }
.timeline li { position: relative; margin-bottom: 22px; padding-left: 8px; }
.timeline li::before { content: ""; position: absolute; left: -31px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(242, 154, 74, 0.25); }
.timeline time { display: block; color: var(--orange); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Pie ---------- */
.site-footer { background: #040820; border-top: 1px solid var(--line); padding: 54px 0 24px; margin-top: 0; }
.foot-grid { display: grid; gap: 34px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.foot-grid h2 { font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); font-family: var(--sans); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--pale); text-decoration: none; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }
.foot-brand img { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 12px; }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 18px; font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; background: #25d366; color: #06301a; font-weight: 700;
  border-radius: 999px; padding: 12px 18px 12px 14px; display: flex; align-items: center; gap: 8px; text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45); font-size: 0.95rem;
}
.wa-float:hover { color: #06301a; background: #3ee57f; }
.wa-float svg { width: 24px; height: 24px; }

/* ---------- Certificado lunar ---------- */
.cert-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.cert-form label { display: block; margin-top: 12px; font-weight: 600; }
.cert-form input { width: 100%; padding: 10px; margin-top: 4px; border-radius: 8px; border: 1px solid var(--line); background: #0e1424; color: #fff; font: inherit; }
.certificate {
  position: relative; width: 100%; max-width: 21cm; aspect-ratio: 21 / 29.7; border-radius: 12px; overflow: hidden;
  background: #101a3d url("../img/certificado-fondo-luna.jpg") center / cover no-repeat; color: #fff; margin: 0 auto;
}
.cert-content { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.42); text-align: center; padding: 6% 7%; display: flex; flex-direction: column; }
.cert-moon { flex-shrink: 0; width: 34%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin: 0 auto 5%; background: #000; box-shadow: 0 0 22px rgba(255, 255, 255, 0.25); }
.cert-moon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cert-content h2 { font-size: clamp(1.4rem, 4vw, 2.6rem); }
.cert-name { font-family: var(--serif); font-size: clamp(1.3rem, 3.6vw, 2.2rem); font-weight: 700; margin: 3% 0; }
.cert-meta span { display: block; margin: 6px auto; padding: 6px 12px; background: rgba(255, 255, 255, 0.12); border-radius: 8px; max-width: 88%; font-size: clamp(0.7rem, 1.7vw, 1rem); }

/* ---------- Adaptacion a pantallas chicas ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-2); border-bottom: 1px solid var(--line); display: none; max-height: calc(100vh - 66px); overflow-y: auto; }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 10px 14px 18px; }
  .nav-list > li > a, .nav-list > li > button { width: 100%; text-align: left; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 6px 14px; }
  .nav-list > li:hover > .dropdown, .nav-list > li:focus-within > .dropdown { display: none; }
  .nav-list > li.open > .dropdown { display: block; }
  .nav-cta { margin: 8px 0 0; text-align: center !important; }
  .split, .split.rev { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cert-wrap { grid-template-columns: 1fr; }
  .hero-in { padding-bottom: 130px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .section { padding: 46px 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .brand-text span { display: none; }
  .wa-float span { display: none; }
  .wa-float { padding: 13px; }
}
.no-js .nav-toggle { display: none; }
.no-js .main-nav { display: block; position: static; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tw, .shoot { animation: none; }
  .tw { opacity: 0.8; }
  .card, .btn { transition: none; }
}

/* ---------- Audioguia accesible (paginas QR) ---------- */
.audio-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px; max-width: 560px; margin: 0 auto;
}
.audio-logo { border-radius: 50%; margin-bottom: 18px; }
.audio-station { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.85rem; color: var(--orange); font-weight: 700; margin: 0 0 6px; }
.audio-page h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); margin-bottom: 0.5em; }
.audio-intro { font-size: 1.15rem; color: var(--pale); margin-bottom: 28px; }
.audio-page audio { width: 100%; max-width: 420px; margin-bottom: 14px; }
.audio-hint { font-size: 0.95rem; color: var(--muted); margin-bottom: 22px; }
.audio-playbtn { font-size: 1.15rem; padding: 18px 36px; }
.audio-back { margin-top: 30px; font-size: 0.95rem; }

/* ---------- Impresion ---------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .wa-float, .hero-art, .cert-form, .page-hero, .crumbs, .btn-row { display: none !important; }
  .cert-wrap { display: block; }
  .certificate { -webkit-print-color-adjust: exact; print-color-adjust: exact; max-width: none; }
  @page { size: A4 portrait; margin: 1cm; }
}
