/* CYV Events Directory Addon Styles */
.cyv-dir-root,
.cyv-dir-root *,
.cyv-modal-backdrop,
.cyv-modal-backdrop * {
  box-sizing: border-box;
}

.cyv-dir-root,
.cyv-modal-backdrop {
  --cyv-obsidian: #121417;
  --cyv-obsidian-soft: #1b1f24;
  --cyv-ivory: #f8f5ee;
  --cyv-card-bg: #ffffff;
  --cyv-gold: #c98a1c;
  --cyv-gold-light: #e7b454;
  --cyv-gold-dark: #96620b;
  --cyv-silver: #8c939e;
  --cyv-silver-light: #cfd5de;
  --cyv-silver-dark: #545a63;
  --cyv-text: #1e2229;
  --cyv-muted: #5c626d;
  --cyv-cols-desktop: 3;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cyv-dir-root {
  background: radial-gradient(circle at top center, #fffdf8 0%, var(--cyv-ivory) 100%);
  color: var(--cyv-text);
  padding: 56px 24px 76px;
  border-radius: var(--cyv-root-radius, 22px);
  max-width: var(--cyv-root-max-w, 1280px);
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.cyv-dir-inner {
  width: 100%;
  max-width: var(--cyv-inner-max-w, 1360px);
  margin: 0 auto;
}

/* Modo Full Width Pantalla Completa (de borde a borde, incluso dentro de secciones Boxed de Elementor) */
.cyv-dir-root.is-full-bleed {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  border-radius: 0 !important;
  padding-left: clamp(20px, 4vw, 64px);
  padding-right: clamp(20px, 4vw, 64px);
}

/* Modo 100% del Contenedor de Elementor */
.cyv-dir-root.is-full-container {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: var(--cyv-root-radius, 0px);
}

/* Cabecera de la sección */
.cyv-dir-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
}
.cyv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1b1f24 0%, #101215 100%);
  color: var(--cyv-gold-light);
  border: 1px solid rgba(201, 138, 28, 0.55);
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(18, 20, 23, 0.16);
  margin-bottom: 16px;
}
.cyv-dir-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--cyv-obsidian);
  margin: 0 0 12px;
  line-height: 1.18;
  letter-spacing: 0.02em;
}
.cyv-dir-title span {
  background: linear-gradient(135deg, var(--cyv-gold-dark), var(--cyv-gold), #dfa63c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cyv-dir-sub {
  font-size: 16px;
  color: var(--cyv-muted);
  line-height: 1.6;
  margin: 0;
}

/* Panel 3D de Filtros */
.cyv-filter-vault {
  background: linear-gradient(145deg, #191c21 0%, #101215 100%);
  border: 1px solid rgba(229, 174, 71, 0.42);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 38px;
  box-shadow:
    0 22px 45px rgba(15, 17, 20, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.cyv-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cyv-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cyv-tab-btn {
  appearance: none;
  border: 1px solid rgba(229, 174, 71, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #e4e7ec;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cyv-tab-btn:hover {
  border-color: var(--cyv-gold-light);
  color: #ffffff;
  transform: translateY(-1px);
}
.cyv-tab-btn.active {
  background: linear-gradient(135deg, #e7b454 0%, var(--cyv-gold) 55%, #9e680d 100%);
  color: #121417;
  border-color: #f4cb78;
  box-shadow: 0 8px 20px rgba(201, 138, 28, 0.38);
}
.cyv-tab-count {
  background: rgba(18, 20, 23, 0.22);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.cyv-tab-btn:not(.active) .cyv-tab-count {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cyv-gold-light);
}

.cyv-reset-btn {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #d0d5dd;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cyv-reset-btn:hover {
  border-color: var(--cyv-gold-light);
  color: var(--cyv-gold-light);
}

.cyv-filters-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.cyv-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cyv-filter-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyv-gold-light);
}
.cyv-filter-field input,
.cyv-filter-field select {
  width: 100%;
  background: #20252d;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cyv-filter-field input:focus,
.cyv-filter-field select:focus {
  border-color: var(--cyv-gold-light);
  box-shadow: 0 0 0 3px rgba(201, 138, 28, 0.22);
}

/* Cuadrícula de eventos */
.cyv-events-grid {
  display: grid;
  grid-template-columns: repeat(var(--cyv-cols-desktop, 3), minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

/* Tarjeta 3D de Evento */
.cyv-event-card {
  background: var(--cyv-card-bg);
  border-radius: 20px;
  border: 1px solid rgba(201, 138, 28, 0.34);
  box-shadow:
    0 18px 38px rgba(18, 20, 23, 0.1),
    0 4px 10px rgba(18, 20, 23, 0.05),
    inset 0 1px 0 #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease, border-color 0.32s ease;
  position: relative;
}
.cyv-event-card:hover {
  transform: translateY(-8px);
  border-color: var(--cyv-gold);
  box-shadow:
    0 28px 54px rgba(18, 20, 23, 0.18),
    0 0 0 1px rgba(201, 138, 28, 0.45);
}

/* Marco de la portada */
.cyv-poster-stage {
  position: relative;
  background: radial-gradient(circle at center, #252a32 0%, #111317 100%);
  padding: 14px;
  border-bottom: 3px solid var(--cyv-gold);
  cursor: pointer;
  overflow: hidden;
}
.cyv-poster-stage img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: #0e1013;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.cyv-event-card:hover .cyv-poster-stage img {
  transform: scale(1.025);
}

/* Insignias sobre la imagen */
.cyv-status-pill {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f0c36d 0%, var(--cyv-gold) 100%);
  color: #121417;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.cyv-date-pill {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 2;
  background: rgba(17, 19, 23, 0.9);
  color: #f9dfa4;
  border: 1px solid rgba(231, 180, 84, 0.65);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

/* Cuerpo de la tarjeta */
.cyv-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cyv-card-church {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyv-gold-dark);
  margin-bottom: 6px;
}
.cyv-card-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--cyv-obsidian);
  margin: 0 0 12px;
  line-height: 1.3;
}
.cyv-card-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--cyv-muted);
  flex: 1;
}
.cyv-card-specs li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}
.cyv-spec-dot {
  color: var(--cyv-gold);
  font-weight: 900;
  flex-shrink: 0;
}

/* Botón 3D Learn More */
.cyv-learn-btn {
  appearance: none;
  width: 100%;
  border: 1px solid #f3cb7a;
  background: linear-gradient(135deg, #1b1f25 0%, #101216 100%);
  color: var(--cyv-gold-light);
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow:
    0 10px 20px rgba(18, 20, 23, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cyv-learn-btn:hover {
  background: linear-gradient(135deg, #e7b454 0%, var(--cyv-gold) 60%, #9b660d 100%);
  color: #121417 !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(201, 138, 28, 0.35);
}

/* =================================================================== */
/* ESTILO AUTOMÁTICO BLANCO Y NEGRO + PLATA 3D PARA EVENTOS PASADOS    */
/* =================================================================== */
.cyv-event-card.is-past {
  background: linear-gradient(180deg, #f7f8fa 0%, #eceef2 100%);
  border-color: rgba(130, 138, 150, 0.48);
}
.cyv-event-card.is-past:hover {
  border-color: var(--cyv-silver-dark);
  box-shadow:
    0 24px 48px rgba(18, 20, 23, 0.16),
    0 0 0 1px rgba(120, 128, 140, 0.5);
}
.cyv-event-card.is-past .cyv-poster-stage {
  background: radial-gradient(circle at center, #2d3035 0%, #16181b 100%);
  border-bottom-color: var(--cyv-silver);
}
.cyv-event-card.is-past .cyv-poster-stage img {
  filter: grayscale(100%) contrast(1.08);
}
.cyv-event-card.is-past .cyv-status-pill {
  background: linear-gradient(135deg, #e2e6ec 0%, #9aa1ac 100%);
  color: #16181c;
}
.cyv-event-card.is-past .cyv-date-pill {
  color: #e4e7ec;
  border-color: rgba(207, 213, 222, 0.55);
}
.cyv-event-card.is-past .cyv-card-church {
  color: var(--cyv-silver-dark);
}
.cyv-event-card.is-past .cyv-card-title {
  color: #2c3036;
}
.cyv-event-card.is-past .cyv-spec-dot {
  color: var(--cyv-silver-dark);
}
.cyv-event-card.is-past .cyv-learn-btn {
  border-color: rgba(180, 186, 196, 0.65);
  background: linear-gradient(135deg, #32363e 0%, #1c1f24 100%);
  color: #e4e7ec;
}
.cyv-event-card.is-past .cyv-learn-btn:hover {
  background: linear-gradient(135deg, #dfe3ea 0%, #aeb5c0 100%);
  color: #15171a !important;
  box-shadow: 0 12px 24px rgba(84, 90, 99, 0.3);
}

/* Ocultar datos internos de la ventana emergente dentro de la tarjeta */
.cyv-hidden-details {
  display: none !important;
}

/* Mensaje cuando ningún filtro coincide */
.cyv-empty-state {
  display: none;
  text-align: center;
  padding: 54px 24px;
  background: #ffffff;
  border: 1px dashed rgba(201, 138, 28, 0.5);
  border-radius: 18px;
  margin-top: 10px;
}
.cyv-empty-state h4 {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--cyv-obsidian);
}
.cyv-empty-state p {
  color: var(--cyv-muted);
  margin: 0 0 18px;
}

/* =================================================================== */
/* VENTANA EMERGENTE (MODAL 3D)                                        */
/* =================================================================== */
.cyv-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 12, 15, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.cyv-modal-backdrop.is-open {
  display: flex;
}
.cyv-modal-dialog {
  background: linear-gradient(165deg, #1a1e24 0%, #101216 100%);
  color: #ffffff;
  border: 1px solid rgba(231, 180, 84, 0.55);
  border-radius: 24px;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.72);
  position: relative;
  display: grid;
  grid-template-columns: 380px 1fr;
  animation: cyvModalIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cyvModalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cyv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(231, 180, 84, 0.5);
  background: rgba(15, 17, 20, 0.85);
  color: var(--cyv-gold-light);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.cyv-modal-close:hover {
  background: var(--cyv-gold);
  color: #121417;
}
.cyv-modal-poster {
  background: #0b0d10;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(231, 180, 84, 0.25);
}
.cyv-modal-poster img {
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
}
.cyv-modal-content {
  padding: 32px 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cyv-modal-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f0c36d 0%, var(--cyv-gold) 100%);
  color: #121417;
}
.cyv-modal-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.24;
}
.cyv-modal-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: #d5dae2;
  margin: 0;
}
.cyv-modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cyv-modal-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(231, 180, 84, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
}
.cyv-modal-box.full {
  grid-column: 1 / -1;
}
.cyv-modal-box-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyv-gold-light);
  margin-bottom: 5px;
}
.cyv-modal-box-val {
  font-size: 13.5px;
  color: #f3f5f8;
  line-height: 1.5;
}
.cyv-modal-schedule-list {
  margin: 0;
  padding-left: 18px;
  color: #f3f5f8;
  font-size: 13.5px;
  line-height: 1.65;
}
.cyv-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.cyv-modal-btn-primary,
.cyv-modal-btn-secondary {
  text-decoration: none !important;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cyv-modal-btn-primary {
  background: linear-gradient(135deg, #e7b454 0%, var(--cyv-gold) 60%, #9b660d 100%);
  color: #121417 !important;
  border: 1px solid #f4cb78;
}
.cyv-modal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(201, 138, 28, 0.4);
}
.cyv-modal-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.cyv-modal-btn-secondary:hover {
  border-color: var(--cyv-gold-light);
  color: var(--cyv-gold-light) !important;
}

/* Modal en modo Blanco y Negro cuando el evento es pasado */
.cyv-modal-dialog.is-past {
  border-color: rgba(190, 197, 208, 0.5);
}
.cyv-modal-dialog.is-past .cyv-modal-poster img {
  filter: grayscale(100%) contrast(1.08);
}
.cyv-modal-dialog.is-past .cyv-modal-badge {
  background: linear-gradient(135deg, #e2e6ec 0%, #9aa1ac 100%);
  color: #141619;
}
.cyv-modal-dialog.is-past .cyv-modal-box {
  border-color: rgba(190, 197, 208, 0.25);
}
.cyv-modal-dialog.is-past .cyv-modal-box-label {
  color: var(--cyv-silver-light);
}
.cyv-modal-dialog.is-past .cyv-modal-btn-primary {
  background: linear-gradient(135deg, #dfe3ea 0%, #9ea6b2 100%);
  border-color: #eef1f5;
  color: #141619 !important;
}

/* Responsivo Tablet y Móvil */
@media (max-width: 1080px) {
  .cyv-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cyv-events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cyv-modal-dialog {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
  .cyv-modal-poster {
    border-right: none;
    border-bottom: 1px solid rgba(231, 180, 84, 0.25);
    padding: 20px;
  }
  .cyv-modal-poster img {
    max-height: 420px;
  }
}
@media (max-width: 680px) {
  .cyv-dir-root {
    padding: 32px 14px 52px;
  }
  .cyv-filters-grid {
    grid-template-columns: 1fr;
  }
  .cyv-events-grid {
    grid-template-columns: 1fr;
  }
  .cyv-modal-info-grid {
    grid-template-columns: 1fr;
  }
  .cyv-modal-content {
    padding: 22px 18px 24px;
  }
}


/* =================================================================== */
/* MODO HOME PREVIEW & OPCIONES EXTRA v2.0                             */
/* =================================================================== */
.cyv-dir-root.is-transparent {
  background: transparent !important;
  padding-top: 12px;
  padding-bottom: 16px;
  border-radius: 0;
}

.cyv-home-cta-wrap {
  margin-top: 40px;
  text-align: center;
  display: flex;
  justify-content: center;
}

.cyv-view-all-btn {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.cyv-view-all-btn.is-gold {
  background: linear-gradient(135deg, #f0c46c 0%, var(--cyv-gold) 58%, #96620b 100%);
  color: #121417 !important;
  border: 1px solid #f7d58b;
  box-shadow:
    0 14px 30px rgba(201, 138, 28, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.cyv-view-all-btn.is-gold:hover {
  transform: translateY(-3px);
  box-shadow:
    0 20px 38px rgba(201, 138, 28, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #121417 !important;
}

.cyv-view-all-btn.is-obsidian {
  background: linear-gradient(135deg, #1b1f25 0%, #101216 100%);
  color: var(--cyv-gold-light) !important;
  border: 1px solid rgba(231, 180, 84, 0.65);
  box-shadow:
    0 14px 28px rgba(18, 20, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cyv-view-all-btn.is-obsidian:hover {
  background: linear-gradient(135deg, #e7b454 0%, var(--cyv-gold) 60%, #9b660d 100%);
  color: #121417 !important;
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(201, 138, 28, 0.38);
}

html, body {
  overflow-x: clip;
}
