/* ============================================
   Doctors Infinite Carousel – Front Page V2
   ============================================ */

/* ---------- Section wrapper ---------- */
.doctors-carousel-section {
    padding: 5rem 0;
    overflow: hidden;          /* hide overflow from the sliding track */
    background-color: var(--bg-color);
}

.doctors-carousel-section .section-header {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
}

/* ---------- Viewport ---------- */
.doctors-carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* extra horizontal room so the highlighted card can breathe */
    padding: 1.5rem 0 2.5rem;
}

/* ---------- Track (translated via JS) ---------- */
.doctors-carousel-track {
    display: flex;
    align-items: center;       /* vertical centering lets the "big" card grow */
    gap: 1.5rem;
    will-change: transform;
    /* smooth CSS-driven transition; JS may override for instant jumps */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Individual slide ---------- */
.doctors-carousel-slide {
    flex: 0 0 auto;
    width: 205px;              /* base card width */
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
    transform: scale(0.92);
    opacity: 0.65;
    filter: saturate(0.8);
}

/* ---------- Active / centre card ---------- */
.doctors-carousel-slide.is-active {
    transform: scale(1.08);
    opacity: 1;
    filter: saturate(1);
    z-index: 2;
}

/* Neighbours of the active card get a bit more presence */
.doctors-carousel-slide.is-near {
    transform: scale(0.97);
    opacity: 0.85;
    filter: saturate(0.9);
}

/* ---------- Card inside the slide --------------------------------
   Re-uses the existing `.doctor-card-redesign` styles already in the
   theme.  We only need minor overrides to ensure the card fits the
   carousel context.
   ---------------------------------------------------------------- */
.doctors-carousel-slide .doctor-card-redesign {
    height: 100%;
    margin: 0;
    max-width: none;
}

/* -- Navigation arrows ------------------------------------------- */
.doctors-carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.doctors-carousel-nav button {
    background: transparent;
    border: 1.5px solid var(--gold-dark);
    color: var(--gold-dark);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.doctors-carousel-nav button:hover {
    background: var(--gold-dark);
    color: #fff;
}

.doctors-carousel-nav button svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Dot indicators (between the arrows) */
.doctors-carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

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

.doctors-carousel-dots .dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .doctors-carousel-slide {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .doctors-carousel-slide {
        width: 220px;
    }
    .doctors-carousel-slide.is-active {
        transform: scale(1.05);
    }
    .doctors-carousel-section {
        padding: 3.5rem 0;
    }
}

@media (max-width: 480px) {
    .doctors-carousel-slide {
        width: 200px;
    }
    .doctors-carousel-track {
        gap: 1rem;
    }
    .doctors-carousel-slide.is-active {
        transform: scale(1.04);
    }
}

/* Pause animation on reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .doctors-carousel-track {
        transition: none !important;
    }
    .doctors-carousel-slide {
        transition: none !important;
    }
}
