/* ============================================================
   Lauffenmühle Museum – Page Template Styles
   page-template.css · Used by gebaeude/ and prozesskette/ pages
   ============================================================ */

.page-wrap { padding-top: 80px; min-height: 100vh; background: var(--bg); }

/* Hero */
.pg-hero { max-width: 1200px; margin: 0 auto; padding: 2.5rem 2rem 1.5rem; }
.pg-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glow); border: 1px solid var(--accent-dim);
  color: var(--accent); padding: 4px 14px; border-radius: 100px;
  font-size: .7rem; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.pg-badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.pg-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900;
  line-height: 1.15; margin-bottom: .8rem; color: var(--text);
}
.pg-hero-desc { color: var(--muted); font-size: 1.05rem; max-width: 680px; margin-bottom: 1.5rem; }
.pg-hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 8px;
  font-size: .88rem; font-weight: 700; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .88; text-decoration: none; }
.btn-secondary { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Content area */
.pg-content { max-width: 1200px; margin: 0 auto; padding: 0 2rem 5rem; }

/* Card sections */
.pg-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 2rem; margin-bottom: 1.5rem;
}
.pg-card-title {
  font-size: 1.1rem; font-weight: 800; color: var(--accent);
  margin-bottom: 1.2rem; display: flex; align-items: center; gap: 9px;
}
.pg-card-title::before {
  content: ''; width: 3px; height: 1.1em;
  background: var(--accent); border-radius: 2px; flex-shrink: 0;
}

/* Facts grid */
.facts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .6rem;
}
.fact-card {
  background: rgba(255,255,255,.025); border: 1px solid var(--border);
  border-radius: 8px; padding: .7rem 1rem;
}
.fact-key { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 3px; }
.fact-val { font-size: .9rem; font-weight: 600; color: var(--text); }

/* Prose sections */
.content-section { margin-bottom: 1.8rem; }
.content-section h3 {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: .6rem; padding-left: .8rem;
  border-left: 3px solid var(--accent-dim);
}
.content-section p { margin-bottom: .9rem; font-size: .95rem; line-height: 1.7; color: var(--muted); }
.section-fig { margin: 1rem 0; }
.section-fig img { border-radius: 10px; width: 100%; }
.section-fig figcaption { font-size: .78rem; color: var(--muted); margin-top: .5rem; text-align: center; }

/* 360 panorama */
.pano-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 1.5rem;
}
.pano-header {
  padding: .8rem 1.5rem; border-bottom: 1px solid var(--border);
  font-size: .8rem; color: var(--muted);
}
#pano-viewer { width: 100%; height: 400px; background: #000; }

/* Matterport embed */
.mp-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; margin-bottom: 1.5rem;
}
.mp-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.mp-header span { font-size: .85rem; font-weight: 700; color: var(--accent); }
.mp-header a { font-size: .75rem; color: var(--muted); text-decoration: none; }
.mp-header a:hover { color: var(--accent); }
.mp-frame { position: relative; padding-bottom: 52%; height: 0; }
.mp-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Matterport teaser card (replaces iframe) */
.mp-teaser-card { border-radius: 16px; overflow: hidden; }
.mp-teaser-card a {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .8rem;
  height: 260px; background: linear-gradient(135deg, #0a0c12 0%, #151821 50%, #1a1f2e 100%);
  color: #fff; text-decoration: none; cursor: pointer; transition: background .3s;
}
.mp-teaser-card a:hover { background: linear-gradient(135deg, #0f1218 0%, #1a1f2e 50%, #252b3a 100%); }
.mp-teaser-icon { font-size: 3rem; }
.mp-teaser-title { font-size: 1.1rem; font-weight: 700; }
.mp-teaser-sub { font-size: .8rem; color: var(--muted); }

/* Gallery */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .8rem;
}
.gallery-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; aspect-ratio: 16/10; cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* Lightbox overlay */
.lb-overlay {
  display: none; position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.92); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; cursor: zoom-out;
}
.lb-overlay.active { display: flex; }
.lb-overlay img {
  max-width: 92vw; max-height: 88vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lb-close {
  position: absolute; top: 16px; right: 20px; background: none; border: none;
  color: #fff; font-size: 2rem; cursor: pointer; z-index: 9999; opacity: .7;
  line-height: 1;
}
.lb-close:hover { opacity: 1; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 1.6rem; padding: .5rem .8rem; border-radius: 8px;
  cursor: pointer; opacity: .7; line-height: 1;
}
.lb-nav:hover { opacity: 1; background: rgba(255,255,255,.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-caption {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #ccc; font-size: .85rem; text-align: center; max-width: 80vw;
}

/* Archiv images */
.archiv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.archiv-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.archiv-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.archiv-item figcaption {
  padding: .8rem 1rem; font-size: .82rem; color: var(--muted); line-height: 1.5;
}

/* Timeline */
.tl-list { list-style: none; padding: 0; }
.tl-list li {
  display: flex; gap: 1rem; padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}
.tl-list li:last-child { border-bottom: none; }
.tl-year { color: var(--accent); font-weight: 700; font-size: .85rem; min-width: 80px; flex-shrink: 0; }
.tl-text { font-size: .88rem; color: var(--muted); }

/* Neighbors */
.neighbors-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.neighbor-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.2rem; flex: 1; min-width: 160px;
  text-decoration: none; color: var(--text); transition: border-color .2s;
}
.neighbor-card:hover { border-color: var(--accent); text-decoration: none; }
.nb-label { font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px; }
.nb-name { font-size: .9rem; font-weight: 700; }

/* Matterport content tags */
.mptags-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .8rem;
}
.mptag-card {
  background: rgba(255,255,255,.025); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.2rem;
}
.mptag-type {
  font-size: .65rem; color: var(--accent); text-transform: uppercase;
  letter-spacing: .8px; margin-bottom: .3rem; font-weight: 700;
}
.mptag-title { font-size: .9rem; font-weight: 700; margin-bottom: .3rem; }
.mptag-desc { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.mptag-link {
  display: inline-block; font-size: .78rem; color: var(--accent);
  text-decoration: none; margin-right: .8rem;
}
.mptag-link:hover { text-decoration: underline; }

/* Process navigation */
.process-nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 2rem 1rem;
}
.pnav-prev, .pnav-next {
  color: var(--accent); text-decoration: none; font-size: .88rem; font-weight: 600;
}
.pnav-prev:hover, .pnav-next:hover { text-decoration: underline; }
.pnav-step { font-size: .78rem; color: var(--muted); }

/* Loading */
.page-loading {
  text-align: center; padding: 8rem 2rem;
  font-size: .9rem; color: var(--muted);
}
.page-loading .spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 600px) {
  .pg-hero { padding: 2rem 1rem 1rem; }
  .pg-content { padding: 0 1rem 3rem; }
  .pg-card { padding: 1.5rem 1rem; }
  #pano-viewer { height: 260px; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .archiv-grid { grid-template-columns: 1fr; }
  .mptags-grid { grid-template-columns: 1fr; }
  .process-nav { flex-wrap: wrap; gap: .5rem; justify-content: center; }
}
