/* =========================================================
   AI Search Events page
   Design source: Figma "AI Search Present - Final" node 3803:56336
   Builds on ranking.css (rank-pagination, tokens).
   ========================================================= */

.site-main > .event-intro,
.site-main > .event-blog {
  width: min(1164px, calc(100% - 48px));
}

.site-main > .event-slider {
  width: 100%;
}

/* ---------- Intro ---------- */

.event-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.event-intro__title {
  max-width: 882px;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.25rem);
  font-weight: 700;
  line-height: 1.06;
  color: #000;
}

.event-intro__desc {
  max-width: 1164px;
  font-size: clamp(1.125rem, 1rem + 0.8vw, 1.75rem);
  line-height: 1.43;
  color: #000;
  opacity: 0.8;
}

/* ---------- Featured peek carousel ---------- */

.event-slider {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.event-slider__viewport {
  position: relative;
  width: 100%;
  /* Clip only the horizontal track travel; vertical stays open so the
     36px/45px card shadow below the card isn't cut off. */
  overflow-x: clip;
  overflow-y: visible;
}

.event-slider__track {
  display: flex;
  gap: 24px;
  align-items: center;
  transition: transform var(--duration-normal) var(--ease-out);
}

.event-slide {
  position: relative;
  flex: 0 0 min(934px, 88vw);
  height: 517px;
  overflow: hidden;
  border-radius: 24px;
  background: #f7fbfb;
  box-shadow: 0 36px 45px rgba(28, 115, 233, 0.08), 0 8px 12.5px #f4f5fc;
  transform: scale(0.713);
  transition: transform var(--duration-normal) var(--ease-out);
}

.event-slide.is-active {
  transform: scale(1);
}

/* Scale neighbours toward the active card: without this the shrunken paint
   box leaves a ~134px invisible inset per side and the peek never shows. */
.event-slide.is-before { transform-origin: right center; }
.event-slide.is-after { transform-origin: left center; }

.event-slide__photo {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.event-slide__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

/* White fade so the left text column stays readable over the photo. */
.event-slide__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f7fbfb 37.3%, rgba(247, 251, 251, 0) 97.5%);
}

.event-slide__content {
  position: absolute;
  top: 50%;
  left: 57px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  width: min(468px, 60%);
  transform: translateY(-50%);
}

.event-slide__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 3rem);
  font-weight: 600;
  line-height: 1.17;
}

.event-slide__title a {
  color: transparent;
  background-image: var(--gradient-brand, linear-gradient(140deg, #1c73e9 38.87%, #2ac48b 88.955%));
  background-clip: text;
  -webkit-background-clip: text;
}

.event-slide__desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
  line-height: 1.5;
  color: #000;
  opacity: 0.8;
}

.event-slide__cta {
  margin-top: 24px;
  padding: 12px 24px 12px 32px;
  border-radius: 100px;
  font-size: 18px;
}

/* Arrows flank the center card, over the peeking side cards. */
.event-slider__arrow {
  top: 50%;
  transform: translateY(-50%);
}

.event-slider__arrow--prev { left: calc(50% - 636px); }
.event-slider__arrow--next { right: calc(50% - 636px); }

@media (max-width: 1320px) {
  .event-slider__arrow--prev { left: 16px; }
  .event-slider__arrow--next { right: 16px; }
}

/* ---------- Event Blog listing ---------- */

.event-blog {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.event-blog__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-blog__title {
  font-size: clamp(1.875rem, 1.3rem + 2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.017em;
  color: #1e1e1e;
}

.event-blog__subtitle {
  font-size: clamp(1.125rem, 1rem + 0.9vw, 2rem);
  line-height: 1.5;
  color: #000;
  opacity: 0.8;
}

.event-blog__filters {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.event-filter select {
  padding: 10px 40px 10px 20px;
  border: 1px solid rgba(28, 28, 28, 0.1);
  border-radius: 99px;
  background: transparent url("../img/imgChevron2.svg") no-repeat right 12px center / 20px 20px;
  font-family: inherit;
  font-size: 14px;
  line-height: 16px;
  color: #000;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.event-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 30px;
}

.event-blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  filter: drop-shadow(0 10px 15px #f4f5fc) drop-shadow(0 25px 15px rgba(244, 245, 252, 0.5));
}

.event-blog-card__image {
  display: block;
  height: 238px;
}

.event-blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 40px;
  padding: 24px 20px;
}

.event-blog-card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.36;
  color: #1a202e;
}

.event-blog-card__title a:hover {
  color: var(--color-brand-blue);
}

.event-blog-card__meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
}

.event-blog-card__date {
  font-size: 20px;
  line-height: 1.37;
  color: var(--color-text-faint);
}

.event-blog-card__location {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}

.event-blog-card__pin {
  width: 20px;
  height: 20px;
}

.event-blog-card__location span {
  font-size: 20px;
  line-height: 1.37;
  color: transparent;
  background-image: var(--gradient-brand, linear-gradient(118deg, #1c73e9 38.87%, #2ac48b 88.955%));
  background-clip: text;
  -webkit-background-clip: text;
}

.event-blog__empty {
  padding: 40px 0;
  text-align: center;
  font-size: 20px;
  color: var(--color-text-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .event-slide {
    height: 440px;
  }

  .event-slide__content {
    left: 32px;
  }

  .event-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .event-slide {
    height: 380px;
  }

  .event-slide__content {
    left: 24px;
    width: 75%;
  }

  .event-blog__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-blog__filters {
    justify-content: flex-start;
  }
}
