/* ========================================================================
   Site Popup
   ======================================================================== */

/* Overlay container */
#popup-scroll-lock {
    overflow: hidden !important;
    height: 100vh !important;
}
#site-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

#site-popup.is-open {
    display: block;
}

/* Backdrop */
.popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(217, 217, 217, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Centering wrapper */
.popup-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Modal card */
.popup-modal {
    position: relative;
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    /* box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Grid: single column on mobile */
.popup-grid {
    display: grid;
    grid-template-columns: 1fr;
}

/* Text + Form panel */
.popup-content-panel {
    border-radius: 40px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    z-index: 10;
}

.popup-content-panel .gform_wrapper>:not([hidden])~:not([hidden]) {
    padding: 0;
}

.popup-heading {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
}

.popup-body {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.4;
    max-width: 440px;
}

/* Image panel */
.popup-image-panel {
    border-radius: 40px;
    overflow: hidden;
}

.popup-image-panel img {
    width: 100%;
    height: 100%;
    max-height: 243px;
    object-fit: cover;
    display: block;
}

/* Close button */
.popup-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 20;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #004D46;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.popup-close-btn:hover {
    opacity: 0.8;
}

/* ─── Desktop (768px+) ─── */
@media (min-width: 768px) {
    .popup-grid {
        grid-template-columns: 2fr 1fr;
        align-items: stretch;
    }

    .popup-content-panel {
        padding: 2.5rem;
    }

    .popup-image-panel {
        margin-top: 0;
        display: flex;
        align-items: stretch;
        height: auto;
    }
    .popup-image-panel img {
        height: 100%;
        object-fit: cover;
        max-height: 100%;
    }

    .popup-close-btn {
        top: 1rem;
        right: 1rem;
    }
}
