/* ==================================================================
   INNOVALIFE — Páginas informativas (Privacidad, Términos, Cookies, Datos)
   Extiende la identidad visual existente (theme.css + estilo.css).
   Prefijo de namespacing: "ip-" (Innovalife Page) para evitar colisiones.
   ================================================================== */

:root {
  --ip-purple: #6f42c1;
  --ip-blue: #1f2f9b;
  --ip-pink: #d032d0;
  --ip-cyan: #00dbde;
  --ip-grad-1: linear-gradient(90deg, #fc00ff 0%, #00dbde 51%, #fc00ff 100%);
  --ip-grad-2: linear-gradient(90deg, #4776e6 0%, #8e54e9 51%, #4776e6 100%);
  --ip-grad-soft: linear-gradient(135deg, rgba(111, 66, 193, 0.12), rgba(0, 219, 222, 0.12));
  --ip-text: #5d5d5d;
  --ip-text-soft: #717075;
  --ip-shadow: 0 7px 14px 0 rgba(65, 69, 88, 0.1), 0 3px 6px 0 rgba(0, 0, 0, 0.07);
  --ip-shadow-lg: 0 1.5rem 4rem rgba(31, 47, 155, 0.12);
  --ip-radius: 1.25rem;
}

/* ---------------------------------------------------------------- */
/* Reading progress bar                                              */
/* ---------------------------------------------------------------- */
.ip-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  z-index: 1090;
  background: transparent;
  pointer-events: none;
}
.ip-progress__bar {
  height: 100%;
  width: 0%;
  background-image: var(--ip-grad-1);
  background-size: 200% auto;
  transition: width 0.1s linear;
}

/* ---------------------------------------------------------------- */
/* Breadcrumb                                                        */
/* ---------------------------------------------------------------- */
.ip-breadcrumb-wrap {
  padding: 6.5rem 0 0.5rem;
}
.ip-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ip-text-soft);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ip-breadcrumb a {
  color: var(--ip-purple);
  text-decoration: none;
  font-weight: 500;
}
.ip-breadcrumb a:hover {
  text-decoration: underline;
}
.ip-breadcrumb .ip-sep {
  opacity: 0.5;
}
.ip-breadcrumb .ip-current {
  color: var(--ip-text);
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Hero                                                               */
/* ---------------------------------------------------------------- */
.ip-hero {
  position: relative;
  overflow: hidden;
  padding: 1rem 0 1.5rem;
  isolation: isolate;
}
.ip-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--ip-grad-soft);
}
.ip-hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: -1;
  will-change: transform;
}
.ip-hero__blob--a {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -120px;
  background: var(--ip-grad-1);
}
.ip-hero__blob--b {
  width: 320px;
  height: 320px;
  bottom: -160px;
  left: -100px;
  background: var(--ip-grad-2);
}
.ip-hero__particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.ip-hero__particle {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: rgba(111, 66, 193, 0.28);
  animation: ip-rise linear infinite;
}
@keyframes ip-rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-620px) translateX(40px);
    opacity: 0;
  }
}

.ip-hero__title {
  font-weight: 700;
  color: var(--ip-blue);
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
  font-size: 2.1rem;
}
.ip-hero__subtitle {
  color: var(--ip-text);
  max-width: 42rem;
  font-size: 1.02rem;
}

.ip-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.1rem 0 0.25rem;
}
.ip-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: #fff;
  box-shadow: var(--ip-shadow);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ip-text);
}
.ip-meta-badge i,
.ip-meta-badge svg {
  color: var(--ip-purple);
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------- */
/* Layout: sidebar TOC + content                                     */
/* ---------------------------------------------------------------- */
.ip-layout {
  padding: 3rem 0 5rem;
}

.ip-toc-wrap {
  position: sticky;
  top: 6.5rem;
}
.ip-toc {
  background: #fff;
  border-radius: var(--ip-radius);
  box-shadow: var(--ip-shadow);
  padding: 1.75rem;
}
.ip-toc__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ip-purple);
  margin-bottom: 1rem;
}
.ip-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid #eee6fb;
}
.ip-toc__list li {
  margin: 0;
}
.ip-toc__list a {
  display: block;
  padding: 0.45rem 0 0.45rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ip-text-soft);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.ip-toc__list a:hover {
  color: var(--ip-purple);
  transform: translateX(2px);
}
.ip-toc__list a.is-active {
  color: var(--ip-blue);
  font-weight: 600;
  border-left-color: var(--ip-purple);
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.08), transparent);
}

.ip-toc__progress {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f0eefa;
}
.ip-toc__progress-track {
  height: 6px;
  border-radius: 50px;
  background: #f0eefa;
  overflow: hidden;
}
.ip-toc__progress-fill {
  height: 100%;
  width: 0%;
  background-image: var(--ip-grad-2);
  border-radius: 50px;
  transition: width 0.15s linear;
}
.ip-toc__progress-label {
  font-size: 0.75rem;
  color: var(--ip-text-soft);
  margin-top: 0.5rem;
}

/* Back-to-top link inside sidebar */
.ip-toc__top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--ip-purple);
  text-decoration: none;
  font-weight: 600;
}
.ip-toc__top:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- */
/* Content cards                                                      */
/* ---------------------------------------------------------------- */
.ip-section {
  scroll-margin-top: 6rem;
  margin-bottom: 2.5rem;
}

.ip-card {
  background: #fff;
  border-radius: var(--ip-radius);
  box-shadow: var(--ip-shadow);
  padding: 2.25rem 2.5rem;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.ip-card:hover {
  box-shadow: var(--ip-shadow-lg);
  transform: translateY(-3px);
}

.ip-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ip-card__icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ip-grad-soft);
  color: var(--ip-purple);
}
.ip-card__icon svg,
.ip-card__icon i {
  width: 24px;
  height: 24px;
  font-size: 24px;
}
.ip-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ip-blue);
  margin: 0;
}
.ip-card p,
.ip-card li {
  color: var(--ip-text);
  line-height: 1.75;
}
.ip-card ul {
  padding-left: 1.25rem;
}
.ip-card ul li {
  margin-bottom: 0.5rem;
}

/* Divider con degradado */
.ip-divider {
  height: 3px;
  border: none;
  border-radius: 50px;
  background-image: var(--ip-grad-1);
  background-size: 200% auto;
  opacity: 0.85;
  margin: 3rem 0;
}

/* ---------------------------------------------------------------- */
/* Callouts / Alerts                                                  */
/* ---------------------------------------------------------------- */
.ip-callout {
  display: flex;
  gap: 1rem;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid transparent;
}
.ip-callout i,
.ip-callout svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  font-size: 22px;
  margin-top: 0.15rem;
}
.ip-callout p,
.ip-callout li {
  margin-bottom: 0;
  font-size: 0.95rem;
}
.ip-callout--info {
  background: rgba(31, 47, 155, 0.06);
  border-color: rgba(31, 47, 155, 0.15);
  color: var(--ip-blue);
}
.ip-callout--warning {
  background: rgba(243, 127, 41, 0.08);
  border-color: rgba(243, 127, 41, 0.2);
  color: #b25a10;
}
.ip-callout--success {
  background: rgba(126, 211, 33, 0.1);
  border-color: rgba(126, 211, 33, 0.25);
  color: #4c8a0f;
}
.ip-callout--critical {
  background: rgba(208, 2, 27, 0.06);
  border-color: rgba(208, 2, 27, 0.18);
  color: #a3081b;
}

/* ---------------------------------------------------------------- */
/* Badges                                                             */
/* ---------------------------------------------------------------- */
.ip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.ip-badge--purple {
  background: rgba(111, 66, 193, 0.1);
  color: var(--ip-purple);
}
.ip-badge--blue {
  background: rgba(31, 47, 155, 0.1);
  color: var(--ip-blue);
}
.ip-badge--green {
  background: rgba(126, 211, 33, 0.15);
  color: #4c8a0f;
}
.ip-badge--pink {
  background: rgba(208, 50, 208, 0.1);
  color: #a3229f;
}
.ip-badge--orange {
  background: rgba(243, 127, 41, 0.12);
  color: #b25a10;
}

/* ---------------------------------------------------------------- */
/* Tables                                                             */
/* ---------------------------------------------------------------- */
.ip-table-wrap {
  overflow-x: auto;
  border-radius: 1rem;
  box-shadow: var(--ip-shadow);
  margin: 1.5rem 0;
}
.ip-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #fff;
}
.ip-table thead th {
  background-image: var(--ip-grad-2);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.9rem 1.25rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.ip-table tbody td {
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  color: var(--ip-text);
  border-bottom: 1px solid #f1eff9;
  vertical-align: top;
}
.ip-table tbody tr:last-child td {
  border-bottom: none;
}
.ip-table tbody tr:hover {
  background: #faf9fe;
}

/* ---------------------------------------------------------------- */
/* Timeline                                                           */
/* ---------------------------------------------------------------- */
.ip-timeline {
  position: relative;
  margin: 2rem 0 0;
  padding-left: 2.5rem;
}
.ip-timeline::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, var(--ip-purple), var(--ip-cyan));
  opacity: 0.35;
}
.ip-timeline__item {
  position: relative;
  padding-bottom: 2rem;
}
.ip-timeline__item:last-child {
  padding-bottom: 0;
}
.ip-timeline__dot {
  position: absolute;
  left: -2.5rem;
  top: 0.15rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background-image: var(--ip-grad-1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--ip-shadow);
}
.ip-timeline__title {
  font-weight: 700;
  color: var(--ip-blue);
  margin-bottom: 0.35rem;
}
.ip-timeline__text {
  color: var(--ip-text);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- */
/* FAQ / Accordion                                                    */
/* ---------------------------------------------------------------- */
.ip-accordion .accordion-item {
  border: none;
  border-radius: 1rem !important;
  overflow: hidden;
  margin-bottom: 0.9rem;
  box-shadow: var(--ip-shadow);
}
.ip-accordion .accordion-button {
  font-weight: 600;
  color: var(--ip-blue);
  background: #fff;
  padding: 1.25rem 1.5rem;
}
.ip-accordion .accordion-button:not(.collapsed) {
  background: var(--ip-grad-soft);
  color: var(--ip-purple);
  box-shadow: none;
}
.ip-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
}
.ip-accordion .accordion-body {
  color: var(--ip-text);
  padding: 0.25rem 1.5rem 1.5rem;
  line-height: 1.75;
}

/* ---------------------------------------------------------------- */
/* Steps flow (Eliminación de Datos)                                  */
/* ---------------------------------------------------------------- */
.ip-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.ip-step {
  position: relative;
  background: #fff;
  border-radius: 1.1rem;
  box-shadow: var(--ip-shadow);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.ip-step__num {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: #4527a0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.ip-step__title {
  font-weight: 700;
  color: var(--ip-blue);
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}
.ip-step__text {
  font-size: 0.85rem;
  color: var(--ip-text-soft);
  margin-bottom: 0;
}
.ip-step-arrow {
  display: none;
}
@media (min-width: 992px) {
  .ip-steps {
    grid-template-columns: repeat(var(--ip-step-count, 4), 1fr);
  }
}

/* ---------------------------------------------------------------- */
/* Final CTA block                                                    */
/* ---------------------------------------------------------------- */
.ip-cta {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  padding: 3.5rem 2rem;
  text-align: center;
  color: #fff;
  background-image: var(--ip-grad-1);
  background-size: 200% auto;
  box-shadow: var(--ip-shadow-lg);
}
.ip-cta h2 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.ip-cta p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
}
.ip-cta .btn {
  background: #fff;
  color: var(--ip-purple);
  font-weight: 600;
  border-radius: 50px;
  padding: 0.85rem 2.25rem;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ip-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  color: var(--ip-purple);
}

/* ---------------------------------------------------------------- */
/* Back to top                                                        */
/* ---------------------------------------------------------------- */
.ip-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 190px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--ip-purple);
  box-shadow: var(--ip-shadow-lg);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  text-decoration: none;
}
.ip-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ip-back-to-top:hover {
  color: #fff;
  background-image: var(--ip-grad-2);
}

/* ---------------------------------------------------------------- */
/* Scroll reveal utilities                                            */
/* ---------------------------------------------------------------- */
.ip-reveal {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ip-reveal--up {
  transform: translateY(28px);
}
.ip-reveal--in {
  transform: none;
}
.ip-reveal--left {
  transform: translateX(-28px);
}
.ip-reveal--right {
  transform: translateX(28px);
}
.ip-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ip-reveal,
  .ip-hero__particle,
  .ip-back-to-top,
  .ip-progress__bar {
    transition: none !important;
    animation: none !important;
  }
  .ip-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- */
/* Focus visibility (accesibilidad WCAG AA)                           */
/* ---------------------------------------------------------------- */
.ip-toc__list a:focus-visible,
.ip-back-to-top:focus-visible,
.ip-cta .btn:focus-visible,
.ip-accordion .accordion-button:focus-visible {
  outline: 3px solid var(--ip-purple);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                         */
/* ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .ip-toc-wrap {
    position: static;
    margin-bottom: 2rem;
  }
  .ip-toc {
    padding: 1.25rem;
  }
  .ip-card {
    padding: 1.75rem 1.5rem;
  }
  .ip-hero {
    padding: 2rem 0 3.5rem;
    text-align: center;
  }
  .ip-hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .ip-hero__meta {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .ip-card {
    padding: 1.5rem 1.25rem;
  }
  .ip-cta {
    padding: 2.5rem 1.25rem;
  }
}

/* Dark mode support (si el usuario activa prefers-color-scheme) */
@media (prefers-color-scheme: dark) {
  body.ip-page {
    background-color: #12131a;
  }
  body.ip-page .ip-toc,
  body.ip-page .ip-card,
  body.ip-page .ip-step,
  body.ip-page .ip-meta-badge,
  body.ip-page .ip-table,
  body.ip-page .ip-back-to-top {
    background-color: #1b1c26;
    color: #d7d6e0;
  }
  body.ip-page .ip-card p,
  body.ip-page .ip-card li,
  body.ip-page .ip-step__text,
  body.ip-page .ip-toc__list a,
  body.ip-page .ip-timeline__text,
  body.ip-page .ip-table tbody td {
    color: #b8b7c4;
  }
  body.ip-page .ip-table tbody tr:hover {
    background: #22232f;
  }
  body.ip-page .ip-hero__title,
  body.ip-page .ip-card__title,
  body.ip-page .ip-timeline__title,
  body.ip-page .ip-step__title {
    color: #a9b6ff;
  }
  body.ip-page .accordion-button,
  body.ip-page .accordion-body {
    background-color: #1b1c26;
    color: #d7d6e0;
  }
}
