/* -----------------------------------------------------------------
   Homepage event popup notification
   ----------------------------------------------------------------- */
body.alicante-home-popup-open {
    overflow: hidden;
}

body.alicante-home-popup-open .page-wrapper {
    filter: blur(6px);
    transform: scale(1.01);
    transition: filter 0.32s ease, transform 0.32s ease;
    pointer-events: none;
    user-select: none;
}

body .page-wrapper {
    transition: filter 0.32s ease, transform 0.32s ease;
}

.alicante-home-popup {
    --mphep-heading-size: 58px;
    --mphep-desc-size: 34px;
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    padding: 22px;
    align-items: center;
    justify-content: center;
    font-family: 'Hind', sans-serif;
}

.alicante-home-popup.is-visible {
    display: flex;
}

.alicante-home-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 11, 20, 0.63);
}

.alicante-home-popup__dialog {
    position: relative;
    width: min(1130px, 100%);
    max-height: min(92vh, 860px);
    background: var(--site-charcoal, #1a1a1a);
    border: 2px solid transparent;
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5), 0 28px 54px rgba(16, 42, 68, 0.34);
    overflow: hidden;
    padding: 16px 16px 18px;
    transform-origin: center center;
    animation: alicantePopupCenterZoom 0.36s cubic-bezier(0.19, 0.92, 0.26, 1.08);
}

.alicante-home-popup__dialog:before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--mp-green, #4caf50) 0%, #2f6fa5 45%, #1e4f80 70%, #102c4a 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.alicante-home-popup__dialog > * {
    position: relative;
    z-index: 2;
}

@keyframes alicantePopupCenterZoom {
    0% {
        opacity: 0;
        transform: scale(0.58);
    }
    72% {
        opacity: 1;
        transform: scale(1.035);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.alicante-home-popup__close {
    position: absolute;
    right: 8px;
    top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--mp-orange, #f26c2a);
    color: #ffffff;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition: all 0.22s ease;
    padding: 0;
    z-index: 12;
}

.alicante-home-popup__close span {
    display: block;
    position: relative;
    width: 20px;
    height: 20px;
    font-size: 0;
    line-height: 0;
    color: transparent;
}

.alicante-home-popup__close span:before,
.alicante-home-popup__close span:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 3px;
    background: #ffffff;
    transform-origin: center;
}

.alicante-home-popup__close span:before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.alicante-home-popup__close span:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.alicante-home-popup__close:hover,
.alicante-home-popup__close:focus {
    background: #dc5a1f;
    transform: scale(1.05);
    outline: none;
}

.alicante-home-popup__header {
    display: none;
}

.alicante-home-popup__header h2 {
    margin: 0;
}

.alicante-home-popup__intro {
    margin: 0;
}

.alicante-home-popup__board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(0, 42%);
    gap: 20px;
    align-items: stretch;
    padding: 12px;
    background-color: var(--site-charcoal, #1a1a1a);
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    border: 2px solid transparent;
    overflow: hidden;
}

.alicante-home-popup__board:before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--mp-yellow, #e3b13d) 0%, var(--mp-orange, #f26c2a) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.alicante-home-popup__board > * {
    position: relative;
    z-index: 2;
}

.alicante-home-popup__featured-carousel {
    position: relative;
    min-height: 490px;
    border-radius: 10px;
}

.alicante-home-popup__featured-carousel.has-multiple .alicante-home-popup__featured {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(14px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    z-index: 1;
}

.alicante-home-popup__featured-carousel.has-multiple .alicante-home-popup__featured.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 2;
}

.alicante-home-popup__event-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(7, 19, 36, 0.66);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    backdrop-filter: blur(2px);
}

.alicante-home-popup__event-nav span {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: none;
}

.alicante-home-popup__event-nav--prev {
    left: 18px;
}

.alicante-home-popup__event-nav--next {
    right: 18px;
}

.alicante-home-popup__event-nav:hover,
.alicante-home-popup__event-nav:focus {
    background: rgba(22, 94, 38, 0.9);
    border-color: var(--mp-green, #4caf50);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
    transform: translateY(-50%) scale(1.04);
    outline: none;
}

.alicante-home-popup__event-nav:active {
    background: rgba(22, 94, 38, 0.94);
    border-color: var(--mp-green, #4caf50);
    color: #ffffff;
    transform: translateY(-50%) scale(1.02);
}

@media (hover: none) and (pointer: coarse) {
    .alicante-home-popup__event-nav:active,
    .alicante-home-popup__event-nav:focus {
        background: rgba(22, 94, 38, 0.94);
        border-color: var(--mp-green, #4caf50);
        color: #ffffff;
    }
}

.alicante-home-popup__featured {
    position: relative;
    min-height: 490px;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--site-charcoal, #1a1a1a);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.alicante-home-popup__featured-media {
    position: absolute;
    inset: 0;
    height: 100%;
}

.alicante-home-popup__featured-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.18);
    transform-origin: center center;
}

.alicante-home-popup__featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 66, 130, 0.76) 0%, rgba(8, 44, 88, 0.72) 42%, rgba(9, 35, 62, 0.7) 100%);
}

.alicante-home-popup__date-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(16, 29, 55, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 0 13px;
    line-height: 1;
    min-height: 38px;
    border-radius: 0;
    white-space: nowrap;
}

.alicante-home-popup__date-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translateY(1px);
}

.alicante-home-popup__date-tag .fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: #8ec8ff;
    font-size: 13px;
    line-height: 1;
}

.alicante-home-popup__type-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    color: #ffffff;
    background: rgba(23, 66, 114, 0.9);
}

.alicante-home-popup__type-tag--event {
    background: rgba(22, 109, 53, 0.92);
}

.alicante-home-popup__type-tag--news {
    background: rgba(176, 63, 20, 0.92);
}

.alicante-home-popup__featured-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 24px 24px 26px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 11px;
    color: #ffffff;
}

.alicante-home-popup__featured-content h3 {
    margin: 0;
    font-size: clamp(24px, 4vw, var(--mphep-heading-size));
    line-height: 1.06;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
}

.alicante-home-popup__featured-text {
    margin: 0;
    font-size: clamp(12px, 1.5vw, var(--mphep-desc-size));
    line-height: 1.4;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
}

.alicante-home-popup__featured-location {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(232, 242, 255, 0.94);
}

.alicante-home-popup__featured-location .fa {
    color: #8fc8ff;
    font-size: 15px;
    line-height: 1;
}

.alicante-home-popup__btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    min-height: 45px;
    padding: 0 20px;
    background: #0a7f42;
    border: 2px solid rgba(188, 239, 211, 0.35);
    border-radius: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.24s ease;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.alicante-home-popup__btn-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translateY(1px);
}

.alicante-home-popup__btn:hover,
.alicante-home-popup__btn:focus {
    background: #066835;
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.alicante-home-popup__notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: center;
    padding: 8px 10px 8px 4px;
}

.alicante-home-popup__note {
    --popup-note-bg: var(--mp-yellow, #e3b13d);
    --popup-note-text: #1a1a1a;
    --popup-note-hover-text: #101010;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 165px;
    padding: 18px 16px;
    background: var(--popup-note-bg);
    color: var(--popup-note-text);
    font-size: clamp(19px, 1.5vw, 30px);
    line-height: 1.48;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid rgba(26, 26, 26, 0.28);
    box-shadow: 0 9px 20px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.16);
    text-decoration: none;
    transform: rotate(-2.5deg) scale(1);
    transition: transform 0.24s ease, box-shadow 0.24s ease, color 0.2s ease;
}

.alicante-home-popup__note:nth-child(4n + 1) {
    --popup-note-bg: var(--mp-yellow, #e3b13d);
    --popup-note-text: #1a1a1a;
    --popup-note-hover-text: #000000;
    transform: rotate(-2.5deg) scale(1);
}

.alicante-home-popup__note:nth-child(4n + 2) {
    --popup-note-bg: var(--mp-blue, #2f6fa5);
    --popup-note-text: #eef5fb;
    --popup-note-hover-text: #ffffff;
    transform: rotate(1.9deg) scale(1);
}

.alicante-home-popup__note:nth-child(4n + 3) {
    --popup-note-bg: var(--mp-green, #4caf50);
    --popup-note-text: #eef9ef;
    --popup-note-hover-text: #ffffff;
    transform: rotate(-1.3deg) scale(1);
}

.alicante-home-popup__note:nth-child(4n + 4) {
    --popup-note-bg: var(--mp-orange, #f26c2a);
    --popup-note-text: #1a1a1a;
    --popup-note-hover-text: #000000;
    transform: rotate(2.1deg) scale(1);
}

.alicante-home-popup__note:hover,
.alicante-home-popup__note:focus {
    transform: rotate(0deg) scale(1.055);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.22);
    color: var(--popup-note-hover-text);
    outline: none;
}

.alicante-home-popup__note--placeholder {
    cursor: default;
    pointer-events: none;
    color: #3a4148;
}

.alicante-home-popup__pin {
    position: absolute;
    top: -12px;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    border-radius: 50%;
    background: #ef503c;
    border: 3px solid #ffffff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.alicante-home-popup__note-text {
    display: block;
    max-width: 100%;
    text-wrap: balance;
}

@media (max-width: 991px) {
    .alicante-home-popup {
        padding: 12px;
    }

    .alicante-home-popup__dialog {
        padding: 12px;
        border-radius: 20px;
    }

    .alicante-home-popup__board {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 10px;
    }

    .alicante-home-popup__featured {
        min-height: 410px;
    }

    .alicante-home-popup__featured-carousel {
        min-height: 410px;
    }

    .alicante-home-popup__featured-content h3 {
        font-size: clamp(24px, 7vw, calc(var(--mphep-heading-size) * 0.9));
    }

    .alicante-home-popup__featured-text {
        font-size: clamp(12px, 2.7vw, calc(var(--mphep-desc-size) * 0.72));
    }

    .alicante-home-popup__btn {
        font-size: clamp(17px, 2.8vw, 21px);
    }

    .alicante-home-popup__notes {
        padding: 4px;
        gap: 14px;
    }

    .alicante-home-popup__note {
        min-height: 136px;
        font-size: clamp(16px, 2.6vw, 24px);
    }
}

@media (max-width: 767px) {
    body.alicante-home-popup-open .page-wrapper {
        filter: blur(4px);
        transform: scale(1.005);
    }

    .alicante-home-popup {
        padding: 8px;
    }

    .alicante-home-popup__dialog {
        max-height: 92vh;
        overflow-y: auto;
        padding: 10px;
        border-radius: 14px;
    }

    .alicante-home-popup__close {
        width: 42px;
        height: 42px;
        font-size: 0;
        right: 4px;
        top: 4px;
    }

    .alicante-home-popup__board {
        padding: 8px;
        gap: 12px;
    }

    .alicante-home-popup__featured {
        min-height: 360px;
    }

    .alicante-home-popup__featured-carousel {
        min-height: 360px;
    }

    .alicante-home-popup__event-nav {
        width: 38px;
        height: 38px;
        font-size: 28px;
    }

    .alicante-home-popup__event-nav--prev {
        left: 12px;
    }

    .alicante-home-popup__event-nav--next {
        right: 12px;
    }

    .alicante-home-popup__date-tag {
        font-size: 12px;
        padding: 0 10px;
        min-height: 32px;
    }

    .alicante-home-popup__type-tag {
        top: 12px;
        right: 12px;
        min-height: 28px;
        padding: 0 10px;
        font-size: 11px;
    }

    .alicante-home-popup__featured-content {
        padding: 16px 14px 16px;
    }

    .alicante-home-popup__featured-content h3 {
        font-size: clamp(20px, 9vw, calc(var(--mphep-heading-size) * 0.72));
    }

    .alicante-home-popup__featured-text {
        font-size: clamp(11px, 3.7vw, calc(var(--mphep-desc-size) * 0.53));
    }

    .alicante-home-popup__btn {
        font-size: clamp(13px, 3.5vw, 17px);
        padding: 0 13px;
        min-height: 32px;
    }

    .alicante-home-popup__notes {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .alicante-home-popup__note {
        min-height: 115px;
        padding: 14px 10px;
        font-size: clamp(13px, 3.7vw, 17px);
        line-height: 1.38;
    }

    .alicante-home-popup__pin {
        top: -10px;
        width: 16px;
        height: 16px;
        margin-left: -8px;
        border-width: 2px;
    }
}
