/* ═══════════════════════════════════════════════
   Wirtshaus zum Spreisel – Custom Styles
   Complements Tailwind CSS (Play CDN)
   ═══════════════════════════════════════════════ */

/* ── Base ───────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #F9F6F0;
  color: #2C2A29;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F9F6F0; }
::-webkit-scrollbar-thumb { background: #A66D3B; border-radius: 3px; }

/* ── Hero overlay ───────────────────────────────── */
.hero-overlay {
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(44, 42, 41, 0.58) 0%, transparent 100%),
    linear-gradient(
      to bottom,
      rgba(44, 42, 41, 0.50) 0%,
      rgba(44, 42, 41, 0.42) 45%,
      rgba(44, 42, 41, 0.68) 100%
    );
}

/* ── Hero text legibility ───────────────────────── */
.hero-text-shadow { text-shadow: 0 2px 18px rgba(20, 18, 17, 0.65), 0 1px 4px rgba(20, 18, 17, 0.45); }
.hero-sub-shadow  { text-shadow: 0 1px 10px rgba(20, 18, 17, 0.60); }

/* ── Nav link underline animation ───────────────── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: #A66D3B;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Nav shadow on scroll ───────────────────────── */
#main-nav.scrolled { box-shadow: 0 2px 16px rgba(44, 42, 41, 0.13); }

/* ── Menu item divider ──────────────────────────── */
.menu-item { border-bottom: 1px solid rgba(166, 109, 59, 0.18); }
.menu-item:last-child { border-bottom: none; }

/* ── Tab active state ───────────────────────────── */
.tab-btn { color: #A66D3B; }
.tab-btn.active {
  background-color: #A66D3B;
  color: #F9F6F0 !important;
}

/* ── Masonry gallery ────────────────────────────── */
.gallery-masonry {
  columns: 2;
  column-gap: 0.75rem;
}
@media (min-width: 640px)  { .gallery-masonry { columns: 3; } }
@media (min-width: 1024px) { .gallery-masonry { columns: 4; } }

.gallery-masonry figure {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: 0.375rem;
}
.gallery-masonry img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-masonry figure:hover img { transform: scale(1.04); }

/* ── Legal modals ───────────────────────────────── */
.legal-modal {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.legal-modal.open {
  visibility: visible;
  opacity: 1;
}
.legal-modal-box {
  transform: translateY(18px);
  transition: transform 0.28s ease;
}
.legal-modal.open .legal-modal-box {
  transform: translateY(0);
}
.legal-body h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; color: #2C2A29; }
.legal-body h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.4rem; color: #2C2A29; }
.legal-body p  { margin-bottom: 0.85rem; line-height: 1.7; color: #2C2A29cc; font-size: 0.875rem; }
.legal-body a  { color: #9B2D20; text-decoration: underline; }
.legal-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.85rem; }
.legal-body ul li { font-size: 0.875rem; color: #2C2A29cc; line-height: 1.7; }
.legal-body .source { font-size: 0.75rem; color: #2C2A2970; margin-top: 2rem; }

/* ── Gingham Divider ──────────────────────────── */
/*
  Classic tablecloth check: two overlapping semi-transparent
  red stripes on white, horizontal × vertical = full red where
  they cross, medium red where only one covers, white in gaps.
*/
.gingham-strip {
  height: 20px;
  flex-shrink: 0;
  background-color: #ffffff;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(196, 18, 48, 0.52) 0,
      rgba(196, 18, 48, 0.52) 10px,
      transparent            10px,
      transparent            20px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(196, 18, 48, 0.52) 0,
      rgba(196, 18, 48, 0.52) 10px,
      transparent            10px,
      transparent            20px
    );
}

/* ── Photo Strip ────────────────────────────────── */
#photo-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.625rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 42, 41, 0.3) transparent;
}
#photo-strip::-webkit-scrollbar { height: 4px; }
#photo-strip::-webkit-scrollbar-track { background: transparent; }
#photo-strip::-webkit-scrollbar-thumb {
  background: rgba(44, 42, 41, 0.3);
  border-radius: 2px;
}

.photo-thumb {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 220px;
  aspect-ratio: 4 / 3;
  border-radius: 0.625rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  transition: border-color 0.2s, transform 0.22s, box-shadow 0.22s;
}
.photo-thumb:hover,
.photo-thumb:focus-visible {
  border-color: #A66D3B;
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  outline: none;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.photo-thumb:hover img,
.photo-thumb:focus-visible img { transform: scale(1.07); }

.photo-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.625rem;
  background: linear-gradient(transparent, rgba(44, 42, 41, 0.78));
  color: #F9F6F0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  line-height: 1.3;
}

/* ── Language toggle ────────────────────────────── */
#lang-toggle,
#lang-toggle-mobile {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border: 1px solid rgba(166, 109, 59, 0.5);
  border-radius: 0.25rem;
  color: #A66D3B;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#lang-toggle:hover,
#lang-toggle-mobile:hover { background: #A66D3B; color: #F9F6F0; }

/* ── Lightbox (native <dialog>) ─────────────────── */
#lightbox {
  border: none;
  border-radius: 0.75rem;
  padding: 0;
  max-width: min(92vw, 960px);
  width: 100%;
  background: #1E1B18;
  color: #F9F6F0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

#lightbox::backdrop {
  background: rgba(20, 18, 16, 0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.lb-inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(249, 246, 240, 0.1);
}

.lb-counter {
  font-size: 0.75rem;
  color: rgba(249, 246, 240, 0.5);
  letter-spacing: 0.08em;
}

.lb-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  border: none;
  background: rgba(249, 246, 240, 0.08);
  color: rgba(249, 246, 240, 0.75);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-size: 1.1rem;
  line-height: 1;
}
.lb-close:hover { background: rgba(155, 45, 32, 0.35); color: #F9F6F0; }

.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0E0D0C;
  min-height: 200px;
  max-height: 80svh;
  overflow: hidden;
}

.lb-stage img {
  display: block;
  max-width: 100%;
  max-height: 80svh;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.lb-stage img.lb-loading { opacity: 0; }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: rgba(249, 246, 240, 0.18);
  color: #F9F6F0;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.2s;
  z-index: 2;
}
.lb-nav:hover { background: rgba(249, 246, 240, 0.35); }
.lb-nav--prev { left: 0.625rem; }
.lb-nav--next { right: 0.625rem; }

.lb-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid rgba(249, 246, 240, 0.1);
}

.lb-caption {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(249, 246, 240, 0.9);
  margin: 0;
}
