/* Joanne Mooney Editorial Carousel v2.5 — continuous images, sequential sliding caption panel. */
.jmec-carousel { --jmec-ink:#231d1b; --jmec-accent:#b84c37; --jmec-bg:#fbf1ec; width:100%; max-width:none; margin:0 auto; padding:28px max(20px, calc((100vw - 1450px)/2)) 30px; box-sizing:border-box; background:var(--jmec-bg); color:var(--jmec-ink); font-family:Georgia,'Times New Roman',serif; }
.jmec-carousel * { box-sizing:border-box; }
.jmec-stage { --jmec-photo-height:clamp(330px,37vw,570px); --jmec-centre-height:clamp(265px,29vw,440px); --jmec-gap:22px; position:relative; width:100%; max-width:1450px; margin:0 auto; min-height:calc(var(--jmec-photo-height) + 100px); overflow:hidden; }
.jmec-viewport { position:relative; width:100%; height:var(--jmec-photo-height); overflow:hidden; }
.jmec-track { display:flex; align-items:flex-start; height:100%; transform:translate3d(0,0,0); will-change:transform; backface-visibility:hidden; }
.jmec-slide { flex:0 0 var(--jmec-cell-width,33.33333%); width:var(--jmec-cell-width,33.33333%); height:100%; min-width:0; margin:0; padding:0 calc(var(--jmec-gap)/2); position:relative; display:block; overflow:hidden; border:0; background:transparent; appearance:none; cursor:pointer; align-self:flex-start; }
/* All pictures have an identical top edge and identical underlying dimensions.
   The shorter centre picture is an overlay effect, NOT an image resize. */
.jmec-slide img, .jmec-slide.jmec-featured img { display:block; width:100%; height:100%; max-width:none; object-fit:cover; object-position:center top; transform:translateZ(0); backface-visibility:hidden; }
.jmec-slide.jmec-featured { cursor:default; }
.jmec-centre-panel { display:none!important; }
.jmec-copy { position:absolute; z-index:3; top:var(--jmec-centre-height); left:33.333333%; width:33.333333%; height:calc(var(--jmec-photo-height) - var(--jmec-centre-height) + 100px); min-height:0; margin:0; padding:16px 35px 30px; text-align:center; overflow:visible; background:var(--jmec-bg); opacity:1; transform:translate3d(0,0,0); transition:transform 340ms cubic-bezier(.23,1,.32,1); will-change:transform; }
/* Caption background leaves the centre image first; the track only moves after exit. */
.jmec-carousel .jmec-stage.jmec-panel-down .jmec-copy { transform:translate3d(0,100%,0); }
/* The text fades independently AFTER the caption background has returned. */
.jmec-copy-inner { opacity:1; transition:opacity 260ms ease; }
.jmec-stage.jmec-copy-text-hidden .jmec-copy-inner { opacity:0; }
.jmec-eyebrow { font:600 12px/1.3 Arial,sans-serif; color:var(--jmec-accent); letter-spacing:.22em; text-transform:uppercase; margin:0 0 10px; }
.jmec-title { font:400 clamp(22px,2.6vw,43px)/1.07 Georgia,serif; color:var(--jmec-ink); margin:0; }
.jmec-caption { font:400 15px/1.3 Georgia,serif; margin:7px auto 0; max-width:340px; }
.jmec-link,.jmec-link:hover,.jmec-link:focus { display:inline-block; color:var(--jmec-accent); font:600 13px/1.4 Arial,sans-serif; text-transform:uppercase; letter-spacing:.1em; margin-top:8px; text-decoration:none!important; border:0!important; box-shadow:none!important; }
.jmec-controls { position:absolute; z-index:4; left:33.333333%; width:33.333333%; bottom:7px; display:flex; justify-content:space-between; pointer-events:none; }
.jmec-prev,.jmec-next { font:16px/1 Arial,sans-serif; background:transparent; border:0; color:var(--jmec-ink); cursor:pointer; padding:10px; pointer-events:auto; }
.jmec-prev:hover,.jmec-next:hover { color:var(--jmec-accent); }
.jmec-carousel button:focus-visible,.jmec-carousel a:focus-visible { outline:3px solid var(--jmec-accent); outline-offset:3px; }
.jmec-carousel [hidden] {display:none!important}
#jmec-auto-insert {width:100%}
@media(max-width:900px) { .jmec-carousel { padding:22px 18px 26px } .jmec-stage { --jmec-photo-height:clamp(300px,43vw,410px); --jmec-centre-height:clamp(190px,31vw,290px); --jmec-gap:12px; } .jmec-copy { padding:10px 26px 28px; } .jmec-eyebrow {font-size:10px;margin-bottom:5px} .jmec-title {font-size:clamp(20px,3vw,30px)} .jmec-caption {font-size:12px;margin-top:4px} .jmec-link {font-size:11px;margin-top:5px} }
@media(max-width:620px) { .jmec-carousel {padding:14px 16px 22px} .jmec-stage {--jmec-photo-height:auto; --jmec-gap:0px; min-height:0;} .jmec-viewport {height:auto; aspect-ratio:4/3;} .jmec-slide { flex-basis:var(--jmec-cell-width,100%); width:var(--jmec-cell-width,100%); aspect-ratio:4/3; padding:0; } .jmec-centre-panel {display:none} .jmec-copy {position:relative; inset:auto; width:100%; height:auto; min-height:150px; padding:16px 34px 32px; overflow:visible;} .jmec-title {font-size:30px} .jmec-caption {font-size:14px} .jmec-controls {left:0;bottom:6px;width:100%} }
@media(prefers-reduced-motion:reduce) {
  .jmec-copy { transition-duration:1ms!important; }
  .jmec-copy-inner { transition-duration:1ms!important; }
}

/* The track receives its actual transition duration from the saved speed. */
.jmec-carousel .jmec-track { animation:none!important; }

/* Do not let theme CSS or legacy slider rules disable/interrupt the track. */
.jmec-carousel .jmec-viewport .jmec-track { transition: none !important; animation: none !important; }

/* Versioned front-end rules protect the panel transition from generic theme animation styles. */
.jmec-carousel .jmec-stage .jmec-copy { transition-property:transform!important; }

/* User-controlled image corners: only the images are rounded, never the slides
   or the white caption panel. The images stay fixed in size while gliding. */
.jmec-carousel .jmec-slide img,
.jmec-carousel .jmec-slide.jmec-featured img {
    border-radius: var(--jmec-image-radius, 8px) !important;
}

/* v2.5: panel transform is driven frame by frame. Prevent theme/CSS transitions
 * from applying a second animation over the saved panel speed. Text is kept
 * transparent until the panel has finished returning. */
.jmec-carousel .jmec-stage .jmec-copy { transition:none!important; }
.jmec-carousel .jmec-stage .jmec-copy-inner { transition:none!important; }

/* v2.8 – identical vector navigation arrows at all viewport widths. */
.jmec-carousel .jmec-controls .jmec-prev,
.jmec-carousel .jmec-controls .jmec-next {
    appearance:none;
    -webkit-appearance:none;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 40px;
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
    margin:0;
    padding:10px;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    color:var(--jmec-ink);
    line-height:1;
    font-size:0;
    text-indent:0;
    cursor:pointer;
}
.jmec-carousel .jmec-controls .jmec-prev::before,
.jmec-carousel .jmec-controls .jmec-prev::after,
.jmec-carousel .jmec-controls .jmec-next::before,
.jmec-carousel .jmec-controls .jmec-next::after { content:none!important; display:none!important; }
.jmec-carousel .jmec-controls .jmec-arrow-icon {
    display:block;
    flex:none;
    width:16px;
    height:16px;
    fill:currentColor;
    stroke:none;
    pointer-events:none;
}
.jmec-carousel .jmec-controls .jmec-prev:hover,
.jmec-carousel .jmec-controls .jmec-next:hover { color:var(--jmec-accent); }
@media(max-width:620px) {
    /* The same icon and control style is intentionally used on mobile. */
    .jmec-carousel .jmec-controls .jmec-prev,
    .jmec-carousel .jmec-controls .jmec-next {
        width:44px;
        height:44px;
        min-width:44px;
        min-height:44px;
        flex-basis:44px;
    }
}
