/* ===== LOCATION PAGE (Task 6, Item 3) =====
   Mobile-first by explicit requirement: base rules below are the mobile
   layout; tablet/desktop are additive min-width overrides near the bottom.
   This is a deliberate, scoped exception to the rest of the site's
   desktop-first/max-width pattern -- confined to this file only. */

body.location-page { padding: 0; }

.loc-page-loading, .loc-page-error {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  font-size: 15px;
  color: var(--text-light);
}

/* ===== Reveal animation (exact reuse of the site's existing mechanism) ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Back link ===== */
.loc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 210;
  background: rgba(250,247,242,0.95);
  backdrop-filter: blur(8px);
  padding: 9px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--green-deep);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

/* ===== Hero ===== */
.loc-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--green-deep);
}
.loc-hero-media { position: absolute; inset: 0; }
.loc-hero-media img, .loc-hero-media video {
  width: 100%; height: 100%; object-fit: cover;
}
.loc-hero-overlay {
  position: absolute; inset: 0;
  /* Base gradient keeps hero text legible regardless of branch color.
     Second layer is a subtle brand-color wash -- transparent (no visible
     effect) when --branch-primary isn't set, matching site default. */
  background:
    linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.1) 100%),
    linear-gradient(to top, var(--branch-primary, transparent) 0%, transparent 60%);
  background-blend-mode: normal, soft-light;
}
.loc-hero-content {
  position: relative; z-index: 1;
  width: 100%;
  padding: 2rem clamp(1rem, 4vw, 2rem) 2.25rem;
  color: white;
}
.loc-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: var(--r-full);
  margin-bottom: 0.75rem;
}
.loc-status-open { background: var(--branch-primary, #2D5A27); color: white; }
.loc-status-closed { background: #8B7D6B; color: white; }
.loc-status-coming_soon { background: var(--gold); color: white; }
.loc-status-temporarily_closed { background: #a11212; color: white; }
.loc-hero-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 46px);
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.loc-hero-tagline {
  font-size: clamp(14px, 3vw, 17px);
  opacity: 0.92;
  max-width: 640px;
}

/* ===== Section shell ===== */
.loc-section {
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 4vw, 2rem);
  max-width: 1100px;
  margin: 0 auto;
}
.loc-section-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 26px);
  color: var(--branch-secondary, var(--green));
  margin-bottom: 1rem;
  font-weight: 700;
}
.loc-section p { font-size: 14.5px; line-height: 1.8; color: var(--text-mid); }

/* ===== Quick actions ===== */
.loc-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 clamp(1rem, 4vw, 2rem);
  margin-top: -1.75rem;
  position: relative;
  z-index: 2;
}
.loc-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: normal;
  color: var(--text-dark);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.loc-action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.loc-action-btn:focus-visible { outline: 2px solid var(--branch-primary, var(--green)); outline-offset: 2px; }
.loc-action-btn.primary { background: var(--branch-primary, var(--green)); color: white; border-color: var(--branch-primary, var(--green)); }

/* ===== Gallery ===== */
.loc-gallery-placeholder { grid-column: 1 / -1; font-style: italic; color: var(--text-light); }
.loc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.loc-gallery-tile {
  position: relative;
  cursor: pointer;
}
.loc-gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: opacity var(--t-fast);
}
.loc-gallery-grid img:hover { opacity: 0.88; }
.loc-gallery-more-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 0.5rem;
}

.loc-lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.loc-lightbox.open { display: flex; }
.loc-lightbox img { max-width: 100%; max-height: 85vh; border-radius: var(--r-sm); }
.loc-lightbox-close {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}
.loc-lightbox-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-fast);
}
.loc-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.loc-lightbox-prev { left: 16px; }
.loc-lightbox-next { right: 16px; }
@media (max-width: 480px) {
  .loc-lightbox-nav { display: none; }
}

/* ===== Back to top ===== */
.loc-back-to-top {
  position: fixed;
  bottom: 1.75rem; left: 1.75rem;
  z-index: 150;
  width: 48px; height: 48px;
  background: var(--branch-primary, var(--green));
  color: white;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base), box-shadow var(--t-fast);
}
.loc-back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.loc-back-to-top:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.loc-back-to-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ===== Facilities ===== */
.loc-facilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.loc-facility-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-tint);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
}
.loc-facility-card .icon { font-size: 20px; }

/* ===== Menu highlights ===== */
.loc-menu-highlights { display: flex; flex-direction: column; gap: 1.25rem; }
.loc-menu-group h4 {
  font-size: 14px; font-weight: 700; color: var(--green-deep); margin-bottom: 0.5rem;
}
.loc-menu-group p { white-space: pre-line; }
.loc-menu-placeholder { font-style: italic; color: var(--text-light); }
.loc-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.loc-menu-item:last-child { border-bottom: none; }
.loc-menu-item-name small { color: var(--text-light); font-size: 12px; }
.loc-menu-item-price { font-weight: 700; color: var(--green); flex-shrink: 0; }
.loc-events-placeholder { font-style: italic; color: var(--text-light); }

/* ===== Menu modal ===== */
.loc-menu-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}
.loc-menu-modal.open { opacity: 1; pointer-events: auto; }
.loc-menu-modal-content {
  background: var(--cream);
  border-radius: var(--r-xl);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-xl);
  transform: scale(0.94) translateY(10px);
  transition: transform var(--t-base);
}
.loc-menu-modal.open .loc-menu-modal-content { transform: scale(1) translateY(0); }
.loc-menu-modal-close {
  position: absolute; top: 14px; left: 14px;
  background: var(--green-tint);
  color: var(--text-dark);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.loc-menu-modal-close:hover { background: var(--border-hover); }
.loc-menu-modal-close:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.loc-menu-modal-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 26px);
  color: var(--green);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

/* ===== Sections / Reviews / Events / Features (generic, Sheet-driven) ===== */
.loc-generic-section { margin-bottom: 1.5rem; }
.loc-generic-section h4 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 0.4rem; }

.loc-review-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  margin-bottom: 10px;
}
.loc-review-stars { color: #F5A623; font-size: 13px; margin-bottom: 4px; }
.loc-review-author { font-size: 12.5px; font-weight: 700; color: var(--text-dark); margin-top: 6px; }

.loc-event-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.loc-event-row .date { font-weight: 700; color: var(--green); flex-shrink: 0; }

.loc-feature-card { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 1rem; }
.loc-feature-card .icon { font-size: 22px; flex-shrink: 0; }
.loc-feature-card h5 { font-size: 13.5px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.loc-feature-card p { font-size: 13px; }

/* ===== Kashrut certificate =====
   Matches .loc-facility-card's spacing/icon-size/typography (same
   padding, border-radius, icon size, font-size/weight) since this is
   meant to read as one more service card, not a distinct component --
   the whole card is the click target (opens the certificate), so it adds
   cursor/hover/focus affordances .loc-facility-card doesn't need. */
.loc-kashrut-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-tint);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text-dark);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.loc-kashrut-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.loc-kashrut-card:focus-visible { outline: 2px solid var(--branch-primary, var(--green)); outline-offset: 2px; }
.loc-kashrut-icon { font-size: 20px; flex-shrink: 0; }
.loc-kashrut-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.loc-kashrut-title { font-size: 13px; font-weight: 600; }
.loc-kashrut-name { font-size: 12px; font-weight: 400; color: var(--text-light); }
.loc-kashrut-arrow { font-size: 14px; color: var(--text-light); flex-shrink: 0; }

/* ===== Map ===== */
.loc-map-wrap { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.loc-map-wrap iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ===== Related branches ===== */
.loc-related-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.loc-related-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  text-decoration: none;
  transition: box-shadow var(--t-fast);
}
.loc-related-card:hover { box-shadow: var(--shadow-md); }
.loc-related-card img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); flex-shrink: 0; }
.loc-related-card .name { font-size: 13.5px; font-weight: 700; color: var(--text-dark); }
.loc-related-card .area { font-size: 12px; color: var(--text-light); }

/* ===== Footer CTA ===== */
.loc-footer-cta {
  background: var(--green-deep);
  color: white;
  text-align: center;
  padding: clamp(2rem, 6vw, 3rem) clamp(1rem, 4vw, 2rem);
}
.loc-footer-cta h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 0.75rem; }

/* ===== Tablet / Desktop (progressive enhancement from the mobile base above) ===== */
@media (min-width: 768px) {
  .loc-quick-actions { grid-template-columns: repeat(3, 1fr); }
  .loc-gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .loc-facilities-grid { grid-template-columns: repeat(3, 1fr); }
  .loc-related-grid { grid-template-columns: repeat(3, 1fr); }
  .loc-related-card { flex-direction: column; text-align: center; }
  .loc-related-card img { width: 100%; height: 120px; }
}
@media (min-width: 1024px) {
  .loc-quick-actions { grid-template-columns: repeat(6, 1fr); }
  .loc-gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .loc-hero { min-height: 74vh; }
}
