@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.carousel-container {
    position: relative;
    width: calc(100% - 1.25rem);
    margin: 0.75rem auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
    background-color: #1a1a1a;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

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

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

.carousel-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 0.3125rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    font-family: 'Inter', sans-serif;
    width: max-content;
    max-width: 70%;
    z-index: 3;
    pointer-events: none;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 0.375rem;
    pointer-events: none;
    z-index: 20;
}

.carousel-btn {
    pointer-events: all;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: Arial, sans-serif;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.75);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:focus {
    outline: 0.125rem solid #4da6ff;
    outline-offset: 0.125rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.375rem;
    z-index: 20;
    pointer-events: none;
}

.indicator {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: 0.0625rem solid white;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    padding: 0;
    pointer-events: all;
}

.indicator.active {
    background-color: white;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.15);
}

.indicator:focus {
    outline: 0.125rem solid #4da6ff;
    outline-offset: 0.125rem;
}

@media (min-width: 640px) {
    .carousel-container {
        width: calc(100% - 3rem);
        max-width: 60rem;
        margin: 1rem auto;
        border-radius: 0.625rem;
    }

    .carousel-caption {
        font-size: 0.875rem;
        padding: 0.375rem 0.875rem;
        bottom: 2rem;
    }

    .carousel-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }

    .carousel-controls {
        padding: 0 0.75rem;
    }

    .indicator {
        width: 0.625rem;
        height: 0.625rem;
    }

    .carousel-indicators {
        bottom: 0.75rem;
        gap: 0.5rem;
    }
}

@media (min-width: 901px) {
    .carousel-container {
        width: 90%;
        margin: 1.5rem auto;
        border-radius: 0.75rem;
        box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.4);
    }

    .carousel-caption {
        font-size: 1.125rem;
        padding: 0.625rem 1.25rem;
        bottom: 2.75rem;
        border-radius: 0.5rem;
    }

    .carousel-btn {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.625rem;
    }

    .carousel-controls {
        padding: 0 1.25rem;
    }

    .indicator {
        width: 0.75rem;
        height: 0.75rem;
    }

    .carousel-indicators {
        bottom: 1rem;
        gap: 0.625rem;
    }
}

[data-theme="light"] .carousel-container {
    background-color: #f0f0f0;
}

[data-theme="light"] .carousel-caption {
    background-color: rgba(255, 255, 255, 0.9);
    color: #1f1f1f;
}

[data-theme="light"] .carousel-btn {
    background-color: rgba(255, 255, 255, 0.7);
    color: #1f1f1f;
}

[data-theme="light"] .carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .indicator {
    border-color: #1f1f1f;
}

[data-theme="light"] .indicator.active {
    background-color: #1f1f1f;
}