/* ============================================================
   legal.css — Impressum & Datenschutz (Eppich24 / Teppichreinigung Wien)
   Loads AFTER main.css. Reuses :root tokens defined there.
   Styles only the legal pages' own content classes (leg-*).
   Header/nav/footer/FAB are already styled in main.css.
   ============================================================ */

/* ---------- Page base ---------- */
.page-legal {
  background: var(--ep-bg);
  color: var(--ep-body);
  font-family: var(--ep-font);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HERO / TITLE BAND (dark teal band -> white headings & text)
   ============================================================ */
.leg-hero {
  position: relative;
  background:
    radial-gradient(1200px 420px at 82% -30%, rgba(20, 161, 132, .35), transparent 60%),
    linear-gradient(135deg, var(--ep-dark) 0%, var(--ep-primary-d) 62%, var(--ep-primary) 130%);
  color: #fff;
  overflow: hidden;
  padding: 118px 24px 66px;
}

/* Subtle decorative glow */
.leg-hero::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 168, 60, .22), transparent 70%);
  pointer-events: none;
}

.leg-hero__container {
  position: relative;
  z-index: 1;
  max-width: var(--ep-wrap);
  margin: 0 auto;
}

/* ---------- Breadcrumb ---------- */
.leg-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  margin-bottom: 22px;
}

.leg-hero__breadcrumb a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  transition: color .2s ease;
}

.leg-hero__breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.leg-hero__breadcrumb-sep {
  color: rgba(255, 255, 255, .45);
}

.leg-hero__breadcrumb > span:last-child {
  color: var(--ep-accent);
  font-weight: 600;
}

/* ---------- Hero titles ---------- */
.leg-hero__content {
  max-width: 760px;
}

.leg-hero__title {
  font-family: var(--ep-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0 0 14px;
}

.leg-hero__subtitle {
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  margin: 0;
  max-width: 640px;
}

/* ============================================================
   MAIN / CONTENT CONTAINER (readable, centered column)
   ============================================================ */
.leg-main {
  padding: 74px 24px 96px;
}

.leg-main__container {
  max-width: var(--ep-wrap);
  margin: 0 auto;
}

/* Readable column — long legal text is comfortable to scan */
.leg-content {
  max-width: 820px;
  margin: 0 auto;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.leg-section {
  margin-bottom: 52px;
  scroll-margin-top: 96px; /* offset for sticky header on anchor jumps */
}

.leg-section:last-child {
  margin-bottom: 0;
}

.leg-section__title {
  position: relative;
  font-family: var(--ep-display);
  font-weight: 700;
  font-size: clamp(1.42rem, 2.6vw, 1.78rem);
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--ep-ink);
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ep-line);
}

/* Accent underline bar */
.leg-section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ep-primary), var(--ep-primary-l));
}

/* ============================================================
   CARDS
   ============================================================ */
.leg-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow-sm);
  padding: 26px 28px;
  margin-bottom: 18px;
  transition: box-shadow .25s ease;
}

.leg-card:last-child {
  margin-bottom: 0;
}

.leg-card:hover {
  box-shadow: var(--ep-shadow);
}

.leg-card__title {
  font-family: var(--ep-display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--ep-ink-2);
  margin: 0 0 12px;
}

.leg-card__body {
  color: var(--ep-body);
  font-size: 1rem;
  line-height: 1.78;
}

.leg-card__body > *:first-child {
  margin-top: 0;
}

.leg-card__body > *:last-child {
  margin-bottom: 0;
}

/* ============================================================
   PARAGRAPHS & INLINE TEXT
   ============================================================ */
.leg-content p {
  margin: 0 0 14px;
  line-height: 1.78;
  color: var(--ep-body);
}

.leg-content p:last-child {
  margin-bottom: 0;
}

.leg-content strong {
  color: var(--ep-ink-2);
  font-weight: 600;
}

.leg-content em {
  color: var(--ep-muted);
  font-style: italic;
}

/* ============================================================
   LINKS
   ============================================================ */
.leg-link {
  color: var(--ep-primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 124, 102, .32);
  transition: color .2s ease, border-color .2s ease;
  word-break: break-word;
}

.leg-link:hover {
  color: var(--ep-primary-d);
  border-bottom-color: var(--ep-primary-d);
}

/* ============================================================
   LISTS
   ============================================================ */
.leg-list {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
}

.leg-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 11px;
  line-height: 1.7;
  color: var(--ep-body);
}

.leg-list li:last-child {
  margin-bottom: 0;
}

/* Default bullet: teal dot */
.leg-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ep-primary);
}

/* Check-mark variant */
.leg-list--check li::before {
  content: "✓";
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  background: none;
  color: var(--ep-primary);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.7;
}

/* Numbered variant (CSS counters) */
.leg-list--numbered {
  counter-reset: leg-counter;
}

.leg-list--numbered li {
  padding-left: 40px;
}

.leg-list--numbered li::before {
  counter-increment: leg-counter;
  content: counter(leg-counter);
  left: 0;
  top: .12em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ep-soft);
  color: var(--ep-primary-d);
  font-family: var(--ep-display);
  font-weight: 700;
  font-size: .82rem;
  line-height: 24px;
  text-align: center;
}

/* ============================================================
   TABLE OF CONTENTS (Datenschutz)
   ============================================================ */
.leg-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
}

.leg-toc li {
  padding: 0;
  margin: 0;
}

.leg-toc li::before {
  display: none;
}

.leg-toc a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  border-bottom: none;
  color: var(--ep-body);
  font-weight: 500;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.leg-toc a:hover {
  background: var(--ep-surface-2);
  color: var(--ep-primary-d);
  border-bottom: none;
  transform: translateX(3px);
}

/* ============================================================
   CONTACT / ADDRESS BLOCKS
   ============================================================ */
.leg-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leg-contact__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--ep-line);
}

.leg-contact__item:first-child {
  padding-top: 0;
}

.leg-contact__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.leg-contact__label {
  flex: 0 0 130px;
  min-width: 0;
  font-weight: 600;
  color: var(--ep-muted);
  font-size: .92rem;
}

.leg-contact__value {
  flex: 1 1 240px;
  min-width: 0;
  color: var(--ep-ink-2);
  font-weight: 500;
  line-height: 1.6;
  word-break: break-word;
}

a.leg-contact__value {
  color: var(--ep-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 124, 102, .3);
  transition: color .2s ease, border-color .2s ease;
}

a.leg-contact__value:hover {
  color: var(--ep-primary-d);
  border-bottom-color: var(--ep-primary-d);
}

/* ============================================================
   HIGHLIGHT / CALLOUT BLOCKS
   ============================================================ */
.leg-highlight {
  position: relative;
  background: linear-gradient(135deg, var(--ep-soft) 0%, var(--ep-surface-2) 100%);
  border: 1px solid var(--ep-line);
  border-left: 4px solid var(--ep-primary);
  border-radius: var(--ep-radius);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--ep-shadow-sm);
}

.leg-highlight p {
  color: var(--ep-ink-2);
}

.leg-highlight__title {
  font-family: var(--ep-display);
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ep-primary-d);
  margin: 0 0 10px;
}

/* Info variant — accent (amber) tone */
.leg-highlight--info {
  background: linear-gradient(135deg, #FCF3DE 0%, #FBEFD1 100%);
  border-left-color: var(--ep-accent);
}

.leg-highlight--info .leg-highlight__title {
  color: var(--ep-accent-d);
}

/* ============================================================
   NOTE & FOOTER NOTE
   ============================================================ */
.leg-note {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--ep-surface-2);
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--ep-muted);
}

/* Dark closing note band — white text on dark */
.leg-footer-note {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--ep-dark);
  border-radius: var(--ep-radius);
  color: rgba(255, 255, 255, .85);
  box-shadow: var(--ep-shadow-sm);
}

.leg-footer-note p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .85);
  font-size: .94rem;
  line-height: 1.6;
}

.leg-footer-note p:last-child {
  margin-bottom: 0;
}

.leg-footer-note strong {
  color: #fff;
}

/* ============================================================
   OPTIONAL TABLE SUPPORT (in case legal content adds tables)
   ============================================================ */
.leg-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: .95rem;
  background: var(--ep-surface);
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-radius);
  overflow: hidden;
}

.leg-content th,
.leg-content td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ep-line);
  line-height: 1.6;
}

.leg-content th {
  background: var(--ep-surface-2);
  color: var(--ep-ink-2);
  font-weight: 600;
}

.leg-content tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   RESPONSIVE — 1920 → 375
   ============================================================ */
@media (max-width: 1200px) {
  .leg-hero {
    padding: 108px 22px 60px;
  }
  .leg-main {
    padding: 66px 22px 84px;
  }
}

@media (max-width: 1024px) {
  .leg-hero {
    padding: 96px 22px 54px;
  }
  .leg-main {
    padding: 60px 22px 76px;
  }
  .leg-section {
    margin-bottom: 46px;
  }
}

@media (max-width: 768px) {
  .leg-hero {
    padding: 84px 18px 48px;
  }
  .leg-hero__breadcrumb {
    margin-bottom: 18px;
  }
  .leg-main {
    padding: 54px 18px 66px;
  }
  .leg-section {
    margin-bottom: 40px;
  }
  .leg-card {
    padding: 22px 20px;
  }
  .leg-highlight {
    padding: 20px 20px;
  }
  /* TOC collapses to single column */
  .leg-toc {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .leg-footer-note {
    padding: 18px 20px;
  }
}

@media (max-width: 480px) {
  .leg-hero {
    padding: 78px 16px 44px;
  }
  .leg-hero::after {
    width: 300px;
    height: 300px;
    right: -110px;
    bottom: -120px;
  }
  .leg-main {
    padding: 48px 16px 60px;
  }
  .leg-card {
    padding: 20px 17px;
  }
  .leg-card__body {
    font-size: .96rem;
  }
  .leg-highlight {
    padding: 18px 17px;
  }
  /* Contact rows stack: label above value */
  .leg-contact__item {
    flex-direction: column;
    gap: 3px;
    padding: 11px 0;
  }
  .leg-contact__label {
    flex: none;
  }
  .leg-contact__value {
    flex: none;
  }
  .leg-list--numbered li {
    padding-left: 36px;
  }
}

@media (max-width: 375px) {
  .leg-hero {
    padding: 74px 14px 40px;
  }
  .leg-main {
    padding: 44px 14px 54px;
  }
  .leg-card {
    padding: 18px 15px;
  }
  .leg-section__title {
    font-size: 1.34rem;
  }
}
