:root {
    --primary: #005b9f;
    --primary-dark: #003d6b;
    --secondary: #00a4d6;
    --accent: #d52b3f;

    --text: #263747;
    --muted: #687887;

    --background: #f3f7fa;
    --surface: #ffffff;
    --border: #dce7ee;

    --radius: 16px;
    --shadow: 0 8px 24px rgba(22, 54, 84, .10);
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--background);
    color: var(--text);
    font-family: 'Inter', Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
}

/* Layout */
.page-layout {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.main-content {
    display: grid;
    width: min(1180px, calc(100% - 40px));
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 0 auto;
    padding: 24px 0 36px;
    overflow: visible;
}

/* Header */
.site-header {
    position: sticky;
    z-index: 200;
    top: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    width: min(1180px, calc(100% - 40px));
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

.hospital-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-dark);
}

.hospital-brand:hover {
    color: var(--primary);
}

.hospital-logo {
    width: 46px;
    height: 46px;
    padding: 4px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    object-fit: contain;
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    font-size: 15px;
    line-height: 1.2;
}

.brand-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.header-security {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #28784f;
    font-size: 12px;
    font-weight: 600;
}

/* Hero */
.hero-section {
    display: flex;
    min-height: 205px;
    align-items: center;
    padding: 34px 40px 58px;
    overflow: hidden;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% 15%, rgba(255, 255, 255, .22), transparent 20%),
        radial-gradient(circle at 75% 90%, rgba(255, 255, 255, .10), transparent 28%),
        linear-gradient(125deg, #004779 0%, #006da8 58%, #00a0cb 100%);
    box-shadow: var(--shadow);
    color: #ffffff;
}

.hero-copy {
    max-width: 720px;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-eyebrow {
    color: rgba(255, 255, 255, .78);
}

.section-eyebrow {
    color: var(--secondary);
}

.hero-copy h1 {
    margin: 0 0 11px;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 43px);
    line-height: 1.08;
}

.hero-copy h1 span {
    display: block;
    color: #a2efff;
}

.hero-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 14px;
    line-height: 1.6;
}

/* Login fijo */
.login-sticky-container {
    position: sticky;
    z-index: 150;
    top: 82px;
    width: 100%;
    margin-top: -58px;
    pointer-events: none;
}

.hero-login {
    display: grid;
    width: min(100% - 32px, 720px);
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    margin: 0 auto;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .60);
    border-radius: 13px;
    background: linear-gradient(125deg, #005b9f, #008ec1);
    box-shadow: 0 12px 28px rgba(0, 61, 107, .25);
    color: #ffffff;
    pointer-events: auto;
}

.hero-login-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 11px;
    background: #ffffff;
    color: var(--primary);
    font-size: 18px;
}

.hero-login-content {
    min-width: 0;
}

.hero-login-content strong,
.hero-login-content span {
    display: block;
}

.hero-login-content strong {
    font-size: 13px;
}

.hero-login-content span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
    line-height: 1.35;
}

/* Botón ClaveÚnica personalizado */
.login-button-custom {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 5px 13px rgba(0, 0, 0, .18);
    color: var(--primary);
    cursor: pointer;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    white-space: nowrap;
}

.login-button-custom::before,
.login-button-custom::after {
    display: none !important;
    content: none !important;
}

.login-button-custom i {
    color: var(--primary);
}

.login-button-custom:hover,
.login-button-custom:focus {
    background: #edf9fd;
    box-shadow: 0 8px 17px rgba(0, 0, 0, .22);
    color: var(--primary-dark);
    outline: none;
    transform: translateY(-1px);
}

.login-button-custom:focus-visible {
    outline: 3px solid #a2efff;
    outline-offset: 3px;
}

/* Tarjetas */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 2px;
}

.info-card {
    display: flex;
    min-height: 132px;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: box-shadow .2s ease, transform .2s ease;
}

.info-card:hover {
    box-shadow: 0 14px 30px rgba(22, 54, 84, .14);
    transform: translateY(-3px);
}

.info-icon {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 14px;
    font-size: 22px;
}

.icon-blue {
    background: #e2f4fc;
    color: #087dbb;
}

.icon-red {
    background: #fde9ed;
    color: #c72e46;
}

.icon-green {
    background: #e5f7ec;
    color: #21875a;
}

.info-card h2 {
    margin: 0 0 7px;
    color: var(--primary-dark);
    font-size: 16px;
}

.info-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

/* Pasos */
.steps-section {
    display: grid;
    grid-template-columns: 205px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 22px 24px;
    border: 1px solid #d5eaf3;
    border-radius: var(--radius);
    background: #eaf6fa;
}

.steps-title h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 20px;
    line-height: 1.2;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.step-item {
    position: relative;
    display: flex;
    min-height: 74px;
    align-items: center;
    gap: 11px;
    padding: 13px 12px 13px 17px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .82);
}

.step-number {
    position: absolute;
    top: -7px;
    left: -5px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 3px 7px rgba(0, 71, 120, .22);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

.step-icon {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;
    border-radius: 10px;
    background: #d8eff8;
    color: var(--primary);
    font-size: 15px;
}

.step-item h3 {
    margin: 0 0 4px;
    color: var(--primary-dark);
    font-size: 13px;
}

.step-item p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

/* Privacidad */
.privacy-section {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 20px;
    border: 1px solid #d5eaf3;
    border-radius: var(--radius);
    background: #f8fcfe;
}

.privacy-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 11px;
    background: var(--primary);
    color: #ffffff;
    font-size: 17px;
}

.privacy-section p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.privacy-section p a {
    color: var(--primary);
    font-weight: 700;
}

.privacy-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #28784f;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Footer */
.site-footer {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 12px max(20px, calc((100% - 1180px) / 2));
    background: var(--primary-dark);
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
}

/* Tablet */
@media (max-width: 900px) {
    .hero-section {
        min-height: 195px;
    }

    .info-grid {
        gap: 12px;
    }

    .info-card {
        min-height: 120px;
        padding: 16px;
    }

    .steps-section {
        grid-template-columns: 160px minmax(0, 1fr);
        gap: 16px;
    }

    .privacy-lock {
        display: none;
    }
}

/* Móvil */
@media (max-width: 700px) {
    .header-content,
    .main-content {
        width: min(100% - 28px, 1180px);
    }

    .header-content {
        min-height: 62px;
    }

    .hospital-logo {
        width: 40px;
        height: 40px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text small,
    .header-security span {
        display: none;
    }

    .header-security {
        font-size: 17px;
    }

    .main-content {
        gap: 16px;
        padding: 14px 0 24px;
    }

    .hero-section {
        min-height: 190px;
        padding: 24px 20px 52px;
    }

    .hero-copy h1 {
        font-size: 29px;
    }

    .hero-copy p {
        font-size: 13px;
        line-height: 1.5;
    }

    .login-sticky-container {
        top: 72px;
        margin-top: -36px;
    }

    .hero-login {
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .hero-login-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .hero-login-content strong {
        font-size: 12px;
    }

    .hero-login-content span {
        font-size: 10px;
    }

    .login-button-custom {
        width: 100%;
        min-height: 42px;
        grid-column: 1 / -1;
        font-size: 12px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .info-card {
        min-height: 95px;
    }

    .steps-section {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 18px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .step-item {
        min-height: 64px;
    }

    .privacy-section {
        align-items: flex-start;
        padding: 15px;
    }

    .privacy-section p {
        font-size: 11px;
        line-height: 1.5;
    }

    .site-footer {
        min-height: 50px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 10px 16px;
        text-align: center;
        font-size: 10px;
    }
}

.hero-login .btn-cu {
    margin: 0;
    box-shadow: none;
    transform: none;
}

.hero-login .btn-cu:hover {
    transform: none;
}