/* ============================
   MODAL BACKDROP
============================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 21, 35, 0.55);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    z-index: 9999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity .35s ease;
}

.modal.show {
    display: flex;
    align-items: baseline;
    justify-content: center;
    opacity: 1;
}

/* ============================
   MODAL CONTAINER – DESKTOP / TABLET
============================ */
.modal__container {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    margin: 40px 20px;

    box-shadow:
        0 12px 42px rgba(0, 32, 66, 0.14),
        0 4px 14px rgba(0, 0, 0, 0.08);

    position: relative;
    padding: 1.5rem;

    /* desktop animation (fade + pop) */
    opacity: 0;
    transform: translateY(50px) scale(.95);
    animation: revliModalIn .45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================
   DESKTOP ANIMATION
============================ */
@keyframes revliModalIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-4px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================
   INPUT FIELDS (unchanged)
============================ */
.input-field {
    width: 100%;
    border: 1px solid #e0e6ef;
    border-radius: 10px;
    padding: .875rem 1rem;
    font-size: .95rem;
    background: #f9fbff;
    transition: all .25s ease;
    color: #1E293B;
}

.input-field:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.input-field:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.input-field-label {
    display: block;
    font-size: .82rem;
    color: #475569;
    font-weight: 500;
    margin-bottom: .45rem;
}

/* ============================
   CLOSE ICON
============================ */
.modal__close-icon {
    cursor: pointer;
    position: absolute;
    top: 40px;
    right: 40px;
    opacity: .55;
    transition: opacity .25s ease, transform .25s ease;
}

.modal__close-icon:hover {
    opacity: 1;
    transform: scale(1.08) rotate(4deg);
}

/* ============================
   BOTTOM SHEET – MOBILE (≤768px)
============================ */
@media (max-width: 768px) {
    /* Backdrop still full-screen, but content is at bottom */
    .modal.show {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .modal__container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 1.25rem;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);

        max-height: 90vh;
        overflow-y: auto;

        /* override desktop animation */
        animation: none;

        /* bottom sheet OFF-SCREEN by default */
        transform: translateY(100%);
        opacity: 1;
        transition: transform .45s cubic-bezier(0.16, 1, 0.3, 1), opacity .3s ease-out;
    }

    /* when modal has .show → slide sheet up */
    .modal.show .modal__container {
        transform: translateY(0);
    }

    .modal__close-icon {
        top: 16px;
        right: 16px;
        width: 22px;
        height: 22px;
    }
}

/* even smaller phones – tweak padding slightly */
@media (max-width: 420px) {
    .modal__container {
        padding: 1rem;
    }
}

/* ============================
   BENEFIT SECTION FIVE – DESKTOP IMAGE OFFSET
============================ */
@media (min-width: 1024px) {
    .benefit-five-image-offset {
        transform: matrix3d(1, 0, 1, 0, 0, 1, 39, 0, -12, 33, 41, 13, 62, 28, 0, 1);
    }
}

/* Benefit Section Seven layout */
.benefit-seven-right {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.benefit-seven-squares {
    position: absolute;
    top: 2.5rem;
    right: -1.5rem;
    display: none;
    z-index: 0;
}

.benefit-seven-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

@media (min-width: 640px) {
    .benefit-seven-squares {
        display: block;
    }
}

@media (min-width: 1024px) {
    .benefit-seven-right-wrap {
        padding-top: 0 !important;
    }

    .benefit-seven-right {
        transform: translate(93px, 90px);
        align-items: flex-end;
        gap: 2rem;
        padding-right: 34px;
    }

    .benefit-seven-top {
        align-self: flex-end;
        position: relative;
        z-index: 1;
    }

    .benefit-seven-bottom {
        transform: translate(5px, -30px);
        align-self: flex-end;
        position: relative;
        z-index: 1;
    }
}
