/* ----------------------------------------------------------------
	Custom CSS

	Add all your Custom Styled CSS here for New Styles or
	Overwriting Default Theme Styles for Better Handling Updates
-----------------------------------------------------------------*/

/* ----------------------------------------------------------------
	CSS-Only Carousel (works without JavaScript)
	Uses radio buttons and :checked selector for navigation
-----------------------------------------------------------------*/
.css-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.css-carousel .carousel-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.css-carousel .carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    /* Auto-advance animation: 9s total cycle (3s per slide for 3 slides) */
    animation: carousel-auto-advance 9s infinite;
}

/* Pause auto-advance on hover for better UX */
.css-carousel:hover .carousel-slides {
    animation-play-state: paused;
}

/* Auto-advance keyframes for 3 slides */
@keyframes carousel-auto-advance {
    0%, 30% { transform: translateX(0%); }
    33.33%, 63.33% { transform: translateX(-100%); }
    66.66%, 96.66% { transform: translateX(-200%); }
    100% { transform: translateX(0%); }
}

.css-carousel .carousel-slide {
    min-width: 100%;
    position: relative;
}

.css-carousel .carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #1a1a1a;
    display: block;
}

.css-carousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 1.5rem 1rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
}

.css-carousel .carousel-nav {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.css-carousel .carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.css-carousel .carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Slide navigation using :checked selector - overrides auto-advance when user interacts */
.css-carousel .carousel-radio:nth-of-type(1):checked ~ .carousel-slides {
    animation: none;
    transform: translateX(0%);
}

.css-carousel .carousel-radio:nth-of-type(2):checked ~ .carousel-slides {
    animation: none;
    transform: translateX(-100%);
}

.css-carousel .carousel-radio:nth-of-type(3):checked ~ .carousel-slides {
    animation: none;
    transform: translateX(-200%);
}

/* Active dot styling */
.css-carousel .carousel-radio:nth-of-type(1):checked ~ .carousel-nav label:nth-of-type(1),
.css-carousel .carousel-radio:nth-of-type(2):checked ~ .carousel-nav label:nth-of-type(2),
.css-carousel .carousel-radio:nth-of-type(3):checked ~ .carousel-nav label:nth-of-type(3) {
    background: #fff;
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .css-carousel .carousel-slide img {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .css-carousel .carousel-slide img {
        height: 350px;
    }
    
    .css-carousel .carousel-caption {
        font-size: 0.85rem;
        padding: 1rem 0.75rem 0.75rem;
    }
}

