/* Showcase Carousel Styles */
.showcase-carousel {
    position: relative;
    width: 100%;
    overflow: visible; /* Changed from hidden to visible */
}

/* Desktop scroll indicator */
/* @media (min-width: 1024px) {
    .showcase-carousel::after {
        content: "Scroll to navigate";
        position: absolute;
        bottom: 2rem;
        right: 2rem;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 4px;
        font-size: 0.875rem;
        opacity: 0.7;
        z-index: 10;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .showcase-carousel:hover::after {
        opacity: 1;
    }
} */

.showcase-carousel .swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.showcase-carousel .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.showcase-carousel .swiper-slide {
    aspect-ratio: 1157 / 755;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    width: 1150px; /* Set explicit width */
    max-width: 1150px;
    flex-shrink: 0; /* Prevent shrinking */
    
    /* Responsive height constraints - use min() to respect both aspect ratio and viewport */
    height: min(calc(1150px / 1157 * 755), 85vh);
    max-height: none;
}

/* Swiper handles spacing via spaceBetween, no manual margins needed */

/* Slide content wrapper */
.showcase-slide-content {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
}

/* Content container */
.showcase-content {
    max-width: 70%;
}

/* Subtitle styling */
.showcase-subtitle {
    font-size: 1.7rem
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin: 0.5rem 0 2rem;
}

/* Title styling with underline animation */
.showcase-title {
    font-size: clamp(30px, calc(18.86px + 2.86vw), 60px);
    position: relative;
    display: inline-block;
    margin: 0 0 1rem;
    padding-bottom: 1.25rem;
}

/* Underline animation */
.showcase-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 20px;
    height: 5px;
    background: red;
    transition: width 0.3s ease-out;
}

/* Hover and focus states for underline expansion */
.showcase-slide:hover .showcase-title::after,
.showcase-slide-content:focus .showcase-title::after {
    width: 100%;
}

/* Focus styles for accessibility */
.showcase-slide-content:focus {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

/* Last Slide */
.showcase-slide-final .showcase-slide-content {
    justify-content: center;
    align-items: center;
}
.showcase-slide-final .showcase-slide-content .showcase-content {
    display:flex;
    flex-direction: column;
    align-items: center;
}
.showcase-slide-final .showcase-slide-content .showcase-content h3::after {
    content: none; /* Remove underline for final slide */   
}

/* Dark overlay for better text readability */
/* .showcase-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    z-index: 1;
} */

/* Responsive adjustments */
@media (max-width: 1200px) {
    .showcase-carousel .swiper-slide {
        width: 95vw; /* Responsive width for medium screens */
        max-width: 1100px;
        height: min(calc(1100px / 1157 * 755), 75vh);
        max-height: none;
    }
}

@media (max-width: 1024px) {
    .showcase-carousel .swiper-slide {
        width: 800px; /* Smaller width on tablets */
        max-width: 90vw;
        aspect-ratio: 1157 / 600; /* Reduce height ratio on laptops */
        height: min(calc(800px / 1157 * 600), 65vh);
        max-height: none;
    }
    
    .showcase-slide-content {
        padding: 1.5rem;
    }
    
    .showcase-content {
        max-width: 80%;
    }
    
    /* Adjust arrow positioning for tablets */
    .showcase-carousel .swiper-button-next,
    .showcase-carousel .swiper-button-prev {
        width: 60px;
        height: 60px;
        bottom: 1.5rem;
    }
    
    .showcase-carousel .swiper-button-prev {
        right: 5rem;
    }
    
    .showcase-carousel .swiper-button-next {
        right: 1.5rem;
    }
    
    .showcase-carousel .swiper-button-next svg,
    .showcase-carousel .swiper-button-prev svg {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .showcase-carousel .swiper-slide {
        width: 600px; /* Smaller width on mobile */
        max-width: 85vw;
        aspect-ratio: 1 / 1;
        max-height: none; /* Remove height constraint on mobile */
    }
    
    .showcase-slide-content {
        padding: 1rem;
    }
    
    .showcase-subtitle {
        font-size: 1.5rem;
    }
    
    .showcase-content {
        max-width: 90%;
    }
    
    /* Adjust arrow positioning for mobile */
    .showcase-carousel .swiper-button-next,
    .showcase-carousel .swiper-button-prev {
        width: 50px;
        height: 50px;
        bottom: 1rem;
    }
    
    .showcase-carousel .swiper-button-prev {
        right: 4rem;
    }
    
    .showcase-carousel .swiper-button-next {
        right: 1rem;
    }
    
    .showcase-carousel .swiper-button-next svg,
    .showcase-carousel .swiper-button-prev svg {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .showcase-carousel .swiper-slide {
        width: 400px; /* Even smaller width on small mobile */
        max-width: 80vw;
        aspect-ratio: 3 / 4;
        max-height: none; /* Remove height constraint on small mobile */
    }
    
    /* Mobile background image class will be applied via JavaScript */
    .showcase-carousel .swiper-slide.mobile-bg-active {
        /* Background image will be set via JavaScript inline style */
    }
    
    .showcase-title::after {
        width: 15px; /* Smaller initial underline on mobile */
        height: 2px;
    }
    
    /* Further adjust arrow positioning for small mobile */
    .showcase-carousel .swiper-button-next,
    .showcase-carousel .swiper-button-prev {
        width: 40px;
        height: 40px;
        bottom: 0.75rem;
    }
    
    .showcase-carousel .swiper-button-prev {
        right: 3rem;
    }
    
    .showcase-carousel .swiper-button-next {
        right: 0.75rem;
    }
    
    .showcase-carousel .swiper-button-next svg,
    .showcase-carousel .swiper-button-prev svg {
        width: 40px;
        height: 40px;
    }
}

/* Swiper navigation customization - positioned in bottom right */
.showcase-carousel .swiper-button-next,
.showcase-carousel .swiper-button-prev {
    position: absolute;
    bottom: 0;
    transform: translateY(50%);
    width: 71px;
    height: 71px;
    margin-top: 0;
    background: transparent;
    z-index: 10;
    transition: all 0.3s ease;
    cursor: pointer;
}

@media (max-width: 480px) {
    .showcase-carousel .swiper-button-next,
    .showcase-carousel .swiper-button-prev {
        bottom: -3rem;
    }
}

.showcase-carousel .swiper-button-prev {
    right: 20rem;
    left: auto;
}

.showcase-carousel .swiper-button-next {
    right: 10rem; /* Position right arrow in bottom right corner */
    left: auto;
}

/* Remove default Swiper arrow icons */
.showcase-carousel .swiper-button-next::after,
.showcase-carousel .swiper-button-prev::after {
    display: none;
}

/* Style the SVG icons */
.showcase-carousel .swiper-button-next svg,
.showcase-carousel .swiper-button-prev svg {
    width: 71px;
    height: 71px;
    transition: all 0.3s ease;
}

/* Hover effects */
.showcase-carousel .swiper-button-next:hover svg,
.showcase-carousel .swiper-button-prev:hover svg {
    transform: scale(1.1);
}

.showcase-carousel .swiper-button-next:hover svg circle,
.showcase-carousel .swiper-button-prev:hover svg circle {
    stroke-width: 1.5;
}

.showcase-carousel .swiper-button-next:hover svg path,
.showcase-carousel .swiper-button-prev:hover svg path {
    stroke-width: 1.5;
}

/* Active/Click feedback effects */
.showcase-carousel .swiper-button-next:active svg,
.showcase-carousel .swiper-button-prev:active svg {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.showcase-carousel .swiper-button-next:active svg circle,
.showcase-carousel .swiper-button-prev:active svg circle {
    stroke-width: 2;
}

.showcase-carousel .swiper-button-next:active svg path,
.showcase-carousel .swiper-button-prev:active svg path {
    stroke-width: 2;
}

/* Swiper pagination customization (if needed) */
.showcase-carousel .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.showcase-carousel .swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.2);
}

/* Ensure proper color inheritance from theme */
.showcase-carousel {
    color: var(--bricks-color-text, #ffffff);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .showcase-slide::before {
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.2) 100%
        );
    }
    
    .showcase-title::after {
        height: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .showcase-title::after {
        transition: none;
    }
    
    .showcase-carousel .swiper-button-next,
    .showcase-carousel .swiper-button-prev,
    .showcase-carousel .swiper-pagination-bullet {
        transition: none;
    }
}

/* Fallback styles when Swiper is not available */
.showcase-carousel.swiper-fallback .swiper-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.showcase-carousel.swiper-fallback .swiper-slide {
    scroll-snap-align: start;
    flex-shrink: 0;
}

.showcase-carousel.swiper-fallback .swiper-wrapper::-webkit-scrollbar {
    height: 8px;
}

.showcase-carousel.swiper-fallback .swiper-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.showcase-carousel.swiper-fallback .swiper-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.showcase-carousel.swiper-fallback .swiper-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}