/* ==========================================================================
   Estilos Premium para Páginas Legales (Políticas y Términos)
   Diseñado por Antigravity con los colores de la marca NED
   ========================================================================== */

.legal-main {
  padding: 6.5rem 1.5rem 3rem 1.5rem;
  background: radial-gradient(circle at 10% 20%, rgba(196, 34, 125, 0.03) 0%, rgba(255, 231, 0, 0.02) 90%), #fafafa;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

.legal-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.legal-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 45px rgba(43, 45, 66, 0.04), 0 5px 15px rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(196, 34, 125, 0.08);
  padding: 2.5rem 2.5rem;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  animation: legalFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Barra superior decorativa con gradiente de marca */
.legal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--magenta) 0%, var(--amarillo) 100%);
}

@media (max-width: 768px) {
  .legal-main {
    padding: 6.5rem 1rem 3rem 1rem;
  }
  .legal-card {
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
  }
}

/* ==========================================================================
   Tipografía y Elementos Renderizados por el Markdown
   ========================================================================== */

#legal-content {
  color: #3b3d4f;
  font-family: "Nunito", sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 400;
  text-align: left;
}

#legal-content p {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: justify;
}

/* Título Principal (Se renderiza del primer H1 o H2) */
#legal-content h1, 
#legal-content > p:first-child strong,
#legal-content > p:first-child b {
  font-family: "Outfit", sans-serif;
  color: var(--text-negro);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 1.5rem;
  display: block;
}

/* Encabezados de Sección (h2) */
#legal-content h2, 
#legal-content h3 {
  font-family: "Outfit", sans-serif;
  color: var(--text-negro);
  font-weight: 700;
  line-height: 1.3;
}

#legal-content h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  border-bottom: 1px solid rgba(196, 34, 125, 0.15);
  padding-bottom: 0.25rem;
  color: var(--magenta);
  margin: 2rem 0 1rem 0;
}

#legal-content h3 {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin: 1.5rem 0 0.8rem 0;
}

/* Negrita */
#legal-content strong, 
#legal-content b {
  color: var(--text-negro);
  font-weight: 700;
}

/* Listas */
#legal-content ul, 
#legal-content ol {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
  list-style-position: outside;
}

#legal-content ul {
  list-style-type: none; /* Quitamos viñetas toscas para usar bullets personalizados */
}

#legal-content ul li {
  position: relative;
  padding-left: 0.8rem;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Viñetas personalizadas magenta */
#legal-content ul li::before {
  content: "•";
  color: var(--magenta);
  font-weight: bold;
  font-size: 1rem;
  position: absolute;
  left: 0;
  top: -0.1rem;
}

#legal-content ol li {
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Enlaces */
#legal-content a {
  color: var(--magenta);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(196, 34, 125, 0.4);
  transition: all 0.2s ease;
}

#legal-content a:hover {
  color: var(--text-negro);
  border-bottom: 1px solid var(--text-negro);
  background-color: rgba(196, 34, 125, 0.04);
}

/* Divisores */
#legal-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(196, 34, 125, 0) 0%, rgba(196, 34, 125, 0.2) 50%, rgba(196, 34, 125, 0) 100%);
  margin: 3rem 0;
}

/* ==========================================================================
   Skeleton Loading State (Pulsante)
   ========================================================================== */

.legal-skeleton {
  width: 100%;
}

.skeleton-title {
  width: 60%;
  height: 40px;
  background: #f0f0f0;
  margin: 0 auto 3rem auto;
  border-radius: 8px;
  animation: pulseSkeleton 1.5s infinite ease-in-out;
}

.skeleton-line {
  width: 100%;
  height: 16px;
  background: #f0f0f0;
  margin-bottom: 1rem;
  border-radius: 4px;
  animation: pulseSkeleton 1.5s infinite ease-in-out;
}

.skeleton-line.short {
  width: 80%;
}

.skeleton-line.very-short {
  width: 45%;
}

.skeleton-group {
  margin-bottom: 2.5rem;
}

@keyframes pulseSkeleton {
  0% {
    background-color: #f2f2f2;
  }
  50% {
    background-color: #e2e2e2;
  }
  100% {
    background-color: #f2f2f2;
  }
}

@keyframes legalFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Error state
   ========================================================================== */

.legal-error {
  text-align: center;
  padding: 2rem 0;
}

.legal-error h3 {
  color: var(--magenta) !important;
  margin-top: 0 !important;
}

.legal-error p {
  margin-bottom: 2rem;
  color: #666;
}

.btn-retry {
  background-color: var(--magenta);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(196, 34, 125, 0.2);
  transition: all 0.2s ease;
}

.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 34, 125, 0.3);
  background-color: var(--text-negro);
}
