/* =========================================================
   RELIANCE ACADEMY HOME POPUP
========================================================= */

.home-popup-overlay {

    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 24px;

    background:
        rgba(5, 8, 20, 0.76);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .35s ease,
        visibility .35s ease;

}


.home-popup-overlay.active {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

}


/* =========================================================
   MAIN POPUP
   ALWAYS LEFT IMAGE + RIGHT CONTENT
========================================================= */

.home-popup-box {

    position: relative;

    width: min(1120px, 94vw);

    height: min(680px, 88vh);

    min-height: 480px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(360px, .95fr);

    overflow: hidden;

    border-radius: 26px;

    background: #ffffff;

    box-shadow:
        0 40px 120px
        rgba(0, 0, 0, .48);

    transform:
        translateY(30px)
        scale(.94);

    transition:
        transform .55s
        cubic-bezier(.16, 1, .3, 1);

}


.home-popup-overlay.active
.home-popup-box {

    transform:
        translateY(0)
        scale(1);

}


/* =========================================================
   LEFT IMAGE
========================================================= */

.home-popup-image-side {

    position: relative;

    width: 100%;

    height: 100%;

    min-height: 480px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            #252a38 0%,
            #11141d 55%,
            #090b11 100%
        );

}


/* subtle image background */

.home-popup-image-side::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, .10),
            transparent 45%,
            rgba(168, 85, 247, .08)
        );

    pointer-events: none;

}


/* ACTUAL IMAGE */

.home-popup-image {

    position: relative;

    z-index: 2;

    display: block;

    width: 100%;

    height: 100%;

    object-fit: contain;

    object-position: center;

}


/* =========================================================
   RIGHT CONTENT
========================================================= */

.home-popup-content {

    position: relative;

    z-index: 3;

    display: flex;

    flex-direction: column;

    justify-content: center;

    overflow-y: auto;

    padding:
        60px 58px;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #fbfcff 55%,
            #f5f7fb 100%
        );

}


/* =========================================================
   KICKER
========================================================= */

.home-popup-kicker {

    position: relative;

    display: flex;

    align-items: center;

    gap: 10px;

    width: max-content;

    margin-bottom: 20px;

    color: #2563eb;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 3px;

    text-transform: uppercase;

    animation:
        popupKickerIn .8s ease both;

}


.home-popup-kicker::before {

    content: "";

    width: 30px;

    height: 2px;

    background: #2563eb;

    animation:
        popupLineBlink 1.8s
        ease-in-out
        infinite;

}


/* =========================================================
   TITLE
========================================================= */

.home-popup-title {

    position: relative;

    margin: 0 0 20px;

    line-height: 1.03;

    font-weight: 800;

    letter-spacing: -2px;

    word-break: break-word;

    animation:
        popupTitleIn .8s
        cubic-bezier(.16,1,.3,1)
        both;

}


/* animated shine */

.home-popup-title::after {

    content: "";

    position: absolute;

    left: 0;

    bottom: -7px;

    width: 70px;

    height: 3px;

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            #2563eb,
            #7c3aed,
            transparent
        );

    animation:
        popupUnderline 2s
        ease-in-out
        infinite;

}


/* =========================================================
   DESCRIPTION
========================================================= */

.home-popup-description {

    margin: 0;

    line-height: 1.8;

    white-space: pre-line;

    word-break: break-word;

    animation:
        popupTextIn 1s
        .15s
        ease both;

}


/* =========================================================
   TEXT BLINK / PULSE
========================================================= */

.home-popup-description::first-line {

    animation:
        popupTextPulse 2.5s
        ease-in-out
        infinite;

}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.home-popup-close {

    position: absolute;

    top: 16px;

    right: 16px;

    z-index: 20;

    width: 46px;

    height: 46px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid
        rgba(17,24,39,.10);

    border-radius: 50%;

    background:
        rgba(255,255,255,.94);

    color: #111827;

    font-size: 23px;

    cursor: pointer;

    box-shadow:
        0 7px 25px
        rgba(0,0,0,.15);

    transition:
        transform .25s ease,
        background .25s ease,
        color .25s ease;

}


.home-popup-close:hover {

    background: #111827;

    color: #ffffff;

    transform:
        rotate(90deg)
        scale(1.05);

}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes popupKickerIn {

    from {

        opacity: 0;

        transform:
            translateX(-20px);

    }

    to {

        opacity: 1;

        transform:
            translateX(0);

    }

}


@keyframes popupTitleIn {

    from {

        opacity: 0;

        transform:
            translateY(25px)
            scale(.96);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


@keyframes popupTextIn {

    from {

        opacity: 0;

        transform:
            translateY(18px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


@keyframes popupLineBlink {

    0%,
    100% {

        opacity: .35;

        transform:
            scaleX(.65);

    }

    50% {

        opacity: 1;

        transform:
            scaleX(1);

    }

}


@keyframes popupUnderline {

    0%,
    100% {

        opacity: .45;

        width: 55px;

    }

    50% {

        opacity: 1;

        width: 105px;

    }

}


@keyframes popupTextPulse {

    0%,
    100% {

        opacity: .82;

    }

    50% {

        opacity: 1;

    }

}


/* =========================================================
   BODY LOCK
========================================================= */

body.home-popup-open {

    overflow: hidden !important;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 850px) {

    .home-popup-overlay {

        padding: 10px;

    }


    .home-popup-box {

        width: 96vw;

        height: 92vh;

        min-height: 0;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(250px, .9fr);

        border-radius: 21px;

    }


    .home-popup-content {

        padding:
            40px 28px;

    }


    .home-popup-title {

        letter-spacing:
            -1.2px;

    }


    .home-popup-close {

        width: 42px;

        height: 42px;

        top: 10px;

        right: 10px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 600px) {

    .home-popup-box {

        width: 97vw;

        height: 90vh;

        grid-template-columns:
            minmax(0, .95fr)
            minmax(190px, .85fr);

        border-radius: 18px;

    }


    .home-popup-content {

        padding:
            40px 20px 30px;

    }


    .home-popup-kicker {

        font-size: 9px;

        letter-spacing: 1.7px;

        gap: 6px;

    }


    .home-popup-kicker::before {

        width: 18px;

    }


    .home-popup-title {

        letter-spacing:
            -.8px;

        margin-bottom: 16px;

    }


    .home-popup-description {

        line-height: 1.6;

    }


    .home-popup-close {

        width: 38px;

        height: 38px;

        font-size: 19px;

    }

}


/* =========================================================
   VERY SMALL DEVICES
========================================================= */

@media (max-width: 400px) {

    .home-popup-box {

        grid-template-columns:
            minmax(0, .9fr)
            minmax(165px, .8fr);

    }


    .home-popup-content {

        padding:
            38px 16px 24px;

    }

}