/* File: assets/styles/carousel.css */

.carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 85px);
    overflow: hidden;
}

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

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity calc(var(--transition-speed) * 0.001s) ease-in-out;
    overflow: hidden;
}

/* Background image container with Ken Burns effect */
.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: inherit;
    z-index: 1;
    /* Start at scale 1, transition to scale when active */
    transform: scale(1);
    transition: transform 9s linear, opacity calc(var(--transition-speed) * 0.001s) ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

/* Scale up when active using transition instead of animation */
.carousel-slide.active::before {
    opacity: 1;
    transform: scale(1.07);
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide.active {
        animation: none;
    }
}

.carousel-content {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
    z-index: 2;
}

.carousel-title {
    font-size: 2.75em;
    font-weight: bold;
    text-shadow:
            -1px -1px 0 #66666650,
            1px -1px 0 #66666650,
            -1px 1px 0 #66666650,
            1px 1px 0#66666650;
}

.carousel-subtitle {
    font-size: 1.2em;
    font-weight: normal;
    text-shadow:
            -1px -1px 0 #66666650,
            1px -1px 0 #66666650,
            -1px 1px 0 #66666650,
            1px 1px 0#66666650;
}

.carousel-action {
    display: inline-block;
    padding: 12px 30px;
    background-color: rgb(15 31 47 / 20%);
    color: #FCA311;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #FCA311;
    transition: all 0.3s ease;
    margin-top: 50px;
}

.carousel-action:hover {
    background-color: #FCA311;
    color: white;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgb(255 255 255 / 30%);
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2;
    font-size: 2em;
}

.carousel-button:hover {
    color: #FCA311;
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

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

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgb(255 255 255 / 30%);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background: #FCA311;
}

@media (max-width: 768px) {
    .carousel {
        height: calc(100vh - 70px);
    }

    .carousel-content {
        bottom: 40px;
    }

    .carousel-title {
        font-size: 1.8em;
    }
}
