/* ORIONIS | Refiere y Gana — página independiente y anuncio discreto en Inicio.
   No cambia el diseño general del portal ni afecta otras páginas. */
:root {
  --rg-navy: #043259;
  --rg-dark: #02233f;
  --rg-orange: #fd4300;
  --rg-gray: #526778;
}

/* Teaser pequeño en la portada; reemplaza al bloque promocional completo. */
.referral-teaser {
  background: #fff7f2;
  border-top: 1px solid rgba(253,67,0,.1);
  border-bottom: 1px solid rgba(253,67,0,.14);
}
.referral-teaser__inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 112px;
  margin: auto;
  padding: 17px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 26px;
}
.referral-teaser__copy {
  display: flex;
  align-items: center;
  gap: 20px;
}
.referral-teaser__eyebrow {
  display: inline-block;
  color: var(--rg-orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.referral-teaser__heading {
  margin: 5px 0 0;
  color: var(--rg-navy);
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(19px,2.25vw,27px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.referral-teaser__heading span { color: var(--rg-orange); }
.referral-teaser__button,
.rg-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.referral-teaser__button {
  flex-shrink: 0;
  min-height: 45px;
  border-radius: 9px;
  padding: 0 18px;
  font-size: 12px;
  background: var(--rg-orange);
  color: #fff;
}
.referral-teaser__button:hover,
.rg-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(253,67,0,.18);
}

/* Landing: empieza directamente con la promoción; sin foto ni hero de Inicio. */
body[data-page="referidos"] {
  background: #f7fafc;
  color: var(--rg-navy);
}
.rg-hero {
  isolation: isolate;
  position: relative;
  min-height: min(720px, calc(100svh - 88px));
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(76px,8vw,110px) 20px;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(55,138,193,.35), transparent 54%),
    radial-gradient(ellipse at 11% 82%, rgba(253,67,0,.15), transparent 38%),
    linear-gradient(125deg, #092947 0%, #043259 55%, #072943 100%);
}
.rg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(110deg, transparent 0 109px, rgba(255,255,255,.06) 110px, transparent 111px 220px);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 75%, transparent);
}
.rg-hero__content {
  position: relative;
  z-index: 1;
  width: min(920px,100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.rg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 19px;
  color: #ffbf9f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.rg-eyebrow::before,
.rg-eyebrow::after {
  content: "";
  height: 1px;
  width: 33px;
  background: #f78355;
}
.rg-hero h1 {
  margin: 0;
  font-family: "Manrope",Arial,sans-serif;
  font-size: clamp(37px,5.5vw,68px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.05;
  color: #fff;
}
.rg-prize {
  display: block;
  margin: 4px 0 12px;
  padding: 0 12px;
  color: #ff6b2c;
  font-family: "Manrope",Arial,sans-serif;
  font-weight: 800;
  font-size: clamp(66px,12vw,150px);
  line-height: 1.08;
  letter-spacing: -.078em;
  text-shadow: 0 15px 50px rgba(253,67,0,.13);
  white-space: nowrap;
}
.rg-hero__subtitle {
  max-width: 710px;
  margin: 5px auto 0;
  color: #fff;
  font-family: "Manrope",Arial,sans-serif;
  font-size: clamp(19px,2.5vw,28px);
  font-weight: 700;
  line-height: 1.35;
}
.rg-hero__description {
  max-width: 675px;
  margin: 15px auto 0;
  color: rgba(255,255,255,.79);
  font-size: 15px;
  line-height: 1.7;
}
.rg-hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 0;
}
.rg-button {
  min-height: 53px;
  padding: 0 24px;
  border-radius: 9px;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
}
.rg-button--primary {
  color: #fff;
  background: linear-gradient(110deg,#fd4300,#f75b1d);
  box-shadow: 0 12px 32px rgba(253,67,0,.28);
}
.rg-button--outline {
  color: #fff;
  border-color: rgba(255,255,255,.43);
  background: rgba(255,255,255,.07);
}
.rg-button--outline:hover {
  background: rgba(255,255,255,.16);
  box-shadow: none;
}
.rg-hero__small {
  margin: 20px auto 0;
  color: rgba(255,255,255,.64);
  font-size: 11px;
  line-height: 1.5;
}
.rg-confetti {
  position: fixed;
  inset: 0;
  z-index: 11500;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Programa, pasos y siguientes acciones. */
.rg-main {
  background: linear-gradient(180deg,#f6f9fb,#fff 45%,#f6f9fb 100%);
}
.rg-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.rg-how {
  padding: clamp(65px,7vw,95px) 0 60px;
  scroll-margin-top: 90px;
}
.rg-section-heading {
  max-width: 720px;
  text-align: center;
  margin: 0 auto 35px;
}
.rg-section-heading__eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rg-orange);
}
.rg-section-heading h2 {
  margin: 0;
  color: var(--rg-navy);
  font-family: "Manrope",Arial,sans-serif;
  font-size: clamp(30px,3.4vw,42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.045em;
}
.rg-section-heading p {
  margin: 14px auto 0;
  color: #65788a;
  font-size: 14px;
  line-height: 1.75;
}
.rg-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.rg-step {
  padding: 27px 27px 30px;
  background: #fff;
  border: 1px solid rgba(4,50,89,.1);
  box-shadow: 0 14px 42px rgba(4,50,89,.055);
  border-radius: 17px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.rg-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(4,50,89,.1);
}
.rg-step__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.rg-step__number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rg-orange);
  color: white;
  font-size: 13px;
  font-weight: 800;
}
.rg-step__top i {
  font-size: 35px;
  color: var(--rg-navy);
}
.rg-step h3 {
  margin: 0 0 10px;
  color: var(--rg-navy);
  font-family: "Manrope",Arial,sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.rg-step p {
  margin: 0;
  color: #627588;
  font-size: 13px;
  line-height: 1.7;
}
.rg-bottom {
  padding: 0 0 80px;
}
.rg-bottom__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(26px,4vw,44px);
  border-radius: 18px;
  background: linear-gradient(118deg,#063359,#0c4b78);
  color: #fff;
}
.rg-bottom__banner h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: "Manrope",Arial,sans-serif;
  font-size: clamp(22px,2.4vw,30px);
  font-weight: 800;
  line-height: 1.22;
}
.rg-bottom__banner p {
  max-width: 600px;
  margin: 0;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  line-height: 1.7;
}
.rg-bottom__terms {
  margin: 18px auto 0;
  max-width: 820px;
  text-align: center;
  color: #708293;
  font-size: 11px;
  line-height: 1.75;
}
.rg-bottom__terms a {
  color: #d83f0b;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Formulario: reaprovecha los mismos nombres y envío revisable por WhatsApp. */
body.referral-modal-open { overflow: hidden; }
.referral-form-dialog {
  position: relative;
  width: min(700px,calc(100% - 26px));
  max-height: min(770px,calc(100dvh - 28px));
  padding: 0;
  margin: auto;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  color: var(--rg-navy);
  background: #fff;
  box-shadow: 0 24px 90px rgba(0,0,0,.34);
}
.referral-form-dialog::backdrop {
  background: rgba(2,24,43,.8);
  backdrop-filter: blur(8px);
}
.referral-form-dialog__inner { position: relative; padding: clamp(24px,4vw,38px); }
.referral-form-dialog__close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #dde5eb;
  background: #fff;
  color: #465e71;
  font-size: 20px;
  cursor: pointer;
}
.referral-form-dialog__head { padding-right: 36px; }
.referral-form-dialog__eyebrow {
  margin: 0 0 7px;
  color: var(--rg-orange);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.referral-form-dialog__head h3 {
  margin: 0;
  color: var(--rg-navy);
  font-family: "Manrope",Arial,sans-serif;
  font-size: clamp(24px,3vw,32px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.04em;
}
.referral-form-dialog__head p {
  margin: 9px 0 0;
  color: #677b8a;
  font-size: 12px;
  line-height: 1.7;
}
.referral-form__group-title {
  padding-bottom: 9px;
  margin: 22px 0 12px;
  border-bottom: 1px solid #e2e9ed;
  color: var(--rg-navy);
  font-size: 14px;
  font-weight: 800;
}
.referral-form__grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px 15px;
}
.referral-form__field {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.referral-form__field--full { grid-column: 1 / -1; }
.referral-form__field label { color: #355067; font-size: 11px; font-weight: 700; }
.referral-form__field input,
.referral-form__field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #fbfcfd;
  color: #183b59;
  font-size: 12px;
}
.referral-form__field input:focus,
.referral-form__field select:focus {
  outline: 0;
  border-color: var(--rg-orange);
  box-shadow: 0 0 0 3px rgba(253,67,0,.1);
}
.referral-form__consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  margin: 20px 0 0;
  color: #526879;
  font-size: 11px;
  line-height: 1.6;
}
.referral-form__consent input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: #fd4300; }
.referral-form__notice { margin: 12px 0 17px; color: #7b8996; font-size: 10px; line-height: 1.6; }
.referral-form-submit {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 9px;
  background: #fd4300;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.referral-form-submit:hover { background: #db3800; }

@media (max-width: 800px) {
  .rg-steps { grid-template-columns: 1fr; }
  .rg-step { padding: 23px; }
  .rg-step__top { margin-bottom: 13px; }
  .rg-bottom__banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .referral-teaser__inner {
    width: calc(100% - 28px);
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  .referral-teaser__heading { font-size: 20px; }
  .referral-teaser__button { width: 100%; }
  .rg-hero { min-height: 530px; padding: 70px 18px; }
  .rg-eyebrow { font-size: 9px; letter-spacing: .19em; gap: 8px; }
  .rg-eyebrow::before,.rg-eyebrow::after { width: 18px; }
  .rg-hero h1 { font-size: clamp(33px,8vw,50px); }
  .rg-prize { font-size: clamp(44px,13vw,84px); letter-spacing: -.075em; }
  .rg-hero__subtitle { font-size: 18px; }
  .rg-hero__description { font-size: 13px; line-height: 1.65; }
  .rg-hero__actions { width: 100%; gap: 10px; margin-top: 25px; }
  .rg-button { width: 100%; min-height: 51px; }
  .rg-how { padding: 57px 0 43px; }
  .rg-wrap { width: calc(100% - 28px); }
  .rg-bottom { padding-bottom: 50px; }
  .rg-bottom__banner { padding: 25px; }
  .referral-form-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .referral-form-dialog__inner { padding: 24px 18px; }
  .referral-form__grid { grid-template-columns: 1fr; gap: 11px; }
  .referral-form__field--full { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .referral-teaser *,
  .rg-hero *,
  .rg-main *,
  .referral-form-dialog * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Zoho CRM webform: protección antispam y pantalla de confirmación. */
.rg-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.rg-submission-notice[hidden] { display: none; }
.rg-submission-notice {
  padding: 28px 0;
  background: #eaf5ef;
  border-top: 1px solid #b9d7c8;
  border-bottom: 1px solid #b9d7c8;
}
.rg-submission-notice h2 {
  margin: 0 0 8px;
  color: #164b37;
  font-size: 25px;
  font-weight: 800;
}
.rg-submission-notice p {
  color: #24513f;
  margin: 0 0 16px;
  line-height: 1.6;
}
.rg-submission-notice .rg-button { max-width: 280px; }
.referral-form-submit:disabled {
  opacity: .7;
  cursor: progress;
}


/* Bienvenida con celebración: solo Refiere y Gana; no afecta Inicio ni CRM */
.rg-welcome {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 0;
  background: transparent;
  color: #043259;
}
.rg-welcome[open] {
  display: grid;
  place-items: center;
}
.rg-welcome::backdrop {
  background: rgba(2,23,42,.83);
  backdrop-filter: blur(9px);
}
.rg-welcome__card {
  position: relative;
  z-index: 1;
  width: min(730px,100%);
  min-height: 0;
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 26px;
  padding: clamp(30px,5vw,56px) clamp(22px,5vw,62px);
  background: radial-gradient(ellipse at 50% 0%,#fff5ed 0%,#fff 51%,#f1f8fc 100%);
  box-shadow: 0 30px 110px rgba(0,0,0,.4), 0 0 55px rgba(253,67,0,.17);
  text-align: center;
  animation: rgWelcomeArrival .6s cubic-bezier(.18,.8,.25,1) both;
}
.rg-welcome__card::before {
  position: absolute;
  left: calc(50% - 36px);
  top: 0;
  width: 72px;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: #fd4300;
  content: "";
}
.rg-welcome__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d7e2ea;
  border-radius: 50%;
  color: #506b81;
  background: #fff;
  cursor: pointer;
  font-size: 17px;
}
.rg-welcome__close:hover { color: #043259; background: #f1f5f8; }
.rg-welcome__eyebrow {
  margin: 0 auto 15px;
  color: #64798b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .24em;
  line-height: 1.5;
}
.rg-welcome__title {
  margin: 0 auto;
  color: #043259;
  font-family: "Manrope",Arial,sans-serif;
  font-size: clamp(38px,6vw,66px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.065em;
}
.rg-welcome__title span {
  display: block;
  margin: 6px auto 0;
  color: #fd4300;
  font-size: 1.16em;
  letter-spacing: -.07em;
  text-shadow: 0 9px 28px rgba(253,67,0,.2);
  animation: rgPrizeArrival .72s .18s cubic-bezier(.18,.8,.25,1) both;
}
.rg-welcome__subtitle {
  margin: 20px auto 0;
  color: #043259;
  font-size: clamp(17px,2.6vw,24px);
  line-height: 1.3;
  font-weight: 800;
}
.rg-welcome__description {
  max-width: 520px;
  margin: 14px auto 0;
  color: #556d7e;
  font-size: 14px;
  line-height: 1.75;
}
.rg-welcome__description strong { color: #043259; }
.rg-welcome__actions {
  display: grid;
  gap: 11px;
  width: min(390px,100%);
  margin: 26px auto 0;
}
.rg-welcome__main-action {
  width: 100%;
  min-height: 56px;
  font-size: 14px;
  box-shadow: 0 13px 32px rgba(253,67,0,.23);
}
.rg-welcome__secondary {
  min-height: 40px;
  padding: 6px;
  border: 0;
  color: #35556d;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.rg-welcome__secondary:hover { text-decoration: underline; text-underline-offset: 3px; }
.rg-welcome__foot {
  max-width: 540px;
  margin: 15px auto 0;
  color: #8090a0;
  font-size: 10px;
  line-height: 1.6;
}
.rg-welcome__canvas {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
@keyframes rgWelcomeArrival {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rgPrizeArrival {
  from { opacity: .15; transform: scale(.82); filter: blur(2px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}
@media (max-width: 600px) {
  .rg-welcome { padding: 12px; }
  .rg-welcome__card {
    max-height: calc(100dvh - 24px);
    padding: 43px 22px 27px;
    border-radius: 20px;
  }
  .rg-welcome__title { font-size: clamp(34px,10vw,48px); }
  .rg-welcome__title span { font-size: 1.09em; }
  .rg-welcome__description { font-size: 12px; }
  .rg-welcome__subtitle { margin-top: 15px; font-size: 17px; }
  .rg-welcome__actions { margin-top: 20px; }
  .rg-welcome__main-action { min-height: 51px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-welcome__card,
  .rg-welcome__title span { animation: none !important; }
}


/* Campo textarea del Webform CRM: aporta datos del referente sin alterar la interfaz. */
.rg-crm-description {
  position: absolute !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
