/* Header marketing partagé (landing v2 + /agendar/) */

.v2-header {
    --navy: #1B2B5E;
    --red: #E63946;
    --line: rgba(27, 43, 94, .12);
    --muted: rgba(27, 43, 94, .66);
    --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --header-h: 52px;
    --max-w: 1140px;
    --ease-enter: cubic-bezier(.22, 1, .36, 1);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: #fff;
}

.v2-header::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 28px;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, .87) 14%,
        rgba(255, 255, 255, .72) 27%,
        rgba(255, 255, 255, .56) 40%,
        rgba(255, 255, 255, .4) 53%,
        rgba(255, 255, 255, .26) 66%,
        rgba(255, 255, 255, .14) 79%,
        rgba(255, 255, 255, .05) 91%,
        rgba(255, 255, 255, 0) 100%);
}

.v2-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.v2-logo {
    display: inline-flex;
    align-items: center;
}

.v2-logo img {
    display: block;
    height: 32px;
    max-height: 32px;
    width: auto;
}

.v2-login {
    font-size: .85rem;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    padding: .45rem 1rem;
    border: 1.5px solid rgba(27, 43, 94, .25);
    border-radius: 999px;
    background: none;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.v2-login:hover {
    background: rgba(27, 43, 94, .06);
    border-color: rgba(27, 43, 94, .5);
}

.v2-auth {
    position: relative;
}

.v2-auth-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 264px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(14, 23, 55, .24);
    padding: .95rem .95rem .8rem;
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transform: scale(.92) translateY(-6px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s;
}

.v2-auth-pop.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s var(--ease-enter), transform .2s var(--ease-enter), visibility .2s;
}

.v2-auth-pop::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 26px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: rotate(45deg);
}

.v2-auth-pop h4 {
    font-family: var(--font-display);
    font-weight: 640;
    font-size: .95rem;
    margin: 0 0 .6rem;
    color: var(--navy);
}

.v2-auth-field {
    margin-bottom: .55rem;
}

.v2-auth-field label {
    display: block;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .25rem;
}

.v2-auth-field input {
    width: 100%;
    padding: .52rem .65rem;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    font-size: .88rem;
    font-family: var(--font-body);
    color: var(--navy);
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.v2-auth-field input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27, 43, 94, .1);
}

.v2-auth-forgot {
    display: block;
    text-align: right;
    margin: -.15rem 0 .55rem;
    font-size: .74rem;
    color: var(--muted);
    text-decoration: none;
}

.v2-auth-forgot:hover {
    color: var(--red);
    text-decoration: underline;
}

.v2-header .v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1rem 1.9rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    background: var(--red);
    color: #fff;
    transition: background-color .2s ease, box-shadow .25s ease, transform .25s var(--ease-enter);
}

.v2-header .v2-btn:hover {
    background: #D32836;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(230, 57, 70, .35);
}

.v2-auth-submit {
    width: 100%;
    justify-content: center;
    padding: .6rem 1rem;
    font-size: .88rem;
    margin-top: 0;
}

.v2-auth-alt {
    display: block;
    text-align: center;
    margin-top: .6rem;
    font-size: .74rem;
    color: var(--muted);
    text-decoration: none;
}

.v2-auth-alt:hover {
    color: var(--navy);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .v2-auth-pop {
        position: fixed;
        top: calc(var(--header-h) + 8px);
        right: .75rem;
        width: min(320px, calc(100vw - 1.5rem));
    }
}

@media (prefers-reduced-motion: reduce) {
    .v2-auth-pop,
    .v2-auth-pop.is-open,
    .v2-header .v2-btn,
    .v2-login {
        transition: none;
        transform: none;
    }
}
