/* Clinic Kamali gallery — quiet ivory, emerald and warm gold. */
.gallery-page{background:#f4f1e9;color:#163b30;font-family:var(--font-body);padding-bottom:3.4rem}
.gallery-hero{position:relative;overflow:hidden;min-height:240px;background:linear-gradient(95deg,#f7f4ee,#fffdfa);border-bottom:1px solid #e6dfd1}
.gallery-hero__art{position:absolute;inset:0 0 0 auto;width:43%;background-image:var(--gallery-hero-art);background-position:center left;background-size:cover;opacity:.88;mask-image:linear-gradient(270deg,#000 54%,transparent)}
.gallery-hero__inner{position:relative;max-width:1450px;margin:auto;padding:36px clamp(20px,5vw,65px);text-align:start;display:flex;align-items:flex-start;flex-direction:column}
.gallery-hero .public-masthead__title{font-size:clamp(2.4rem,4vw,4.25rem);line-height:1.16;max-width:700px}
.gallery-hero .public-masthead__intro{max-width:620px;font-size:.99rem}
.gallery-layout{display:grid;grid-template-columns:minmax(230px,282px) minmax(0,1fr);align-items:start;gap:clamp(18px,3vw,34px);max-width:1450px;padding:26px clamp(20px,4.5vw,65px);margin:auto}
.gallery-side{position:sticky;top:100px;background:rgba(255,253,248,.74);border:1px solid #e0d4bd;border-radius:22px;padding:23px 18px;box-shadow:0 12px 35px #193e2c0c}
.gallery-side h2{font-size:1.06rem;margin:0 0 17px;border-bottom:1px solid #ddc396;padding-bottom:15px;color:#163b30;font-weight:800}
.gallery-side__list{display:grid;gap:7px}.gallery-side__link{min-height:46px;display:flex;gap:12px;justify-content:space-between;align-items:center;padding:9px 13px;border:1px solid #e9dfce;border-radius:13px;color:#273c33;background:#faf8f3;text-decoration:none;font-weight:720;font-size:.91rem;transition:background .2s,transform .2s}
.gallery-side__link:hover{background:#fff1d3;transform:translateY(-1px)}.gallery-side__link.is-active{color:white;background:linear-gradient(110deg,#004635,#123b32);border-color:#07543e;box-shadow:0 4px 13px #0c4f3624}
.gallery-side__link b{font-size:.76rem;min-width:34px;min-height:25px;display:grid;place-items:center;border-radius:50px;background:#f5e9d1;color:#58451e;font-variant-numeric:tabular-nums}.gallery-side__link.is-active b{background:#2b7257;color:#f5e6ba}
.gallery-side__note{margin:19px 4px 0;padding-top:14px;border-top:1px solid #e8dac4;font-size:.75rem;color:#60726a;line-height:1.9}
.gallery-main{min-width:0}
.gallery-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.gallery-case{min-width:0;background:linear-gradient(120deg,#fffcf5,#f7f4ed);border:1px solid #e6d8c2;border-radius:22px;padding:10px;box-shadow:0 9px 25px #29483508}
.gallery-comparison{--comparison-position:50%;position:relative;height:auto;aspect-ratio:1.76;overflow:hidden;border-radius:15px;background:#e6ded1;touch-action:pan-y}
.gallery-comparison img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;user-select:none;pointer-events:none}.gallery-comparison__before{clip-path:inset(0 calc(100% - var(--comparison-position)) 0 0)}.gallery-comparison__line{pointer-events:none;z-index:3;position:absolute;top:0;bottom:0;left:var(--comparison-position);width:2px;background:#f6d89a;box-shadow:0 0 4px #4426004d;transform:translateX(-50%)}
.gallery-comparison__handle{z-index:4;pointer-events:none;position:absolute;top:50%;left:var(--comparison-position);transform:translate(-50%,-50%);width:38px;height:38px;border-radius:50%;border:1px solid #d9bb81;background:#fff8e6;box-shadow:0 3px 12px #1b302a30;display:grid;place-items:center;color:#164a38}.gallery-comparison__handle svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.gallery-comparison__range{z-index:6;position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:ew-resize;margin:0}.gallery-comparison__range:focus-visible{opacity:.12;background:#f0d897}.gallery-comparison__label{position:absolute;top:12px;z-index:3;padding:5px 13px;border:1px solid #d5b77b;border-radius:10px;background:rgba(255,246,221,.94);color:#27271b;font-weight:800;font-size:.79rem;box-shadow:0 2px 10px #352a0c21}.gallery-comparison__label--before{left:12px}.gallery-comparison__label--after{right:12px}
.gallery-case__foot{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding:12px 5px 5px}.gallery-case__info{min-width:0}.gallery-case__category{display:block;color:#85672d;text-decoration:none;font-size:.73rem;font-weight:750}.gallery-case__category:hover{text-decoration:underline}.gallery-case h3{font-size:1.08rem;color:#17392d;margin:5px 0;font-weight:850}.gallery-case__info p{font-size:.75rem;color:#69766d;margin:2px 0;line-height:1.6}.gallery-case__action{flex:none;font-size:.73rem;color:#2e3f33;border:1px solid #d8b976;border-radius:99px;text-decoration:none;padding:9px 13px;background:#f7edd9;white-space:nowrap;font-weight:760}.gallery-case__action:hover{background:#eddbb6}
.gallery-empty{display:grid;justify-items:center;text-align:center;background:#fffdf8;border:1px dashed #d7c69e;border-radius:23px;min-height:330px;align-content:center;padding:28px;color:#184035}.gallery-empty h2{font-size:1.12rem;margin:7px 0}.gallery-empty p{margin:5px 0;max-width:450px;font-size:.86rem;color:#67786f;line-height:1.9}.gallery-empty a{margin-top:15px;color:#0f5e47;font-weight:750}.gallery-empty__mark{font-size:2.5rem;color:#c3a46b}
.gallery-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:25px 0 0}.gallery-bottom p{font-size:.77rem;color:#62736c;line-height:1.8;max-width:460px}.gallery-pagination{display:flex;gap:10px;align-items:center;font-size:.8rem}.gallery-pagination a{border:1px solid #d4be8e;border-radius:9px;padding:8px 13px;text-decoration:none;color:#193e31}.gallery-book{border:1px solid #bda05f;background:linear-gradient(120deg,#0d4b38,#003629);color:#fdf3d7;border-radius:99px;padding:12px 22px;font-weight:850;text-decoration:none;box-shadow:0 4px 0 #bf9c54}.gallery-book:hover{background:#22644b}
html[dir=rtl] .gallery-hero__art{left:0;right:auto;mask-image:linear-gradient(90deg,#000 54%,transparent)}html[dir=rtl] .gallery-comparison__label--before{left:auto;right:12px}html[dir=rtl] .gallery-comparison__label--after{right:auto;left:12px}html[dir=rtl] .gallery-comparison__before{clip-path:inset(0 0 0 calc(100% - var(--comparison-position)))}html[dir=rtl] .gallery-comparison__line,html[dir=rtl] .gallery-comparison__handle{left:auto;right:var(--comparison-position);transform:translate(50%,-50%)}html[dir=rtl] .gallery-comparison__line{transform:translateX(50%)}
@media(max-width:1050px){.gallery-layout{grid-template-columns:210px minmax(0,1fr);padding-inline:23px;gap:18px}.gallery-cards{gap:12px}.gallery-comparison{aspect-ratio:1.45}.gallery-case__foot{flex-wrap:wrap}.gallery-case__action{margin-inline-start:auto}}
@media(max-width:760px){.gallery-hero{min-height:210px}.gallery-hero__art{width:60%;opacity:.36}.gallery-hero__inner{padding:25px 20px}.gallery-layout{grid-template-columns:1fr;padding:20px 16px}.gallery-side{position:static;padding:15px}.gallery-side h2{margin-bottom:12px}.gallery-side__list{grid-template-columns:repeat(2,minmax(0,1fr))}.gallery-side__link{min-height:41px;font-size:.78rem;padding:7px 9px}.gallery-side__note{margin-top:12px}.gallery-main{min-width:0}.gallery-hero .public-masthead__title{font-size:clamp(2rem,8vw,3rem)}}
@media(max-width:520px){.gallery-cards{grid-template-columns:1fr}.gallery-comparison{aspect-ratio:1.55}.gallery-case__foot{flex-wrap:nowrap}.gallery-case__action{white-space:normal}.gallery-side__list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.gallery-side__link{transition:none}}


/* Batch 288: both full source photos remain visible, irrespective of their orientation.
   JS determines a suitable canvas ratio after lazy-loaded images are decoded. */
.gallery-page .gallery-comparison {
  aspect-ratio: var(--gallery-photo-ratio, 1.76);
  background: #e7e1d6;
}
.gallery-page .gallery-comparison img {
  object-fit: contain;
  object-position: center center;
}
.gallery-case__collection {
  display: block;
  min-width: 0;
  text-decoration: none;
  border-radius: 8px;
  color: inherit;
  outline-offset: 5px;
}
.gallery-case__collection .gallery-case__category {
  display: block;
  color: #85672d;
  text-decoration: none;
}
.gallery-case__collection h3 {
  margin: 5px 0;
}
.gallery-case__collection:hover .gallery-case__category,
.gallery-case__collection:focus-visible .gallery-case__category {
  color: #0e6048;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gallery-case__collection:hover h3,
.gallery-case__collection:focus-visible h3 {
  color: #0e6048;
}
.gallery-case__collection:focus-visible {
  outline: 2px solid #c6a15a;
}


/* Batch 289 — service-card-sized gallery without a consultation CTA. */
.gallery-page .gallery-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.gallery-page .gallery-case {
  padding: 8px;
  border-radius: 17px;
}
.gallery-page .gallery-comparison {
  border-radius: 12px;
}
.gallery-page .gallery-comparison__label {
  top: 8px;
  padding: 4px 9px;
  font-size: .7rem;
}
.gallery-page .gallery-comparison__label--before { left: 8px; }
.gallery-page .gallery-comparison__label--after { right: 8px; }
html[dir=rtl] .gallery-page .gallery-comparison__label--before {
  left: auto;
  right: 8px;
}
html[dir=rtl] .gallery-page .gallery-comparison__label--after {
  right: auto;
  left: 8px;
}
.gallery-page .gallery-comparison__handle {
  width: 32px;
  height: 32px;
}
.gallery-page .gallery-comparison__handle svg {
  width: 20px;
  height: 20px;
}

.gallery-page .gallery-case__foot {
  padding: 10px 5px 5px;
}
.gallery-page .gallery-case h3 {
  font-size: .92rem;
}
.gallery-page .gallery-case__category {
  font-size: .7rem;
  line-height: 1.55;
}
@media (max-width: 1190px) {
  .gallery-page .gallery-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 990px) {
  .gallery-page .gallery-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .gallery-page .gallery-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .gallery-page .gallery-cards { grid-template-columns: 1fr; }
  .gallery-page .gallery-case { max-width: 360px; width: 100%; justify-self: center; }
}


/* Batch 289: hide unpublished/empty categories and remove numerical category badges. */
.gallery-page .gallery-layout--no-categories {
  grid-template-columns: minmax(0, 1fr);
}
.gallery-page .gallery-side__link {
  justify-content: flex-start;
}


/* Batch 295: match the Services numbered pagination (including RTL reading order). */
.gallery-page .gallery-bottom { align-items:center; }
.gallery-page .gallery-services-pagination { display:flex;justify-content:center;margin:0; }
.gallery-page .services-pagination__inner { direction:ltr;display:inline-flex;align-items:center;justify-content:center;gap:.32rem;padding:.28rem;border:1px solid rgba(24,55,47,.1);border-radius:999px;background:rgba(250,248,243,.72);box-shadow:0 10px 28px rgba(34,45,40,.045),inset 0 1px 0 rgba(255,255,255,.65); }
.gallery-page .services-pagination__pages { direction:ltr;display:inline-flex;align-items:center;gap:.18rem; }
.gallery-page .services-pagination__page,.gallery-page .services-pagination__arrow { width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid transparent;border-radius:50%;background:transparent;color:#66716c;font:650 .77rem var(--font-body,inherit);text-decoration:none;transition:color 220ms ease,background 220ms ease,border-color 220ms ease,box-shadow 220ms ease,transform 220ms ease; }
.gallery-page .services-pagination__arrow { font-size:.9rem; }
.gallery-page .services-pagination__page:hover,.gallery-page .services-pagination__arrow:not(.is-disabled):hover { border-color:rgba(179,154,99,.34);background:rgba(255,255,255,.82);color:#18372f;box-shadow:0 6px 16px rgba(34,45,40,.06);transform:translateY(-1px); }
.gallery-page .services-pagination__page.is-active { border-color:#18372f;background:#18372f;color:white;box-shadow:0 7px 18px rgba(24,55,47,.18);cursor:default; }
.gallery-page .services-pagination__arrow.is-disabled { color:rgba(102,113,108,.28);cursor:default; }
.gallery-page .services-pagination__ellipsis { min-width:25px;display:inline-flex;align-items:center;justify-content:center;color:rgba(98,106,102,.58);font:.68rem var(--font-body,inherit); }
html[dir="rtl"] .gallery-page .services-pagination__arrow,html[dir="rtl"] .gallery-page .services-pagination__arrow:not(.is-disabled):hover { transform:none; }
html[dir="rtl"] .gallery-page .services-pagination__arrow:not(.is-disabled):hover { transform:translateY(-1px); }
@media(max-width:660px){.gallery-page .gallery-bottom{justify-content:center;text-align:center}.gallery-page .gallery-services-pagination{width:100%}.gallery-page .services-pagination__inner{gap:.14rem;padding:.2rem;max-width:100%}.gallery-page .services-pagination__pages{gap:.06rem}.gallery-page .services-pagination__page,.gallery-page .services-pagination__arrow{width:30px;height:30px;font-size:.73rem}.gallery-page .services-pagination__ellipsis{min-width:14px}}
