/* Diálogo a dos paneles (Acceso socios, Contacto). Solo aplica con data-variant="split" (lo fija showView); el resto de las vistas no cambia. */

/* Máscara de fondo: oscurece toda la página al 50 % (con un desenfoque leve para separar el diálogo del contenido) */
.modal[data-variant="split"]::backdrop { background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }

.modal[data-variant="split"] {
  --slant: 100px; /* cuánto se inclina el borde del panel blanco */
  width: min(1040px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: hidden auto;
  border-radius: 34px; border: 2px solid rgba(255, 255, 255, .78); color: #fff;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  background:
    linear-gradient(105deg, rgba(6, 33, 54, .97) 0%, rgba(8, 51, 82, .93) 48%, rgba(10, 78, 120, .78) 100%),
    url('../../assets/img/hero-1000.jpg') 22% 42% / cover no-repeat;
}
.modal[data-variant="split"][open] { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); }

/* Panel izquierdo (la cabecera del diálogo): marca, título, texto y beneficios */
.modal[data-variant="split"] .modal__head { display: block; /* sin position: el botón cerrar se ancla al diálogo */ padding: 46px 0 36px 46px; border: 0; background: none; }
.modal[data-variant="split"] .modal__head > div { display: flex; flex-direction: column; height: 100%; }
.modal[data-variant="split"] .modal__aside { display: contents; }
.modal[data-variant="split"] .modal__aside[hidden] { display: none; }
.modal[data-variant="split"] .split-logo { order: -1; width: 168px; margin-bottom: 38px; filter: brightness(0) invert(1); }
.modal[data-variant="split"] .eyebrow { color: rgba(255, 255, 255, .92); letter-spacing: .3em; font-size: .78rem; margin-bottom: 10px; }
.modal[data-variant="split"] .modal__head h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -.035em; color: #fff; margin-bottom: 18px; }
.split-lead { order: 1; max-width: 27ch; color: rgba(255, 255, 255, .9); font-size: 1.05rem; line-height: 1.55; }
.split-feats { order: 2; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin-top: auto; padding-top: 44px; position: relative; z-index: 1; }
.split-feats li { display: grid; justify-items: center; gap: 10px; padding-inline: 13px; text-align: center; font-size: .86rem; line-height: 1.3; color: rgba(255, 255, 255, .92); }
.split-feats li:first-child { padding-left: 0; }
.split-feats li + li { border-left: 1px solid rgba(255, 255, 255, .22); }
.split-feat__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.split-feat__icon .icon { width: 26px; height: 26px; }
/* Ondas decorativas detrás de los beneficios */
.modal[data-variant="split"]::after {
  content: ''; position: absolute; z-index: -1; left: 0; bottom: 0; width: 60%; height: 52%; pointer-events: none; opacity: .95;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 260' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%232f8fd6' stop-opacity='0'/%3E%3Cstop offset='.55' stop-color='%232f8fd6' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%2362b6f0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 190C110 120 250 150 360 100S560 20 640 40V260H0z' fill='%23ffffff' fill-opacity='.05'/%3E%3Cpath d='M0 190C110 120 250 150 360 100S560 20 640 40' fill='none' stroke='url(%23g)' stroke-width='2.5'/%3E%3Cpath d='M0 215C130 160 270 190 390 150S580 90 640 100' fill='none' stroke='%23ffffff' stroke-opacity='.14' stroke-width='1.5'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

/* Cerrar: botón circular suave arriba a la derecha, sobre el panel blanco */
.modal[data-variant="split"] .modal__head .icon-btn { position: absolute; z-index: 5; top: 22px; right: 22px; width: 52px; height: 52px; background: #e6eef5; color: var(--brand-navy); }
.modal[data-variant="split"] .modal__head .icon-btn:hover { background: #d7e4ee; }
.modal[data-variant="split"] .modal__head .icon-btn .icon { width: 24px; height: 24px; }

/* Panel derecho: blanco, con el borde izquierdo inclinado y la esquina superior redondeada */
.modal[data-variant="split"] .modal__body {
  position: relative; z-index: 1; margin-left: calc(var(--slant) * -1); padding: 88px 52px 52px calc(var(--slant) + 40px); align-content: center; gap: 0;
  color: var(--text-primary); background: linear-gradient(180deg, #fff 0%, #f6f9fd 100%);
  clip-path: polygon(calc(var(--slant) * .36) 100%, calc(var(--slant) - 14px) 90px, calc(var(--slant) - 10px) 62px, calc(var(--slant) - 2px) 40px, calc(var(--slant) + 14px) 22px, calc(var(--slant) + 40px) 8px, calc(var(--slant) + 76px) 0, 100% 0, 100% 100%);
}
.modal[data-variant="split"] .modal__body p { color: inherit; }

.form--split { gap: 22px; }
.form--split .field { gap: 10px; }
.form--split .field label { display: flex; align-items: center; gap: 12px; font-size: 1.08rem; color: var(--brand-navy); }
.form--split .field__icon { width: 24px; height: 24px; color: var(--brand-navy); }
.form--split .field input:not([type="checkbox"]) {
  min-height: 58px; padding: 0 22px; border-radius: 20px; font-size: 1.08rem; color: var(--brand-navy);
  background: #e8effb; border: 1.5px solid rgba(118, 146, 196, .38); transition: border-color var(--duration-short), box-shadow var(--duration-short), background-color var(--duration-short);
}
.form--split .field input:not([type="checkbox"]):hover { background: #e3ebfa; }
.form--split .field input:not([type="checkbox"]):focus { outline: 0; background: #fff; border-color: var(--brand-blue-2); box-shadow: 0 0 0 4px rgba(31, 123, 176, .2); }
.form--split .field [aria-invalid="true"] { border-color: #a3261e; background: #fdf0ef; }
.form--split .field__control { position: relative; }
.form--split .field__control input { padding-right: 62px; }
.field__reveal { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--brand-navy); transition: background-color var(--duration-short); }
.field__reveal:hover { background: rgba(9, 40, 62, .08); }
.field__reveal .icon { width: 24px; height: 24px; }

.login-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 2px; }
.login-remember { display: inline-flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--text-primary); cursor: pointer; }
.login-remember input { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; margin: 0; flex: none; border-radius: 8px; border: 2px solid var(--brand-navy); background: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color var(--duration-short); }
.login-remember input::after { content: ''; width: 14px; height: 8px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--duration-short) var(--ease-emphasis); }
.login-remember input:checked { background: var(--brand-navy); }
.login-remember input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.login-remember input:focus-visible { outline: 3px solid rgba(31, 123, 176, .45); outline-offset: 2px; }
.login-forgot { min-height: 44px; color: var(--brand-blue); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.login-forgot:hover { color: var(--brand-navy); }
.login-hint { font-size: .9rem; color: var(--text-secondary) !important; margin-top: -6px; }

.form--split .form__actions { justify-content: center; margin-top: 12px; }
.form--split .form__actions .btn { min-width: min(100%, 360px); min-height: 70px; font-size: 1.3rem; font-weight: 600; box-shadow: 0 14px 30px rgba(9, 40, 62, .32); }
.form--split .field__error { font-size: .88rem; }

.form--split .field textarea {
  min-height: 118px; padding: 16px 22px; border-radius: 20px; font-size: 1.08rem; color: var(--brand-navy); resize: vertical;
  background: #e8effb; border: 1.5px solid rgba(118, 146, 196, .38); transition: border-color var(--duration-short), box-shadow var(--duration-short), background-color var(--duration-short);
}
.form--split .field textarea:hover { background: #e3ebfa; }
.form--split .field textarea:focus { outline: 0; background: #fff; border-color: var(--brand-blue-2); box-shadow: 0 0 0 4px rgba(31, 123, 176, .2); }

/* Select: misma piel que los inputs, con flecha propia */
.form--split .field select {
  min-height: 58px; padding: 0 56px 0 22px; border-radius: 20px; font-size: 1.08rem; color: var(--brand-navy); cursor: pointer;
  appearance: none; -webkit-appearance: none; background: #e8effb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2309283e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 20px center / 20px no-repeat;
  border: 1.5px solid rgba(118, 146, 196, .38); transition: border-color var(--duration-short), box-shadow var(--duration-short), background-color var(--duration-short);
}
.form--split .field select:hover { background-color: #e3ebfa; }
.form--split .field select:focus { outline: 0; background-color: #fff; border-color: var(--brand-blue-2); box-shadow: 0 0 0 4px rgba(31, 123, 176, .2); }

/* Checkbox de términos: mismo aspecto que "Recordarme" */
.form--split .field label.check { font-weight: 400; } /* gana a `.form--split .field label` (negrita de las etiquetas de campo) */
.form--split .field label.check { font-size: .95rem; }
.form--split .check { align-items: center; gap: 12px; line-height: 1.4; color: var(--text-primary); cursor: pointer; }
.form--split .check input, .login-remember input { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; min-height: 0; padding: 0; margin: 0; flex: none; border-radius: 8px; border: 2px solid var(--brand-navy); background: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color var(--duration-short); }
.form--split .check input::after { content: ''; width: 14px; height: 8px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--duration-short) var(--ease-emphasis); }
.form--split .check input:checked { background: var(--brand-navy); }
.form--split .check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.form--split .check input:focus-visible { outline: 3px solid rgba(31, 123, 176, .45); outline-offset: 2px; }

/* Variante en columna (datos de contacto): ícono + etiqueta/valor alineados a la izquierda, sin separadores */
.split-feats--stack { grid-template-columns: 1fr; gap: 16px; }
.split-feats--stack li { grid-template-columns: auto 1fr; justify-items: start; align-items: center; gap: 16px; padding: 0; text-align: left; font-size: .98rem; overflow-wrap: anywhere; }
.split-feats--stack li + li { border-left: 0; }
.split-feats--stack small { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .68); margin-bottom: 2px; }

/* Tablet/mobile: un solo panel; se reduce la cabecera y desaparece la inclinación */
@media (max-width: 859.98px) {
  .modal[data-variant="split"][open] { display: flex; flex-direction: column; }
  .modal[data-variant="split"] .modal__head { padding: 28px 24px 22px; }
  .modal[data-variant="split"] .split-logo { width: 130px; margin-bottom: 20px; }
  .modal[data-variant="split"] .modal__head h2 { margin-bottom: 0; }
  .modal[data-variant="split"] .split-lead, .modal[data-variant="split"] .split-feats:not(.split-feats--stack), .modal[data-variant="split"]::after { display: none; }
  .split-feats--stack { padding-top: 22px; gap: 12px; }
  .split-feats--stack .split-feat__icon { width: 44px; height: 44px; border-radius: 13px; }
  .modal[data-variant="split"] .modal__head .icon-btn { top: 16px; right: 16px; width: 46px; height: 46px; background: rgba(255, 255, 255, .16); color: #fff; }
  .modal[data-variant="split"] .modal__body { margin-left: 0; padding: 36px 24px 32px; clip-path: none; border-radius: 28px 28px 0 0; }
  .form--split .field input:not([type="checkbox"]) { min-height: 54px; }
  .form--split .form__actions .btn { min-height: 60px; font-size: 1.15rem; }
}
