.eg-home-community-events.panel--community-events,
.panel--community-events.eg-home-community-events {
  background: linear-gradient(165deg, #f0fbe8 0%, #e7f4d4 45%, #ebe8f9 100%);
  color: #1a1030;
  border-block: 1px solid rgba(107, 70, 193, 0.14);
}

.panel--community-events .parents-h2 {
  color: #1a1030;
}

.eg-home-community-events {
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
}

.eg-home-community-events__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: stretch;
}

.eg-home-community-events__intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
}

.eg-home-community-events__head {
  max-width: 36rem;
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.eg-home-community-events__showcase {
  min-width: 0;
  width: 100%;
  max-width: min(100%, 56rem);
  justify-self: end;
  --eg-ce-lineup-lime: #bef264;
  --eg-ce-lineup-purple: #2d1b4e;
  --eg-ce-lineup-ink: #0f081a;
  --eg-ce-slide-width: clamp(17.5rem, 86%, 32rem);
}

.eg-home-community-events__lineup-kicker {
  margin: 0 0 0.65rem;
  text-align: center;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--egg-purple-600, #6b46c1);
  font-weight: 600;
}

.eg-home-community-events__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--egg-purple-600, #6b46c1);
  font-weight: 600;
}

.eg-home-community-events__title {
  margin: 0 0 0.65rem;
}

.eg-home-community-events__lede {
  display: grid;
  gap: 0.85rem;
  color: var(--text-muted, #4b5563);
  font-size: 1.05rem;
  line-height: 1.55;
}

.eg-home-community-events__lede p {
  margin: 0;
}

.eg-home-community-events__status,
.eg-home-community-events__empty {
  margin: 0 0 1rem;
  color: var(--text-muted, #6b7280);
  font-size: 0.92rem;
}

.eg-home-community-events__showcase[hidden],
.eg-home-community-events__empty[hidden] {
  display: none;
}

.eg-home-community-events__carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
}

.eg-home-community-events__viewport {
  overflow: hidden;
  width: 100%;
  padding: 0.35rem clamp(0.15rem, 1.5vw, 0.65rem);
  min-height: clamp(16rem, 48vw, 22.5rem);
}

.eg-home-community-events__track {
  display: flex;
  gap: clamp(0.85rem, 2.6vw, 1.35rem);
  align-items: flex-start;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1);
}

.eg-home-community-events__track.is-snapping {
  transition: none !important;
}

.eg-home-community-events__track.is-snapping .eg-home-community-events__slide,
.eg-home-community-events__track.is-snapping .eg-home-community-events__slide-poster {
  transition: none !important;
}

.eg-home-community-events__slide {
  flex: 0 0 var(--eg-ce-slide-width);
  width: var(--eg-ce-slide-width);
  position: relative;
  opacity: 0.38;
  transform: scale(0.88);
  transform-origin: center top;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: center;
  overflow: visible;
}

.eg-home-community-events__slide.is-active {
  opacity: 1;
  transform: scale(1);
  cursor: default;
  z-index: 2;
}

.eg-home-community-events__slide.is-adjacent,
.eg-home-community-events__slide.is-next-adjacent {
  opacity: 0.72;
  transform: scale(0.93);
  transform-origin: left top;
}

.eg-home-community-events__slide-poster {
  position: relative;
  border: 3px solid var(--eg-ce-lineup-purple);
  background: var(--eg-ce-lineup-ink);
  box-shadow: 5px 5px 0 rgba(45, 27, 78, 0.18);
  transition:
    box-shadow 0.45s ease,
    border-color 0.45s ease,
    transform 0.45s ease;
}

.eg-home-community-events__slide.is-active .eg-home-community-events__slide-poster {
  box-shadow: 7px 7px 0 var(--eg-ce-lineup-lime);
}

.eg-home-community-events__slide-poster::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--eg-ce-lineup-lime);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.eg-home-community-events__slide.is-active .eg-home-community-events__slide-poster::after {
  opacity: 1;
}

.eg-home-community-events__slide-tag {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  padding: 0.18rem 0.42rem;
  background: var(--eg-ce-lineup-lime);
  color: var(--eg-ce-lineup-ink);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.eg-home-community-events__banner-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.eg-home-community-events__banner {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eg-home-community-events__slide-meta {
  padding: 0.72rem 0.35rem 0;
  text-align: center;
  min-height: 3.35rem;
}

.eg-home-community-events__slide-title {
  margin: 0;
  font-family: var(--font-display, "Bakbak One", sans-serif);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eg-ce-lineup-purple);
  transition: color 0.35s ease, opacity 0.35s ease;
}

.eg-home-community-events__slide.is-active .eg-home-community-events__slide-title {
  color: var(--eg-ce-lineup-ink);
}

.eg-home-community-events__slide-date {
  margin: 0.38rem 0 0;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--egg-purple-600, #6b46c1);
  line-height: 1.35;
}

.eg-home-community-events__slide.is-active .eg-home-community-events__slide-date {
  color: #4c1d95;
}

.eg-home-community-events__slide:not(.is-active) .eg-home-community-events__slide-meta {
  opacity: 0.72;
}

.eg-home-community-events__nav {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(107, 70, 193, 0.12);
  color: var(--egg-purple-700, #553c9a);
  font-size: 1.35rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.eg-home-community-events__nav:hover {
  background: rgba(107, 70, 193, 0.22);
}

.eg-home-community-events__nav:focus-visible {
  outline: 3px solid #fde047;
  outline-offset: 2px;
}

.eg-home-community-events__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.eg-home-community-events__carousel--single .eg-home-community-events__nav {
  visibility: hidden;
  pointer-events: none;
}

.eg-home-community-events__carousel--single .eg-home-community-events__slide {
  flex-basis: 100%;
  cursor: default;
}

.eg-home-community-events__videos-head {
  margin: 0;
  font-family: var(--font-display, "Bakbak One", sans-serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--egg-purple-900, #2d1b4e);
}

.eg-home-community-events__highlights {
  margin-top: clamp(1.5rem, 2.8vw, 2rem);
  max-width: min(100%, 40rem);
}

.eg-home-community-events__highlights-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.eg-home-community-events__video-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.eg-home-community-events__video-tab {
  appearance: none;
  border: 1px solid rgba(109, 40, 217, 0.22);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  color: #4c1d95;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.eg-home-community-events__video-tab:hover {
  border-color: rgba(109, 40, 217, 0.38);
  background: #fff;
}

.eg-home-community-events__video-tab.is-active {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}

.eg-home-community-events__video-tab:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}

.eg-home-community-events__video-feature[hidden] {
  display: none !important;
}

.eg-home-community-events__video-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.eg-home-community-events__video-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.eg-home-community-events__video-card--featured {
  gap: 0.65rem;
}

.eg-home-community-events__video-caption {
  display: grid;
  gap: 0.25rem;
}

.eg-home-community-events__video-caption-meta {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(15, 118, 110, 0.95);
}

.eg-home-community-events__video-caption-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.78);
}

.eg-home-community-events__video-copy {
  display: grid;
  gap: 0.35rem;
}

.eg-home-community-events__video-format {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 118, 110, 0.95);
}

.eg-home-community-events__video-title {
  margin: 0;
  font-family: var(--font-display, "Bakbak One", sans-serif);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.15;
  color: var(--egg-purple-900, #2d1b4e);
}

.eg-home-community-events__video-context {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.82);
}

/* Match landing-lab / homepage parents-starter-example video cards */
.eg-home-community-events__video.parents-starter-example {
  margin: 0;
}

.eg-home-community-events__video .parents-starter-example__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-chunky, 18px) - 4px);
  overflow: hidden;
  background: linear-gradient(165deg, #faf7ff 0%, #f3edff 100%);
  border: 2px solid rgba(109, 40, 217, 0.18);
  box-shadow: 0 8px 22px rgba(109, 40, 217, 0.1);
}

.eg-home-community-events__video .parents-starter-example__launch {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: #fff;
  text-align: center;
}

.eg-home-community-events__video .parents-starter-example__launch[hidden],
.eg-home-community-events__video .parents-starter-example__frame.is-playing .parents-starter-example__launch {
  display: none !important;
}

.eg-home-community-events__video .parents-starter-example__launch:focus-visible {
  outline: 3px solid #fde047;
  outline-offset: 3px;
}

.eg-home-community-events__video .parents-starter-example__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.eg-home-community-events__video .parents-starter-example__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(243, 237, 255, 0.08) 0%,
    rgba(45, 26, 77, 0.28) 58%,
    rgba(45, 26, 77, 0.62) 100%
  );
  pointer-events: none;
}

.eg-home-community-events__video .parents-starter-example__launch-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
}

.eg-home-community-events__video .parents-starter-example__launch-byline {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.eg-home-community-events__video .parents-starter-example__play-btn {
  display: grid;
  place-items: center;
  width: clamp(4.5rem, 14vw, 5.75rem);
  height: clamp(4.5rem, 14vw, 5.75rem);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--purple-700, #6d28d9);
  box-shadow:
    0 0 0 0 rgba(255, 255, 255, 0.5),
    0 0 22px rgba(124, 58, 237, 0.48),
    0 0 38px rgba(163, 230, 53, 0.28),
    0 8px 28px rgba(109, 40, 217, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: egg-video-play-pulse 2.4s ease-in-out infinite;
}

.eg-home-community-events__video-card--featured .parents-starter-example__play-btn {
  width: 3.1rem;
  height: 3.1rem;
  animation: none;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.28);
}

.eg-home-community-events__video-card--featured .parents-starter-example__play-btn svg {
  width: 24px;
  height: 24px;
}

.eg-home-community-events__video-card--featured .parents-starter-example__shade {
  background: rgba(17, 12, 32, 0.1);
}

.eg-home-community-events__video-card--featured .parents-starter-example__frame {
  border-width: 1px;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.08);
}

.eg-home-community-events__video .parents-starter-example__play-btn svg {
  margin-left: 0.14rem;
  width: 40px;
  height: 40px;
}

.eg-home-community-events__video.parents-starter-example--play-only .parents-starter-example__shade {
  background: rgba(17, 12, 32, 0.14);
}

.eg-home-community-events__video.parents-starter-example--play-only .parents-starter-example__launch-inner {
  gap: 0;
}

.eg-home-community-events__video .parents-starter-example__launch-title {
  font-family: var(--font-display, "Bakbak One", sans-serif);
  font-size: clamp(0.92rem, 2.2vw, 1.02rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 10px rgba(15, 23, 42, 0.35);
}

.eg-home-community-events__video .parents-starter-example__launch:hover .parents-starter-example__play-btn,
.eg-home-community-events__video .parents-starter-example__launch:focus-visible .parents-starter-example__play-btn {
  animation-play-state: paused;
  transform: scale(1.08);
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.14),
    0 0 36px rgba(124, 58, 237, 0.72),
    0 0 56px rgba(163, 230, 53, 0.42),
    0 12px 36px rgba(109, 40, 217, 0.55);
}

.eg-home-community-events__video .parents-starter-example__launch:hover .parents-starter-example__play-btn::before,
.eg-home-community-events__video .parents-starter-example__launch:focus-visible .parents-starter-example__play-btn::before {
  animation-play-state: paused;
  opacity: 1;
  transform: scale(1.12);
}

.eg-home-community-events__video .parents-starter-example__iframe,
.eg-home-community-events__video .parents-starter-example__frame iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: none;
}

.eg-home-community-events__video .parents-starter-example__iframe[hidden],
.eg-home-community-events__video .parents-starter-example__frame iframe[hidden] {
  display: none !important;
}

.eg-home-community-events__video .parents-starter-example__frame.is-playing .parents-starter-example__iframe,
.eg-home-community-events__video .parents-starter-example__frame.is-playing iframe {
  z-index: 3;
}

.eg-home-community-events__video .parents-starter-example__launch--static {
  cursor: default;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.eg-home-community-events__cta {
  margin: 0.35rem 0 0;
}

.eg-home-community-events__cta .btn {
  display: inline-flex;
}

@media (max-width: 900px) {
  .eg-home-community-events__layout {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .eg-home-community-events__showcase {
    justify-self: stretch;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eg-home-community-events__track,
  .eg-home-community-events__track.is-snapping {
    transition: none;
  }

  .eg-home-community-events__slide,
  .eg-home-community-events__slide-poster {
    transition: none;
  }
}
