/* ==== Melbourne Graphic Design – About Carousel ==== */

/* Tweak these if you want a taller/shorter gallery */
:root {
    --mgd-slide-h-desktop: 560px;
    --mgd-slide-h-tablet: 420px;
    --mgd-slide-h-mobile: 300px;
    --mgd-radius: 12px;
    --mgd-dot: 10px;
    --mgd-dot-inactive: #3f3f3f;  /* dark grey */
    --mgd-dot-active: #e53935;    /* red */
}

.mgd-carousel { position: relative; overflow: hidden; }

/* Horizontal scroll-snap track */
.mgd-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 0;
    padding: 0; margin: 0; list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.mgd-slide {
    position: relative;
    scroll-snap-align: center;
    height: var(--mgd-slide-h-desktop);
    border-radius: var(--mgd-radius);
    overflow: hidden;
    background: #111;
}

.mgd-slide img {
    width: 100%; height: 100%;
    display: block;
    object-fit: cover;        /* ✅ crops vertical images */
    object-position: center;
}

/* Side-by-side layout for the merged gymnastics slide */
.mgd-slide--split .mgd-sbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 100%;
}
.mgd-slide--split .mgd-sbs img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    border-radius: 8px;
}

/* Caption overlay */
.mgd-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.45) 80%);
    color: #fff;              /* ✅ white text */
}
.mgd-caption h2 {
    margin: 0;
    color: #fff;              /* ✅ white text */
    font-size: clamp(18px, 3vw, 28px);
    line-height: 1.2;
    font-weight: 700;
}

/* Dots (circles, no stretch) */
.mgd-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;      /* prevent vertical stretch */
    margin-top: 12px;
}

.mgd-dots button {
    appearance: none;
    -webkit-appearance: none;
    padding: 0;               /* kill theme padding */
    margin: 0;
    line-height: 0;           /* no font-driven height */
    inline-size: var(--mgd-dot);
    block-size: var(--mgd-dot);
    aspect-ratio: 1 / 1;      /* belt & braces circle */
    border: 0;
    border-radius: 50%;
    background: var(--mgd-dot-inactive);
    cursor: pointer;
    flex: 0 0 var(--mgd-dot); /* don't flex-grow */
}

.mgd-dots button[aria-selected="true"] {
    background: var(--mgd-dot-active);
}

.mgd-dots button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Space above the carousel row */
.et_pb_row_about_carousel {
    margin-top: clamp(24px, 5vw, 72px);
}


/* Heights by breakpoint */
@media (max-width: 980px) {
    .mgd-slide { height: var(--mgd-slide-h-tablet); }
}
@media (max-width: 480px) {
    .mgd-slide { height: var(--mgd-slide-h-mobile); }
}

/* Smooth scroll if allowed */
@media (prefers-reduced-motion: no-preference) {
    .mgd-track { scroll-behavior: smooth; }
}

@media (max-width: 480px) {
    .mgd-slide--split .mgd-sbs { grid-template-columns: 1fr; }
}

