/* ===== Events / Carousel (index) ===== */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 48px; /* room for arrows */
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    padding: 20px 0;
    will-change: transform;
}

.carousel-item {
    flex: 0 0 calc(50% - 10px);
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Team member image inside a carousel item (host page) */
/* Team member photos are portrait (~3:4); match the container to that
   ratio so `object-fit: cover` doesn't crop heads/bodies. */
.carousel-item-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: var(--section-bg);
}

.carousel-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-item-content {
    padding: 20px;
    text-align: center;
}

/* Carousel navigation arrows (prev/next buttons) */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.carousel-prev { left: 4px; }
.carousel-next { right: 4px; }

.carousel-prev:hover,
.carousel-next:hover {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.05);
}

.carousel-prev i,
.carousel-next i {
    line-height: 1;
}

.event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: center;
    text-align: center;
}

.event-content h3 {
    color: var(--primary-color);
    margin: 0 0 15px;
    font-size: 1.5rem;
}

.event-details {
    margin: 1.5rem 0;
    text-align: left;
}

.event-details p {
    margin: 0.75rem 0;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1em;
}

.event-details i {
    color: var(--primary-color);
    min-width: 20px;
}

.event-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    border: none;
    transition: all 0.3s ease;
}

.event-link:hover {
    background-color: var(--accent-color);
    color: white;
}

.event-image {
    width: auto;
    height: 250px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--section-bg);
    padding: 0.5rem;
}

.event-winners-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.event-image-container {
    margin: 1rem 0;
    text-align: center;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
/* Carousel: single item, smaller arrows on mobile */

.carousel-container {
        padding: 0 36px;
    }

.carousel-item {
        flex: 0 0 100%;
    }

.carousel-prev,
    .carousel-next {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}
