.terms-header {
  padding: 40px 0;
}

.terms-intro {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.terms-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--default-color), transparent 90%);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--default-color), transparent 20%);
}

.meta-item i {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.important-notice {
  background: color-mix(in srgb, #ffc107, transparent 90%);
  border-left: 4px solid #ffc107;
  padding: 20px;
  border-radius: 0 10px 10px 0;
  display: flex;
  gap: 15px;
}

.notice-icon i {
  color: #ffc107;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notice-content h4 {
  color: var(--heading-color);
  margin-bottom: 10px;
}

.notice-content p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin: 0;
  line-height: 1.6;
}

/* Table of Contents */
.terms-toc {
  background: var(--surface-color);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 120px;
  height: fit-content;
}

.terms-toc h4 {
  color: var(--heading-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav li {
  margin-bottom: 10px;
}

.toc-nav a {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: block;
  padding: 8px 15px;
  border-radius: 8px;
}

.toc-nav a:hover,
.toc-nav a.active {
  color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 95%);
  transform: translateX(5px);
}

/* Terms Content */
.terms-content {
  padding: 80px 0;
}

.terms-sections {
  padding-left: 30px;
}

.terms-section {
  display: flex;
  gap: 30px;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid
    color-mix(in srgb, var(--default-color), transparent 95%);
}

.terms-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-number {
  width: 60px;
  height: 60px !important;
  background: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    color-mix(in srgb, var(--accent-color), black 20%) 100%
  );
  color: var(--contrast-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  position: sticky;
  top: 140px;
  height: fit-content;
}

.section-content {
  flex: 1;
}

.section-content h2 {
  color: var(--heading-color);
  margin-bottom: 25px;
  font-size: 1.8rem;
}

.section-text p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  line-height: 1.7;
  margin-bottom: 20px;
}

.section-text .lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--heading-color);
  margin-bottom: 20px;
}

.section-text ul {
  margin: 20px 0;
  padding-left: 20px;
}

.section-text li {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin-bottom: 8px;
  line-height: 1.6;
}

.section-text a {
  color: var(--accent-color);
  text-decoration: underline;
}

.section-text a:hover {
  color: color-mix(in srgb, var(--accent-color), black 20%);
}

/* Special Boxes */
.important-box,
.info-box,
.warning-box,
.disclaimer-box,
.copyright-notice {
  padding: 20px;
  border-radius: 10px;
  margin: 25px 0;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.important-box {
  background: color-mix(in srgb, #dc3545, transparent 95%);
  border-left: 4px solid #dc3545;
}

.info-box {
  background: color-mix(in srgb, #17a2b8, transparent 95%);
  border-left: 4px solid #17a2b8;
}

.warning-box {
  background: color-mix(in srgb, #ffc107, transparent 95%);
  border-left: 4px solid #ffc107;
}

.disclaimer-box {
  background: color-mix(in srgb, #6c757d, transparent 95%);
  border-left: 4px solid #6c757d;
}

.copyright-notice {
  background: color-mix(in srgb, var(--accent-color), transparent 95%);
  border-left: 4px solid var(--accent-color);
}

.important-box i {
  color: #dc3545;
}

.info-box i {
  color: #17a2b8;
}

.warning-box i {
  color: #ffc107;
}

.disclaimer-box i {
  color: #6c757d;
}

.copyright-notice i {
  color: var(--accent-color);
}

.important-box p,
.info-box p,
.warning-box p,
.disclaimer-box p,
.copyright-notice p {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 10%);
  line-height: 1.6;
}

/* Jurisdiction Details */
.jurisdiction-details {
  background: color-mix(in srgb, var(--accent-color), transparent 97%);
  padding: 25px;
  border-radius: 10px;
  margin: 20px 0;
}

.jurisdiction-details h4 {
  color: var(--heading-color);
  margin-bottom: 15px;
}

.contact-legal {
  background: var(--surface-color);
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.contact-legal h4 {
  color: var(--heading-color);
  margin-bottom: 10px;
}

/* Terms Footer */
.terms-footer {
  padding: 60px 0;
}

.terms-footer-content {
  background: var(--surface-color);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.footer-notice {
  display: flex;
  gap: 20px;
  align-items: center;
  text-align: left;
  margin-bottom: 30px;
  padding: 25px;
  background: color-mix(in srgb, var(--accent-color), transparent 95%);
  border-radius: 15px;
}

.footer-notice .notice-icon i {
  font-size: 2.5rem;
  color: var(--accent-color);
}

.footer-notice h4 {
  color: var(--heading-color);
  margin-bottom: 10px;
}

.footer-notice p {
  color: color-mix(in srgb, var(--default-color), transparent 20%);
  margin: 0;
  line-height: 1.6;
}

.footer-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.related-documents {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid
    color-mix(in srgb, var(--default-color), transparent 90%);
}

.related-documents h5 {
  color: var(--heading-color);
  margin-bottom: 20px;
}

.documents-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--accent-color), transparent 95%);
  color: var(--accent-color);
  padding: 15px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
}

.doc-link:hover {
  background: var(--accent-color);
  color: var(--contrast-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.doc-link i {
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .terms-sections {
    padding-left: 0;
  }

  .terms-toc {
    position: static;
    margin-bottom: 40px;
  }

  .terms-section {
    flex-direction: column;
    gap: 20px;
  }

  .section-number {
    position: static;
    align-self: flex-start;
  }
}

@media (max-width: 768px) {
  .terms-meta {
    flex-direction: column;
    gap: 15px;
  }

  .terms-intro {
    padding: 30px 20px;
  }

  .important-notice,
  .footer-notice {
    flex-direction: column;
    text-align: center;
  }

  .terms-toc {
    padding: 25px 20px;
  }

  .terms-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
  }

  .section-content h2 {
    font-size: 1.5rem;
  }

  .footer-actions {
    flex-direction: column;
    align-items: center;
  }

  .footer-actions .btn {
    width: 100%;
    max-width: 300px;
  }

  .documents-grid {
    flex-direction: column;
  }

  .doc-link {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .terms-footer-content {
    padding: 30px 20px;
  }

  .section-number {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }

  .important-box,
  .info-box,
  .warning-box,
  .disclaimer-box,
  .copyright-notice {
    padding: 15px;
    flex-direction: column;
    text-align: center;
  }

  .jurisdiction-details,
  .contact-legal {
    padding: 20px 15px;
  }
}

/* Smooth scrolling for ToC links */
html {
  scroll-behavior: smooth;
}

/* Active section highlighting */
.terms-section:target .section-number {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  transform: scale(1.1);
}

.terms-section:target {
  background: color-mix(in srgb, var(--accent-color), transparent 98%);
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
}
