.event-popup {
    position: fixed;
    inset: 0;
    z-index: 1000000002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0b2f4c;
    -webkit-font-smoothing: antialiased;
}

.event-popup[hidden] {
    display: none !important;
}

.event-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 10, 17, 0.64);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.event-popup__dialog {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fffaf6;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.event-popup.is-open .event-popup__backdrop {
    opacity: 1;
}

.event-popup.is-open .event-popup__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.event-popup__media {
    position: relative;
    height: 146px;
    overflow: hidden;
    background: #0b2f4c;
}

.event-popup__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 38%;
    filter: saturate(0.92);
}

.event-popup__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 10, 17, 0.08) 0%, rgba(11, 47, 76, 0.2) 55%, rgba(11, 47, 76, 0.92) 100%);
    pointer-events: none;
}

.event-popup__close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(3, 16, 28, 0.5);
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background 0.2s ease;
}

.event-popup__close:hover,
.event-popup__close:focus-visible {
    background: rgba(3, 16, 28, 0.8);
}

.event-popup__close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

.event-popup__body {
    padding: 26px 30px 22px;
}

.event-popup__title {
    margin: 0 0 12px;
    color: #0b2f4c;
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.01em;
}

.event-popup__lead {
    margin: 0 0 8px;
    color: #0b2f4c;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.42;
    letter-spacing: -0.005em;
}

.event-popup__topics {
    margin: 0 0 12px;
    color: #b07755;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.event-popup__description {
    margin: 0 0 16px;
    color: #6f5f53;
    font-size: 13.5px;
    line-height: 1.55;
}

.event-popup__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin: 0 0 18px;
    color: #0b2f4c;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-popup__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 9px;
    background: #0b2f4c;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.event-popup__cta svg {
    width: 18px;
    height: 18px;
    flex: none;
    transition: transform 0.2s ease;
}

.event-popup__cta:hover {
    background: #0f3a5c;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(11, 47, 76, 0.2);
}

.event-popup__cta:hover svg {
    transform: translateX(3px);
}

.event-popup__cta:focus-visible {
    outline: 2px solid #0b2f4c;
    outline-offset: 3px;
}

.event-popup__dismiss {
    display: block;
    width: 100%;
    margin-top: 11px;
    padding: 4px;
    border: 0;
    background: none;
    color: #8a7a6d;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.event-popup__dismiss:hover {
    color: #0b2f4c;
}

.event-popup__dismiss:focus-visible {
    outline: 2px solid #0b2f4c;
    outline-offset: 2px;
    border-radius: 4px;
}

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

    .event-popup__dialog {
        border-radius: 20px;
    }

    .event-popup__media {
        height: 104px;
    }

    .event-popup__body {
        padding: 18px 20px 16px;
    }

    .event-popup__title {
        margin-bottom: 10px;
        font-size: 28px;
    }

    .event-popup__lead {
        font-size: 14px;
    }

    .event-popup__topics {
        font-size: 11.5px;
    }

    .event-popup__description {
        font-size: 12.5px;
        line-height: 1.45;
    }

    .event-popup__meta {
        font-size: 10px;
        letter-spacing: 0.06em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-popup__backdrop,
    .event-popup__dialog,
    .event-popup__cta,
    .event-popup__cta svg {
        transition-duration: 0.001ms !important;
    }
}
