/* ============================================
   IRIS Festival – Legal Pages (AGB / Datenschutz / Impressum)
   Scoped to .legal-page to avoid global side effects
   ============================================ */

.legal-page {
  padding: clamp(1.75rem, 4vw, 3.25rem) 0;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(26, 0, 31, 0.35);
}

.legal-back:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.legal-hero {
  margin-bottom: 1.25rem;
}

.legal-title {
  font-family: "Cinzel", serif;
  letter-spacing: 0.02em;
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(1rem, 2.8vw, 2rem);
  align-items: start;
}

/* ----- TOC ----- */
.legal-toc {
  position: sticky;
  top: 92px; /* header offset */
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(26, 0, 31, 0.55);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem;
}

.legal-toc__title {
  font-family: "Cinzel", serif;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.legal-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.legal-toc__item--h3 {
  padding-left: 0.75rem;
  border-left: 1px solid rgba(212, 175, 55, 0.18);
}

.legal-toc__link {
  display: inline-flex;
  width: 100%;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 0.35rem 0.4rem;
  border-radius: var(--radius-sm);
}

.legal-toc__link:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(212, 175, 55, 0.12);
}

.legal-toc__link.is-active {
  color: rgba(255, 255, 255, 0.98);
  background: rgba(233, 30, 140, 0.18);
  border: 1px solid rgba(233, 30, 140, 0.35);
}

/* ----- Content card ----- */
.legal-content {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(26, 0, 31, 0.35);
  box-shadow: var(--shadow-md);
  padding: clamp(1.1rem, 2.6vw, 2rem);
}

.legal-content > *:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.75;
}

.legal-content p {
  margin: 0.75rem 0;
}

.legal-content ul,
.legal-content ol {
  margin: 0.75rem 0 1.25rem;
  padding-left: 1.25rem;
}

.legal-content li {
  margin: 0.35rem 0;
}

.legal-content a {
  color: rgba(244, 208, 63, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: rgba(255, 107, 53, 0.95);
}

.legal-content h2 {
  font-family: "Cinzel", serif;
  font-size: 1.55rem;
  margin: 2.1rem 0 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

.legal-content h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.5rem;
  color: rgba(255, 255, 255, 0.92);
}

.legal-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
  margin: 1.75rem 0;
}

.legal-content blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.08);
  border-radius: var(--radius-md);
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.legal-content th,
.legal-content td {
  padding: 0.7rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  text-align: left;
}

.legal-content th {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(212, 175, 55, 0.10);
}

/* ----- Mobile ----- */
@media (max-width: 980px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    position: relative;
    top: 0;
  }
}


/* tweak: keep back button visible under header */
.legal-back{ margin-top: .35rem; }


/* Fix: title not hidden behind sticky header */
.legal-page{
  padding-top: 96px; /* header offset */
}
.legal-hero{
  margin-top: 0;
}
.legal-title{
  scroll-margin-top: 110px;
}
.legal-content h2,
.legal-content h3,
.legal-content h4{
  scroll-margin-top: 110px;
}
