.hero-section {
  min-height: 60vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1920&q=80")
      center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0rem 4rem;
}

.terms-toc {
  background: linear-gradient(135deg, #e0e4e7ad 0%, #ffffff 100%);
  border-left: 4px solid var(--primary-color);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
  /* Prevent overflow on small screens */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-toc-title {
  font-family: var(--font-heading);
  font-size: var(--heading-sm);
  font-weight: var(--heading-sm-weight);
  color: var(--secondary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-toc-title i {
  color: var(--primary-color);
  flex-shrink: 0;
}

.terms-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.terms-toc-list li {
  margin: 0;
}

.terms-toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-md);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  transition: all 0.3s ease;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.terms-toc-list a:hover {
  color: var(--primary-color);
  padding-left: 10px;
}

.terms-toc-list a i {
  font-size: var(--font-size-12);
  color: var(--primary-color);
  flex-shrink: 0;
}

.terms-section {
  scroll-margin-top: 100px;
  margin-bottom: 40px;
  /* Prevent content overflow */
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 0;
}

.terms-section-number {
  width: 55px;
  height: 50px;
  background: rgba(21, 105, 253, 0.2);
  border-left: 3px solid var(--primary-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--heading-md-weight);
  font-size: var(--heading-md);
  margin-bottom: 5px;
}

.terms-section-title {
  font-family: var(--font-heading);
  font-size: var(--heading-lg);
  font-weight: var(--heading-md-weight);
  line-height: var(--heading-md-line);
  color: var(--secondary-color);
  margin-bottom: 10px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.terms-section p {
  font-size: var(--text-md);
  line-height: var(--text-lg-line);
  color: var(--text-secondary);
  margin-bottom: 20px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section ul,
.terms-section ol {
  margin: 20px 0;
  padding-left: 25px;
}

.terms-section li {
  font-size: var(--text-md);
  line-height: var(--text-lg-line);
  color: var(--text-secondary);
  margin-bottom: 12px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-section strong {
  color: var(--text-dark);
  font-weight: 600;
}

.terms-highlight {
  background: rgba(21, 105, 253, 0.05);
  border-left: 4px solid var(--primary-color);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 4px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-highlight-title {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-lg);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.terms-highlight-title i {
  color: var(--primary-color);
  flex-shrink: 0;
}

.terms-highlight p {
  margin-bottom: 0;
}

.terms-warning {
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 4px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-warning-title {
  font-weight: 600;
  color: #f57c00;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-lg);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.terms-warning-title i {
  color: #ffc107;
  flex-shrink: 0;
}

.terms-contact-cta {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  padding: 50px 40px;
  border-radius: 12px;
  text-align: center;
  margin: 60px 0;
  overflow: hidden;
}

.terms-contact-cta h3 {
  font-family: var(--font-heading);
  font-size: var(--heading-md);
  color: var(--text-white);
  margin-bottom: 15px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.terms-contact-cta p {
  color: var(--text-light);
  font-size: var(--text-lg);
  margin-bottom: 25px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.terms-contact-cta .btn {
  background: var(--text-white);
  color: var(--secondary-color);
  border-color: var(--text-white);
}

.terms-contact-cta .btn:hover {
  background: transparent;
  border-color: var(--text-white);
  color: var(--text-white);
}

/* ============================================
   RESPONSIVE STYLES
============================================ */

@media (max-width: 768px) {
  .terms-toc {
    padding: 20px;
    margin-bottom: 30px;
  }

  .terms-toc-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .terms-toc-list a {
    padding: 6px 0;
  }

  .terms-section-number {
    width: 40px;
    height: 40px;
    font-size: var(--font-size-18);
  }

  .terms-section {
    margin-bottom: 35px;
  }

  .terms-highlight,
  .terms-warning {
    padding: 15px 18px;
    margin: 20px 0;
  }

  .terms-contact-cta {
    padding: 35px 25px;
    margin: 40px 0;
  }
}

@media (max-width: 480px) {
  .terms-toc {
    padding: 15px;
    margin-bottom: 25px;
  }

  .terms-toc-title {
    font-size: var(--font-size-16);
    margin-bottom: 15px;
  }

  .terms-toc-list {
    gap: 4px;
  }

  .terms-toc-list a {
    font-size: var(--font-size-13, 13px);
    padding: 5px 0;
    gap: 8px;
  }

  .terms-toc-list a:hover {
    padding-left: 6px;
  }

  .terms-section {
    margin-bottom: 28px;
  }

  .terms-section-number {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-16);
  }

  .terms-section-title {
    font-size: var(--font-size-18, 18px);
  }

  .terms-section p,
  .terms-section li {
    font-size: var(--font-size-14);
  }

  .terms-section ul,
  .terms-section ol {
    padding-left: 18px;
    margin: 15px 0;
  }

  .terms-section li {
    margin-bottom: 8px;
  }

  .terms-highlight,
  .terms-warning {
    padding: 12px 15px;
    margin: 15px 0;
  }

  .terms-highlight-title,
  .terms-warning-title {
    font-size: var(--font-size-14);
    gap: 8px;
  }

  .terms-contact-cta {
    padding: 28px 18px;
    margin: 30px 0;
    border-radius: 8px;
  }

  .terms-contact-cta h3 {
    font-size: var(--font-size-18, 18px);
    margin-bottom: 12px;
  }

  .terms-contact-cta p {
    font-size: var(--font-size-14);
    margin-bottom: 20px;
  }

  .terms-contact-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-size: var(--font-size-14);
  }

  /* All text elements on small screens */
  .terms-section h1,
  .terms-section h2,
  .terms-section h3,
  .terms-section h4,
  .terms-section h5,
  .terms-section h6,
  .terms-section p,
  .terms-section li,
  .terms-section a,
  .terms-section span {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
}
