/* header dashboard */
.navbar {
    background-color: #d8d8d8;
    border-radius: 20px;
}

.btn-login-default {
    background-color: #3fa2f6;
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.3s background-color;
}

.btn-login-admin {
    background-color: #ff204e;
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.3s background-color;
}

.btn-login-user {
    background-color: #5debd7;
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.3s background-color;
}

.navbar-toggler {
    border: none;
    font-size: 1.25rem;
}

.navbar-toggler:focus,
.btn-close:focus {
    box-shadow: none;
    outline: none;
}

.nav-link {
    color: #666777;
    font-weight: 500;
    position: relative;
}

.dropdown-item:hover {
    background-color: #dadada;
    transition: 0.3s background-color;
}

.nav-link:hover,
.nav-link.active {
    color: #000;
}

@media (min-width: 991px) {
    .nav-link::before {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: #3fa2f6;
        visibility: hidden;
        transition: 0.4s ease-in-out;
    }

    .nav-link:hover::before,
    .nav-link.active::before {
        width: 100%;
        visibility: visible;
    }
}

.logo-small {
    width: 150px;
    height: auto;
}

.pad {
    padding-top: 80px;
}

/* dashboard */
.bg-cover {
    background-size: cover;
    background-position: center;
    height: 100vh;
    background-image: url("/img/BG3.png");
}

/* Mengatur agar konten berada di tengah secara horizontal dan vertikal */
.container-fluid.bg-cover {
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    justify-content: center; /* Pusatkan secara horizontal */
    align-items: center; /* Pusatkan secara vertikal */
    padding: 0;
}

.overlay {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 20px;
    min-width: 60%; /* Mengatur lebar */
    min-height: 60%; /* Mengatur tinggi */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Pusatkan isi secara vertikal */
    align-items: center; /* Pusatkan isi secara horizontal */
    text-align: center; /* Teks rata tengah */
    margin: 0 auto; /* Pastikan overlay berada di tengah */
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem; /* Tambahkan margin untuk memberi ruang antara elemen */
}

p {
    font-size: 1.25rem;
    margin-bottom: 2rem; /* Tambahkan margin untuk ruang antara elemen */
}


.content {
    color: white;
}

/* card */

:root {
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    --first-color: hsl(82, 60%, 28%);
    --title-color: hsl(0, 0%, 15%);
    --text-color: hsl(0, 0%, 35%);
    --body-color: hsl(0, 0%, 0%);
    --container-color: hsl(0, 0%, 100%);
    --h2-font-size: 1.5rem;
    --small-font-size: 0.9rem;
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: 100%;
}

/*=============== CARD & CAROUSEL ===============*/
.container {
    display: grid;
    place-items: center;
    margin-inline: 1.5rem;
    padding-block: 5rem;
}

.card__container {
    display: grid;
    row-gap: 3.5rem;
}


/* Wrapper for the cards */
.card__wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 1200px; /* Adjust as needed */
}

/* Carousel Track (holds all the cards) */

.card__article {
    position: relative;
    flex: 0 0 33.33%; /* Show 3 cards at a time */
    max-width: 33.45%;
    overflow: visible; /* Keep card within bounds */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: scale(1);
    padding: 20px;
    opacity: 0.5; /* Make surrounding cards faded */
    display: flex; /* Make it a flex container */
    justify-content: center; /* Center content horizontally */
    align-items: flex-start; /* Align items at the top (for the image) */
}

.card__img {
    max-width: 600px;
    max-height: 300px;
    border-radius: 20px;
    width: 100%; /* Make the image fill the container */
    height: 100%; /* Ensure the image scales to fill the area */
    object-fit: cover; /* Ensure image covers the area without stretching */
}

.card__data {
    position: absolute; /* Position absolutely within the card */
    bottom: 20px; /* Align the card data to the bottom of the image */
    left: 50%;
    transform: translateX(-50%); /* Center the data horizontally */
    opacity: 0;
    visibility: hidden;
    max-width: 300px;
    background-color: rgba(255, 255, 255, 0.7); /* Semi-transparent background for readability */
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.15);
    border-radius: 1rem;
    padding: 20px;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    text-align: center;
}

.card__description {
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: 0.25rem;
    color: var(--title-color);
}

.card__title {
    font-size: var(--h2-font-size);
    font-weight: 500;
    color: var(--title-color);
}

.card__button {
    text-decoration: none;
    font-size: var(--small-font-size);
    font-weight: 500;
    color: var(--first-color);
}

.card__button:hover {
    text-decoration: underline;
}

/* Carousel Container */
.carousel__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    max-width: 100%;
    margin-top: 2rem; /* Beri jarak dari teks di atas */
    overflow: hidden;
}

.card__carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* Button Styles */
.carousel__btn {
    background-color: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}

.carousel__btn--left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.carousel__btn--right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Naming animations in hover */
.card__article.active .card__data {
    animation: show-data 1s forwards;
    opacity: 1;
    visibility: visible;
}

.card__article.active {
    transform: scale(1.2); 
    opacity: 1; 
    z-index: 1; 
}
/* Card animation */
@keyframes show-data {
    50% {
        transform: translateX(-50%) translateY(100px); /* Slight upward shift for animation */
    }
    100% {
        transform: translateX(-50%) translateY(0); /* End in the final position */
    }
}

@keyframes remove-data {
    0% {
        transform: translateY(-7rem);
    }
    50% {
        transform: translateY(-10rem);
    }
    100% {
        transform: translateY(0.5rem);
    }
}


/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media (max-width: 450px) {
    /* Mengatur ukuran card secara keseluruhan */
    .card__article {
        transform: scale(0.7); /* Mengurangi ukuran card secara keseluruhan lebih kecil */
        padding: 4px;
    }

    /* Mengatur ukuran gambar di dalam card */
    .card__img {
        max-width: 130px;
        max-height: 80px;
        border-radius: 6px;
    }

    /* Mengatur ukuran teks di dalam card */
    .card__title {
        font-size: 12px !important; /* Mengecilkan ukuran judul lebih kecil */
        margin-bottom: 2px; /* Mengurangi jarak dengan deskripsi */
    }

    .card__description {
        font-size: 0.4rem; /* Mengecilkan ukuran deskripsi lebih kecil */
        margin-bottom: 4px; /* Mengurangi jarak dengan button */
    }

    /* Mengatur ukuran dan padding card data */
    .card__data {
        width: 80%;
        padding: 6px;
        bottom: 6px; /* Mengurangi jarak dari bawah */
        border-radius: 4px;
    }

    /* Mengurangi ukuran tombol di dalam card */
    .card__button {
        font-size: 0.5rem !important;
        padding: 2px 6px;
        margin-top: 2px; /* Dekatkan tombol dengan deskripsi */
    }
}

/* For medium devices */
@media (max-width: 735px) {
    /* Mengatur ukuran card secara keseluruhan */
    .card__article {
        padding: 10px;
        transform: scale(0.9); /* Mengurangi ukuran card secara keseluruhan */
    }

    /* Mengatur ukuran gambar di dalam card */
    .card__img {
        max-width: 200px;
        max-height: 150px;
        border-radius: 10px;
    }

    /* Mengatur ukuran teks di dalam card */
    .card__title {
        font-size: 1rem; /* Mengecilkan ukuran judul */
    }

    .card__description {
        font-size: 0.7rem; /* Mengecilkan ukuran deskripsi */
    }

    /* Mengatur ukuran dan padding card data */
    .card__data {
        width: 80%;
        padding: 10px;
        bottom: 10px; /* Memastikan jarak dari bawah lebih kecil */
        border-radius: 8px;
    }

    /* Mengurangi ukuran tombol di dalam card */
    .card__button {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

/* For large devices */
@media screen and (min-width: 1120px) {
    .container {
        height: 100vh;
    }

    .card__container {
        grid-template-columns: repeat(3, 1fr);
    }
    .card__img {
        width: 348px;
    }
    .card__data {
        width: 316px;
        padding-inline: 2.5rem;
    }
}


