/* ==========================================================================
   JR FITNESS - css/events.css
   Estilos para el módulo de eventos (Admin, Portal de Socios y Landing)
   ========================================================================== */

/* ── Tarjetas de Eventos en Panel de Administración ── */
.events-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}

.event-admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.event-admin-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.event-card-cover {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(5,150,105,0.25) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.event-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-card-cover-emoji {
  font-size: 3.2rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.event-card-scope-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.event-scope-public {
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-scope-private {
  background: rgba(124, 58, 237, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.event-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-card-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 2px 7px;
  border-radius: 6px;
  margin-bottom: .45rem;
  align-self: flex-start;
}

.event-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: .4rem;
  line-height: 1.3;
}

.event-card-desc {
  font-size: .82rem;
  color: var(--gray-600);
  line-height: 1.45;
  margin-bottom: .85rem;
  flex: 1;
}

.event-card-meta {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: var(--gray-50);
  padding: .65rem .85rem;
  border-radius: 8px;
  font-size: .775rem;
  color: var(--gray-700);
  margin-bottom: .85rem;
  border: 1px solid var(--gray-200);
}

.event-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .75rem;
  border-top: 1px solid var(--gray-100);
}

/* ── Banner de Evento del Día en Portal de Socios (Amarillo / Dorado) ── */
.portal-today-event-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(251, 191, 36, 0.18) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  padding: .9rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
  animation: bannerPulse 3s ease infinite;
}

@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15); }
  50% { box-shadow: 0 4px 22px rgba(245, 158, 11, 0.35); }
}

.portal-today-event-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.portal-today-event-content {
  flex: 1;
}

.portal-today-event-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.portal-today-event-desc {
  font-size: .82rem;
  color: var(--gray-600);
  margin-top: .2rem;
  line-height: 1.4;
}

body.dark-mode .portal-today-event-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.25) 100%);
  border-color: rgba(245, 158, 11, 0.55);
}

body.dark-mode .portal-today-event-title {
  color: #fef08a;
}

body.dark-mode .portal-today-event-desc {
  color: #fde68a;
}

/* ── Sección de Eventos en Landing Pública ── */
.landing-events-section {
  padding: 4.5rem 1.5rem;
  position: relative;
  background: transparent;
}

.landing-events-container {
  max-width: 1200px;
  margin: 0 auto;
}

.landing-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
  justify-content: center;
  gap: 1.75rem;
  margin-top: 2rem;
}

.landing-event-card {
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .22s cubic-bezier(0.16, 1, 0.3, 1), border-color .22s ease;
  position: relative;
}

.landing-event-card:hover {
  transform: translateY(-4px);
}

/* ── Landing Eventos en Dark Mode (Por Defecto) ── */
.landing-event-card {
  background: #18181b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5) !important;
}

.landing-event-card:hover {
  border-color: rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(16, 185, 129, 0.15) !important;
}

.landing-event-card .event-card-body {
  background: #18181b !important;
}

.landing-event-card .event-card-title,
.landing-event-card h3 {
  color: #ffffff !important;
}

.landing-event-card .event-card-desc,
.landing-event-card p {
  color: #cbd5e1 !important;
}

.landing-event-card .landing-event-meta-box {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f1f5f9 !important;
}

.landing-event-card .landing-event-meta-box span {
  color: #f1f5f9 !important;
}

.landing-events-title {
  color: #ffffff !important;
}

.landing-events-subtitle {
  color: #94a3b8 !important;
}

/* ── Landing Eventos en Light Mode (html.theme-light) ── */
html.theme-light .landing-event-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06) !important;
}

html.theme-light .landing-event-card:hover {
  border-color: #10b981 !important;
  box-shadow: 0 16px 36px -10px rgba(16, 185, 129, 0.15) !important;
}

html.theme-light .landing-event-card .event-card-body {
  background: #ffffff !important;
}

html.theme-light .landing-event-card .event-card-title,
html.theme-light .landing-event-card h3 {
  color: #0f172a !important;
}

html.theme-light .landing-event-card .event-card-desc,
html.theme-light .landing-event-card p {
  color: #475569 !important;
}

html.theme-light .landing-event-card .landing-event-meta-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

html.theme-light .landing-event-card .landing-event-meta-box span {
  color: #0f172a !important;
}

html.theme-light .landing-events-title {
  color: #0f172a !important;
}

html.theme-light .landing-events-subtitle {
  color: #64748b !important;
}

/* ── Responsive Modal Eventos ── */
@media (max-width: 768px) {
  .modal-event-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

body.dark-mode .modal-event-side-panel {
  background: #141416 !important;
  border-color: #27272a !important;
}
