/* V2 SHOWCASE V1 — SERVICES & WIDE GALLERY */

.v2-services-section,
.v2-gallery-section {
    padding: clamp(70px, 9vw, 115px) 0;
}

.v2-services-section {
    background: var(--color-surface-alt);
}

.v2-gallery-section {
    background: var(--color-bg);
    overflow: hidden;
}

.v2-showcase-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 37px;
}

.v2-showcase-heading h2 {
    margin: 9px 0 0;
    font-size: clamp(2rem, 3.7vw, 3.25rem);
    line-height: 1.35;
    letter-spacing: -.025em;
}

.v2-showcase-heading p {
    max-width: 330px;
    margin: 0;
    color: var(--color-muted);
    font-size: .9rem;
    line-height: 1.95;
}

.v2-services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.v2-service-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 132px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 22px;
    transition:
        transform .25s var(--ease-standard),
        border-color .25s,
        box-shadow .25s;
}

.v2-service-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-soft);
}

.v2-service-number {
    align-self: flex-start;
    font-family: var(--font-en);
    font-size: .85rem;
    font-weight: 800;
    color: var(--color-primary);
}

.v2-service-content {
    flex: 1;
    min-width: 0;
}

.v2-service-content h3 {
    margin: 0 0 10px;
    font-size: 1.13rem;
    line-height: 1.65;
}

.v2-service-duration {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-muted);
    font-size: .77rem;
}

.v2-service-duration svg {
    width: 16px;
    height: 16px;
}

.v2-service-book {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.3rem;
    transition: transform .2s, background .2s;
}

.v2-service-book:hover {
    transform: scale(1.08);
}

.v2-gallery-heading {
    align-items: end;
}

.v2-gallery-heading > div:first-child > p {
    max-width: none;
    margin-top: 12px;
}

.v2-gallery-arrows {
    display: flex;
    gap: 10px;
}

.v2-gallery-arrows button {
    width: 47px;
    height: 47px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 1.3rem;
    transition: background .2s, transform .2s;
}

.v2-gallery-arrows button:hover {
    background: var(--color-primary-soft);
    transform: scale(1.05);
}

.v2-gallery-arrows button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.v2-gallery-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    padding: 4px 2px 12px;
}

.v2-gallery-track::-webkit-scrollbar {
    display: none;
}

.v2-gallery-slide {
    flex: 0 0 min(100%, 900px);
    min-width: 0;
    scroll-snap-align: start;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 25px;
    overflow: hidden;
}

.v2-comparison {
    position: relative;
    height: clamp(290px, 47vw, 535px);
    overflow: hidden;
    background: var(--color-surface-alt);
    isolation: isolate;
}

.v2-comparison > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

.v2-after-image {
    clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.v2-comparison-line {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: var(--split);
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
    pointer-events: none;
    filter: drop-shadow(0 1px 5px rgba(0,0,0,.2));
}

.v2-comparison-line span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 53px;
    height: 53px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #fff;
    color: #154459;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.v2-comparison-range {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    direction: ltr;
}

.v2-comparison-range:focus-visible {
    outline: 4px solid var(--color-primary);
    outline-offset: -4px;
    opacity: .08;
}

.v2-comparison-badge {
    position: absolute;
    z-index: 2;
    top: 19px;
    padding: 7px 16px;
    border-radius: 100px;
    background: rgba(255,255,255,.93);
    color: #164054;
    font-size: .75rem;
    font-weight: 700;
    pointer-events: none;
}

.v2-badge-before {
    right: 19px;
}

.v2-badge-after {
    left: 19px;
}

.v2-gallery-info {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    padding: 24px 30px 27px;
}

.v2-gallery-category {
    font-family: var(--font-en);
    font-size: .67rem;
    color: var(--color-primary);
    letter-spacing: .13em;
    font-weight: 700;
}

.v2-gallery-info h3 {
    margin: 6px 0;
    font-size: 1.18rem;
}

.v2-gallery-info p {
    margin: 6px 0 0;
    color: var(--color-muted);
    font-size: .86rem;
    line-height: 1.85;
}

.v2-slide-count {
    font-family: var(--font-en);
    font-size: .73rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.v2-clinic-slide > img {
    display: block;
    width: 100%;
    height: clamp(290px, 47vw, 535px);
    object-fit: cover;
}

.v2-gallery-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding-top: 16px;
    color: var(--color-muted);
    font-size: .77rem;
}

.v2-gallery-progress {
    width: 155px;
    height: 4px;
    overflow: hidden;
    border-radius: 50px;
    background: var(--color-border);
}

.v2-gallery-progress > span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s;
}

.v2-showcase-empty {
    grid-column: 1 / -1;
    padding: 35px;
    border: 1px dashed var(--color-border);
    border-radius: 18px;
    color: var(--color-muted);
    background: var(--color-surface);
}

.v2-gallery-empty {
    text-align: center;
    padding: 70px 22px;
}

.v2-gallery-empty h3 {
    margin: 10px 0;
    color: var(--color-text);
}

.v2-gallery-empty p {
    margin-inline: auto;
}

.v2-empty-symbol {
    font-size: 2.2rem;
    color: var(--color-primary);
}

@media (max-width: 760px) {
    .v2-showcase-heading {
        align-items: start;
        flex-direction: column;
        gap: 13px;
        margin-bottom: 24px;
    }

    .v2-services-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .v2-service-item {
        padding: 18px;
        min-height: 110px;
        border-radius: 17px;
        gap: 12px;
    }

    .v2-service-content h3 {
        font-size: 1rem;
    }

    .v2-gallery-track {
        gap: 13px;
    }

    .v2-gallery-slide {
        flex-basis: 100%;
        border-radius: 17px;
    }

    .v2-comparison,
    .v2-clinic-slide > img {
        height: clamp(250px, 66vw, 400px);
    }

    .v2-comparison-line span {
        width: 44px;
        height: 44px;
    }

    .v2-gallery-info {
        padding: 18px;
    }

    .v2-gallery-arrows button {
        width: 43px;
        height: 43px;
    }

    .v2-comparison-badge {
        top: 12px;
        padding: 5px 10px;
        font-size: .68rem;
    }

    .v2-badge-before {
        right: 12px;
    }

    .v2-badge-after {
        left: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .v2-gallery-track {
        scroll-behavior: auto;
    }

    .v2-service-item,
    .v2-gallery-progress > span {
        transition: none;
    }

    
}


/* V2 LAYOUT CORRECTION V4 */

/* Full-width editorial presentation */
.v2-gallery-section {
    overflow: hidden;
}

.v2-gallery-track {
    gap: clamp(16px, 3vw, 34px);
    padding: 0 0 14px;
}

.v2-gallery-slide {
    flex: 0 0 min(100%, 1100px);
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

/* The image is the visual element, not a card. */
.v2-comparison {
    width: 100%;
    height: clamp(320px, 49vw, 610px);
    border: 0;
    border-radius: 15px;
    background: var(--color-surface-alt);
    overflow: hidden;
}

.v2-comparison > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-gallery-info {
    padding: 19px 0 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.v2-gallery-info h3 {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.v2-gallery-info p {
    max-width: 700px;
}

/* Keep comparison indicators subtle. */
.v2-comparison-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: .73rem;
    box-shadow: none;
}

.v2-comparison-line span {
    width: 48px;
    height: 48px;
}

/* Additional clinic image, if present. */
.v2-clinic-slide {
    background: transparent;
}

.v2-clinic-slide > img {
    display: block;
    width: 100%;
    height: clamp(320px, 49vw, 610px);
    border-radius: 15px;
    object-fit: cover;
}

/* Mobile-first refinements */
@media (max-width: 760px) {
    .v2-gallery-slide {
        flex-basis: 100%;
    }

    .v2-comparison,
    .v2-clinic-slide > img {
        height: clamp(245px, 68vw, 410px);
        border-radius: 11px;
    }

    .v2-gallery-info {
        padding: 17px 1px 5px;
    }

    .v2-comparison-line span {
        width: 43px;
        height: 43px;
    }
}
/* V2 GALLERY CLEANUP V1 */

/* Remove unnecessary case text below comparison images */
.v2-gallery-info {
    display: none !important;
}

/* Keep the gallery visually focused on images */
.v2-gallery-slide {
    background: transparent;
    border: none;
    box-shadow: none;
}


/* Gallery case picker: visual variety without duplicating sections. */
.clinic-gallery-thumbnails {display:flex; gap:11px; overflow-x:auto; padding:14px 2px 20px; scroll-snap-type:x proximity; scrollbar-width:thin;}
.clinic-gallery-thumb {display:flex;align-items:center;gap:10px;flex:0 0 clamp(148px,20vw,225px);padding:7px;text-align:start;border:1px solid var(--color-border);background:var(--color-surface);border-radius:13px;color:var(--color-text);cursor:pointer;scroll-snap-align:start;min-width:0;}
.clinic-gallery-thumb img {width:58px;height:55px;border-radius:9px;object-fit:cover;flex-shrink:0;}
.clinic-gallery-thumb span {font-size:.78rem;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.clinic-gallery-thumb[aria-pressed="true"] {border-color:var(--color-secondary);box-shadow:0 0 0 1px var(--color-secondary);}
.clinic-gallery-thumb:focus-visible {outline:3px solid var(--color-secondary);outline-offset:2px;}
@media(max-width:760px) {.clinic-gallery-thumb{flex-basis:172px;}}


/* CLINIC INDEPENDENT GALLERY 2026 */
.clinic-gallery-section { padding:clamp(64px,8vw,110px) 0; background:var(--color-surface-alt); }
.clinic-gallery-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.clinic-gallery-photo { position:relative; display:block; padding:0; border:0; min-width:0; height:220px; overflow:hidden; border-radius:20px; cursor:zoom-in; background:var(--color-surface); color:#fff; }
.clinic-gallery-photo:first-child { grid-column:span 2; grid-row:span 2; height:454px; }
.clinic-gallery-photo img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .55s ease; }
.clinic-gallery-photo:hover img { transform:scale(1.045); }
.clinic-gallery-caption { position:absolute; bottom:0; inset-inline:0; text-align:start; padding:34px 15px 14px; background:linear-gradient(transparent,rgba(0,0,0,.65)); font-weight:700; font-size:.86rem; }
.clinic-gallery-photo:focus-visible { outline:3px solid var(--color-primary); outline-offset:3px; }
.clinic-gallery-lightbox[hidden] { display:none!important; }
.clinic-gallery-lightbox { position:fixed; inset:0; z-index:9999; display:flex; justify-content:center; align-items:center; gap:15px; padding:50px 20px 24px; background:rgba(5,20,28,.93); color:#fff; }
.clinic-gallery-lightbox figure { margin:0; min-width:0; max-width:min(80vw,1000px); text-align:center; }
.clinic-gallery-lightbox figure img { display:block; max-width:100%; max-height:78vh; margin:auto; object-fit:contain; border-radius:8px; }
.clinic-gallery-lightbox figcaption { margin-top:12px; }
.clinic-gallery-close,.clinic-gallery-step { color:#fff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.3); border-radius:12px; cursor:pointer; }
.clinic-gallery-close { position:absolute; top:15px; inset-inline-end:18px; width:42px; height:42px; font-size:30px; }
.clinic-gallery-step { width:44px; height:48px; flex-shrink:0; font-size:30px; }
@media(max-width:760px) { .clinic-gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;} .clinic-gallery-photo {height:160px;border-radius:13px;} .clinic-gallery-photo:first-child {grid-column:span 2;grid-row:span 1;height:240px;} .clinic-gallery-lightbox {gap:5px;padding-inline:6px;} .clinic-gallery-lightbox figure {max-width:calc(100vw - 108px);} }
@media(prefers-reduced-motion:reduce) { .clinic-gallery-photo img {transition:none;} }


/* CLINIC SERVICE MODAL + FOCUS GALLERY 2026 */
/* Compact services; details deliberately remain available without leaving the page. */
.v2-services-grid { gap: 11px; }
.v2-service-item.clinic-service-open {
    display: flex; width: 100%; min-height: 78px; padding: 14px 19px;
    text-align: start; align-items: center; cursor: pointer;
}
.clinic-service-open .v2-service-content strong { display: block; font-size: 1rem; }
.clinic-service-open .v2-service-content .v2-service-duration { display: block; margin-top: 3px; }
.clinic-service-chevron { display: grid; place-items: center; width: 35px; height: 35px;
    border-radius: 11px; background: var(--color-primary-soft); color: var(--color-primary); }
.clinic-service-open:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.clinic-service-modal[hidden] { display: none !important; }
.clinic-service-modal { position: fixed; inset: 0; z-index: 10020; display: flex; align-items: center;
    justify-content: center; background: rgba(5, 18, 29, .68); padding: 18px; }
.clinic-service-dialog { position: relative; width: min(100%, 510px); max-height: 85dvh;
    overflow-y: auto; border: 1px solid var(--color-border); border-radius: 23px;
    background: var(--color-surface); color: var(--color-text); padding: 30px 24px 24px;
    box-shadow: 0 25px 70px rgba(0,0,0,.22); }
.clinic-service-dialog h3 { margin: 4px 44px 8px 0; font-size: clamp(1.25rem, 3.4vw, 1.7rem); }
.clinic-service-modal-duration { color: var(--color-primary); font-weight: 700; margin: 0 0 14px; }
.clinic-service-modal-description { margin: 0 0 20px; line-height: 1.9; color: var(--color-muted); white-space: pre-line; }
.clinic-service-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 44px; height: 44px;
    border-radius: 13px; border: 1px solid var(--color-border); background: var(--color-surface-alt);
    color: var(--color-text); font-size: 25px; cursor: pointer; }
.clinic-service-book-action { width: 100%; min-height: 48px; border: 0; border-radius: 13px;
    background: var(--color-primary); color: white; font: inherit; font-weight: 750; cursor: pointer; }
@media (max-width: 760px) { .v2-service-item.clinic-service-open { min-height: 72px; padding: 13px 16px; }
    .clinic-service-dialog { width: min(100%, 440px); padding: 27px 20px 20px; max-height: 85dvh; }
    .clinic-service-modal { padding: 14px; } }
/* Focus gallery: show only three photos and animate between them. */
.clinic-gallery-stage { position: relative; }
.clinic-gallery-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 13px; height: clamp(360px, 49vw, 570px); }
.clinic-gallery-grid > .clinic-gallery-photo { display: none; grid-column: auto; grid-row: auto;
    height: 100%; border-radius: 19px; animation: clinic-photo-enter .65s ease both; }
.clinic-gallery-grid > .clinic-gallery-photo.is-focus { display: block; grid-column: 1; grid-row: 1 / span 2; }
.clinic-gallery-grid > .clinic-gallery-photo.is-side-first { display: block; grid-column: 2; grid-row: 1; }
.clinic-gallery-grid > .clinic-gallery-photo.is-side-second { display: block; grid-column: 2; grid-row: 2; }
.clinic-gallery-grid .clinic-gallery-photo img { transform: translateY(var(--clinic-parallax, 0px)) scale(1.06);
    transition: transform .7s ease; }
.clinic-gallery-grid .clinic-gallery-photo:hover img { transform: translateY(var(--clinic-parallax, 0px)) scale(1.11); }
.clinic-gallery-navigation { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 15px; }
.clinic-gallery-navigation button { width: 44px; height: 44px; border: 1px solid var(--color-border);
    background: var(--color-surface); color: var(--color-text); border-radius: 13px; font-size: 25px; cursor: pointer; }
.clinic-gallery-counter { min-width: 60px; text-align: center; color: var(--color-muted); font-size: .85rem; direction: ltr; }
@keyframes clinic-photo-enter { from { opacity: .6; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }
@media (max-width: 760px) {
  .clinic-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1.6fr) minmax(0, 1fr); height: clamp(360px, 108vw, 530px); gap: 9px; }
  .clinic-gallery-grid > .clinic-gallery-photo { border-radius: 13px; }
  .clinic-gallery-grid > .clinic-gallery-photo.is-focus { grid-column: 1 / span 2; grid-row: 1; }
  .clinic-gallery-grid > .clinic-gallery-photo.is-side-first { grid-column: 1; grid-row: 2; }
  .clinic-gallery-grid > .clinic-gallery-photo.is-side-second { grid-column: 2; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .clinic-gallery-grid .clinic-gallery-photo { animation: none; }
  .clinic-gallery-grid .clinic-gallery-photo img, .clinic-gallery-grid .clinic-gallery-photo:hover img { transition: none; transform: none; } }


/* CLINIC PHOTO MOTION V1 - BEGIN */
/* All effects are visual only; booking and before/after interactions stay untouched. */
@keyframes clinic-hero-breathe {
  from { transform: scale(1.005); }
  to   { transform: scale(1.085); }
}
@keyframes clinic-gallery-drift {
  from { transform: translate3d(0, var(--clinic-parallax, 0px), 0) scale(1.065); }
  to   { transform: translate3d(0, var(--clinic-parallax, 0px), 0) scale(1.13); }
}
/* Animate only while the image is visible; JS toggles the active class. */
.v2-hero.clinic-motion-active #v2-hero-photo {
  animation: clinic-hero-breathe 16s ease-in-out infinite alternate;
  transform-origin: center center;
}
/* Existing focus gallery rotates every 6 seconds; each new photo gets a gentle drift. */
.clinic-gallery-section.clinic-motion-active
.clinic-gallery-photo.is-focus img {
  animation: clinic-gallery-drift 12s ease-in-out infinite alternate;
  transform-origin: center center;
}
.clinic-gallery-section.clinic-motion-active
.clinic-gallery-photo.is-side-first img,
.clinic-gallery-section.clinic-motion-active
.clinic-gallery-photo.is-side-second img {
  animation: clinic-gallery-drift 17s ease-in-out infinite alternate;
  transform-origin: center center;
}
.clinic-gallery-photo:hover img { animation-play-state: paused; }
/* Progressive enhancement: reveal is enabled in JS, but content is never fully hidden. */
.clinic-motion-reveal {
  opacity: .78;
  transform: translate3d(0, 18px, 0);
  transition: opacity .85s ease, transform .85s cubic-bezier(.18,.7,.2,1);
}
.clinic-motion-reveal.clinic-motion-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* Prevent offscreen motion from running in background tabs. */
.clinic-motion-page-hidden #v2-hero-photo,
.clinic-motion-page-hidden .clinic-gallery-photo img {
  animation-play-state: paused !important;
}
@media (max-width: 760px) {
  .clinic-motion-reveal { transform: translate3d(0, 12px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .v2-hero.clinic-motion-active #v2-hero-photo,
  .clinic-gallery-section.clinic-motion-active .clinic-gallery-photo img {
    animation: none !important;
  }
  .clinic-motion-reveal,
  .clinic-motion-reveal.clinic-motion-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
/* CLINIC PHOTO MOTION V1 - END */


/* CLINIC EDITORIAL REDESIGN V1 — HERO / SCROLL STORY / BEFORE-AFTER */
/* Hero: widen the media without changing the booking CTA or copy. */
.v2-hero-grid { align-items: center; }
.v2-hero-media { min-width: 0; }
.v2-hero-media .v2-clinic-image-wrap {
    position: relative; overflow: hidden; width: 100%;
    border-radius: clamp(18px, 2.6vw, 32px);
    box-shadow: 0 28px 65px rgba(4, 29, 44, .13);
}
.v2-hero-media #v2-hero-photo {
    display: block; width: 100%; height: clamp(410px, 40vw, 620px);
    object-fit: cover; object-position: center;
    transform-origin: 48% 54%;
    animation: clinic-hero-breathe 14s ease-in-out infinite alternate !important;
    will-change: transform;
}
@keyframes clinic-hero-breathe {
    from { transform: scale(1.015) translate3d(0,0,0); }
    to { transform: scale(1.095) translate3d(-.7%, -.65%, 0); }
}
/* Scroll story: real document scrolling, no wheel capture or scroll locking. */
#clinic-gallery { overflow: clip; }
#clinic-gallery .clinic-gallery-heading { margin-bottom: clamp(26px, 5vw, 55px); }
#clinic-gallery .clinic-story-grid {
    display: flex; flex-direction: column; gap: clamp(95px, 17vh, 180px);
    height: auto; overflow: visible; padding: 0 0 clamp(95px, 16vh, 170px);
}
#clinic-gallery .clinic-story-grid > .clinic-gallery-photo,
#clinic-gallery .clinic-story-grid > .clinic-gallery-photo:first-child {
    display: block; position: sticky; top: 11vh; flex: none;
    grid-column: auto; grid-row: auto;
    width: min(94%, 1060px); height: min(72vh, 640px);
    margin-inline: auto; border: 1px solid rgba(255,255,255,.13);
    border-radius: clamp(18px, 2.5vw, 29px); overflow: hidden;
    box-shadow: 0 23px 65px rgba(3,22,35,.18);
    animation: none; isolation: isolate;
    transform: translate3d(0, var(--story-card-shift, 35px), 0) scale(var(--story-card-scale, .94));
    opacity: var(--story-card-opacity, .35);
    transition: box-shadow .3s ease;
}
#clinic-gallery .clinic-story-grid > .clinic-gallery-photo:nth-child(2n) { width: min(88%, 990px); margin-inline-end: 1.5%; }
#clinic-gallery .clinic-story-grid > .clinic-gallery-photo:nth-child(3n) { width: min(91%, 1030px); margin-inline-start: 1.5%; }
#clinic-gallery .clinic-story-grid .clinic-gallery-photo img,
#clinic-gallery .clinic-story-grid .clinic-gallery-photo:hover img {
    width: 100%; height: 100%; object-fit: cover;
    transform: translate3d(0, var(--story-image-shift, 0px), 0) scale(var(--story-image-zoom, 1.075));
    transition: none;
}
#clinic-gallery .clinic-story-grid .clinic-gallery-photo::after {
    content: ''; position:absolute; inset:0; pointer-events:none;
    background:linear-gradient(to bottom, transparent 54%, rgba(0,14,26,.25));
}
#clinic-gallery .clinic-story-grid .clinic-gallery-caption { z-index: 2; font-size:clamp(.85rem,1.5vw,1.06rem); padding: 45px 25px 23px; }
/* Cases: show comparison at full width, with only a centered title and navigation. */
#gallery .v2-gallery-heading { justify-content: center; text-align: center; margin-bottom: 28px; }
#gallery .v2-gallery-heading h2 { margin: 0; }
#gallery .v2-gallery-slide { flex-basis: min(100%, 1000px); }
#gallery .v2-comparison { height: clamp(330px, 51vw, 610px); border-radius: clamp(15px,2vw,23px); }
#gallery .clinic-case-name {
    display: block; margin: 22px 0 4px; text-align: center;
    color: var(--color-text); font-size: clamp(1.05rem, 2vw, 1.32rem); font-weight: 750;
}
#gallery .clinic-cases-navigation { display:flex; align-items:center; justify-content:center; gap: 22px; margin-top: 20px; }
#gallery .clinic-cases-navigation button {
    width: 60px; height: 60px; border: 1px solid var(--color-border);
    border-radius: 50%; background: var(--color-surface); color:var(--color-text);
    font: inherit; font-size: 1.55rem; cursor:pointer; box-shadow: 0 9px 23px rgba(0,0,0,.055);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
#gallery .clinic-cases-navigation button:hover:not(:disabled) { background:var(--color-primary); color:#fff; transform:translateY(-3px); }
#gallery .clinic-cases-navigation button:disabled {opacity:.35;cursor:not-allowed;}
#gallery .clinic-cases-counter { min-width: 70px; text-align:center; direction:ltr; color:var(--color-muted); font-size:.86rem; font-variant-numeric:tabular-nums; }
/* Reveal the comparison as it enters without transforming its layered images. */
#gallery .v2-gallery-slide { opacity: var(--case-reveal-opacity, 1); transform:translate3d(0,var(--case-reveal-shift, 0px),0); transition:opacity .7s ease, transform .7s ease; }
@media (max-width: 760px) {
  .v2-hero-media { width: 100%; max-width: none; }
  .v2-hero-media .v2-clinic-image-wrap { width: 100%; max-width: none; margin-inline:auto; border-radius: 19px; }
  .v2-hero-media #v2-hero-photo { height: clamp(310px, 93vw, 450px); }
  #clinic-gallery .clinic-story-grid { gap: clamp(75px, 14vh, 125px); padding-bottom: 15vh; }
  #clinic-gallery .clinic-story-grid > .clinic-gallery-photo,
  #clinic-gallery .clinic-story-grid > .clinic-gallery-photo:first-child,
  #clinic-gallery .clinic-story-grid > .clinic-gallery-photo:nth-child(n) {
      width: 100%; height: min(64vh, 515px); top: 10vh;
      margin-inline: 0; border-radius: 17px;
  }
  #clinic-gallery .clinic-story-grid .clinic-gallery-caption { padding: 40px 16px 16px; }
  #gallery .v2-gallery-track { gap: 14px; }
  #gallery .v2-comparison { height: clamp(315px, 89vw, 465px); border-radius: 17px; }
  #gallery .clinic-case-name { margin-top: 17px; }
  #gallery .clinic-cases-navigation button { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-hero-media #v2-hero-photo { animation: none !important; transform:none !important; will-change:auto; }
  #clinic-gallery .clinic-story-grid > .clinic-gallery-photo { opacity:1 !important; transform:none !important; }
  #clinic-gallery .clinic-story-grid .clinic-gallery-photo img {transform:none !important;}
  #gallery .v2-gallery-slide { opacity:1 !important;transform:none !important;transition:none !important; }
}
