/* ========================================
   HERO CAROUSEL
   ======================================== */

.hero-carousel {
    width: 100%;
    margin: 0 auto;
    padding: 40px 10px;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.carousel-container {
    /* position: relative; */
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    z-index: 1;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    display: none;
}

.carousel-slide.active {
    display: block;
}

/* Slide Animations */
.slide-in-right {
    animation: slideInRight 1s forwards;
}

.slide-out-left {
    animation: slideOutLeft 1s forwards;
}

.slide-in-left {
    animation: slideInLeft 1s forwards;
}

.slide-out-right {
    animation: slideOutRight 1s forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}


.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 5;
    /* Ensure it's above decorative background elements if they overlap differently */
}

/* Red Decorative Elements */
.carousel-decorative-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 180px 350px 0 0;
    border-color: #D32F2F transparent transparent transparent;
    z-index: 2;
    pointer-events: none;
    /* Allow clicks to pass through */
}

.carousel-decorative-right {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 180px 350px;
    border-color: transparent transparent #D32F2F transparent;
    z-index: 2;
    pointer-events: none;
    /* Allow clicks to pass through */
}

/* Text Overlay */
.carousel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    width: 90%;
    max-width: 900px;
    pointer-events: none;
    /* Allow clicks to pass through */
}

.carousel-heading {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333333;
    margin: 0 0 var(--spacing-sm) 0;
    background-color: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-sm) var(--spacing-md);
    display: inline-block;
    line-height: 1.3;
}

.carousel-subheading {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-secondary);
    margin: 0 0 var(--spacing-md) 0;
    background-color: var(--color-white-95);
    padding: var(--spacing-sm) var(--spacing-md);
    display: inline-block;
    line-height: 1.4;
}

.carousel-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-white);
    margin: 0;
    background-color: var(--color-primary-90);
    padding: var(--spacing-xs) var(--spacing-md);
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: var(--color-white);
    border: 2px solid var(--color-black);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--color-black-15);
}
.carousel-prev .arrow-icon,
.carousel-next .arrow-icon {
    right: 16px;
}

.carousel-nav:hover {
    background-color: var(--color-white);
    border-color: var(--color-black);
    box-shadow: 0 4px 12px var(--color-black-25);
    transform: translateY(-50%) scale(1.1);
}

.arrow-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.carousel-prev {
    left: -15px;
}

.carousel-next {
    right: -15px;
}

/* Dot Indicators */
.carousel-dots {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-gray-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

/* .carousel-dot:hover removed */

.carousel-dot.active {
    background-color: var(--color-gray-medium);
    width: 14px;
    height: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .carousel-container {
        height: 450px;
    }

    .carousel-decorative-left {
        border-width: 140px 280px 0 0;
    }

    .carousel-decorative-right {
        border-width: 0 0 140px 280px;
    }

    .carousel-heading {
        font-size: 2rem;
    }

    .carousel-subheading {
        font-size: 1.2rem;
    }

    .carousel-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-carousel {
        padding: 0;
        padding-bottom: 20px;
    }

    .carousel-container {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .carousel-decorative-left {
        border-width: 100px 200px 0 0;
    }

    .carousel-decorative-right {
        border-width: 0 0 100px 200px;
    }

    .carousel-heading {
        font-size: 1.5rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .carousel-subheading {
        font-size: 1rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .carousel-subtitle {
        font-size: 0.85rem;
        padding: 4px var(--spacing-sm);
    }

    .carousel-nav {
        display: none;

    }

    .carousel-dots {
        bottom: -10px;
        gap: 8px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .carousel-dot.active {
        width: 12px;
        height: 12px;
    }

    .carousel-slide img {
        object-fit: cover;
        margin-top: 29px;
    }
}