.terms-page {
  background-color: var(--color-bg-subtle);
}

.terms-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: white;
  padding: var(--space-16) 0 var(--space-12);
  position: relative;
}

.terms-hero__title {
  color: white;
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
  text-align: center;
}

.terms-hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: var(--text-lg);
  margin-bottom: 0;
}

.breadcrumb {
  margin-bottom: var(--space-6);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  color: rgba(255, 255, 255, 0.5);
  margin-left: var(--space-2);
}

.breadcrumb__link {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
  color: white;
}

.breadcrumb__current {
  color: white;
  font-weight: 600;
}

.terms-content {
  padding: var(--space-12) 0 var(--space-24);
}

.terms-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  align-items: start;
}

.terms-sidebar {
  position: sticky;
  top: var(--space-8);
}

.terms-nav {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.terms-nav__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  color: var(--color-text);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-accent);
}

.terms-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.terms-nav__link {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.terms-nav__link:hover {
  color: var(--color-primary);
  background-color: var(--color-bg-subtle);
  border-left-color: var(--color-primary-light);
}

.terms-document {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-10);
  box-shadow: var(--shadow-sm);
}

.terms-section {
  margin-bottom: var(--space-10);
  scroll-margin-top: var(--space-8);
}

.terms-section:last-of-type {
  margin-bottom: 0;
}

.terms-section h2 {
  color: var(--color-primary);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.terms-section p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.terms-section a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-primary-light);
  text-underline-offset: 2px;
}

.terms-section a:hover {
  color: var(--color-primary-hover);
  text-decoration-color: var(--color-primary-hover);
}

.terms-footer {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 2px solid var(--color-border);
  text-align: center;
}

.terms-footer p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  font-size: var(--text-lg);
}

.terms-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }
  
  .terms-sidebar {
    position: relative;
    top: 0;
    order: 2;
  }
  
  .terms-nav {
    padding: var(--space-4);
  }
  
  .terms-nav__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2);
  }
  
  .terms-document {
    order: 1;
    padding: var(--space-6);
  }
}

@media (max-width: 640px) {
  .terms-hero {
    padding: var(--space-12) 0 var(--space-8);
  }
  
  .terms-hero__title {
    font-size: var(--text-2xl);
  }
  
  .terms-document {
    padding: var(--space-4);
  }
  
  .terms-section h2 {
    font-size: var(--text-lg);
  }
  
  .terms-nav__list {
    grid-template-columns: 1fr;
  }
  
  .terms-actions {
    flex-direction: column;
  }
  
  .terms-actions .btn {
    width: 100%;
  }
}

@media print {
  .terms-sidebar,
  .terms-hero,
  .terms-actions,
  .breadcrumb {
    display: none;
  }
  
  .terms-document {
    box-shadow: none;
    border: none;
    padding: 0;
  }
  
  .terms-section {
    page-break-inside: avoid;
    margin-bottom: var(--space-6);
  }
}