/* ==========================================================
   EVENTS: function cards stack
   ========================================================== */

/* ---- FUNCTIONS / EVENTS STACK SECTION ---- */
.events {
  position: relative;
  padding: clamp(90px, 12vw, 160px) 0;
  background: transparent;
}

.events-heading {
  width: min(1160px, 90%);
  margin: 0 auto 52px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.events-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 6.5vw, 86px);
  font-weight: 600;
  line-height: .99;
  color: var(--ink);
}

.events-heading h2 em {
  display: block;
  margin-left: 18%;
  color: var(--crimson);
  font-family: var(--font-script);
  font-size: .75em;
  font-style: normal;
}

.slide-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8c6e3a;
  font-family: var(--font-royal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.slide-hint span {
  position: relative;
  width: 54px;
  height: 1.5px;
  background: rgba(200, 156, 90, .5);
}

.slide-hint span::after {
  content: "🕊️";
  position: absolute;
  right: -2px;
  top: 50%;
  color: var(--crimson);
  font-size: 16px;
  transform: translateY(-54%);
  animation: arrowNudge 1.3s ease-in-out infinite alternate;
}

@keyframes arrowNudge {
  to {
    transform: translate(0, -104%);
  }
}

.event-stack {
  position: relative;
  width: min(700px, 92%);
  margin: auto;
}

.event-card {
  position: sticky;
  top: 104px;
  display: flex;
  flex-direction: column;
  height: min(760px, calc(90svh - 85px));
  overflow: hidden;
  border: 2px solid rgba(200, 156, 90, 0.6);
  border-radius: 34px;
  background: var(--slide-bg, #FFFDF8);
  box-shadow: 0 16px 45px rgba(160, 100, 35, 0.14);
  transition: transform .3s ease;
}

.event-card+.event-card {
  margin-top: 44svh;
}

.event-stack::after {
  content: "";
  display: block;
  height: 30svh;
}

.event-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  padding: 9px 18px;
  color: #fffdf8;
  border-radius: 999px;
  background: linear-gradient(135deg, #9b2424, #5c1414);
  border: 1px solid #f5e9cf;
  box-shadow: 0 8px 22px rgba(127, 29, 29, 0.35);
  font-family: var(--font-royal);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.event-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 90px;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: var(--slide-bg, #FFFDF8);
}

.event-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.03);
  transition: transform 5s ease;
}

.event-card:hover .event-media img {
  transform: scale(1.09);
}

.event-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, var(--slide-bg, #FFFDF8));
}

.event-copy {
  position: relative;
  flex: 0 0 auto;
  padding: 6px clamp(22px, 3.4vw, 36px) clamp(22px, 3vw, 30px);
  text-align: left;
}

.event-copy h3 {
  margin: 0 0 8px;
  font-family: var(--font-script) !important;
  font-size: clamp(44px, 8vw, 68px) !important;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--crimson);
}

.event-copy h3 .event-title-main,
.event-copy h3 .event-title-sub {
  display: block;
}

.event-copy h3 .event-title-sub {
  font-size: 0.45em;
  line-height: 1.3;
  margin-top: 5px;
}

.event-copy .event-note {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.35;
  color: var(--muted);
  margin: 0 0 14px;
}

.event-when {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-when b {
  color: var(--crimson);
  font-family: var(--font-royal);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 700;
  letter-spacing: .02em;
}

.event-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(280px, 100%);
  margin: 0;
  color: #c89c5a;
}

.event-divider i {
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.event-divider span {
  font-size: 14px;
  opacity: .9;
}

.event-where {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ---- DARK CARD TEXT FIXES (cards 2 & 5: Sufi Night, Reception) ---- */
/* Target by --slide-bg dark value via data approach: use nth-child on the stack */
.event-stack .event-card:nth-child(2) .event-copy h3,
.event-stack .event-card:nth-child(5) .event-copy h3 {
  color: #f5e9cf !important;
}

.event-stack .event-card:nth-child(2) .event-copy .event-note,
.event-stack .event-card:nth-child(5) .event-copy .event-note {
  color: rgba(245, 220, 170, 0.88) !important;
}

.event-stack .event-card:nth-child(2) .event-when b,
.event-stack .event-card:nth-child(5) .event-when b {
  color: #c89c5a !important;
}

.event-stack .event-card:nth-child(2) .event-where b,
.event-stack .event-card:nth-child(2) .event-where span,
.event-stack .event-card:nth-child(5) .event-where b,
.event-stack .event-card:nth-child(5) .event-where span {
  color: #e8d5a8 !important;
}

.event-stack .event-card:nth-child(2) .event-where svg,
.event-stack .event-card:nth-child(5) .event-where svg {
  color: #c89c5a !important;
}

.event-stack .event-card:nth-child(2) .event-divider,
.event-stack .event-card:nth-child(5) .event-divider {
  color: rgba(200, 156, 90, 0.7) !important;
}

.event-stack .event-card:nth-child(2) .event-media::after {
  background: linear-gradient(180deg, transparent 62%, #2D1A2E) !important;
}

.event-stack .event-card:nth-child(5) .event-media::after {
  background: linear-gradient(180deg, transparent 62%, #1A0D0D) !important;
}

.event-where svg {
  flex: 0 0 auto;
  width: 16px;
  margin-top: 3px;
  color: var(--crimson);
}

.event-where-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.event-where-text b {
  color: var(--crimson);
  font-family: var(--font-royal);
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 700;
}

.event-where-text span {
  color: #5c3024;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 600;
}
