/* ============================================================
   Bionet · Registro Pacientes
   CSS puro, mobile-first, nomenclatura BEM. Vista sin header.
   ============================================================ */

:root {
    --font: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

    --blue: #007CB7;
    --blue-bright: #067FEE;
    --blue-light: #45C7FF;
    --blue-dark: #002440;
    --orange: #F58220;
    --yellow: #FDB515;
    --white: #FFFFFF;

    --gray-1: #F9FAFB;
    --gray-2: #F1F1F1;
    --gray-3: #E6E7E8;
    --gray-4: #808285;
    --gray-5: #414042;

    --bg: var(--gray-1);
    --text: var(--blue-dark);
    --text-soft: #002447;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-input: 14px;

    --container: 1200px;
    --space: clamp(16px, 4vw, 32px);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Layout base ---------- */
.page {
    flex: 1 0 auto;
    width: 100%;
}

/* ============================================================
   HERO  ·  Mobile: una columna (contenido y luego imagen).
   ============================================================ */
.hero {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 6vw, 48px);
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(24px, 6vw, 56px) var(--space) 0;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    max-width: 540px;
}

/* Chip "Pacientes" */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(69, 199, 255, 0.25);
    border-radius: var(--radius-md);
    color: var(--blue-bright);
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1.2;
}

.chip__icon {
    width: 17px;
    height: 17px;
    flex: none;
}

.chip__text {
    color: inherit;
}

/* Título y subtítulo */
.hero__title {
    color: var(--blue-dark);
    font-weight: 700;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.hero__title--md {
    font-size: clamp(1.375rem, 3.5vw, 1.75rem);
}

/* título largo, algo más chico */

.hero__subtitle {
    color: var(--text-soft);
    font-size: 0.9375rem;
    line-height: 1.4;
}

/* ============================================================
   FORMULARIO
   ============================================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: 4px;
}

.field {
    width: 100%;
}

/* Fila de dos campos (Nombre / Apellido): apilados en móvil */
.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

.input {
    width: 100%;
    padding: 15px 18px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--blue-dark);
    background-color: var(--white);
    border: 1px solid var(--gray-4);
    border-radius: var(--radius-input);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input::placeholder {
    color: var(--gray-4);
}

.input:focus {
    outline: none;
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(6, 127, 238, .15);
}

.input--with-action {
    padding-right: 56px;
}

/* Select estilizado */
.select {
    position: relative;
    width: 100%;
}

.select__control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 48px;
    cursor: pointer;
}

.select__control:required:invalid {
    color: var(--gray-4);
}

/* placeholder en gris */
.select__arrow {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--blue-dark);
}

/* Campo con botón interno (ojo de contraseña) */
.input-group {
    position: relative;
    width: 100%;
}

.input-action {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--gray-5);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.input-action:hover {
    color: var(--blue-bright);
}

.input-action:focus-visible {
    outline: 2px solid rgba(6, 127, 238, .4);
    outline-offset: 2px;
}

.input-action .icon-eye {
    display: none;
}

.input-action[aria-pressed="true"] .icon-eye {
    display: block;
}

.input-action[aria-pressed="true"] .icon-eye-off {
    display: none;
}

/* Texto de ayuda bajo un campo */
.field__help {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gray-4);
    line-height: 1.4;
}

/* Link de ayuda con ícono (Encuentra tu número de atención) */
.link-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: -4px;
    color: var(--blue-bright);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    width: fit-content;
}

.link-help__icon {
    width: 18px;
    height: 18px;
    flex: none;
}

.link-help:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Checkbox de términos */
.checkbox {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--gray-4);
    line-height: 1.4;
}

.checkbox__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox__box {
    width: 20px;
    height: 20px;
    flex: none;
    border: 2px solid var(--gray-4);
    border-radius: 5px;
    background-color: var(--white);
    position: relative;
    transition: background-color .15s ease, border-color .15s ease;
}

.checkbox__input:checked+.checkbox__box {
    background-color: var(--blue-bright);
    border-color: var(--blue-bright);
}

.checkbox__input:checked+.checkbox__box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox__input:focus-visible+.checkbox__box {
    outline: 2px solid rgba(6, 127, 238, .4);
    outline-offset: 2px;
}

.checkbox__link {
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Botón ---------- */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.actions--center {
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .05s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn--center {
    justify-content: center;
}

.btn--auto {
    width: auto;
    min-width: 220px;
}

/* botón "Enviar": ancho automático */
.btn:focus-visible {
    outline: 3px solid rgba(6, 127, 238, .4);
    outline-offset: 2px;
}

.btn--primary {
    background-color: var(--blue-bright);
    border-color: var(--blue-bright);
    color: var(--white);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background-color: var(--blue-light);
    border-color: var(--blue-light);
}

/* ---------- Imagen del hero ---------- */
.hero__media {
    width: 100%;
}

.hero__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    flex-shrink: 0;
    width: 100%;
    margin-top: clamp(32px, 8vw, 64px);
    background-color: var(--blue-dark);
    padding: 16px var(--space);
}

.footer__text {
    max-width: var(--container);
    margin: 0 auto;
    text-align: center;
    color: var(--gray-1);
    font-size: 0.75rem;
    line-height: 1.5;
}

.footer__link {
    color: var(--gray-1);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer__link:hover {
    color: var(--yellow);
}

/* ============================================================
   TABLET ≥ 768px
   ============================================================ */
@media (max-width: 768px) {
    .hero__content {
        max-width: 100%;
    }

    .hero__title {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }
}

/* ============================================================
   DESKTOP ≥ 1024px · dos columnas
   ============================================================ */
@media (max-width: 1024px) {
    .hero__content {
        max-width: 100%;
    }
}

@media (min-width: 1024px) {
    .hero {
        flex-direction: row;
        align-items: stretch;
        gap: clamp(32px, 5vw, 72px);
        padding-top: clamp(40px, 5vw, 72px);
        padding-bottom: 0;
    }

    .hero__content {
        flex: 1 1 48%;
        align-self: center;
        padding-block: 24px;
    }

    .hero__media {
        flex: 1 1 52%;
        align-self: stretch;
        display: flex;
        justify-content: flex-end;
    }

    .hero__image {
        width: 100%;
        max-width: 620px;
        height: 100%;
        max-height: 760px;
        border-radius: 0;
    }
}

/* ============================================================
   DESKTOP WIDE ≥ 1440px
   ============================================================ */
@media (min-width: 1440px) {
    .hero__image {
        max-width: 680px;
    }
}

/* ---------- Accesibilidad: reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}