/* =========================================================
   PARTNERS IN HOMECARE SERVICES
   HOME PAGE PROMOTIONAL POPUP
   Responsive + Animated
   ========================================================= */


/* ---------------------------------------------------------
   POPUP OVERLAY
   --------------------------------------------------------- */

#popup {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background: rgba(0, 0, 0, 0.62);

    box-sizing: border-box;

    animation: popupOverlayFade 0.35s ease-out both;
}


/* ---------------------------------------------------------
   POPUP BOX
   --------------------------------------------------------- */

#popup .popup_box {
    position: relative;

    width: min(1100px, 94vw);
    max-height: 90vh;

    overflow-y: auto;
    overflow-x: hidden;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.30);

    padding: 45px 48px;

    box-sizing: border-box;

    animation: popupBoxEnter 0.45s cubic-bezier(.22, 1, .36, 1) both;
}


/* ---------------------------------------------------------
   CLOSE BUTTON
   --------------------------------------------------------- */

#popup .close_popup {
    position: absolute;

    top: 15px;
    right: 15px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #7a6025;
    color: #ffffff;

    font-size: 21px;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    z-index: 10;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

#popup .close_popup:hover {
    transform: rotate(90deg) scale(1.08);

    background: #9bc956;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.20);
}

#popup .close_popup:focus {
    outline: 3px solid rgba(155, 201, 86, 0.45);
    outline-offset: 3px;
}


/* ---------------------------------------------------------
   TITLE
   --------------------------------------------------------- */

#popup .popup_box h2 {
    width: 68%;

    margin: 0 0 18px;

    color: #1f1f1f;

    font-size: clamp(25px, 3vw, 38px);

    font-weight: 700;

    line-height: 1.2;
}


/* ---------------------------------------------------------
   PARAGRAPH
   --------------------------------------------------------- */

#popup .popup_box p {
    width: 65%;

    margin: 0 0 22px;

    color: #333333;

    font-size: clamp(15px, 1.5vw, 18px);

    line-height: 1.6;
}

#popup .popup_box p mark {
    background: transparent;

    color: #7a6025;

    font-weight: 700;
}


/* ---------------------------------------------------------
   LIST
   --------------------------------------------------------- */

#popup .popup_box ul {
    width: 65%;

    margin: 0 0 25px;
    padding: 0;

    list-style: none;
}

#popup .popup_box ul li {
    position: relative;

    margin: 0 0 13px;

    padding-left: 37px;

    color: #333333;

    font-size: clamp(14px, 1.4vw, 17px);

    line-height: 1.4;
}


/* Green checkmark */

#popup .popup_box ul li::before {
    content: "✓";

    position: absolute;

    left: 0;
    top: -2px;

    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #9bc956;

    border-radius: 5px;

    color: #9bc956;

    font-size: 18px;
    font-weight: 700;

    line-height: 1;
}


/* ---------------------------------------------------------
   SUBHEADING
   --------------------------------------------------------- */

#popup .popup_box h3 {
    width: 65%;

    margin: 25px 0 20px;

    color: #111111;

    font-size: clamp(19px, 2vw, 25px);

    line-height: 1.35;
}


/* ---------------------------------------------------------
   REGISTER BUTTON
   --------------------------------------------------------- */

#popup .popup_box .reg_txt {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 255px;
    min-height: 56px;

    padding: 14px 28px;

    box-sizing: border-box;

    border-radius: 30px;

    background: #7a6025;

    color: #ffffff !important;

    font-size: 17px;
    font-weight: 700;

    text-align: center;
    text-decoration: none;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

#popup .popup_box .reg_txt:hover {
    transform: translateY(-3px);

    background: #9bc956;

    color: #ffffff !important;

    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.20);
}

#popup .popup_box .reg_txt:active {
    transform: translateY(0);
}


/* ---------------------------------------------------------
   POPUP IMAGE
   --------------------------------------------------------- */

#popup .popup_img {
    position: absolute;

    right: 0;
    bottom: 0;

    width: 42%;
    max-width: 480px;

    pointer-events: none;
}

#popup .popup_img figure {
    margin: 0;

    padding: 0;
}

#popup .popup_img img {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;

    border: 0;
}


/* ---------------------------------------------------------
   ENTRANCE ANIMATIONS
   --------------------------------------------------------- */

@keyframes popupOverlayFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


@keyframes popupBoxEnter {
    from {
        opacity: 0;

        transform:
            translateY(25px)
            scale(0.94);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media only screen and (max-width: 900px) {

    #popup {
        padding: 20px;
    }

    #popup .popup_box {
        width: min(720px, 94vw);

        padding: 40px 35px;
    }

    #popup .popup_box h2,
    #popup .popup_box p,
    #popup .popup_box ul,
    #popup .popup_box h3 {
        width: 58%;
    }

    #popup .popup_img {
        width: 43%;
    }
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media only screen and (max-width: 700px) {

    #popup {
        align-items: center;

        padding: 15px;
    }

    #popup .popup_box {
        width: 100%;
        max-width: 520px;

        max-height: 92vh;

        padding: 0 22px 28px;

        border-radius: 16px;
    }


    /* Image moves to the top */

    #popup .popup_img {
        position: relative;

        right: auto;
        bottom: auto;

        width: calc(100% + 44px);
        max-width: none;

        margin-left: -22px;

        margin-bottom: 25px;
    }


    #popup .popup_img img {
        width: 100%;
    }


    /* Close button */

    #popup .close_popup {
        top: 12px;
        right: 12px;

        width: 40px;
        height: 40px;

        background: #7a6025;
    }


    /* Text becomes full width */

    #popup .popup_box h2,
    #popup .popup_box p,
    #popup .popup_box ul,
    #popup .popup_box h3 {
        width: 100%;
    }


    #popup .popup_box h2 {
        margin-bottom: 15px;

        font-size: 27px;
    }


    #popup .popup_box p {
        font-size: 16px;

        line-height: 1.55;
    }


    #popup .popup_box ul {
        margin-bottom: 20px;
    }


    #popup .popup_box ul li {
        padding-left: 34px;

        margin-bottom: 12px;

        font-size: 15px;
    }


    #popup .popup_box h3 {
        margin-top: 20px;

        font-size: 20px;
    }


    /* Full-width button */

    #popup .popup_box .reg_txt {
        display: flex;

        width: 100%;
        min-width: 0;

        min-height: 54px;

        font-size: 16px;
    }
}


/* ---------------------------------------------------------
   SMALL PHONES
   --------------------------------------------------------- */

@media only screen and (max-width: 400px) {

    #popup {
        padding: 10px;
    }

    #popup .popup_box {
        max-height: 94vh;

        padding: 0 18px 22px;

        border-radius: 14px;
    }

    #popup .popup_img {
        width: calc(100% + 36px);

        margin-left: -18px;

        margin-bottom: 20px;
    }

    #popup .popup_box h2 {
        font-size: 24px;
    }

    #popup .popup_box p {
        font-size: 15px;
    }

    #popup .popup_box ul li {
        font-size: 14px;

        padding-left: 31px;
    }

    #popup .popup_box h3 {
        font-size: 18px;
    }

    #popup .popup_box .reg_txt {
        min-height: 50px;

        font-size: 15px;
    }
}


/* ---------------------------------------------------------
   ACCESSIBILITY
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    #popup,
    #popup .popup_box {
        animation: none;
    }

    #popup .close_popup,
    #popup .popup_box .reg_txt {
        transition: none;
    }
}