/* =====================================================
   TÉRMINOS & CONDICIONES — VERSIÓN PREMIUM
   Usa como base la misma línea visual de Home
===================================================== */

/* Variables (por si esta hoja se usa sola) */
:root {
  --azul-petroleo: #1e3a4a;
  --cian: #34d7c4;
  --cian-claro: #e0fffa;
  --blanco: #ffffff;
  --texto: #1f2933;
  --gris-claro: #6b7280;
  --gris-borde: #e2e8f0;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.15);
  --radius-card: 1.4rem;
}

/* ================================================
   HERO LEGAL (hereda .hero del Index y lo ajusta)
================================================ */

.terms-hero {
  position: relative;
  padding: 7.8rem 0 3.8rem;
  background:
    radial-gradient(circle at top left, rgba(52, 215, 196, 0.2) 0, transparent 55%),
    radial-gradient(circle at bottom right, rgba(142, 249, 229, 0.18) 0, transparent 55%),
    linear-gradient(135deg, #0b2534, #12384b);
  color: var(--blanco);
  overflow: hidden;
}

/* Reaprovechamos la misma rejilla de hero pero adaptada a legal */
.terms-hero .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 2.5rem;
  align-items: flex-start;
}

/* Texto principal */
.terms-hero .hero-text h1 {
  margin: 0 0 0.8rem;
}

.terms-hero .hero-subtitle {
  margin-bottom: 1.5rem;
  max-width: 560px;
}

/* Meta: versión + fecha */
.meta-item {
  text-align: left;
}

/* Blob decorativo reutilizable */
.terms-hero::before,
.terms-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
  pointer-events: none;
}

.terms-hero::before {
  width: 260px;
  height: 260px;
  background: #34d7c4;
  top: -80px;
  right: 4%;
}

.terms-hero::after {
  width: 220px;
  height: 220px;
  background: #8ef9e5;
  bottom: -90px;
  left: -40px;
}

/* ================================================
   TABLA DE CONTENIDO (card derecha)
================================================ */

.terms-toc {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1.4rem;
  padding: 1.4rem 1.5rem 1.3rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  text-align: left;
}

.terms-toc h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 600;
}

.terms-toc small {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.7rem;
}

.terms-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.terms-toc li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.terms-toc li::before {
  content: "•";
  color: var(--cian);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.terms-toc a {
  text-decoration: none;
  color: #e5e7eb;
  transition: color 0.2s ease, transform 0.15s ease;
}

.terms-toc a:hover {
  color: var(--cian);
  transform: translateX(2px);
}

/* ================================================
   CONTENIDO LEGAL
================================================ */

.terms-content {
  background: #ffffff;
  padding: 3.5rem 0 4.2rem;
}

.terms-section {
  margin-bottom: 2.6rem;
  scroll-margin-top: 120px; /* para que el anchor no quede tapado por el header */
}

.terms-section:last-of-type {
  margin-bottom: 0;
}

.terms-section h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  color: var(--azul-petroleo);
  margin: 0 0 0.75rem;
}

.terms-section h2 i {
  color: var(--cian);
  font-size: 1.1rem;
}

.terms-section > p {
  margin: 0 0 0.6rem;
  color: var(--gris-claro);
  font-size: 0.96rem;
  max-width: 780px;
}

/* Listas elegantes */
.terms-section ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  color: #4b5563;
  font-size: 0.95rem;
}

.terms-section ul li {
  margin-bottom: 0.35rem;
}

/* Lista anidada más compacta */
.terms-section ul ul {
  margin-top: 0.2rem;
  padding-left: 1rem;
  font-size: 0.93rem;
}

/* Intro y aceptación */
.terms-intro {
  background: #f9fafb;
  border-radius: var(--radius-card);
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--gris-borde);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  margin-bottom: 2.6rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.terms-intro p {
  margin: 0 0 0.5rem;
}

.terms-intro p:last-child {
  margin-bottom: 0;
}

.terms-acceptance {
  margin-top: 2.4rem;
  padding: 1.6rem 1.6rem 1.3rem;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #0b2534, #134e4a);
  color: #e5e7eb;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.6);
}

.terms-acceptance p {
  margin: 0 0 1rem;
  font-size: 0.96rem;
}

/* Bloque de contacto legal dentro de la aceptación */
.contact-legal {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.9rem;
}

.contact-legal h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #e5e7eb;
}

.contact-legal p {
  margin: 0.1rem 0;
}

.contact-legal i {
  margin-right: 0.4rem;
  color: var(--cian);
}

.contact-legal a {
  color: #a5f3fc;
  text-decoration: none;
}

.contact-legal a:hover {
  text-decoration: underline;
}

/* ================================================
   CTA FINAL (reutiliza patrón de política)
================================================ */

.terms-contact {
  margin-top: 3rem;
}

.terms-contact .contact-card {
  background: radial-gradient(circle at top left, #22c55e, #14b8a6);
  border-radius: 18px;
  padding: 1.6rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: #f9fafb;
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.6);
}

.terms-contact .contact-icon {
  font-size: 2.4rem;
  opacity: 0.92;
}

.terms-contact h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-family: 'Poppins', sans-serif;
}

.terms-contact p {
  margin: 0;
  font-size: 0.95rem;
}

/* ================================================
   RESPONSIVE
================================================ */

/* Tablet */
@media (max-width: 992px) {
  .terms-hero {
    padding: 4.2rem 0 3.2rem;
  }

  .terms-hero .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }

  /* TOC debajo del título en móvil/tablet */
  .terms-toc {
    order: 1;
    max-width: 420px;
    margin: 0 auto;
  }

  .meta-item {
    text-align: left;
  }
}

/* Móvil */
@media (max-width: 768px) {
  .terms-hero {
    padding: 3.6rem 0 2.8rem;
  }

  .terms-intro {
    padding: 1.1rem 1.1rem;
  }

  .terms-acceptance {
    padding: 1.3rem 1.2rem;
  }

  .terms-contact .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Móvil pequeño */
@media (max-width: 480px) {
  .terms-hero .hero-text h1 {
    font-size: 1.9rem;
  }

  .terms-toc {
    padding: 1.2rem 1.2rem;
  }
}
