/* ============================================
   ANNOUNCEMENT POPUP (homepage)
   ============================================ */
.ann-popup {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
}

.ann-popup[hidden] {
    display: none;
}

.ann-popup.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .35s ease;
}

.ann-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ann-popup__card {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
    transform: translateY(24px) scale(.96);
    opacity: 0;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .4s ease;
}

.ann-popup.is-open .ann-popup__card {
    transform: none;
    opacity: 1;
}

/* gold top edge */
.ann-popup__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary-dark, #9a7a20), var(--color-primary-light, #c9a54a), var(--color-primary-dark, #9a7a20));
    z-index: 3;
}

.ann-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.ann-popup__close:hover {
    background: var(--color-primary, #b8942f);
    transform: rotate(90deg);
}

/* ---------- viewport / slides ---------- */
.ann-popup__viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.ann-popup__track {
    position: relative;
}

.ann-slide {
    display: none;
    animation: annFade .45s ease both;
}

.ann-slide.is-active {
    display: block;
}

.ann-slide.is-leaving-left,
.ann-slide.is-leaving-right {
    display: none;
}

@keyframes annFade {
    from {
        opacity: 0;
        transform: translateX(var(--ann-dir, 24px));
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ann-slide__media {
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.ann-slide__media a {
    display: block;
    width: 100%;
    line-height: 0;
}

.ann-slide__media img {
    width: 100%;
    height: auto;
    max-height: 62vh;
    max-height: 62dvh;
    object-fit: contain;
    display: block;
}

.ann-slide__caption {
    padding: 18px 22px 20px;
    text-align: center;
}

.ann-slide__title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text, #1a1a1a);
    margin: 0 0 6px;
}

.ann-slide__note {
    font-size: .92rem;
    line-height: 1.55;
    color: var(--color-text-muted, rgba(0, 0, 0, .6));
    margin: 0;
}

.ann-slide__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--color-primary, #b8942f);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.ann-slide__btn:hover {
    background: var(--color-primary-dark, #9a7a20);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(184, 148, 47, .35);
}

.ann-slide__btn svg {
    transition: transform .25s ease;
}

.ann-slide__btn:hover svg {
    transform: translateX(3px);
}

/* ---------- arrows ---------- */
.ann-popup__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: background .2s ease, color .2s ease, opacity .2s ease;
    opacity: .85;
}

.ann-popup__arrow:hover {
    background: var(--color-primary, #b8942f);
    color: #fff;
    opacity: 1;
}

.ann-popup__arrow--prev {
    left: 12px;
}

.ann-popup__arrow--next {
    right: 12px;
}

/* ---------- footer ---------- */
.ann-popup__footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid var(--color-border, rgba(0, 0, 0, .08));
    background: var(--color-bg-light, #fafafa);
    font-size: .82rem;
    color: var(--color-text-muted, rgba(0, 0, 0, .6));
}

.ann-popup__dismiss {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.ann-popup__dismiss input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ann-popup__check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid rgba(0, 0, 0, .3);
    background: #fff;
    position: relative;
    flex: 0 0 auto;
    transition: background .2s ease, border-color .2s ease;
}

.ann-popup__check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .2s ease;
}

.ann-popup__dismiss input:checked+.ann-popup__check {
    background: var(--color-primary, #b8942f);
    border-color: var(--color-primary, #b8942f);
}

.ann-popup__dismiss input:checked+.ann-popup__check::after {
    transform: rotate(45deg) scale(1);
}

.ann-popup__dismiss input:focus-visible+.ann-popup__check {
    outline: 2px solid var(--color-primary, #b8942f);
    outline-offset: 2px;
}

.ann-popup__dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ann-popup__dot {
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ann-popup__dot span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .22);
    transition: width .25s ease, background .25s ease;
}

.ann-popup__dot.is-active span {
    width: 20px;
    background: var(--color-primary, #b8942f);
}

.ann-popup__counter {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ann-popup__counter b {
    color: var(--color-text, #1a1a1a);
}

/* ---------- responsive ---------- */
@media (max-width: 575px) {
    .ann-popup {
        padding: 12px;
    }

    .ann-popup__card {
        border-radius: 14px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .ann-slide__media img {
        max-height: 55vh;
        max-height: 55dvh;
    }

    .ann-slide__caption {
        padding: 14px 16px 16px;
    }

    .ann-slide__title {
        font-size: 1.1rem;
    }

    .ann-popup__footer {
        flex-wrap: wrap;
        padding: 10px 14px;
    }

    .ann-popup__counter {
        order: 2;
    }

    .ann-popup__dots {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .ann-popup__arrow {
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ann-popup,
    .ann-popup__card,
    .ann-slide {
        transition: none;
        animation: none;
    }
}

body.ann-popup-open {
    overflow: hidden;
}
