@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background-color: #111111;
    position: relative; /* Ensure relative positioning for centering modal */
}

.carousel {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    max-height: 400px; /* Ensure maximum height to prevent oversized media */
    border-radius: 9px;
    box-shadow: 10px 10px 35px 0px rgba(0, 0, 0, 0.35);
    position: relative;
}

.carousel-videos {
    display: flex;
    overflow: hidden; 
    border-radius: 11px;
    width: 100%;
    height: 100%; /* Ensure the height scales correctly */
}

.carousel-media {
    transition: all 0.9s;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure the media fits within the container */
    width: 100%;
    transform: translateX(0);
    cursor: pointer; /* To indicate that the media is clickable */
}

.btn-left,
.btn-right {
    height: 3rem;
    width: 3rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.449);
    border: none;
    position: absolute;
    cursor: pointer;
    opacity: 0.75;
    transition: all 0.25s;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
}

.btn-left:hover,
.btn-right:hover {
    opacity: 1;
}

.btn-left {
    top: 50%;
    left: -1.5rem;
    transform: translateY(-50%);
    color: #ffffff; /* Color for left button text */
}

.btn-right {
    top: 50%;
    right: -1.5rem;
    transform: translateY(-50%);
    color: #ffffff; /* Color for right button text */
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80%; /* Increase width to cover more screen area */
    height: 80%; /* Increase height to cover more screen area */
    max-width: 600px; /* Ensure maximum width */
    max-height: 600px; /* Ensure maximum height */
    background-color: rgba(0, 0, 0, 0); /* Adjust opacity for prominence */
    padding: 20px;
    border-radius: 10px;
    color: #fff;
}

.modal-content {
    background-color: #111111;
    padding: 20px;
    border: 0.1px solid #ffffff;
    border-radius: 10px;
    color: #fff;
    overflow-y: auto; /* Ensure content is scrollable if it overflows */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.modal-content ul {
    list-style-type: none;
    padding: 0;
}

.modal-content ul li {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.5;
}

.modal-content ul li strong {
    font-weight: bold;
}

/* Overlay button styles */
.overlay-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.449);
    border: none;
    cursor: pointer;
    opacity: 0.75;
    transition: all 0.25s;
    font-size: 24px;
    color: #fff;
    z-index: 11; /* Ensure button is above other elements */
}

.overlay-button:hover {
    opacity: 1;
}

/* Media Queries */
@media (max-width: 768px) {
    .carousel {
        width: 90%;
        max-width: 400px;
        max-height: 300px;
    }

    .carousel-media {
        max-width: 100%;
        max-height: 100%;
    }

    .btn-left {
        height: 2.5rem;
        width: 2.5rem;
        font-size: 1.5rem;
        left: -1rem;
    }

    .btn-right {
        height: 2.5rem;
        width: 2.5rem;
        font-size: 1.5rem;
        right: -1rem;
    }

    .modal {
        width: 90%;
        height: 90%;
    }

    .modal-content {
        width: 100%;
    }

    .modal-content h2 {
        font-size: 20px;
    }

    .modal-content ul li {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .carousel {
        width: 100%;
        max-width: 300px;
        max-height: 200px;
    }

    .carousel-media {
        max-width: 100%;
        max-height: 100%;
    }

    .btn-left {
        height: 2rem;
        width: 2rem;
        font-size: 1.2rem;
        left: -0.5rem;
    }

    .btn-right {
        height: 2rem;
        width: 2rem;
        font-size: 1.2rem;
        right: -0.5rem;
    }

    .modal {
        width: 100%;
        height: 100%;
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        padding: 10px;
    }

    .modal-content h2 {
        font-size: 18px;
    }

    .modal-content ul li {
        font-size: 14px;
    }

    .close-button {
        font-size: 24px;
    }
}
