/**
 * Lobby — portada premium pantalla completa
 */

body.fp-page-lobby .fp-header,
body.fp-page-lobby .fp-sidebar,
body.fp-page-lobby .fp-footer {
    display: none !important;
}

body.fp-page-lobby {
    overflow: hidden;
}

body.fp-page-lobby .fp-body { display: block; }
body.fp-page-lobby .fp-main { padding: 0; background: #000; }
body.fp-page-lobby .fp-app {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

/* ══════════════════════════════════════
   CONTENEDOR — una sola pantalla
   ══════════════════════════════════════ */
.lb {
    position: relative;
    height: calc(100vh - 0px);
    min-height: 720px;
    overflow: hidden;
}

.lb-hero {
    position: relative;
    height: 100%;
    min-height: 720px;
    overflow: hidden;
}

.lb-hero__bg {
    position: absolute;
    inset: 0;
    background-image: var(--lb-hero-bg-desktop);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.lb-hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(90, 0, 45, 0.66) 0%,
        rgba(90, 0, 45, 0.36) 35%,
        rgba(0, 0, 0, 0.12) 65%,
        rgba(0, 0, 0, 0.04) 100%
    );
    pointer-events: none;
}

/* ══════════════════════════════════════
   HEADER FLOTANTE — minimal
   ══════════════════════════════════════ */
.lb-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    pointer-events: none;
}

.lb-header > * { pointer-events: auto; }

.lb-header__logo img {
    height: 38px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.lb-header__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lb-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.lb-header__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.lb-header__chevron {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.75);
}

.lb-header__login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: background 0.2s;
}

.lb-header__login:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.lb-header__register {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6a0032;
    text-decoration: none;
    background: #f2b705;
    border-radius: 999px;
    transition: opacity 0.2s;
}

.lb-header__register:hover {
    opacity: 0.92;
    color: #6a0032;
}

/* ══════════════════════════════════════
   CONTENIDO — centrado vertical izquierda
   ══════════════════════════════════════ */
.lb-hero__content {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    max-width: 560px;
    padding: 0 2rem 0 70px;
    color: #fff;
}

.lb-hero__eyebrow {
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 0.2rem;
    opacity: 0.95;
}

.lb-hero__title {
    font-size: clamp(1.85rem, 3.8vw, 2.75rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.lb-hero__title-line {
    display: inline;
}

.lb-hero__accent {
    color: #F2B705;
}

.lb-hero__subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 1.25rem;
    opacity: 0.92;
    line-height: 1.5;
}

.lb-hero__meta {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.lb-hero__meta li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.92;
}

.lb-hero__meta i {
    color: #F2B705;
    margin-top: 0.12rem;
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
}

.lb-hero__meta small {
    display: block;
    font-size: 0.76rem;
    opacity: 0.85;
    margin-top: 0.08rem;
}

.lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 2.2rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.lb-btn--primary {
    background: #F2B705;
    color: #4d0024;
    box-shadow: 0 10px 25px rgba(242, 183, 5, 0.35);
}

.lb-btn--primary:hover {
    background: #ffd040;
    color: #4d0024;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(242, 183, 5, 0.45);
}

.lb-header__user-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.lb-header__user-link:hover {
    opacity: 0.9;
    color: #fff;
}

/* Tarjeta de acciones por rol (empresa / admin / candidato) */
.lb-role-card {
    margin-top: 0.35rem;
    max-width: 400px;
    padding: 0.95rem 1rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.lb-role-card__welcome {
    margin: 0 0 0.3rem;
    font-size: 0.86rem;
    line-height: 1.35;
    color: #6a0032;
    font-weight: 500;
}

.lb-role-card__welcome strong {
    font-weight: 800;
    color: #4d0024;
}

.lb-role-card__desc {
    margin: 0 0 0.75rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #5a4a52;
}

.lb-role-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.lb-role-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.lb-role-btn:link,
.lb-role-btn:visited,
.lb-role-btn:hover,
.lb-role-btn:active,
.lb-role-btn:focus {
    text-decoration: none !important;
}

.lb-role-btn--primary {
    grid-column: 1 / -1;
    background: #f2b705;
    color: #4d0024 !important;
    border: none;
    box-shadow: 0 4px 14px rgba(242, 183, 5, 0.35);
    letter-spacing: 0.02em;
}

.lb-role-btn--primary:hover {
    background: #ffd040;
    color: #4d0024 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(242, 183, 5, 0.42);
}

.lb-role-btn--outline {
    background: #ffffff;
    color: #6a0032 !important;
    border: 1.5px solid rgba(106, 0, 50, 0.22);
}

.lb-role-btn--outline:hover {
    background: #fffdf8;
    color: #4d0024 !important;
    border-color: #f2b705;
    transform: translateY(-1px);
}

.lb-role-btn:focus-visible {
    outline: 2px solid #f2b705;
    outline-offset: 2px;
}

/* ══════════════════════════════════════
   MÉTRICAS — flotante sobre el hero
   ══════════════════════════════════════ */
.lb-strip {
    position: absolute;
    z-index: 5;
    bottom: calc(2rem + 30px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 1320px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
}

.lb-strip__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 1.15rem 1.5rem;
}

.lb-strip__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 1rem;
    border-right: 1px solid #eef0f3;
}

.lb-strip__item:last-child { border-right: none; }

.lb-strip__icon {
    flex-shrink: 0;
    font-size: 24px;
    color: #7A003C;
    line-height: 1;
    width: 28px;
    text-align: center;
}

.lb-strip__item strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #6A0032;
    line-height: 1.1;
}

.lb-strip__item span {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
}

/* ══════════════════════════════════════
   RESPONSIVE — sin scroll
   ══════════════════════════════════════ */
@media (max-width: 1199px) {
    .lb-hero__content {
        max-width: 520px;
        padding-left: 3rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .lb-header { padding: 1rem 1.25rem; }
    .lb-header__name { display: none; }

    .lb-hero__content {
        padding: 0 1.5rem 0 2rem;
        max-width: 100%;
    }

    .lb-hero__title {
        font-size: clamp(1.65rem, 4.5vw, 2.25rem);
    }

    .lb-strip {
        width: calc(100% - 2rem);
        bottom: calc(1.25rem + 30px);
    }

    .lb-strip__inner {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
    }

    .lb-strip__item:nth-child(2) { border-right: none; }
    .lb-strip__item:nth-child(1),
    .lb-strip__item:nth-child(2) {
        border-bottom: 1px solid #eef0f3;
    }
}

/* ══════════════════════════════════════
   MÓVIL — scroll vertical, layout centrado
   ══════════════════════════════════════ */
@media (max-width: 768px) {
    html,
    body.fp-page-lobby {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        margin: 0;
        padding: 0;
        height: auto !important;
        min-height: 0;
        background: #ffffff !important;
        -webkit-overflow-scrolling: touch;
    }

    body.fp-page-lobby .fp-app,
    body.fp-page-lobby .fp-body,
    body.fp-page-lobby .fp-main,
    body.fp-page-lobby .lobby-container,
    body.fp-page-lobby .main-content,
    .lb,
    .lobby-page {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    body.fp-page-lobby .fp-app {
        display: block;
    }

    body.fp-page-lobby .fp-body,
    body.fp-page-lobby .fp-main {
        flex: none;
        min-height: auto;
        background: #ffffff !important;
    }

    /* Ocultar elementos laterales del portal en lobby móvil */
    body.fp-page-lobby .fp-sidebar,
    body.fp-page-lobby .fp-header,
    body.fp-page-lobby .fp-footer,
    .mobile-side-tab,
    .floating-side-tab,
    .desktop-sidebar,
    .side-handle {
        display: none !important;
    }

    .lb-hero,
    .lobby-hero {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: max(24px, env(safe-area-inset-top, 0px)) 0 max(12px, env(safe-area-inset-bottom, 0px)) !important;
        background: transparent;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .lb-hero__bg {
        background-image: var(--lb-hero-bg-mobile);
        background-position: center bottom !important;
        background-size: cover !important;
    }

    .lb-hero__veil {
        background: linear-gradient(
            180deg,
            rgba(30, 0, 20, 0.38) 0%,
            rgba(30, 0, 20, 0.14) 32%,
            rgba(0, 0, 0, 0.04) 58%,
            transparent 100%
        );
    }

    .lb-header,
    .lb-hero__content {
        position: relative;
        z-index: 2;
    }

    /* Header en flujo — logo separado del título */
    .lb-header {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        height: auto;
        min-height: 0;
        padding: 0;
        display: block;
        pointer-events: none;
        flex-shrink: 0;
    }

    .lb-header > * {
        pointer-events: auto;
    }

    .lb-header__logo,
    .lobby-logo {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        display: block;
        margin: 0 0 36px 24px !important;
        width: 110px;
        max-width: calc(100% - 48px);
        z-index: 5;
    }

    .lb-header__logo img {
        width: 110px !important;
        max-width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
    }

    .lb-header__user {
        position: absolute;
        top: 0;
        right: max(24px, env(safe-area-inset-right, 0px));
        z-index: 6;
    }

    .lb-header__login {
        font-size: 0.72rem;
        padding: 0.42rem 0.85rem;
        gap: 0.35rem;
        background: rgba(40, 0, 25, 0.55);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .lb-header__login i { font-size: 0.68rem; }

    .lb-header__avatar {
        width: 30px;
        height: 30px;
    }

    .lb-header__name { display: none; }

    /* Contenido centrado — título y botón siempre visibles */
    .lb-hero__content,
    .lobby-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: calc(100% - 48px) !important;
        max-width: 100%;
        margin: 0 auto !important;
        padding: 0 !important;
        z-index: 10;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0;
        color: #fff;
        box-sizing: border-box;
        overflow: visible;
        flex-shrink: 0;
    }

    .lb-hero__eyebrow {
        font-size: 0.82rem;
        margin: 0 0 0.55rem;
        opacity: 0.95;
    }

    .lb-hero__eyebrow::before {
        content: '';
        display: block;
        width: 42px;
        height: 3px;
        background: #F2B705;
        border-radius: 2px;
        margin-bottom: 0.55rem;
    }

    .lb-hero__title,
    .lobby-title,
    .lobby-content h1 {
        font-size: clamp(1.875rem, 9.5vw, 2.625rem) !important;
        line-height: 1.08 !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        max-width: 100% !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    }

    .lb-hero__title-line {
        display: block;
    }

    .lb-hero__subtitle,
    .lobby-subtitle {
        font-size: 18px !important;
        line-height: 1.3 !important;
        max-width: 100% !important;
        margin-bottom: 0.85rem;
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    }

    .lb-hero__meta {
        margin-bottom: 1rem;
        gap: 0.45rem;
    }

    .lb-hero__meta li,
    .lobby-date-pill,
    .lobby-time-pill {
        font-size: 0.74rem;
        gap: 0.45rem;
        background: rgba(60, 0, 35, 0.62);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border-radius: 999px;
        padding: 0.45rem 0.85rem;
        width: fit-content;
        max-width: 100%;
    }

    .lb-hero__meta i {
        font-size: 0.72rem;
        margin-top: 0;
    }

    .lb-btn,
    .lobby-enter-btn {
        width: 100% !important;
        max-width: 100% !important;
        height: 54px;
        min-height: 54px;
        margin-top: 22px !important;
        margin-bottom: 0 !important;
        padding: 0 0.35rem 0 1.15rem;
        font-size: 0.78rem;
        justify-content: space-between;
        border-radius: 999px;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .lb-role-card {
        max-width: 100%;
        width: 100%;
        margin-top: 1rem;
        padding: 0.9rem 0.85rem;
    }

    .lb-role-card__grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .lb-role-btn {
        width: 100%;
        min-height: 44px;
        font-size: 0.78rem;
    }

    .lb-role-btn--primary {
        grid-column: 1;
    }

    .lb-btn--primary i {
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        margin-left: 0.5rem;
        background: #fff;
        color: #6A0032;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }

    /* Métricas — debajo del botón, separación 24–32px, sin solapamiento */
    .lb-strip,
    .lobby-stats,
    .hero-stats,
    .mobile-stats {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        width: calc(100% - 32px) !important;
        max-width: calc(100vw - 32px);
        margin: 236px auto 0 auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        border-radius: 20px;
        z-index: 20;
        box-sizing: border-box;
        background: #fff;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
        flex-shrink: 0;
    }

    .lb {
        padding-bottom: 0 !important;
        min-height: auto !important;
    }

    .lb-strip__inner,
    .lobby-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;
        gap: 0;
        padding: 0.85rem 0.65rem;
    }

    .lb-strip__item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 0.55rem;
        padding: 0.55rem 0.45rem;
        max-height: none;
        background: transparent;
        border-radius: 0;
        border-right: none;
        border-bottom: none;
    }

    .lb-strip__item:nth-child(odd) {
        border-right: 1px solid #eef0f3;
    }

    .lb-strip__item:nth-child(1),
    .lb-strip__item:nth-child(2) {
        border-bottom: 1px solid #eef0f3;
        padding-bottom: 0.65rem;
        margin-bottom: 0.1rem;
    }

    .lb-strip__icon {
        flex-shrink: 0;
        width: 34px;
        height: 34px;
        font-size: 16px;
        background: rgba(106, 0, 50, 0.1);
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .lb-strip__item strong {
        font-size: 1.05rem;
        line-height: 1.05;
    }

    .lb-strip__item span {
        font-size: 0.52rem;
        line-height: 1.15;
        margin-top: 0.08rem;
    }
}

@media (max-height: 720px) and (max-width: 768px) {
    .lb-hero__title,
    .lobby-title,
    .lobby-content h1 {
        font-size: clamp(1.625rem, 8.5vw, 2.25rem) !important;
        margin-bottom: 12px !important;
    }

    .lb-hero__subtitle,
    .lobby-subtitle {
        font-size: 16px !important;
        margin-bottom: 0.65rem;
    }

    .lb-hero__meta { margin-bottom: 0.75rem; }

    .lb-btn,
    .lobby-enter-btn {
        height: 50px;
        min-height: 50px;
        font-size: 0.72rem;
    }

    .lb-header__logo,
    .lobby-logo {
        margin-bottom: 28px !important;
    }

    .lb-strip__inner { padding: 0.65rem 0.5rem; }

    .lb-strip__item strong { font-size: 0.95rem; }
}
