/* Shared add-ons, loaded after each page's own styles so it can override them.
   1. Call / Free Quote bar pinned to the bottom on phones and small tablets
   2. Tap a gallery photo to view it full screen
   3. Small-screen tweaks: form text that does not trigger the iPhone zoom,
      a bigger menu button, and tighter section padding */

.action-bar { display: none; }

.masonry img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 12px 70px;
  background: rgba(13, 35, 64, 0.95);
}
.lightbox.open { display: flex; }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.lightbox-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 20px;
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--body);
  font-size: 0.85rem;
  line-height: 1.5;
}
.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-close { top: 14px; right: 14px; font-size: 1.5rem; }
.lightbox-prev { top: 50%; left: 10px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 10px; transform: translateY(-50%); }

@media (max-width: 900px) {
  body { padding-bottom: 78px; }
  .action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    display: flex;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .action-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 4px;
    font-family: var(--body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: center;
  }
  .action-call { background: var(--white); color: var(--navy); }
  .action-quote { background: var(--accent); color: var(--white); }
  /* 16px stops iPhones from zooming the page when a field is tapped */
  .form-group input, .form-group textarea { font-size: 16px; }
  .nav-toggle { width: 44px; height: 44px; }
}

@media (max-width: 560px) {
  section { padding: 48px 20px; }
  .lightbox { padding: 12px 8px 64px; }
  .lightbox button { width: 44px; height: 44px; font-size: 1.5rem; }
}
