/* Carousel Block Styles */

.carousel-wrapper {
    position: relative;
    z-index: 3;
    overflow: hidden;
}

.carousel-slider {
    overflow: visible; /* Allow slides to hang off screen */
}

/* Carousel Cell (Individual Slide) */
.carousel-cell {
    margin-right: 10px;
    position: relative;
}

/* Carousel Slide Background */
.carousel-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
}

/* Bottom Overlay with Content */
.carousel-overlay {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: auto; /* Height adjusts to content */
}

.carousel-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}

.carousel-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.carousel-button {
    margin-top: 8px;
}

.carousel-block button {
	background:unset !important;
}


.carousel-block button svg {
    width: 74px;
    height: 74px;
    max-width: 74px;
    max-height: 74px;
}

.carousel-block button svg path {
  fill:white !important;
}

.carousel-flex {
    display: flex;
    align-items: center;
}

.carousel-flex .carousel-container {
    margin-right: auto;
    width:600px;
}

/* Flickity Navigation Overrides */
.carousel-block .flickity-prev-next-button {
    top: 50%;
    width: 74px;
    height: 74px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translateY(-50%);
    padding: 0 !important;
}

.carousel-block .flickity-prev-next-button:hover {
    background: rgba(255, 255, 255, 1);
}

.carousel-block .flickity-prev-next-button.previous {
    left: 20px;
}

.carousel-block .flickity-prev-next-button.next {
    right: 40px;
}

/* Navigation Dots */
.carousel-block .flickity-page-dots {
    bottom: 20px;
    position: absolute;
    z-index: 4;
}

.carousel-block .flickity-page-dots .dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 6px;
}

.carousel-block .flickity-page-dots .dot.is-selected {
    background: rgba(255, 255, 255, 1);
}

/* Responsive Design */
@media (max-width: 1440px) {
    .carousel-cell {
        width: 850px;
        height: 850px;
    }
}

@media (max-width: 1024px) {
    .carousel-cell {
        width: 700px;
        height: 700px;
        margin-right: 15px;
    }
    
    .carousel-overlay {
        padding: 30px;
        gap: 12px;
    }
    
    .carousel-title {
        font-size: 1.75rem;
    }
    
    .carousel-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    .carousel-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .carousel-overlay {
        padding: 20px 20px 60px !important;
    }

    .carousel-flex .carousel-container {
        margin-right: auto;
        width: 100%;
    }

    .carousel-cell {
        width: 90vw;
        height: 90vw;
        max-width: 500px;
        max-height: 700px;
        margin-right: 10px;
    }
    
    .carousel-overlay {
        padding: 20px;
        gap: 10px;
    }
    
    .carousel-title {
        font-size: 22px !important;
    }
    
    
    .carousel-block .flickity-prev-next-button {
        display:none;
    }
    
    .carousel-block .flickity-prev-next-button.previous {
        left: 10px;
    }
    
    .carousel-block .flickity-prev-next-button.next {
        right: 10px;
    }
    #carousel-850-1 .flickity-viewport {
        overflow: visible;
        margin-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .carousel-cell {
        width: 100% !important;
        min-height: 500px;
        max-width: 100% !important;
        max-height: 600px;
    }
    
    .carousel-overlay {
        padding: 16px;
        gap: 8px;
    }
    
    .carousel-title {
        margin-bottom:8px;
    }
    
    .carousel-text {
        margin-bottom:8px;
    }
}

/* Ensure proper slide hang-off for larger screens */
@media (min-width: 1600px) {
    /* Slides will naturally hang off at 1440px viewport, 
       but extend properly on larger screens */
    .carousel-wrapper {
        padding-right: 0px; /* Extra space for overhanging slides */
    }
}