/* ══════════════════════════════════════════════════════
   modulos-base.css — Clases compartidas para /components
   Basado en Design Tokens del Figma
   ══════════════════════════════════════════════════════ */

/* ── Contenedor de sección (todos los módulos) ── */

.modulo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
  padding-top: 90px;
  padding-bottom: 90px;
}

@media (max-width: 767px) {
  .c-text-cta .modulo-section.gap-4,
  .c-header .modulo-section.gap-4,
  .c-title-image .modulo-section.gap-4 {
    justify-content: center;
  }
}

.modulo-section--neutral {
  display: flex;
  flex-direction: column;
  align-items: center;
  --tw-bg-opacity: 1;
  background-color: rgb(248 250 252 / var(--tw-bg-opacity));
  padding-top: 90px;
  padding-bottom: 90px;
}

@media (max-width: 767px) {
  .c-text-cta .modulo-section--neutral.gap-4,
  .c-header .modulo-section--neutral.gap-4,
  .c-title-image .modulo-section--neutral.gap-4 {
    justify-content: center;
  }
}

/* ── Contenedor interno ── */

.modulo-container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1280px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.modulo-container--sm {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1160px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ── Bloque de encabezado (tag + h2 + body) ── */

.modulo-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (max-width: 767px) {
  .c-text-cta .modulo-heading.gap-4,
  .c-header .modulo-heading.gap-4,
  .c-title-image .modulo-heading.gap-4 {
    justify-content: center;
  }
}

.modulo-heading--left {
  align-items: flex-start;
}

/* ── Tag / Subtítulo ── */

.modulo-tag {
  margin: 0px;
  font-family: Figtree, sans-serif;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(108 99 249 / var(--tw-text-opacity));
}

/* ── Títulos ── */

.modulo-h1 {
  margin: 0px;
  font-family: Figtree, sans-serif;
  font-size: 60px;
  line-height: 72px;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

.modulo-h2 {
  margin: 0px;
  font-family: Figtree, sans-serif;
  font-size: 48px;
  line-height: 54px;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

/* ── Destacado en headings (span/strong dentro de h1-h5) ── */

.modulo-h1 span,
.modulo-h1 strong,
.modulo-h2 span,
.modulo-h2 strong {
  font-weight: 700;
  background: linear-gradient(267.5deg, #6C63FF 0%, #1A1566 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Body text ── */

.modulo-body {
  margin: 0px;
  font-family: Figtree, sans-serif;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

/* ── CTA Buttons ──
   Hover = gradiente animado (igual que sq1.sesamehr.es)
   .modulo-cta         → Indigo (#6C63FF)  — Ver demo / Pedir demo
   .modulo-cta--dark   → Dark  (#1F2D52)   — Prueba gratis / Registro
   .modulo-cta--outline→ Borde indigo       — Secundario
   .modulo-cta--green  → Verde (#55E5BC)    — Accent
── */

.modulo-cta {
  display: inline-flex;
  height: 54px;
  width: -moz-fit-content;
  width: fit-content;
  cursor: pointer;
  align-items: center;
  border-radius: 16px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  text-align: center;
  font-family: Figtree, sans-serif;
  font-size: 18px;
  line-height: normal;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
  text-decoration-line: none;
  background-size: 300% 100%;
  background-image: linear-gradient(205deg, #AEA9FF, #6C63FF, #6C63FF, #6C63FF);
  transition: all 0.4s ease-in-out;
}

.modulo-cta:hover {
  background-position: 90% 0;
}

.modulo-cta--dark {
  display: inline-flex;
  height: 54px;
  width: -moz-fit-content;
  width: fit-content;
  cursor: pointer;
  align-items: center;
  border-radius: 16px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  text-align: center;
  font-family: Figtree, sans-serif;
  font-size: 18px;
  line-height: normal;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
  text-decoration-line: none;
  background-size: 300% 100%;
  background-image: linear-gradient(226deg, #6C63FF, #1A1566, #1F2D52, #1F2D52);
  transition: all 0.4s ease-in-out;
}

.modulo-cta--dark:hover {
  background-position: 100% 0;
}

.modulo-cta--outline {
  display: inline-flex;
  height: 54px;
  width: -moz-fit-content;
  width: fit-content;
  cursor: pointer;
  align-items: center;
  border-radius: 16px;
  border-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(108 99 255 / var(--tw-border-opacity));
  background-color: transparent;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  text-align: center;
  font-family: Figtree, sans-serif;
  font-size: 18px;
  line-height: normal;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(108 99 255 / var(--tw-text-opacity));
  text-decoration-line: none;
  background-size: 300% 100%;
  transition: all 0.4s ease-in-out;
}

.modulo-cta--outline:hover {
  border-color: transparent;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
  background-image: linear-gradient(205deg, #AEA9FF, #6C63FF, #6C63FF, #6C63FF);
}

.modulo-cta--green {
  display: inline-flex;
  height: 54px;
  width: -moz-fit-content;
  width: fit-content;
  cursor: pointer;
  align-items: center;
  border-radius: 16px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  text-align: center;
  font-family: Figtree, sans-serif;
  font-size: 18px;
  line-height: normal;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity));
  text-decoration-line: none;
  background-size: 300% 100%;
  background-image: linear-gradient(205deg, #7AEFD0, #55E5BC, #55E5BC, #55E5BC);
  transition: all 0.4s ease-in-out;
}

.modulo-cta--green:hover {
  background-position: 90% 0;
}

.modulo-cta--link {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  cursor: pointer;
  align-items: center;
  border-width: 0px;
  background-color: transparent;
  padding: 0px;
  font-family: Figtree, sans-serif;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  --tw-text-opacity: 1;
  color: rgb(108 99 255 / var(--tw-text-opacity));
  text-decoration-line: none;
  transition: font-weight 0.15s ease;
}

.modulo-cta--link:hover {
  font-weight: 700;
}

/* ── Icon Box ── */

.modulo-icon-box {
  display: flex;
  height: 45px;
  width: 45px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  --tw-bg-opacity: 1;
  background-color: rgb(108 99 255 / var(--tw-bg-opacity));
}

@media (max-width: 767px) {
  .c-text-cta .modulo-icon-box.gap-4,
  .c-header .modulo-icon-box.gap-4,
  .c-title-image .modulo-icon-box.gap-4 {
    justify-content: center;
  }
}

.modulo-icon-box img {
  height: 30px;
  width: 30px;
}

/* ── Card base ── */

.modulo-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: 20px;
  border-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(228 234 240 / var(--tw-border-opacity));
  --tw-bg-opacity: 1;
  background-color: rgb(255 255 255 / var(--tw-bg-opacity));
  padding: 2rem;
}

@media (max-width: 767px) {
  .c-text-cta .modulo-card.gap-4,
  .c-header .modulo-card.gap-4,
  .c-title-image .modulo-card.gap-4 {
    justify-content: center;
  }
}

/* ── Subtitle (texto descriptivo bajo heading) ── */

.modulo-subtitle {
  margin: 0px;
  font-family: Figtree, sans-serif;
  font-size: 20px;
  line-height: 24px;
  font-weight: 400;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

/* ── Card title ── */

.modulo-card-title {
  font-family: Figtree, sans-serif;
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

/* ── Badge/Highlight ── */

.modulo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  --tw-bg-opacity: 1;
  background-color: rgb(240 239 255 / var(--tw-bg-opacity));
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-top: 5px;
  padding-bottom: 5px;
  font-family: Figtree, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  --tw-text-opacity: 1;
  color: rgb(108 99 255 / var(--tw-text-opacity));
}

/* ── Imagen placeholder ── */

.modulo-img {
  overflow: hidden;
  border-radius: 20px;
}

.modulo-img img {
  height: 100%;
  width: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

/* ── Separadores ── */

.modulo-divider {
  margin-top: 1rem;
  margin-bottom: 1rem;
  width: 50%;
  border-top-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(108 99 249 / var(--tw-border-opacity));
}

@media (min-width: 1024px) {
  .modulo-divider {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
  }
}

/* ── Número (Steps) ── */

.modulo-step-number {
  font-family: Figtree, sans-serif;
  font-size: 48px;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

@media (min-width: 1024px) {
  .modulo-step-number {
    font-size: 60px;
  }
}

/* ── FAQ / Accordion ── */

.modulo-faq {
  position: relative;
  border-bottom-width: 1px;
  --tw-border-opacity: 1;
  border-color: rgb(226 232 240 / var(--tw-border-opacity));
}

.modulo-faq-question {
  position: relative;
  width: 100%;
  cursor: pointer;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  padding-right: 40px;
  font-family: Figtree, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

.modulo-faq-question::after {
  content: '+';
  position: absolute;
  right: 0px;
  top: 50%;
  --tw-translate-y: -50%;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
  font-size: 1.5rem;
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

.modulo-faq.active .modulo-faq-question::after {
  content: '−';
}

.modulo-faq-answer {
  overflow: hidden;
  font-size: 1.0625rem;
  line-height: 1.625;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
  height: 0;
  transition: height 0.3s linear;
}

.modulo-faq.active .modulo-faq-answer {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* ── Hero overlay ── */

.modulo-hero-overlay--light::after {
  content: "";
  position: absolute;
  top: 0px;
  height: 100%;
  width: 100%;
  border-radius: 1rem;
  background: linear-gradient(90deg, rgba(255,255,255,0.9) 45%, rgba(255,255,255,0) 100%);
}

.modulo-hero-overlay--dark::after {
  content: "";
  position: absolute;
  top: 0px;
  height: 100%;
  width: 100%;
  border-radius: 1rem;
  background: linear-gradient(90deg, rgba(0,0,0,0.8) 55%, rgba(0,0,0,0) 100%);
}

/* ── Gradientes de banner ── */

.modulo-gradient-purple {
  background: linear-gradient(25deg, rgba(108,99,255,1) 45%, rgba(176,172,253,1) 100%);
}

.modulo-gradient-soft {
  background: linear-gradient(163deg, #EEFAF8, #ECEBFE 100%);
}

.modulo-gradient-form {
  background: linear-gradient(145deg, rgba(218,215,255,1) 0%, rgba(255,255,255,1) 35%, rgba(255,255,255,1) 65%, rgba(234,233,255,1) 100%);
}

/* ── Tab selector ── */

.modulo-tab {
  cursor: pointer;
  --tw-text-opacity: 1;
  color: rgb(226 232 240 / var(--tw-text-opacity));
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.modulo-tab.active {
  font-weight: 700;
  --tw-text-opacity: 1;
  color: rgb(31 45 82 / var(--tw-text-opacity));
}

.modulo-tab-content {
  transform: scale(0.9);
  opacity: 0.5;
  transition: none;
}

.modulo-tab-content.active {
  transform: scale(1);
  opacity: 1;
  transition: all 0.25s linear 0s;
}

.modulo-tab-line {
  position: absolute;
  --tw-bg-opacity: 1;
  background-color: rgb(31 45 82 / var(--tw-bg-opacity));
  height: 2px;
  bottom: -5px;
  margin: 10px 0 0 0;
}

/* ── Glider Tabs ── */

.glider-tabs {
  border-radius: 35px;
  padding: 8px;
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  -webkit-backdrop-filter: blur(40px);
          backdrop-filter: blur(40px);
  border: 2px solid #ffffff;
  background: linear-gradient(90deg, rgba(108,99,255,0.15) 0%, rgba(213,225,255,0.25) 100%);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.glider-tabs input[type=radio] {
  display: none;
}

.glider-tabs__tab {
  font-family: 'Figtree', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #1F2D52;
  border-radius: 25px;
  cursor: pointer;
  transition: color 0.15s ease-in;
  padding: 12px 24px;
  margin: 0;
  text-align: center;
  position: relative;
  z-index: 2;
  white-space: nowrap;
}

input[type=radio]:checked + .glider-tabs__tab {
  color: #6C63FF;
  font-weight: 600;
}

.glider-tabs__glider {
  position: absolute;
  top: 8px;
  left: 8px;
  height: calc(100% - 16px);
  width: 100px;
  background-color: #fff;
  z-index: 1;
  border-radius: 28px;
  transition: left 0.25s ease-out, width 0.25s ease-out;
  box-shadow: 0 2px 12px rgba(108,99,255,0.12);
  pointer-events: none;
}

.glider-tabs__panel {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
  border: none;
  outline: none;
  box-shadow: none;
}

.glider-tabs__panel.active {
  display: grid;
  opacity: 1;
  transform: translateY(0);
}

/* ── Video Popup ── */

.modulo-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modulo-video-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.modulo-video-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
}

.modulo-video-overlay__content {
  position: relative;
  width: 90vw;
  max-width: 960px;
  z-index: 1;
}

.modulo-video-overlay__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 4px 8px;
}

.modulo-video-overlay__player {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.modulo-video-overlay__player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Mobile responsive ── */

@media (max-width: 767px) {
  .modulo-h1 {
    font-size: 40px;
    line-height: 48px;
  }

  .modulo-h2 {
    font-size: 32px;
    line-height: 38px;
    text-align: center;
  }

  .modulo-tag {
    font-size: 16px;
    line-height: 20px;
    text-align: center;
  }

  .modulo-subtitle {
    font-size: 16px;
    line-height: 20px;
  }

  .modulo-body {
    font-size: 14px;
    line-height: 18px;
  }

  /* FAQ: todo a la izquierda en mobile */

  .c-accordion .modulo-h2,
  .c-accordion .modulo-tag {
    text-align: left;
  }

  /* CTA centrado solo en text-cta, header y title-image */

  .c-text-cta .flex.gap-4,
  .c-header .flex.gap-4,
  .c-title-image .flex.gap-4 {
    justify-content: center;
  }

  .modulo-cta,
  .modulo-cta--dark,
  .modulo-cta--outline,
  .modulo-cta--green {
    height: 44px;
    font-size: 14px;
    padding: 10px 16px;
  }

  .modulo-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .modulo-card-title {
    font-size: 18px;
    line-height: 22px;
  }

  .modulo-badge {
    font-size: 14px;
    line-height: 20px;
  }

  .modulo-faq-question {
    font-size: 16px;
    line-height: 22px;
  }

  .glider-tabs {
    flex-wrap: wrap;
    justify-content: center;
    border: none;
    background: none;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    gap: 8px;
  }

  .glider-tabs__tab {
    font-size: 14px;
    padding: 10px 16px;
    background: #F0EFFF;
    border-radius: 30px;
  }

  input[type=radio]:checked + .glider-tabs__tab {
    background: #fff;
    box-shadow: 0 2px 8px rgba(108,99,255,0.12);
  }

  .glider-tabs__glider {
    display: none;
  }

  .modulo-video-overlay__content {
    width: 95vw;
  }

  .modulo-video-overlay__close {
    top: -36px;
    font-size: 28px;
  }
}
