/* Gallery and always-visible contact actions */
.mobile-contact-bar {
  display:flex;
  position:fixed;
  z-index:100;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  width:min(620px,calc(100% - 32px));
  padding:9px;
  gap:8px;
  background:rgba(255,254,250,.97);
  border:1px solid #dce0d6;
  border-radius:14px;
  box-shadow:0 8px 32px rgba(35,48,38,.18);
  backdrop-filter:blur(16px);
}
.mobile-contact-bar a {
  display:flex;
  flex:1;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:0 12px;
  border-radius:8px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  transition:filter .2s,transform .2s;
}
.mobile-contact-bar a:hover { filter:brightness(.96); transform:translateY(-1px); }
.mobile-contact-bar svg { width:17px;height:17px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round; }
.mobile-call { background:#e9eee5;color:#24382d; }
.mobile-message { background:#d9e8dc;color:#24382d; }
.mobile-appointment { background:#354f3e;color:#fff; }
body { padding-bottom:90px; }
.gallery { background:#eeece3; }
.gallery-heading { margin-bottom:38px; }
.gallery-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start; }
.gallery-item { appearance:none;position:relative;display:block;width:100%;padding:0;border:0;background:#d9d8ce;overflow:hidden;cursor:zoom-in;text-align:left;color:var(--ink);isolation:isolate; }
.gallery-item:nth-child(4n+1),.gallery-item:nth-child(4n+4) { aspect-ratio:.79; }
.gallery-item:nth-child(4n+2),.gallery-item:nth-child(4n+3) { aspect-ratio:.9; }
.gallery-item img { width:100%;height:100%;object-fit:cover;transition:transform .45s ease; }
.gallery-item:hover img,.gallery-item:focus-visible img { transform:scale(1.045); }
.gallery-item:focus-visible { outline:3px solid var(--leaf);outline-offset:3px; }
.gallery-caption { position:absolute;inset:auto 0 0;display:flex;align-items:end;justify-content:space-between;gap:10px;padding:32px 13px 12px;color:white;background:linear-gradient(transparent,rgba(20,30,23,.78));opacity:0;transition:opacity .2s ease; }
.gallery-item:hover .gallery-caption,.gallery-item:focus-visible .gallery-caption { opacity:1; }
.gallery-caption strong,.gallery-caption small { display:block; }
.gallery-caption strong { font:500 16px/1.2 var(--serif); }
.gallery-caption small { margin-top:4px;font-size:12px;letter-spacing:.06em; }
.gallery-zoom { display:grid;place-items:center;width:27px;height:27px;border:1px solid rgba(255,255,255,.7);border-radius:50%;flex:0 0 auto; }
.gallery-footnote { display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:27px;color:var(--muted);font-size:12px; }
.gallery-footnote a { color:var(--green);font-weight:800;border-bottom:1px solid #9dad9e;padding-bottom:3px; }
.gallery-lightbox { position:fixed;inset:0;width:min(94vw,1000px);max-width:none;max-height:92dvh;padding:48px 54px 28px;border:1px solid rgba(255,255,255,.18);background:#17231b;color:#fff;overflow:visible; }
.gallery-lightbox::backdrop { background:rgba(10,15,11,.88);backdrop-filter:blur(5px); }
.gallery-lightbox figure { margin:0;display:flex;flex-direction:column;align-items:center;gap:12px;max-height:calc(92dvh - 76px); }
.gallery-lightbox figure img { display:block;max-width:100%;width:auto;height:auto;max-height:calc(92dvh - 130px);object-fit:contain; }
.gallery-lightbox figcaption { color:#e4e9e1;font-size:12px;text-align:center; }
.lightbox-close,.lightbox-prev,.lightbox-next { position:absolute;display:grid;place-items:center;border:1px solid rgba(255,255,255,.45);color:white;background:rgba(255,255,255,.1);cursor:pointer;border-radius:50%; }
.lightbox-close { top:10px;right:10px;width:36px;height:36px;font-size:25px; }
.lightbox-prev,.lightbox-next { top:50%;width:38px;height:38px;font-size:28px;transform:translateY(-50%); }
.lightbox-prev { left:8px; } .lightbox-next { right:8px; }
@media (max-width:820px) {
  .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  .gallery-caption { opacity:1;padding:28px 10px 10px; }
  .gallery-caption strong { font-size:14px; } .gallery-caption small { font-size:12px; }
  .gallery-lightbox { padding:48px 42px 22px; }
  .mobile-contact-bar { bottom:calc(10px + env(safe-area-inset-bottom));width:calc(100% - 20px);padding:7px;gap:6px; }
  .mobile-contact-bar a { min-height:44px;padding:0 7px;gap:5px;font-size:12px; }
}
@media (max-width:430px) {
  .gallery-grid { gap:7px; }
  .gallery-caption { padding:27px 8px 8px; }
  .gallery-caption strong { font-size:12px; } .gallery-caption small { font-size:12px; }
  .gallery-zoom { width:22px;height:22px;font-size:12px; }
  .gallery-lightbox { width:100vw;max-height:95dvh;padding:48px 36px 20px; }
  .gallery-lightbox figure img { max-height:calc(95dvh - 130px); }
  .mobile-contact-bar { width:calc(100% - 12px);padding:6px;gap:4px; }
  .mobile-contact-bar a { font-size:12px;gap:4px;padding:0 4px; }
  .mobile-contact-bar svg { width:15px;height:15px; }
}
@media (prefers-reduced-motion:reduce) { .gallery-item img,.gallery-caption,.mobile-contact-bar a { transition:none; } }

/* Keep every visible text label at least 12px, including mobile gallery captions. */
.gallery-caption small { font-size:12px; }
@media (max-width:820px) { .gallery-caption small { font-size:12px; } }

/* On phones, keep install action visible alongside contact actions. */
@media (max-width:820px) {
 .mobile-contact-bar { gap:5px; }
 .mobile-contact-bar a,.mobile-contact-bar .mobile-install { flex:1; min-width:0; padding-left:4px; padding-right:4px; gap:4px; font-size:12px; }
 .mobile-contact-bar .mobile-install svg { width:17px; height:17px; }
}
@media (max-width:430px) {
 .mobile-contact-bar { gap:3px; }
 .mobile-contact-bar a,.mobile-contact-bar .mobile-install { font-size:12px; padding-left:2px; padding-right:2px; }
}
