@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap');

*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;

    /* Background */
    background-image: url("../../assets/img/zakatsrc/bgHijau.png");
    background-size: cover;          /* Make background fill entire area */
    background-position: center;     /* Center the image */
    background-repeat: no-repeat;    /* Prevent repeating */
}


.box {
    position: relative;
    width: 100%;
    max-width: 1020px;
    height: 640px;
    background: linear-gradient(135deg, #4caf4f9e, #2e7d328a);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 15% 0;
    box-shadow: 0 60px 40px -30px rgba(0, 0, 0, 0.27);
    overflow: hidden;
}


.inner-box {
    position: absolute;
    width: calc(100% - 4.1rem);
    height: calc(100% - 4.1rem);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forms-wrap {
    position: absolute;
    height: 100%;
    width: 45%;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    transition: 0.8s ease-in-out;
}

form {
    max-width: 260px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    transition: opacity 0.02s 0.4s;
}

form.sign-up-form {
    opacity: 0;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 250px;
    margin-right: 0.3rem;
}

.heading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.heading h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.heading h4 {
    color: #bababa;
    font-size: 0.95rem;
    font-weight: 400;
    text-align: center;
    padding: 0 1rem;
}

.heading h6 {
    color: #267d63;
    font-weight: 400;
    font-size: 0.75rem;
    display: inline;
}

.toggle {
    color: #151111;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.3s;
}

.toggle:hover {
    color: #267d63;
}

.input-wrap {
    position: relative;
    height: 37px;
    margin-bottom: 2rem;
}

.input-field {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    border-bottom: 1px solid #e5e1e1;
    padding: 0;
    font-size: 0.95rem;
    color: #151111;
    transition: 0.4s;
}

label {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: .95rem;
    color: #e5e1e1;
    pointer-events: none;
    transition: 0.4s;
}

.input-field.active {
    border-bottom-color: #11604a;
}

.input-field.active + label {
    font-size: .75rem;
    top: -2px;
    color: #11604a;
}

.sign-btn {
    display: inline-block;
    width: 100%;
    height: 43px;
    background-color: #151111;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 0.8rem;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    transition: .3s;
}

.sign-btn:hover {
    background: #267d63;
}

.text {
    color: #ffecec;
    font-size: 0.7rem;
    text-align: center;
}

.text a {
    color: #151111;
    text-decoration: none;
    transition: 0.3s;
}

.text a:hover {
    color: #267d63;
}

.carousel {
    position: absolute;
    height: 100%;
    width: 55%;
    left: 45%;
    top: 0;
    border-radius: 15% 0;
    overflow: hidden;
    transition: 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                0 6px 20px rgba(0, 0, 0, 0.19);
}


.images-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

.image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    opacity: 1;
    transition: opacity 0.5s, transform 0.5s;
}

/* dark gradient overlay for clarity */
.carousel::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 50%;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index: 1;
}

.text-slider {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
}

.text-slider h2 {
    font-size: 1.6rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); /* makes text pop */
    letter-spacing: 1px;
    margin: 0;
}

.bullets {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bullets span {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.bullets span.active {
    width: 1.1rem;
    background-color: #fff;
    border-radius: 1rem;
}

/* Popup styling */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.popup-overlay.show {
    opacity: 1;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s;
}

.popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Responsive Design */
@media (max-width: 850px) {
    .box {
        height: auto;
        max-width: 550px;
        overflow: hidden;
        border-radius: 35% 0;
    }

    .inner-box {
        position: static;
        transform: none;
        width: revert;
        height: revert;
        padding: 2rem;
    }

    .forms-wrap {
        position: revert;
        width: 100%;
        height: auto;
    }

    form {
        max-width: revert;
        padding: 1.5rem 2.5rem 2rem;
        transition: transform 0.8s ease-in-out, opacity 0.45s linear;
    }

    /* .heading {
        margin: 2rem 0;
    } */

    form.sign-up-form {
        transform: translateX(100%);
    }

    .carousel {
        display:none !important;
        position: revert;
        height: auto;
        width: 100%;
        padding: 3rem 2rem;
        display: flex;
        margin-top: 1rem;
    }

    .images-wrapper {
        display: none;
    }

    .text-slider {
        width: 100%;
    }
}

@media (max-width: 530px) {
    main {
        padding: 1rem;
    }

    .box {
        border-radius: 2rem;
        width: 100%;
    }

    .inner-box {
        padding: 1rem;
        width: 100%;
    }
    
    .forms-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .carousel {
        display: none;
        padding: 1.5rem 1rem;
        border-radius: 1.6rem;
    }

    .text-wrap {
        margin-bottom: 1rem;
    }

    .text-group h2 {
        display: none;
        font-size: 1.2rem;
    }

    form {
        padding: 1rem 1.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .logo img {
        max-width: 200px;
    }
    
    .heading h2 {
        font-size: 1.2rem;
    }
    
    .input-wrap {
        margin-bottom: 1.5rem;
    }
}