/* Widgets del calendario compartidos (portada, /calendario, /admin): modal, tarjetas, avisos */
:root {
  /* Mismos valores que @theme en global.css */
  --navy: #07215f;
  --blue: #0a3087;
  --accent: #2015ff;
  --coral: #ff8562;
  --bg: #f3f5f9;
  --card: #fff;
  --text: #0b1430;
  --muted: #5b6480;
  --line: #dde2ee;
  --radius: 1rem;
  --shadow: 0 6px 24px rgba(7, 33, 95, 0.08);
}

/* ---- Modal de evento ---- */
.event-modal {
  border: 0; padding: 0; border-radius: 1.25rem; width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px); margin: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: auto;
}
.event-modal::backdrop { background: rgba(4, 14, 40, .65); backdrop-filter: blur(2px); }
.event-modal__close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -52px 0; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; line-height: 1;
}
.event-modal__media { background: #000; }
.event-modal__media img, .event-modal__media video { display: block; width: 100%; max-height: 60vh; object-fit: contain; }
.event-modal__media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
/* Contenido vertical (reels de Instagram, carteles): centrado, sin estirarse, con fondo difuminado */
.event-modal__media { position: relative; overflow: hidden; }
.event-modal__media::before { content: ""; position: absolute; inset: -30px; background: var(--fondo, none) center / cover; filter: blur(28px) brightness(.55); }
.event-modal__media > * { position: relative; }
.event-modal__media.is-vertical img { width: auto; max-width: 100%; height: min(68vh, 640px); margin: 0 auto; object-fit: contain; }
.event-modal__media iframe.media--vertical { aspect-ratio: auto; width: min(420px, 100%); height: min(76vh, 720px); margin: 0 auto; background: #fff; }
.event-modal__body { padding: 24px clamp(18px, 4vw, 28px) 28px; }
.event-modal__date { color: var(--coral); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .06em; }
.event-modal__title { margin: 6px 0 4px; font-size: clamp(22px, 5vw, 28px); line-height: 1.15; font-weight: 800; color: var(--navy); }
.event-modal__location { color: var(--muted); margin: 0 0 14px; }
.event-modal__desc { white-space: pre-line; margin: 0 0 20px; }

/* ---- Tarjetas de evento (próximos eventos) ---- */
.upcoming__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.ev-card {
  background: var(--card); border-radius: 1.25rem; overflow: hidden; box-shadow: var(--shadow);
  border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; font: inherit; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ev-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(7, 33, 95, .16); }
.ev-card__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cat, var(--blue)), var(--navy)); color: #fff; }
.ev-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ev-card:hover .ev-card__thumb img { transform: scale(1.04); }
.ev-card__icon { font-size: 52px; }
.ev-card__play { position: absolute; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 24px; padding-left: 4px; backdrop-filter: blur(2px); }
.ev-badge { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 999px; background: var(--cat, var(--blue));
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.ev-badge--inline { position: static; display: inline-block; margin-bottom: 10px; box-shadow: none; }
.ev-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ev-card__date { color: var(--coral); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.ev-card__title { margin: 2px 0; font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.ev-card__loc { margin: 0; color: var(--muted); font-size: 14px; }
.ev-card__more { margin-top: auto; padding-top: 10px; color: var(--blue); font-weight: 600; font-size: 14px; }

/* ---- Utilidades ---- */
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); grid-column: 1 / -1; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); text-align: center;
}
.toast--error { background: #c62f3b; }
