/* ==========================================================================
   Legal Pages Styles (Terms, Privacy, Imprint)
   ========================================================================== */

/* Page Layout */
.legal-page {
  max-width: 900px;
  margin: 0 auto;
}

.legal-page__updated {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
}

/* Sections */
.legal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-gray-200);
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.legal-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.legal-section a:hover {
  color: var(--color-primary-dark);
}

/* Text Variations */
.legal-text--large {
  font-size: 1.1rem;
}

/* Lists */
.legal-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.legal-list li {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.legal-list li strong {
  color: var(--text-primary);
}

.legal-list--no-bullet {
  list-style: none;
  padding-left: 0;
}

.legal-list--no-bullet li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.legal-list--no-bullet li:last-child {
  border-bottom: none;
}

/* Address Blocks */
.legal-address {
  font-style: normal;
  line-height: 1.8;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border-left: 3px solid var(--color-primary);
}

.legal-address--prominent {
  background-color: rgba(45, 90, 39, 0.08);
  border-left-width: 4px;
}

.legal-address strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tables */
.legal-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--color-gray-200);
}

.legal-table thead th {
  background-color: var(--color-primary);
  color: var(--text-inverse);
  font-weight: 600;
}

.legal-table tbody tr:nth-child(even) {
  background-color: var(--bg-secondary);
}

.legal-table tbody td {
  color: var(--text-secondary);
}

.legal-table tbody td strong {
  color: var(--text-primary);
}

.legal-table--simple {
  border: none;
}

.legal-table--simple th,
.legal-table--simple td {
  border: none;
  border-bottom: 1px solid var(--color-gray-200);
  padding: 0.875rem 1rem 0.875rem 0;
}

.legal-table--simple td:first-child {
  width: 35%;
  color: var(--text-primary);
  font-weight: 500;
}

.legal-table--simple tr:last-child td {
  border-bottom: none;
}

/* Contact Grid for Imprint */
.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.legal-contact-item {
  background-color: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.legal-contact-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 0.75rem 0;
}

.legal-contact-item p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* Notes */
.legal-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .legal-section h2 {
    font-size: 1.25rem;
  }

  .legal-section h3 {
    font-size: 1rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .legal-address {
    padding: 1rem;
  }

  .legal-contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .legal-table--simple td:first-child {
    width: 40%;
  }
}
