.event-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 18, 42, 0.82);
}

.event-popup-open {
  overflow: hidden;
}

.event-popup__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(1000px, calc(184vh - 40px), 100%);
  aspect-ratio: 2 / 1;
  max-height: 92vh;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  color: #0b2344;
  font-family: 'Poppins', sans-serif;
}

.event-popup__visual {
  min-width: 0;
  background: #f2f5fa;
}

.event-popup__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.event-popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 32px;
}

.event-popup__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
  padding-right: 42px;
  color: #5b687a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-popup__eyebrow span:first-child {
  padding: 5px 8px;
  border-radius: 4px;
  background: #fff0ed;
  color: #b80f22;
}

.event-popup__title {
  margin: 0 30px 5px 0;
  color: #081e3d;
  font-size: clamp(31px, 3vw, 39px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.event-popup__intro {
  margin: 0 0 18px;
  color: #506077;
  font-size: 13px;
  line-height: 1.5;
}

.event-popup__event-card {
  display: flex;
  align-items: stretch;
  min-height: 92px;
  margin-bottom: 13px;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
}

.event-popup__date {
  display: flex;
  flex: 0 0 96px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #0b294f;
  color: #fff;
  line-height: 1;
}

.event-popup__date strong {
  font-size: 35px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.event-popup__date span {
  display: flex;
  gap: 4px;
  align-items: baseline;
  margin-top: 5px;
  color: #ffd244;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-popup__date small {
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.event-popup__event-place {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 11px 16px;
  color: #51627a;
  font-size: 11px;
  line-height: 1.35;
}

.event-popup__event-place span:first-child {
  margin-bottom: 5px;
  color: #b80f22;
  font-size: 11px;
  font-weight: 800;
}

.event-popup__event-place strong {
  color: #0b2344;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.event-popup__speaker {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
  margin-bottom: 13px;
  color: #607087;
  font-size: 11px;
}

.event-popup__speaker strong {
  color: #0b2344;
  font-size: 12px;
  font-weight: 800;
}

.event-popup__countdown {
  margin-bottom: 13px;
  padding: 10px 12px 11px;
  border: 2px dotted #8fa9c9;
  border-radius: 9px;
  background: transparent;
  color: #0b294f;
}

.event-popup__countdown-label {
  display: block;
  margin-bottom: 8px;
  color: #b80f22;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.event-popup__countdown-units {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.event-popup__countdown-units span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.event-popup__countdown-units span + span {
  border-left: 1px solid #e4eaf2;
}

.event-popup__countdown-units strong {
  color: #0b294f;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.event-popup__countdown-units small {
  color: #607087;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-popup__cta {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 7px;
  background: #be0823;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.event-popup__cta:hover {
  background: #9e071d;
  transform: translateY(-2px);
}

.event-popup__cta span {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.event-popup__footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: #607087;
  font-size: 10px;
  line-height: 1.5;
}

.event-popup__poster-link {
  color: #0b294f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid #e0e6ef;
  border-radius: 50%;
  background: #f4f7fb;
  color: #0b294f;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.event-popup__close:hover {
  background: #e8eef6;
}

.event-popup__close:focus-visible {
  outline: 2px solid #8fa9ca;
  outline-offset: 2px;
}

.event-popup__cta:focus-visible,
.event-popup__poster-link:focus-visible {
  outline: 3px solid #ffca27;
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .event-popup {
    padding: 10px;
  }

  .event-popup__dialog {
    display: block;
    width: min(430px, 100%);
    aspect-ratio: auto;
    max-height: 95vh;
    overflow-y: auto;
  }

  .event-popup__poster {
    width: 100%;
    height: auto;
    max-height: min(33vh, 260px);
  }

  .event-popup__content {
    overflow: visible;
    padding: 22px 24px 25px;
  }

  .event-popup__title {
    font-size: 33px;
  }

  .event-popup__intro {
    margin-bottom: 15px;
  }

  .event-popup__date {
    flex-basis: 82px;
  }

  .event-popup__event-place {
    padding: 10px 12px;
  }
}
