/* Expanded client-photo gallery, with an accessible RTL image viewer. */
.gallery { scroll-margin-top: 100px; }
.gallery-heading-info { max-width: 325px; color: #63715b; font-size: 14px; }
.gallery-heading-info p { line-height: 1.8; }
.gallery-count { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 11px; padding: 6px 13px; background: #fff5d7; border: 1px solid #efe2b3; color: #70602d; border-radius: 999px; }
.gallery-count:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #aa8635; }
.gallery-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.gallery-item, .gallery-large { grid-column: auto; height: auto; aspect-ratio: 4/5; }
.gallery-item:first-child { grid-column: span 2; aspect-ratio: auto; }
.gallery-item > img { position: absolute; inset: 0; object-position: var(--photo-position, center); filter: none; }
.gallery-item > span { font-size: 12px; }
.gallery-item { touch-action: manipulation; background: #f0f2e8; }
.gallery-item:hover .icon { transform: rotate(90deg); transition: transform .25s; }
.gallery-note { margin-top: 21px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #68785d; font-size: 12px; }
.gallery-note .icon { width: 17px; height: 17px; }

.lightbox { width: min(1180px,calc(100vw - 36px)); max-height: calc(100dvh - 28px); border: 1px solid #dce3d2; padding: 0; overflow: hidden; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-topbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 18px; background: #fffdf6; border-bottom: 1px solid #e8eadd; }
.lightbox-topbar > span { font: 700 14px/1.2 Arial,sans-serif; letter-spacing: 2px; color: #5d714b; }
.lightbox .lightbox-close { position: static; width: 42px; height: 42px; flex-shrink: 0; }
.lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; height: min(68dvh,720px); max-height: calc(100dvh - 184px); min-height: 100px; flex: 1 1 auto; background: #f0f2eb; touch-action: pan-y pinch-zoom; }
.lightbox .lightbox-image { height: 100%; max-height: 100%; width: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.lightbox-nav { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); width: 47px; height: 47px; display: grid; place-items: center; background: #fffef5f5; border: 1px solid #d3dcc4; border-radius: 50%; color: #385133; box-shadow: 0 5px 15px #15251a29; }
.lightbox-nav:hover { background: #ffeaad; border-color: #d6b551; }
.lightbox-prev { right: 16px; }
.lightbox-prev .icon { transform: rotate(180deg); }
.lightbox-next { left: 16px; }
.lightbox-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px 18px; flex: 0 0 auto; background: #fffdf6; }
.lightbox .lightbox-caption { padding: 0; font-size: 14px; text-align: right; color: #3c5034; font-weight: 600; }
.lightbox .lightbox-help { padding: 5px 0 0; font-size: 10px; text-align: right; color: #6c785e; }
.lightbox-counter { flex-shrink: 0; padding: 6px 13px; min-width: 70px; text-align: center; border-radius: 999px; background: #fff0c2; color: #6c5820; font: 600 13px/1.5 Arial,sans-serif; }
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
  .gallery-item:first-child { grid-column: auto; aspect-ratio: 4/5; }
  .gallery-item > span { font-size: 10px; padding: 8px 9px; }
}
@media (max-width: 740px) {
  .gallery-heading-info { margin-top: 16px; font-size: 12px; }
  .gallery-count { margin-top: 9px; font-size: 10px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .gallery-item, .gallery-large { grid-column: auto; aspect-ratio: 4/5; height: auto; border-radius: 15px; }
  .gallery-item:first-child { grid-column: 1/-1; aspect-ratio: 3/2; }
  .gallery-item > span { font-size: 10px; line-height: 1.5; gap: 5px; padding: 7px 8px; right: 8px; left: 8px; bottom: 8px; }
  .gallery-item > span > .icon { width: 15px; height: 15px; }
  .gallery-note { font-size: 10px; margin-top: 17px; }
  .lightbox { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
  .lightbox-topbar { padding: 9px 12px; }
  .lightbox-topbar > span { font-size: 12px; }
  .lightbox-stage { height: 62dvh; max-height: calc(100dvh - 177px); }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-next { left: 8px; }
  .lightbox-prev { right: 8px; }
  .lightbox-footer { padding: 12px; gap: 12px; }
  .lightbox .lightbox-caption { font-size: 12px; }
  .lightbox .lightbox-help { font-size: 9px; }
  .lightbox-counter { font-size: 12px; padding: 5px 10px; min-width: 59px; }
}
@media (max-width: 380px) {
  .gallery-grid { gap: 10px; }
  .gallery-item > span { font-size: 9px; }
  .gallery-item { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-item:hover .icon { transition: none; } }
