/* términos y condiciones*/

.legal-document {
  max-width: 900px;
  margin: 4rem auto 6rem;
  padding: 3rem;
  background: rgba(17, 18, 34, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(0, 181, 202, 0.15);
  box-shadow: 0 10px 40px rgba(0, 181, 202, 0.08);
  position: relative;
  overflow: hidden;
}

/* Línea decorativa lateral */
.legal-document::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom,
      var(--bs-primary) 0%,
      var(--bs-secondary) 100%);
}

/* Cabecera del documento */
.document-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(109, 81, 255, 0.3);
  position: relative;
}

.document-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg,
      var(--bs-primary),
      var(--bs-secondary));
  border-radius: 2px;
}

.document-header h1 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 181, 202, 0.2);
}

.document-subtitle {
  color: var(--bs-primary);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Secciones principales */
.legal-section {
  margin-bottom: 3.5rem;
  counter-increment: section-counter;
  position: relative;
}

.legal-section:last-of-type {
  margin-bottom: 0;
}

.legal-section h2 {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(109, 81, 255, 0.2);
  position: relative;
}

.legal-section h2::before {
  content: counter(section-counter) ".";
  color: var(--bs-primary);
  margin-right: 10px;
  font-weight: 700;
}

/* Subsecciones */
.legal-subsection {
  margin-bottom: 2.2rem;
  background: rgba(30, 31, 48, 0.4);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 3px solid rgba(0, 181, 202, 0.3);
  transition: all 0.3s ease;
}

.legal-subsection:hover {
  background: rgba(30, 31, 48, 0.6);
  border-left-color: var(--bs-primary);
  box-shadow: 0 4px 12px rgba(0, 181, 202, 0.1);
}

.legal-subsection h3 {
  color: #e6e6e6;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.legal-subsection h3::before {
  content: '•';
  color: var(--bs-secondary);
  margin-right: 10px;
  font-size: 1.5rem;
}

/* Listas */
.legal-subsection ul,
.legal-subsection ol {
  color: #cccccc;
  line-height: 1.7;
  padding-left: 1.8rem;
  margin: 0.8rem 0;
}

.legal-subsection li {
  margin-bottom: 0.6rem;
  position: relative;
}

.legal-subsection li::marker {
  color: var(--bs-primary);
}

.legal-subsection ul ul,
.legal-subsection ol ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
}

.legal-subsection ul ul li::marker,
.legal-subsection ol ol li::marker {
  color: var(--bs-secondary);
  opacity: 0.8;
}

/* Textos destacados */
.legal-subsection strong {
  color: var(--bs-primary);
  font-weight: 600;
}

.legal-subsection em {
  color: #b8b8b8;
  font-style: italic;
}

/* Notas especiales */
.note {
  background: rgba(0, 181, 202, 0.08);
  border: 1px solid rgba(0, 181, 202, 0.2);
  border-left: 4px solid var(--bs-primary);
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  border-radius: 6px;
  color: #cccccc;
  font-size: 0.95rem;
  line-height: 1.6;
}

.note::before {
  content: '📌 Nota:';
  color: var(--bs-primary);
  font-weight: 600;
  margin-right: 5px;
}

/* Pie del documento */
.document-footer {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 2px solid rgba(109, 81, 255, 0.3);
  text-align: center;
}

.document-footer p {
  color: #b8b8b8;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.document-footer strong {
  color: #ffffff;
  font-weight: 600;
}

/* Enlace de descarga */
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  background: rgba(0, 181, 202, 0.1);
  border: 1px solid rgba(0, 181, 202, 0.3);
  border-radius: 6px;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.download-link:hover {
  background: rgba(0, 181, 202, 0.2);
  color: #ffffff;
  border-color: var(--bs-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 181, 202, 0.2);
}

.download-link::before {
  content: '📄';
  font-size: 1.2rem;
}

/* Numeración automática para subsecciones */
.legal-section {
  counter-reset: subsection-counter;
}

.legal-subsection h3::after {
  content: counter(section-counter) "." counter(subsection-counter);
  counter-increment: subsection-counter;
  color: var(--bs-primary);
  opacity: 0.7;
  font-size: 0.9rem;
  margin-left: auto;
  font-weight: 400;
}

/* Estilos para citas o referencias legales */
.legal-reference {
  font-family: 'Courier New', monospace;
  background: rgba(30, 31, 48, 0.6);
  padding: 1rem;
  border-radius: 6px;
  border-left: 3px solid var(--bs-secondary);
  margin: 1rem 0;
  color: #b8b8b8;
  font-size: 0.9rem;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {

  .legal-subsection,
  .download-link {
    transition: none;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .legal-document {
    margin: 2rem 1rem 4rem;
    padding: 2rem;
  }

  .document-header h1 {
    font-size: 2rem;
  }

  .legal-section h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .legal-document {
    padding: 1.5rem;
  }

  .document-header h1 {
    font-size: 1.8rem;
  }

  .document-subtitle {
    font-size: 1rem;
  }

  .legal-section h2 {
    font-size: 1.3rem;
  }

  .legal-subsection {
    padding: 1.2rem;
  }

  .legal-subsection h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .legal-document {
    padding: 1rem;
    margin: 1rem 0.5rem 3rem;
  }

  .legal-document::before {
    width: 3px;
  }

  .document-header {
    margin-bottom: 2.5rem;
  }

  .document-header h1 {
    font-size: 1.6rem;
  }

  .legal-section {
    margin-bottom: 2.5rem;
  }
}

/* Estilos para impresión */
@media print {
  .legal-document {
    background: white !important;
    color: black !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 2cm !important;
    max-width: 100% !important;
  }

  .legal-document::before {
    display: none;
  }

  .document-header,
  .legal-section h2,
  .legal-subsection h3 {
    color: black !important;
  }

  .legal-subsection {
    background: white !important;
    border: 1px solid #eee !important;
  }

  .download-link {
    display: none !important;
  }

  .legal-subsection strong {
    color: black !important;
  }

  .legal-subsection ul,
  .legal-subsection ol {
    color: #333 !important;
  }

  .note {
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    color: #555 !important;
  }
}

/* Animación sutil para secciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.legal-section {
  animation: fadeInUp 0.6s ease-out;
}

.legal-section:nth-child(2) {
  animation-delay: 0.1s;
}

.legal-section:nth-child(3) {
  animation-delay: 0.2s;
}

.legal-section:nth-child(4) {
  animation-delay: 0.3s;
}

.legal-section:nth-child(5) {
  animation-delay: 0.4s;
}

.legal-section:nth-child(6) {
  animation-delay: 0.5s;
}

.legal-section:nth-child(7) {
  animation-delay: 0.6s;
}

.legal-section:nth-child(8) {
  animation-delay: 0.7s;
}

.legal-section:nth-child(9) {
  animation-delay: 0.8s;
}