/* ============================================
   HEC CLINIC GALLERY CAROUSEL
   ============================================ */

.hec-clinic-gallery {
    --hec-gallery-visible: 2;
    --hec-gallery-gap: 24px;
    --hec-gallery-image-height: 330px;
    --hec-gallery-radius: 8px;

    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.hec-clinic-gallery__track {
    display: flex;
    gap: var(--hec-gallery-gap);
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hec-clinic-gallery__track::-webkit-scrollbar {
    display: none;
}

.hec-clinic-gallery__item {
    flex: 0 0 calc((100% - (var(--hec-gallery-gap) * (var(--hec-gallery-visible) - 1))) / var(--hec-gallery-visible));
    height: var(--hec-gallery-image-height);
    overflow: hidden;
    border-radius: var(--hec-gallery-radius);
    background: var(--color-bg-light, #F6F1EA);
    scroll-snap-align: start;
    box-sizing: border-box;
}

.hec-clinic-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    border-radius: var(--hec-gallery-radius);
}

.hec-clinic-gallery__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 0 2px 8px 0;
}

.hec-clinic-gallery__progress {
    position: relative;
    flex: 1 1 auto;
    height: 2px;
    background: #EEE9DD;
    overflow: hidden;
}

.hec-clinic-gallery__progress-bar {
    display: block;
    width: 0;
    height: 100%;
    background: #C9C0AD;
    transition: width 0.2s ease;
}

.hec-clinic-gallery__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.hec-clinic-gallery__prev,
.hec-clinic-gallery__next {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid var(--color-border-light, #E8E4DC);
    border-radius: var(--radius-full, 9999px);
    background: var(--color-bg-light, #F6F1EA);
    color: var(--color-primary, #4E5B31);
    cursor: pointer;
    line-height: 1;
    box-shadow: none;
    transition:
        background var(--transition-base, 0.2s ease),
        color var(--transition-base, 0.2s ease),
        border-color var(--transition-base, 0.2s ease),
        opacity var(--transition-base, 0.2s ease);
}

.hec-clinic-gallery__prev::before,
.hec-clinic-gallery__next::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.hec-clinic-gallery__prev::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.hec-clinic-gallery__next::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

.hec-clinic-gallery__prev:hover,
.hec-clinic-gallery__next:hover {
    background: var(--color-primary, #4E5B31);
    color: var(--color-white, #ffffff);
    border-color: var(--color-primary, #4E5B31);
}

.hec-clinic-gallery__prev:disabled,
.hec-clinic-gallery__next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: var(--color-bg-light, #F6F1EA);
    color: var(--color-primary, #4E5B31);
    border-color: var(--color-border-light, #E8E4DC);
}

@media (max-width: 1024px) {
    .hec-clinic-gallery {
        --hec-gallery-visible: 2;
        --hec-gallery-gap: 20px;
        --hec-gallery-image-height: 280px;
    }
}

@media (max-width: 767px) {
    .hec-clinic-gallery {
        --hec-gallery-visible: 1.08;
        --hec-gallery-gap: 16px;
        --hec-gallery-image-height: 240px;
    }

    .hec-clinic-gallery__bottom {
        margin-top: 18px;
        gap: 12px;
    }

    .hec-clinic-gallery__prev,
    .hec-clinic-gallery__next {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }
}
