﻿.carousel .row {
    display: flex;
    align-items: flex-start;
}

.carousel-item img {
    max-width: 100%;
}

.carousel-next, .carousel-prev {
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 2rem;
    align-items: center;
    justify-content: center;
    flex-grow: 0;
    flex-shrink: 0;
    display: flex;
    border-radius: 0; /* Flat design: sharp edges */
    align-self: center;
    aspect-ratio: 1 / 1;
    height: 100%;
}

.carousel-next:hover, .carousel-prev:hover {
    background-color: var(--secondary-color);
}

@keyframes slideLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideRight {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

@keyframes slideInLeft {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.carousel-item.slide-left {
    animation: slideLeft 0.3s forwards;
}

.carousel-item.slide-right {
    animation: slideRight 0.3s forwards;
}

.carousel-item.slide-in-left {
    animation: slideInLeft 0.3s forwards;
    position: absolute;
    top: 0; left: 0; width: 100%;
}

.carousel-item.slide-in-right {
    animation: slideInRight 0.3s forwards;
    position: absolute;
    top: 0; left: 0; width: 100%;
}

.carousel-item.slide-out-left {
    animation: slideOutLeft 0.3s forwards;
    position: absolute;
    top: 0; left: 0; width: 100%;
}

.carousel-item.slide-out-right {
    animation: slideOutRight 0.3s forwards;
    position: absolute;
    top: 0; left: 0; width: 100%;
}

.carousel-item {
    transition: transform 0.3s, opacity 0.3s;
    will-change: transform, opacity;
    position: relative;
}

.carousel-item .column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1em;
    height: 100%;
}

.carousel-item .column h3 {
    margin-top: 0;
}

.carousel-item .column .date {
    margin-top: auto;
}

.carousel-item-container {
    position: relative;
    width: 100%;
    min-height: 1px;
}

/* Mobile-specific styles for carousel controls */
@media (max-width: 1200px) {
    .carousel .row {
        position: relative;
    }
    
    .carousel-item-container {
        position: relative;
    }
    
    .carousel-next, .carousel-prev {
        position: absolute;
        /* top is set dynamically by JavaScript to center on image */
        transform: translateY(-50%);
        z-index: 10;
        background-color: rgba(30, 30, 36, 0.7); /* Semi-transparent dark background */
        border: 2px solid rgba(0, 0, 0, 0.9); /* Dark, bold edges */
        padding: 0.5rem;
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .carousel-next:hover, .carousel-prev:hover {
        background-color: rgba(30, 30, 36, 0.9);
    }
}

@media (max-width: 480px) {
    .carousel-next, .carousel-prev {
        padding: 0.4rem;
        font-size: 1.25rem;
        width: 36px;
        height: 36px;
    }
    
    /* Move buttons closer to edges on small screens */
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
}

.carousel .date {
    color: var(--secondary-color);
    font-weight: 700;
}