/* Container used to center the carousel that also contains the navigation buttons */
.carousel-container {
    justify-content: center;
    width: 100%;
    display: block;
    overflow: hidden;
    height: fit-content;
}

/* Track used to contain and move the slides */
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Slide external wrapper to handle spacing between slides */
.carousel-slide-external {
    display: flex;
    padding: 0 10px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: stretch;
}

.carousel-slide-external:hover {
    transform: translateY(-4px);
}

.carousel-slide-external:hover .carousel-slide {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .carousel-slide-external:hover .carousel-slide {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

/* Disable hover effect for non-clickable carousels (e.g. skills) */
#skills_carousel .carousel-slide-external:hover {
    transform: none;
}

#skills_carousel .carousel-slide-external:hover .carousel-slide {
    box-shadow: none;
}

/* Slide card */
.carousel-slide {
    flex: 1;
    border-radius: 1.25rem;
    border: 1px solid var(--box-border);
    background: var(--box-color);
    display: flex;
    height: 100%;
    align-items: stretch;
    overflow: hidden;
}

.carousel-slide-internal {
    padding: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
}

/* Image container */
.carousel-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    object-fit: contain;
    border-radius: 0.75rem;
}

.carousel-image {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}


/* Title container */
.carousel-card-title-container {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    row-gap: 0.35rem;
    text-align: center;
    justify-content: center;
    flex-grow: 1;
}

.carousel-card-title,
.carousel-card-subtitle {
    text-align: center;
    align-items: center;
}

.carousel-card-title {
    color: var(--title-color);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.carousel-card-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--subparagraph-color);
}

/* Quote style for art carousel */
.quote-style {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--subparagraph-color);
}

.quote-style::before,
.quote-style::after {
    content: '"';
    font-style: normal;
}

/* Carousel buttons */
.carousel-btn {
    max-width: 10rem;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
}

/* Navigation buttons */
.carousel-navigation-buttons {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.75rem;
}

.prev-button,
.next-button {
    width: 40px;
    height: 40px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.prev-button:hover,
.next-button:hover {
    transform: scale(1.1);
}

/* Navigation dots */
.carousel-navigation-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 0.75rem;
    padding: 0.25rem 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--carousel-dot-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background-color: var(--btn-color);
    opacity: 0.6;
}

.carousel-dot.active {
    background-color: var(--btn-color);
    border-radius: 4px;
    width: 24px;
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    .carousel-slide-internal {
        padding-bottom: 1.5rem;
    }

    .btn-container {
        padding-bottom: 1rem;
    }
}

/* Mobile adjustments */
@media screen and (max-width: 480px) {
    .carousel-slide-internal {
        min-height: 500px;
    }

    .carousel-card-title {
        font-size: 1.25rem;
    }
}
