/* ========================================
   TERMS AND CONDITIONS PAGE STYLES
   ======================================== */

.terms-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-neutral-800);
}

.terms-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.terms-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.terms-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(44, 44, 44, 0.4) 0%, rgba(44, 44, 44, 0.6) 100%);
  z-index: 1;
}

.terms-hero__content {
  position: relative;
  z-index: 2;
  padding: var(--space-16) 0;
}

.terms-hero__title {
  color: var(--color-text-inverse);
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.terms-hero__subtitle {
  color: var(--color-text-inverse);
  font-size: var(--text-lg);
  max-width: 70ch;
  opacity: 0.95;
  line-height: var(--leading-relaxed);
}

/* ========================================
   TABLE OF CONTENTS SECTION
   ======================================== */

.section--toc {
  padding: var(--space-24) 0;
  background-color: var(--color-background-alt);
}

.toc__nav {
  margin-top: var(--space-10);
}

.toc__list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .toc__list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

.toc__link {
  display: block;
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  transition: all 0.3s ease;
}

.toc__link:hover {
  background-color: var(--color-background);
  border-left-color: var(--color-primary-dark);
  transform: translateX(4px);
}

/* ========================================
   TERMS CONTENT SECTIONS
   ======================================== */

.section--general-terms,
.section--class-policies,
.section--membership-terms,
.section--cancellation,
.section--liability,
.section--health-safety,
.section--privacy,
.section--contact-complaints {
  padding: var(--space-24) 0;
}

.section--general-terms,
.section--membership-terms,
.section--liability,
.section--privacy {
  background-color: var(--color-background-alt);
}

.terms-content {
  max-width: 80ch;
  margin: 0 auto;
}

.terms-content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-6);
  font-weight: var(--font-weight-semibold);
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: var(--space-3);
}

.terms-content h3:first-child {
  margin-top: 0;
}

.terms-content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.terms-content ul {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
  margin-left: 0;
}

.terms-content ul li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  padding-left: var(--space-6);
  position: relative;
  line-height: var(--leading-relaxed);
}

.terms-content ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
  font-size: var(--text-lg);
}

.terms-content strong {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

/* ========================================
   SECTION STYLES
   ======================================== */

.section {
  position: relative;
}

.section__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6);
}

.section__header--centered {
  text-align: center;
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 70ch;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* ========================================
   CONTACT & COMPLAINTS SECTION
   ======================================== */

.section--contact-complaints {
  background-color: var(--color-background);
}

.terms-content ul li:last-child {
  margin-bottom: 0;
}

/* ========================================
   CTA SECTION
   ======================================== */

.section--cta-terms {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--color-background-alt) 0%, var(--color-background) 100%);
}

.cta-terms__content {
  max-width: 80ch;
  margin: 0 auto;
  text-align: center;
}

.cta-terms__content .section__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.cta-terms__content .section__lead {
  font-size: var(--text-lg);
  margin-bottom: var(--space-10);
}

.cta-terms__actions {
  display: flex;
  gap: var(--space-4);
  margin: 0 auto var(--space-12);
  justify-content: center;
  flex-wrap: wrap;
}

.btn--large {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
}

/* ========================================
   BREADCRUMB
   ======================================== */

.breadcrumb {
  margin-bottom: var(--space-6);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-inverse);
  opacity: 0.9;
}

.breadcrumb__item:not(:last-child)::after {
  content: " / ";
  margin-left: var(--space-2);
  opacity: 0.7;
}

.breadcrumb__link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.breadcrumb__link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ========================================
   SCROLLING & INTERACTIONS
   ======================================== */

html {
  scroll-behavior: smooth;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .terms-hero__title {
    font-size: var(--text-4xl);
  }

  .terms-hero__subtitle {
    font-size: var(--text-base);
  }

  .section__title {
    font-size: var(--text-3xl);
  }

  .section__subtitle {
    font-size: var(--text-base);
  }

  .terms-content h3 {
    font-size: var(--text-xl);
  }

  .toc__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .terms-hero__title {
    font-size: var(--text-3xl);
  }

  .cta-terms__actions {
    flex-direction: column;
  }

  .btn--large {
    width: 100%;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .terms-hero,
  .breadcrumb {
    display: none;
  }

  .terms-content {
    color: #000;
  }

  .terms-content h3 {
    page-break-after: avoid;
  }

  .terms-content ul,
  .terms-content p {
    page-break-inside: avoid;
  }
}
