/* ==========================================================================
   6to Encuentro Nacional de ISI — Universidad de Sonora
   Sistema de diseño "Red Nacional" — tema claro
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg:           #F5F7FB;
  --surface:      #FFFFFF;
  --surface-2:    #EDF1FA;
  --ink:          #12172E;
  --muted:        #616B85;
  --blue:         #2A56E8;
  --blue-dark:    #17337E;
  --blue-soft:    #E8EDFC;
  --blue-soft-2:  #DCE5FB;
  --line:         rgba(18, 23, 46, 0.09);
  --line-strong:  rgba(18, 23, 46, 0.17);
  --danger:       #D8453F;
  --success:      #1F8F5F;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  --max: 1180px;
  --radius: 14px;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--blue); }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 0.9rem; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

section { position: relative; z-index: 1; padding: clamp(4rem, 9vw, 7rem) 0; border-bottom: 1px solid var(--line); }
.section-alt { background: var(--surface-2); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 0.95em 1.7em; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgba(42, 86, 232, 0.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(42, 86, 232, 0.38); background: var(--blue-dark); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-disabled { background: transparent; border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(245, 247, 251, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 88px; }

.brand { display: flex; align-items: center; gap: 1rem; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; transition: transform .2s ease; }
.brand:hover { transform: translateY(-1px); }
.brand .mark {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(155deg, var(--blue), var(--blue-dark)); color: #fff;
  font-family: var(--font-mono); font-weight: 500; font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(42, 86, 232, 0.3); flex-shrink: 0;
}
.brand .edition { color: var(--muted); font-family: var(--font-mono); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.02em; display: block; margin-top: 0.25rem; }

.main-nav ul { display: flex; gap: clamp(0.9rem, 1.6vw, 1.6rem); }
.main-nav a { font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 0.2s ease; position: relative; padding-bottom: 2px; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--blue); transition: right .25s ease; }
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { right: 0; }

.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; width: 42px; height: 42px; color: var(--ink); font-size: 1.1rem; }

@media (max-width: 920px) {
  .main-nav { position: fixed; inset: 88px 0 0 0; background: var(--bg); border-top: 1px solid var(--line); padding: 1.5rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; overflow-y: auto; }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 0.25rem; }
  .main-nav a { display: block; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-cta .btn-ghost { display: none; }
  .brand { font-size: 1.05rem; }
  .brand .mark { width: 44px; height: 44px; font-size: 1rem; }
}

/* ---- Banner oficial del evento ---- */
.event-banner { padding: clamp(1.5rem, 4vw, 2.5rem) 0 0; }
.banner-frame {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(18,23,46,0.14);
  border: 1px solid var(--line);
}
.banner-frame img { width: 100%; height: auto; }

.banner-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  text-align: center;
  max-width: 620px;
  margin: 1.5rem auto 0;
  padding: 0.9em 1.5em;
  background: var(--blue-soft);
  border: 1px solid var(--blue-soft-2);
  border-radius: 999px;
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 0.98rem;
}
.banner-note strong { color: var(--blue); }
.banner-note-emoji { display: inline-block; animation: banner-wave 1.8s ease-in-out infinite; }

@keyframes banner-wave {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25%      { transform: rotate(-8deg) translateY(-2px); }
  75%      { transform: rotate(8deg) translateY(-2px); }
}

@media (max-width: 640px) {
  .banner-note { font-size: 0.9rem; padding: 0.8em 1.1em; }
}

/* ---- Photo carousel (galería) ---- */
.event-carousel { position: relative; border-radius: 18px; border: 1px solid var(--line); background: var(--ink); overflow: hidden; box-shadow: 0 20px 45px rgba(18,23,46,0.1); }
.carousel-track-wrap { position: relative; aspect-ratio: 21 / 9; min-height: 240px; max-height: 460px; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; background: linear-gradient(155deg, var(--blue-dark), #0c1638); }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.carousel-slide-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: rgba(255,255,255,0.55); font-family: var(--font-mono); font-size: 0.85rem; text-align: center; padding: 1rem; }
.carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(1.25rem, 4vw, 2.5rem); background: linear-gradient(to top, rgba(8,12,30,0.75), transparent); color: #fff; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.03em; }
.carousel-controls { position: absolute; bottom: clamp(1rem, 3vw, 1.75rem); right: clamp(1.25rem, 4vw, 2.5rem); display: flex; gap: 0.6rem; z-index: 3; }
.carousel-arrow { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.3); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); transition: background .2s ease; }
.carousel-arrow:hover { background: rgba(255,255,255,0.28); }
.carousel-dots { position: absolute; left: clamp(1.25rem, 4vw, 2.5rem); bottom: clamp(1rem, 3vw, 1.75rem); display: flex; gap: 0.5rem; z-index: 3; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.35); transition: background .2s ease, width .2s ease; }
.carousel-dot.active { background: #fff; width: 22px; border-radius: 5px; }

/* ---- Contador regresivo: panel digital ---- */
:root {
  --led: #6FE3FF;
  --led-dim: #2C7A99;
}

.countdown-band {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(111,227,255,0.08), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(42,86,232,0.15), transparent 50%),
    var(--ink);
  color: #fff;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
  overflow: hidden;
}
/* textura tipo circuito, sutil, para conectar con el banner oficial */
.countdown-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(111,227,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111,227,255,0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.countdown-inner { position: relative; z-index: 1; text-align: center; }

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.5rem;
}

.countdown-device {
  display: inline-block;
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(160deg, #0B0F22, #131A38);
  border: 1px solid rgba(111,227,255,0.25);
  border-radius: 20px;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.countdown-figures {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.1rem);
  flex-wrap: wrap;
}

.countdown-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 74px;
  padding: 0.6rem 0.5rem 0.75rem;
  background: #060911;
  border: 1px solid rgba(111,227,255,0.18);
  border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(111,227,255,0.06);
}

.countdown-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--led);
  text-shadow: 0 0 8px rgba(111,227,255,0.65), 0 0 22px rgba(111,227,255,0.35);
  transition: transform .2s ease;
}

.countdown-days .countdown-value { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.55), 0 0 26px rgba(111,227,255,0.5); }
.countdown-days { border-color: rgba(111,227,255,0.4); box-shadow: inset 0 0 22px rgba(111,227,255,0.12); }

.countdown-value.tick { animation: digit-pulse .5s ease; }
@keyframes digit-pulse {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.countdown-unit {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--led-dim);
  margin-top: 0.3rem;
}

.countdown-colon {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--led-dim);
  animation: colon-blink 1s steps(1) infinite;
  padding-bottom: 1rem;
}
@keyframes colon-blink { 50% { opacity: 0.15; } }

.countdown-sub {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
}

@media (prefers-reduced-motion: reduce) {
  .countdown-colon { animation: none; }
  .countdown-value.tick { animation: none; }
}

@media (max-width: 480px) {
  .countdown-colon { display: none; }
  .countdown-figures { gap: 0.6rem; }
}

/* ---- Riel social lateral ---- */
.social-rail {
  position: fixed;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.7rem 0.55rem;
  box-shadow: 0 12px 30px rgba(18,23,46,0.12);
  transition: transform .3s ease, opacity .3s ease;
}
.social-rail.rail-hidden { transform: translateY(-50%) translateX(-120%); opacity: 0; }
.social-rail a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--muted);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.social-rail a:hover { color: var(--blue); background: var(--blue-soft); transform: scale(1.08); }

@media (max-width: 720px) {
  .social-rail {
    left: 0; right: 0; top: auto; bottom: 0; transform: none;
    flex-direction: row; justify-content: center;
    border-radius: 0; border-left: none; border-right: none; border-bottom: none;
    padding: 0.5rem;
  }
  .social-rail.rail-hidden { transform: translateY(120%); }
}

/* ---- Hero ---- */
.hero { position: relative; padding: clamp(3.5rem, 10vw, 6rem) 0 clamp(4rem, 8vw, 6rem); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-network { position: absolute; inset: 0; z-index: 0; opacity: 0.8; }
.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 760px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-dark); background: var(--blue-soft); border: 1px solid var(--blue-soft-2);
  padding: 0.5em 1em; border-radius: 999px; margin-bottom: 1.75rem;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse-dot 2.4s infinite; }
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(42,86,232,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(42,86,232,0); }
  100% { box-shadow: 0 0 0 0 rgba(42,86,232,0); }
}

.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); margin-bottom: 1.4rem; }
.hero h1 em { font-style: normal; color: var(--blue); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; margin: 2rem 0 2.5rem; font-family: var(--font-mono); font-size: 0.9rem; }
.hero-meta li { display: flex; align-items: center; gap: 0.6em; color: var(--ink); }
.hero-meta li span.label { color: var(--muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-edition-mark {
  position: absolute; right: clamp(-2rem, 2vw, 4rem); bottom: clamp(-3rem, -2vw, -1rem);
  font-family: var(--font-display); font-size: clamp(9rem, 22vw, 20rem); font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong); line-height: 1;
  z-index: 1; pointer-events: none; user-select: none;
}

/* ---- Stat strip ---- */
.stat-strip { border-bottom: 1px solid var(--line); background: var(--surface); }
.stat-strip .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; padding-block: 2.25rem; }
.stat-strip .stat b { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--blue); }
.stat-strip .stat span { font-size: 0.85rem; color: var(--muted); }

/* ---- Cards ---- */
.card-grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2.1rem);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover { border-color: var(--blue); transform: translateY(-4px); box-shadow: 0 16px 32px rgba(18,23,46,0.08); }
.card .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); margin-bottom: 1.25rem; font-size: 1.1rem; }
.card h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card ul { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.55rem; }
.card ul li { font-size: 0.92rem; color: var(--ink); padding-left: 1.4em; position: relative; }
.card ul li::before { content: "→"; position: absolute; left: 0; color: var(--blue); }
.card .card-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---- Track / audience tabs ---- */
.track-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.track-tab { font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--muted); padding: 0.9em 0.2em; margin-right: 1.75rem; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.track-tab.active, .track-tab:hover { color: var(--ink); border-color: var(--blue); }
.track-pane { display: none; }
.track-pane.active { display: block; animation: fade-up .5s ease; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.track-pane .card { max-width: 900px; }

/* ---- Program / schedule ---- */
.day-tabs { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.day-tab { font-family: var(--font-mono); font-size: 0.85rem; padding: 0.65em 1.1em; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--muted); transition: all .2s ease; }
.day-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); }

.schedule-empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: clamp(2.5rem, 6vw, 4rem); text-align: center; color: var(--muted); background: var(--surface); }
.schedule-empty .eyebrow { justify-content: center; }
.schedule-empty h3 { color: var(--ink); margin-bottom: 0.75rem; }

.schedule-time { font-family: var(--font-mono); color: var(--blue); white-space: nowrap; }

/* ---- Agenda: línea de tiempo (en vez de tabla) ---- */
.agenda-summary {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* Filtros por tipo de actividad */
.agenda-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.agenda-filter {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5em 1.1em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.agenda-filter:hover { border-color: var(--blue); color: var(--blue); }
.agenda-filter.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Tabla interactiva de la agenda */
.agenda-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: auto;
  max-height: 560px;
}
.agenda-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.agenda-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line-strong);
}

.agenda-row td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  vertical-align: top;
  box-shadow: inset 4px 0 0 var(--line-strong);
  transition: background .15s ease;
}
.agenda-row td:first-child { box-shadow: inset 4px 0 0 var(--line-strong); }
.agenda-row:hover td { background: var(--blue-soft); }
.agenda-row.is-hidden { display: none; }

.agenda-table-time { font-family: var(--font-mono); color: var(--blue); font-weight: 600; white-space: nowrap; }
.agenda-table-title { font-weight: 600; margin-top: 0.25rem; }
.agenda-role { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }
.agenda-link { font-size: 0.85rem; font-weight: 600; color: var(--blue); white-space: nowrap; }
.agenda-link:hover { text-decoration: underline; }

.agenda-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Acentos por tipo de actividad (franja izquierda de cada fila) */
.agenda-row--bienvenida td:first-child { box-shadow: inset 4px 0 0 var(--blue); }
.agenda-row--bienvenida .agenda-table-time { color: var(--blue); }

.agenda-row--taller td:first-child { box-shadow: inset 4px 0 0 var(--success); }
.agenda-row--taller .agenda-table-time { color: var(--success); }
.agenda-row--taller td { background: #F5FBF8; }
.agenda-row--taller:hover td { background: var(--blue-soft); }

.agenda-row--receso td:first-child { box-shadow: inset 4px 0 0 var(--muted); }
.agenda-row--receso .agenda-table-time { color: var(--muted); }
.agenda-row--receso .agenda-table-title { color: var(--muted); font-weight: 500; }

@media (max-width: 560px) {
  .agenda-table-wrap { max-height: 480px; }
  .agenda-table { min-width: 460px; }
}

/* ---- Logo wall ---- */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.logo-slot { aspect-ratio: 3 / 2; border: 1px dashed var(--line-strong); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 0.75rem; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em; background: var(--surface); transition: border-color .2s ease, transform .2s ease; overflow: hidden; }
.logo-slot:hover { border-color: var(--blue); transform: translateY(-2px); }
.logo-slot img { width: 100%; height: 100%; max-height: none; object-fit: contain; padding: 0.5rem; }

/* ---- Flyer grid: para imágenes con texto/QR que necesitan verse grandes ---- */
.flyer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.flyer-grid-large { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); max-width: 460px; }

/* Empresas: una sola fila horizontal de 5 imágenes, más chicas */
.flyer-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.9rem; }
@media (max-width: 860px) { .flyer-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .flyer-row { grid-template-columns: repeat(2, 1fr); } }

.flyer-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.flyer-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(18,23,46,0.12); border-color: var(--blue); }
.flyer-card img { width: 100%; height: auto; display: block; }

/* ---- Lightbox: visor de imagen ampliada ---- */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(9, 12, 26, 0.88);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3.5rem);
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: modal-in .25s ease;
}
.lightbox-close {
  position: fixed;
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 1.75rem);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 1.2rem;
  z-index: 601;
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

/* ---- Notice / avisos ---- */
.notice { display: flex; gap: 1rem; padding: 1.5rem; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); margin-bottom: 1.25rem; transition: transform .2s ease, box-shadow .2s ease; }
.notice:hover { transform: translateX(3px); box-shadow: 0 10px 24px rgba(18,23,46,0.06); }
.notice .icon { color: var(--blue); font-size: 1.1rem; margin-top: 0.15rem; }
.notice h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.notice p { color: var(--muted); font-size: 0.92rem; }

/* ---- Committee / contact ---- */
.people-list { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); transition: transform .2s ease; }
.person:hover { transform: translateX(3px); }
.person-photo { width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: var(--blue-soft); color: var(--blue-dark); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-info { display: flex; flex-direction: column; gap: 0.15rem; }
.person-info b { font-weight: 600; font-size: 0.96rem; }
.person-info a { font-family: var(--font-mono); font-size: 0.85rem; color: var(--blue); }
.person-info a:hover { text-decoration: underline; }

/* ---- Form ---- */
.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; font-family: var(--font-mono); }
.input, textarea.input { width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.85em 1em; color: var(--ink); font-family: var(--font-body); font-size: 0.96rem; transition: border-color .2s ease, box-shadow .2s ease; }
.input:focus, textarea.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea.input { resize: vertical; min-height: 130px; }

.alert { padding: 1rem 1.25rem; border-radius: 10px; font-size: 0.92rem; margin-bottom: 1.5rem; border: 1px solid transparent; }
.alert-success { background: #E7F6EE; border-color: #BEE6CE; color: #1a6b46; }
.alert-danger { background: #FBEAEA; border-color: #F2C6C4; color: #a5312c; }

/* ---- Footer ---- */
.site-footer { padding: 3rem 0; background: var(--ink); color: rgba(255,255,255,0.7); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.85rem; }
.footer-brand .mark { background: linear-gradient(155deg, var(--blue), #5c86ff); }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; color: rgba(255,255,255,0.7); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.footer-social a:hover { color: #fff; border-color: #fff; transform: translateY(-2px); }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(12, 16, 36, 0.55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: 0 30px 60px rgba(12,16,36,0.25); animation: modal-in .25s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-box h3 { margin-bottom: 1rem; }
.modal-box p, .modal-box li { color: var(--muted); font-size: 0.94rem; margin-bottom: 0.75rem; }
.modal-box ul { padding-left: 0; }
.modal-box li { list-style: none; padding-left: 1.4em; position: relative; }
.modal-box li::before { content: "—"; position: absolute; left: 0; color: var(--blue); }

.modal-box ol { padding-left: 1.3em; margin-bottom: 0.75rem; }
.modal-box ol > li { list-style: decimal; padding-left: 0.3em; }
.modal-box ol > li::before { content: none; }
.modal-box ol > li::marker { color: var(--blue); font-weight: 600; }
.modal-box ol ol { margin-top: 0.5rem; margin-bottom: 0.75rem; }
.modal-box ol ol > li { list-style: lower-alpha; }
.modal-box ol ol > li::marker { color: var(--muted); font-weight: 400; }
.modal-box strong { color: var(--ink); }
.modal-close-btn { float: right; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; transition: background .2s ease; }
.modal-close-btn:hover { background: var(--blue-soft); border-color: var(--blue); }

/* ---- Utility ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
