/* Reusable Certification/Image Carousel Styles */
.carousel-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: height 0.4s ease; /* Smooth height transition */
}

.carousel-track {
    display: flex;
    align-items: flex-start;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

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

.carousel-item img, 
.carousel-item video {
    max-width: 100%;
    max-height: 75vh; /* Prevent extremely tall images */
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

/* Arrows - Full height side zones */
.carousel-nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    background: transparent;
    border: none;
    color: #fff;
    width: 80px; /* Wider clickable area */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.carousel-nav-btn.prev { 
    left: 0; 
    border-radius: 12px 0 0 12px;
}
.carousel-nav-btn.next { 
    right: 0; 
    border-radius: 0 12px 12px 0;
}

.carousel-nav-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.carousel-nav-btn.prev:hover {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent);
}

.carousel-nav-btn.next:hover {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.4), transparent);
}

.carousel-nav-btn svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.carousel-nav-btn:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

.carousel-nav-btn.prev:hover svg {
    transform: scale(1.1) translateX(-3px);
}

.carousel-nav-btn.next:hover svg {
    transform: scale(1.1) translateX(3px);
}

/* Dot indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.25);
}

/* Specific overrides for media-box carousels */
.media-box .carousel-wrapper {
    max-width: 100%;
}

.media-box .carousel-track-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

.media-box .carousel-item {
    line-height: 0;
}

/* Remove dark background band - images always fill the full width */

.media-box .carousel-item img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    margin: 0;
}

.media-box .carousel-item video {
    width: 100%;
    height: auto;
    max-height: 75vh;
    border-radius: 12px;
    margin: 0;
}
