/* ==========================================================================
   Calendario visual de eventos
   CSS moderno: @property + conic-gradient animado, container queries por celda,
   :has(), color-mix(), mask-composite, aspect-ratio, line-clamp y subgrid-free grid.
   Usa los tokens de index.css, así que respeta el tema claro/oscuro.
   ========================================================================== */

@property --ang {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.cal {
  --up: var(--red);
  --up-2: var(--gold);
  --past: #8d97ab;
  --cell-min: 128px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
[data-theme="dark"] .cal { --past: #6f7b92; }

.cal-intro { margin: 0 auto 1.6rem; max-width: 56ch; text-align: center; color: var(--muted); font-size: 1.05rem; }
.cal-sub { margin: 0 0 .4rem; font-size: 1.3rem; }

/* ------------------------------------------------------ próximo evento */
.cal-next-wrap { margin-bottom: 1.4rem; }
.next-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  inline-size: 100%;
  padding: .9rem 1.1rem;
  text-align: start;
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  background:
    radial-gradient(80% 140% at 100% 0%, rgb(242 184 75 / .35), transparent 60%),
    linear-gradient(120deg, var(--navy-800), var(--navy-950));
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.next-card::before {                               /* aro animado */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), var(--red-600), var(--gold), #fff0, var(--red-600));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ang 4s linear infinite;
}
.next-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.next-thumb {
  flex: none;
  inline-size: 74px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgb(0 0 0 / .4);
}
.next-body { display: grid; gap: .1rem; min-inline-size: 0; flex: 1; }
.next-kicker { font: 800 .68rem var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.next-title { font: 800 clamp(1.05rem, .95rem + .5vw, 1.35rem) var(--font-head); line-height: 1.2; text-wrap: balance; }
.next-sub { font-size: .88rem; color: rgb(255 255 255 / .8); }
.next-cta {
  flex: none;
  padding: .55rem 1rem;
  border-radius: 999px;
  font: 700 .8rem var(--font-head);
  background: linear-gradient(135deg, var(--red-600), var(--red));
  box-shadow: 0 10px 22px -8px rgb(186 27 27 / .8);
}
@media (max-width: 575.98px) {
  .next-card { flex-wrap: wrap; }
  .next-cta { inline-size: 100%; text-align: center; }
  .next-thumb { inline-size: 60px; }
}
@keyframes ang { to { --ang: 360deg; } }

/* ------------------------------------------------------------ tarjeta */
.cal-card {
  padding: clamp(.8rem, 2.4vw, 1.6rem);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.cal.is-loading .cal-grid { opacity: .4; }

.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; }
.cal-nav { display: flex; align-items: center; gap: .6rem; }
.cal-title {
  margin: 0;
  min-inline-size: 11ch;
  text-align: center;
  font: 800 clamp(1.25rem, 1rem + 1.2vw, 1.9rem) var(--font-head);
  letter-spacing: -.01em;
}
.cal-btn {
  display: grid;
  place-items: center;
  inline-size: 42px; block-size: 42px;
  padding: 0;
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.cal-btn:hover { color: #fff; background: var(--red); border-color: var(--red); transform: scale(1.08); }
.cal-btn svg { inline-size: 18px; block-size: 18px; }

.cal-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; }
.cal-today {
  padding: .5rem 1.1rem;
  font: 700 .8rem var(--font-head);
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.cal-today:hover { color: #fff; background: var(--navy-800); border-color: var(--navy-800); }
.cal-legend { display: flex; gap: .9rem; margin: 0; padding: 0; list-style: none; font: 700 .72rem var(--font-head); color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: .45rem; }
.lg::before { content: ""; inline-size: .7rem; block-size: .7rem; border-radius: 50%; }
.lg--prox::before { background: conic-gradient(var(--red), var(--gold), var(--red)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 25%, transparent); }
.lg--past::before { background: var(--past); }
.cal-count { margin: .6rem 0 1rem; font-size: .88rem; color: var(--muted); }

/* --------------------------------------------------------------- grilla */
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays { gap: 0; padding-block: .4rem; }
.cal-wd { text-align: center; font: 800 .7rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wd-short { display: none; }
@media (max-width: 767.98px) { .wd-long { display: none; } .wd-short { display: inline; letter-spacing: 0; } }

.cal-grid {
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.day {
  container: day / inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-block-size: clamp(66px, 11vw, var(--cell-min));
  padding: .35rem;
  background: var(--surface);
  transition: background-color .3s;
}
.day--out { background: color-mix(in srgb, var(--bg) 70%, var(--surface)); }
.day--out .day-num { opacity: .4; }
.day--out .day-events { opacity: .7; }
.day:has(.ev--prox, .ev--hoy) { background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.day-num { align-self: flex-start; display: grid; place-items: center; min-inline-size: 1.7rem; block-size: 1.7rem; padding-inline: .2rem; font: 700 .85rem var(--font-head); color: var(--heading); border-radius: 999px; }
.day--today .day-num { color: #fff; background: linear-gradient(135deg, var(--red-600), var(--red)); box-shadow: 0 6px 14px -4px rgb(186 27 27 / .7); }
.day--today { box-shadow: inset 0 0 0 2px var(--gold); }
.day-events { display: grid; gap: .3rem; }

/* --------------------------------------------------- evento en la celda */
.ev {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: .4rem;
  inline-size: 100%;
  padding: .25rem;
  text-align: start;
  font: inherit;
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .3s;
}
.ev:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow); z-index: 2; }
.ev-thumb {
  flex: none;
  inline-size: 2.4rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 7px;
  background: var(--bg);
}
.ev-body { display: grid; min-inline-size: 0; flex: 1; line-height: 1.15; }
.ev-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font: 700 .7rem var(--font-body);
}
.ev-tag { margin-top: .15rem; font: 800 .56rem var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.ev-mark { position: absolute; inset: -4px -4px auto auto; inline-size: 14px; block-size: 14px; border-radius: 50%; }

/* próximamente / hoy: aro de color animado + pulso */
.ev--prox, .ev--hoy {
  border-color: transparent;
  background: color-mix(in srgb, var(--red) 9%, var(--surface));
  box-shadow: 0 6px 18px -8px rgb(186 27 27 / .55);
}
.ev--prox::before, .ev--hoy::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), var(--red), var(--gold), var(--red-600), var(--red));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ang 3.4s linear infinite;
}
.ev--prox .ev-tag, .ev--hoy .ev-tag { color: var(--red); }
[data-theme="dark"] .ev--prox .ev-tag, [data-theme="dark"] .ev--hoy .ev-tag { color: var(--gold); }
.ev--prox .ev-mark, .ev--hoy .ev-mark {
  background: var(--red-600);
  box-shadow: 0 0 0 0 rgb(214 45 45 / .6);
  animation: pulse 1.8s infinite;
}
.ev--hoy .ev-mark { background: var(--gold); box-shadow: 0 0 0 0 rgb(242 184 75 / .7); }
.ev--hoy { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px #0000; } 100% { box-shadow: 0 0 0 0 #0000; } }

/* ya pasó: apagado + check */
.ev--past { filter: saturate(.15); opacity: .72; background: color-mix(in srgb, var(--bg) 80%, var(--surface)); }
.ev--past:hover { filter: saturate(.7); opacity: 1; }
.ev--past .ev-tag { color: var(--muted); }
.ev--past .ev-mark {
  display: grid; place-items: center;
  background: var(--past);
}
.ev--past .ev-mark::after { content: "✓"; font: 800 .55rem/1 var(--font-head); color: #fff; }

.ev-more {
  padding: .15rem .5rem;
  justify-self: start;
  font: 800 .68rem var(--font-head);
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: var(--navy-700);
  cursor: pointer;
}

/* celdas angostas (móvil): solo afiche o barrita de color */
@container day (max-width: 120px) {
  .ev { padding: 0; border-radius: 8px; }
  .ev-body { display: none; }
  .ev-thumb { inline-size: 100%; border-radius: 7px; }
  .ev--sin { block-size: 12px; background: var(--up); border: 0; }
  .ev--sin.ev--past { background: var(--past); }
  .ev--sin.ev--hoy { background: var(--gold); }
  .ev-mark { inset: -3px -3px auto auto; inline-size: 11px; block-size: 11px; }
  .ev--past .ev-mark::after { font-size: .45rem; }
  .day-num { font-size: .72rem; min-inline-size: 1.4rem; block-size: 1.4rem; }
}
@container day (min-width: 121px) and (max-width: 138px) {
  .ev-tag { display: none; }
  .ev-thumb { inline-size: 2rem; }
}

.cal-empty { margin: 1rem 0 .2rem; text-align: center; color: var(--muted); font-size: .95rem; }

/* ---------------------------------------- lista del mes (solo pantallas chicas) */
.cal-list { display: none; margin-top: 1rem; gap: .6rem; }
@media (max-width: 767.98px) { .cal-list { display: grid; } }
.row-ev {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .8rem;
  text-align: start;
  font: inherit;
  color: var(--heading);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.row-date { flex: none; display: grid; place-items: center; inline-size: 46px; line-height: 1.05; }
.row-date b { font: 800 1.4rem var(--font-head); }
.row-date small { font: 700 .62rem var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row-ev .ev-thumb { inline-size: 48px; border-radius: 10px; }
.row-txt { display: grid; flex: 1; min-inline-size: 0; }
.row-title { font: 700 .92rem var(--font-head); line-height: 1.25; }
.row-sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-tag { flex: none; padding: .25rem .6rem; font: 800 .6rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; }
.row-ev--prox, .row-ev--hoy { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.row-ev--prox .row-tag, .row-ev--hoy .row-tag { color: #fff; background: linear-gradient(135deg, var(--red-600), var(--red)); animation: pulse-bg 2s infinite; }
.row-ev--hoy .row-tag { color: #3b2a00; background: var(--gold); }
.row-ev--past { opacity: .7; filter: saturate(.2); }
.row-ev--past .row-tag { color: var(--muted); background: var(--bg); }
@keyframes pulse-bg { 50% { filter: brightness(1.25); } }

/* ------------------------------------------------------------------ modal */
.evm-content { position: relative; overflow: hidden; border: 0; border-radius: calc(var(--radius) + 4px); background: var(--surface); }
.evm-close {
  position: absolute; z-index: 5; inset: .8rem .8rem auto auto;
  display: grid; place-items: center;
  inline-size: 40px; block-size: 40px; padding: 0;
  color: #fff; border: 0; border-radius: 50%;
  background: rgb(5 15 32 / .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s;
}
.evm-close:hover { background: var(--red); transform: rotate(90deg); }
.evm-close svg { inline-size: 18px; block-size: 18px; }

.evm { padding: 0; }
.evm-tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .9rem 4rem .5rem 1.2rem; scrollbar-width: none; }
.evm-tab { flex: none; max-inline-size: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: .4rem .9rem; font: 700 .75rem var(--font-head); color: var(--heading); border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; }
.evm-tab.is-on { color: #fff; background: var(--red); border-color: var(--red); }

.evm-grid { display: grid; }
@media (min-width: 768px) { .evm-grid.has-poster { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

.evm-poster {
  position: relative;
  display: block;
  background: #060d1a;
  max-block-size: min(70vh, 640px);
  overflow: hidden;
}
.evm-poster img { display: block; inline-size: 100%; block-size: 100%; object-fit: contain; max-block-size: min(70vh, 640px); }
.evm-poster::after {
  content: "";
  position: absolute; inset: auto 0 0 0; block-size: 40%;
  background: linear-gradient(transparent, rgb(5 15 32 / .35));
  pointer-events: none;
}
@media (max-width: 767.98px) { .evm-poster, .evm-poster img { max-block-size: 46vh; } }

.evm-info { padding: clamp(1.2rem, 3vw, 2rem); display: grid; align-content: start; gap: .7rem; }
.evm-grid:not(.has-poster) .evm-info { padding-inline-end: 4rem; }
.evm-tag {
  justify-self: start;
  padding: .3rem .8rem;
  font: 800 .68rem var(--font-head); letter-spacing: .14em; text-transform: uppercase;
  border-radius: 999px;
}
.evm-tag--prox { color: #fff; background: linear-gradient(135deg, var(--red-600), var(--red)); box-shadow: 0 8px 20px -8px rgb(186 27 27 / .8); animation: pulse-bg 2s infinite; }
.evm-tag--hoy { color: #3b2a00; background: linear-gradient(135deg, var(--gold), #ffd78a); }
.evm-tag--past { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.evm-tag--past::before { content: "✓ "; }
.evm-title { margin: 0; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); line-height: 1.15; }
.evm-date { margin: 0; font: 700 .95rem var(--font-head); color: var(--red); }
[data-theme="dark"] .evm-date { color: var(--gold); }
.evm-meta { display: grid; gap: .5rem; margin: .3rem 0; }
.evm-meta > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .6rem; padding-block: .45rem; border-block-end: 1px dashed var(--line); }
.evm-meta dt { font: 800 .68rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); align-self: center; }
.evm-meta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.evm-desc { margin: 0; color: var(--text); white-space: pre-line; }
.evm-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.btn-pill--wa { color: #fff; background: #25d366; box-shadow: 0 12px 24px -8px rgb(26 123 69 / .6); }
.btn-pill--wa:hover { color: #fff; background: #1fb458; }
.btn-pill--line { color: var(--heading); background: transparent; border-color: var(--line); }
.btn-pill--line:hover { color: var(--heading); border-color: var(--heading); }
.evm--past .evm-poster img { filter: grayscale(.6); }

/* ------------------------------------------------- movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .next-card::before, .ev--prox::before, .ev--hoy::before, .ev-mark, .row-tag, .evm-tag { animation: none !important; }
}

/* en oscuro los enlaces globales son rosados: los botones conservan su color */
[data-theme="dark"] .btn-pill--wa, [data-theme="dark"] .btn-pill--wa:hover { color: #fff; }
[data-theme="dark"] .btn-pill--line, [data-theme="dark"] .btn-pill--line:hover { color: var(--heading); }

/* ======================================================================
   Calendario plegable: tarjeta cerrada → se despliega al tocarla
   (grid-template-rows 0fr→1fr anima la altura real sin JavaScript)
   ====================================================================== */
.cal-toggle {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  inline-size: 100%;
  padding: clamp(1rem, 2.6vw, 1.5rem) clamp(1.1rem, 3vw, 1.8rem);
  text-align: start;
  font: inherit;
  color: #fff;
  border: 0;
  border-radius: calc(var(--radius) + 4px);
  cursor: pointer;
  overflow: hidden;
  background:
    radial-gradient(70% 160% at 100% 0%, rgb(242 184 75 / .35), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgb(186 27 27 / .45), transparent 60%),
    linear-gradient(120deg, var(--navy-800), var(--navy-950));
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.cal-toggle::before {                      /* aro animado, igual que los eventos próximos */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--ang), var(--red-600), var(--gold), #fff0 35%, var(--red-600));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ang 5s linear infinite;
}
.cal-toggle:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.ct-ico {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: clamp(48px, 9vw, 64px);
  aspect-ratio: 1;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--red-600), var(--red));
  box-shadow: 0 12px 26px -8px rgb(186 27 27 / .8);
}
.ct-ico svg { inline-size: 55%; block-size: 55%; }
.ct-text { display: grid; gap: .15rem; flex: 1; min-inline-size: 0; }
.ct-text b { font: 800 clamp(1.1rem, .95rem + .9vw, 1.6rem) var(--font-head); line-height: 1.15; text-wrap: balance; }
.ct-text small { font: 700 .72rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.ct-close { display: none; }
.cal.is-open .ct-open { display: none; }
.cal.is-open .ct-close { display: block; }
.ct-chev {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 44px; block-size: 44px;
  border-radius: 50%;
  background: rgb(255 255 255 / .14);
  border: 1px solid rgb(255 255 255 / .3);
  transition: transform .5s var(--ease), background-color .3s;
}
.ct-chev svg { inline-size: 20px; block-size: 20px; }
.cal-toggle:hover .ct-chev { background: rgb(255 255 255 / .26); }
.cal.is-open .ct-chev { transform: rotate(180deg); }
.cal.is-open .cal-toggle { box-shadow: var(--shadow-lg); }

.cal-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .65s var(--ease), visibility 0s linear .65s;
}
.cal.is-open .cal-panel { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.cal-panel-inner { min-block-size: 0; overflow: hidden; }
.cal-panel-inner > :first-child { margin-block-start: 1.6rem; }
.cal-panel-inner { padding-inline: 4px; opacity: 0; transform: translateY(-12px); transition: opacity .5s ease, transform .6s var(--ease); }
.cal.is-open .cal-panel-inner { opacity: 1; transform: none; transition-delay: .12s; }

@media (max-width: 575.98px) {
  .ct-chev { inline-size: 38px; block-size: 38px; }
  .ct-text small { font-size: .64rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-toggle::before { animation: none; }
  .cal-panel, .cal-panel-inner, .ct-chev { transition-duration: .01ms !important; }
}

/* la agenda (calendario + próximas + anteriores) es una sola sección bajo el hero */
#eventos { padding-block-start: clamp(2.5rem, 5vw, 4rem); }

/* ======================================================================
   Tarjeta "próximo evento" entre el título y el calendario + bienvenida 6:30 p.m.
   ====================================================================== */
.cal-next-wrap { margin-block: 0 1.2rem; }
.next-card--static { cursor: default; }
.next-card--static:hover { transform: none; box-shadow: var(--shadow); }
.next-thumb--logo { object-fit: contain; background: #fff; padding: 4px; }

.next-card--welcome {
  justify-content: center;
  padding-block: clamp(1.4rem, 4vw, 2.4rem);
  text-align: center;
  background:
    radial-gradient(60% 120% at 15% 0%, rgb(242 184 75 / .55), transparent 60%),
    radial-gradient(60% 120% at 90% 100%, rgb(214 45 45 / .6), transparent 60%),
    linear-gradient(120deg, #3a0d0d, var(--navy-900) 55%, #3a0d0d);
  animation: glow 3.2s ease-in-out infinite;
}
.next-card--welcome::after {                       /* destello que cruza la tarjeta */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .18) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: sweep 3.8s ease-in-out infinite;
}
.next-card--welcome .next-body { justify-items: center; flex: 0 1 auto; gap: .35rem; }
.next-card--welcome .next-thumb { inline-size: clamp(64px, 12vw, 96px); border-radius: 50%; }
.welcome-title {
  font: 400 clamp(2rem, 1.2rem + 3.6vw, 3.6rem) / 1.1 'Satisfy', cursive;
  color: var(--gold);
  text-shadow: 0 4px 24px rgb(0 0 0 / .45);
  text-wrap: balance;
}
.welcome-note { margin-block-start: .2rem; font: 700 .78rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: rgb(255 255 255 / .8); }
@media (max-width: 575.98px) { .next-card--welcome { flex-direction: column; } }
@keyframes sweep { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgb(242 184 75 / .25), var(--shadow-lg); } }
@media (prefers-reduced-motion: reduce) { .next-card--welcome, .next-card--welcome::after { animation: none; } }

/* ======================================================================
   Tarjeta del siguiente evento: se despliega en una tarjeta ampliada
   ====================================================================== */
.next-wrap { display: grid; }
.next-card--static { cursor: pointer; }
.next-cta { display: inline-flex; align-items: center; gap: .45rem; }
.next-cta svg { inline-size: 16px; block-size: 16px; transition: transform .5s var(--ease); }
.next-cta-close { display: none; }
.next-wrap.is-open .next-cta-open { display: none; }
.next-wrap.is-open .next-cta-close { display: inline; }
.next-wrap.is-open .next-cta svg { transform: rotate(180deg); }
.next-card--welcome::after { pointer-events: none; }

.next-more {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .6s var(--ease), visibility 0s linear .6s;
}
.next-wrap.is-open .next-more { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.next-more-inner { min-block-size: 0; overflow: hidden; }
.next-wrap.is-open .next-more-inner { padding: 4px 2px 8px; }
.next-evm {
  margin-block-start: .7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .45s ease, transform .55s var(--ease);
}
.next-wrap.is-open .next-evm { opacity: 1; transform: none; transition-delay: .1s; }
.next-evm .evm-grid:not(.has-poster) .evm-info { padding-inline-end: clamp(1.2rem, 3vw, 2rem); }
.next-evm .evm-poster, .next-evm .evm-poster img { max-block-size: 520px; }
@media (prefers-reduced-motion: reduce) { .next-more, .next-evm, .next-cta svg { transition-duration: .01ms !important; } }

.next-thumb--dark { background: #000; padding: 2px; }

/* ------------------------------------------------------------ compartir */
.cal-share { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; font: 700 .8rem var(--font-head); color: #fff; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(135deg, var(--red-600), var(--red)); box-shadow: 0 10px 22px -10px rgb(0 0 0 / .6); transition: transform .25s var(--ease); }
.cal-share:hover { transform: translateY(-2px); }
.cal-share svg { inline-size: 16px; block-size: 16px; }
@media (max-width: 420px) { .cal-share span { display: none; } .cal-share { padding: .55rem .7rem; } }

.share-dlg { inline-size: min(440px, calc(100vw - 1.5rem)); padding: 0; border: 0; background: transparent; overflow: visible; margin: auto; }
.share-dlg::backdrop { background: rgb(5 15 32 / .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.share-dlg[open] { animation: shareIn .35s var(--ease) both; }
@keyframes shareIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.share-card { position: relative; padding: 1.6rem; border-radius: calc(var(--radius) + 4px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.share-card h3 { font-size: 1.25rem; margin: 0 2.5rem .3rem 0; }
.share-what { margin: 0 0 1.2rem; font-size: .88rem; color: var(--muted); }
.share-x { position: absolute; inset: .9rem .9rem auto auto; display: grid; place-items: center; inline-size: 34px; block-size: 34px; padding: 0; color: var(--heading); border: 1px solid var(--line); border-radius: 50%; background: var(--bg); cursor: pointer; }
.share-x svg { inline-size: 14px; block-size: 14px; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: 1.2rem; }
.share-net { display: grid; justify-items: center; gap: .4rem; padding: .8rem .3rem; font: 700 .74rem var(--font-head); color: var(--heading); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; transition: transform .25s var(--ease), border-color .25s; }
.share-net:hover { color: var(--heading); transform: translateY(-3px); border-color: var(--c); }
.share-net--poster { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: .6rem; font-size: .85rem; border-color: var(--c); }
.sn-ic { display: grid; place-items: center; inline-size: 46px; block-size: 46px; color: #fff; border-radius: 14px; background: var(--c); }
.sn-ic svg { inline-size: 24px; block-size: 24px; }
.share-copy { display: flex; gap: .5rem; }
.share-copy input { flex: 1; min-inline-size: 0; padding: .7rem .9rem; font: 500 .82rem var(--font-body); color: var(--heading); border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); }
.share-copy .btn-pill { flex: none; padding: .65rem 1.1rem; font-size: .8rem; border: 0; cursor: pointer; }
.share-copy .btn-pill.ok { background: #1f9d57; }
@media (prefers-reduced-motion: reduce) { .share-dlg[open] { animation: none; } }

/* modal del evento: en pantallas bajas/móviles todo el contenido (incluidos los botones) debe poder desplazarse */
#modalEventoCal .modal-dialog { margin: .75rem auto; max-block-size: calc(100dvh - 1.5rem); }
#modalEventoCal .modal-content.evm-content {
  max-block-size: calc(100dvh - 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.evm-close { position: sticky; inset-block-start: .6rem; float: inline-end; margin: .6rem .6rem -46px 0; inset-inline-end: auto; }
.evm-actions { padding-block-end: env(safe-area-inset-bottom); }
@media (max-width: 767.98px) {
  .evm-poster, .evm-poster img { max-block-size: 34vh; }
  .evm-actions .btn-pill { flex: 1 1 100%; justify-content: center; }
  .evm-info { padding-block-end: 1.4rem; }
}
#modalEventoCal .evm-close { position: sticky; inset: .6rem auto auto auto; float: none; display: grid; margin: .6rem .6rem -46px auto; z-index: 5; }

/* barra superior fija del modal: compartir + cerrar siempre visibles, sin depender del desplazamiento */
#modalEventoCal .evm-top { position: sticky; inset-block-start: .6rem; z-index: 6; display: flex; justify-content: flex-end; gap: .5rem; margin: .6rem .6rem -46px auto; pointer-events: none; inline-size: max-content; margin-inline-start: auto; }
#modalEventoCal .evm-top > * { pointer-events: auto; }
#modalEventoCal .evm-top .evm-close { position: static; margin: 0; inset: auto; }
.evm-share { display: grid; place-items: center; inline-size: 40px; block-size: 40px; padding: 0; color: #fff; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--red-600), var(--red)); box-shadow: 0 8px 18px -6px rgb(0 0 0 / .6); cursor: pointer; transition: transform .25s var(--ease); }
.evm-share:hover { transform: scale(1.1); }
.evm-share svg { inline-size: 18px; block-size: 18px; }
/* botones de acción siempre al alcance al fondo de la ventana */
#modalEventoCal .evm-actions { position: sticky; inset-block-end: 0; z-index: 4; margin-inline: calc(-1 * clamp(1.2rem, 3vw, 2rem)); padding: .8rem clamp(1.2rem, 3vw, 2rem) calc(.8rem + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--surface) 22%); }

/* modal del evento: misma estructura que el detalle desplegable (botones compactos, alineados a la izquierda, en el flujo normal) */
#modalEventoCal .evm-actions { position: static; margin: .4rem 0 0; padding: 0; background: none; justify-content: flex-start; }
#modalEventoCal .evm-actions .btn-pill { flex: 0 0 auto; inline-size: auto; justify-content: flex-start; padding: .6rem 1.1rem; font-size: .8rem; }
@media (max-width: 767.98px) {
  #modalEventoCal .evm-actions .btn-pill { flex: 0 0 auto; }
  #modalEventoCal .evm-info { padding-block-end: 1.6rem; }
}
