/* Base styles for the login page */
body,
html {
    height: 100%;
    margin: 0;
}

.login-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-content {
    flex: 1;
    display: flex;
}

/* Login carousel specific styles */
.login-carousel {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    /* Ensure proper positioning context */
}

.login-carousel .carousel-inner {
    height: 100%;
    /* Full height */
    position: relative;
}

.login-carousel .carousel-item {
    height: 100vh;
    position: absolute;
    /* Position absolute to prevent layout shifts */
    top: 0;
    left: 0;
    width: 100%;
    transition: transform .6s ease-in-out;
    /* Smoother transition */
    backface-visibility: hidden;
    /* Prevent flickering */
    perspective: 1000px;
}

.login-carousel .carousel-item.active {
    position: relative;
    /* Active item with relative position */
}

.login-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.7);
}

.login-carousel .lore-text {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 10px;
    max-width: 80%;
    margin: 0 auto;
}

.login-carousel .lore-text p {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.login-carousel .welcome-text {
    font-size: 2rem;
    font-weight: 700;
    color: #ffcc00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 15px 0;
}

.login-card {
    padding: 50px;
    max-width: 400px;
    width: 100%;
}

/* Ensure carousel controls are visible */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 10px;
}

/* Improve carousel indicators position */
.carousel-indicators {
    z-index: 15;
    margin-bottom: 20px;
}

/* Media query for smaller screens */
@media (max-width: 767.98px) {
    .login-content {
        flex-direction: column;
    }

    /* Show carousel on mobile and adjust it */
    .login-carousel {
        display: block;
        height: 40vh;
        /* Reduce height on mobile */
        min-height: 250px;
    }

    .login-carousel .carousel-item {
        height: 40vh;
        min-height: 250px;
    }

    .login-carousel .lore-text {
        max-width: 95%;
        padding: 10px;
    }

    .login-carousel .lore-text p {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .login-carousel .welcome-text {
        font-size: 1.5rem;
        margin: 10px 0;
    }

    /* Make carousel indicators smaller on mobile */
    .carousel-indicators {
        margin-bottom: 5px;
    }

    .carousel-indicators button {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

    .login-card {
        padding: 20px;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Create a slight overlap between carousel and card for a nice effect */
    .login-card {
        margin-top: -20px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        z-index: 5;
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    }
}