/* Carousel background color */
.carousel {
    background: #fff;
}

.mobile-cell img,
.desktop-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Adjusts image to cover the container, preserving aspect ratio */
}

.desktop-cell img {
    height: 100%;
}

/* Mobile buttons */
.flickity-prev-next-button {
    width: 30px;
    height: 30px;
    background: transparent;
}

/* arrow color */
.flickity-prev-next-button .arrow {
    fill: white;
}

.flickity-prev-next-button.no-svg {
    color: white;
}

.flickity-prev-next-button:hover {
    background: transparent;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0.9)
    );
    z-index: 1; /* Places the overlay above the background image */
}

/* Outer container */
.carousel-detail {
    position: absolute;
    bottom: 0; /* Aligns to the bottom of the cell */
    left: 0;
    right: 0;
    padding: 2rem;
    margin-left: 6.5rem; /* Adds left margin */
    margin-right: 6.5rem; /* Adds left margin */
    z-index: 2; /* Places the detail above the overlay */
    color: white;
    text-decoration: none;
}

/* Content styling */
.carousel-content {
    display: flex;
    flex-direction: column;
}

/* Text styles */
.carousel-featured,
.carousel-date-category,
.carousel-title {
    color: white;
}

/* Dark Mode */
[data-bs-theme="dark"] {
    /* arrow color */
    .flickity-prev-next-button .arrow {
        fill: #eda720;
    }
    .flickity-prev-next-button.no-svg {
        color: #eda720;
    }
}

/* Samsung Galaxy S Ultra Width */
@media screen and (max-width: 767px) {
    /* half-width cells for larger devices */
    .mobile-carousel {
        display: block;
    }

    .mobile-cell {
        display: block;
        width: 100%;
        height: 480px;
        border-radius: 5px;
        counter-increment: gallery-cell;
    }

    .desktop-carousel,
    .desktop-cell {
        display: none;
    }

    .carousel-detail {
        padding: 1rem; /* Reduce padding */
        margin-left: 1.5rem; /* Remove left margin */
        margin-right: 1.5rem; /* Remove right margin */
    }

    .carousel-featured {
        font-size: 0.7rem; /* Smaller font for featured text */
    }

    .carousel-title {
        font-size: 1rem; /* Smaller font for title */
        line-height: 1.2;
    }

    .carousel-date-category {
        font-size: 0.7rem; /* Smaller font for date and category */
    }
}

/* iPhone Pro Max */
@media screen and (min-width: 430px) {
    .mobile-cell {
        height: 500px;
    }
}

/* Responsive Breakpoint */
/* Mobile and tablet portrait width */
/* Responsive Breakpoint */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    /* half-width cells for larger devices (use mobile) */
    .mobile-carousel {
        display: block;
    }

    .mobile-cell {
        display: block;
        height: 850px;
        border-radius: 5px;
        counter-increment: gallery-cell;
    }

    .flickity-prev-next-button {
        width: 50px;
        height: 50px;
        background: transparent;
    }

    .desktop-carousel,
    .desktop-cell {
        display: none;
    }

    .carousel-detail {
        padding: 1rem; /* Reduce padding */
        margin-left: 1.5rem; /* Remove left margin */
        margin-right: 1.5rem; /* Remove right margin */
    }

    .carousel-featured {
        font-size: 0.7rem; /* Smaller font for featured text */
    }

    .carousel-title {
        font-size: 1rem; /* Smaller font for title */
        line-height: 1.2;
        font-weight: bold;
    }

    .carousel-date-category {
        font-size: 0.7rem; /* Smaller font for date and category */
    }
}

/* Desktop and table landscape width */
/* Responsive Breakpoint */
@media screen and (min-width: 1024px) {
    /* half-width cells for larger devices */
    .desktop-carousel {
        display: block;
    }

    .desktop-cell {
        width: 100%;
        border-radius: 5px;
        counter-increment: gallery-cell;
        display: block;
        height: 550px;
    }

    .flickity-prev-next-button {
        width: 55px;
        height: 55px;
        background: transparent;
    }

    .mobile-carousel,
    .mobile-cell {
        display: none;
    }

    /* Desktop carousel styles */
    .carousel-featured {
        font-size: 1rem;
    }

    .carousel-title {
        font-weight: bold;
        font-size: 2.25rem; /* equivalent to text-4xl */
        line-height: 45px;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .carousel-date-category {
        font-size: 1rem;
    }
}

/* Responsive Breakpoint */
@media screen and (min-width: 1600px) {
    /* half-width cells for larger devices */
    .desktop-cell {
        height: 750px;
    }

    .flickity-prev-next-button {
        width: 60px;
        height: 60px;
        background: transparent;
    }
}
