/* ===================================================================
 *  HYLINE – PÁGINA HX (hx-en.html)
 *  Carregar DEPOIS de componentes.css.
 *
 *  O componentes.css já trata da letra, dos títulos, do texto, dos
 *  botões e das margens (é partilhado com a apresentação).
 *  Aqui fica só o que é próprio da página HX: estrutura das colunas,
 *  abertura com o logótipo, slogan com a mão, vídeo, livro, programas
 *  e equipa.
 * =================================================================== */


/* ------------------------------------------------------------------
 * FUNDO E BASE (o mesmo fundo da apresentação)
 * ------------------------------------------------------------------ */
body.pagina-hx {
    margin: 0;
    background-color: #111111;
    background-image: url('../images/bg.jpg');
    background-image: image-set(url('../images/bg.webp') type('image/webp'), url('../images/bg.jpg') type('image/jpeg'));
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    padding-bottom: 0;
}

.pagina-hx a {
    color: var(--dourado);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.pagina-hx sup {
    font-size: 0.6em;
    vertical-align: super;
}

/* Pré-carregador (o main.js do template retira-o quando a página carrega) */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000000;
    transition: all 0.6s ease-out;
}

@keyframes hx-flutuar {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}


/* ------------------------------------------------------------------
 * "×" PARA VOLTAR À APRESENTAÇÃO (igual ao × do zoom dos produtos)
 * ------------------------------------------------------------------ */
.pagina-hx .hx-voltar {
    position: fixed;
    top: 28px;
    right: 28px;
    z-index: 9999;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 16px;
    transition: color 0.3s ease, background 0.3s ease;
}

.pagina-hx .hx-voltar:hover,
.pagina-hx .hx-voltar:focus-visible {
    color: var(--dourado);
    background: rgba(0, 0, 0, 0.8);
}


/* ------------------------------------------------------------------
 * ESTRUTURA DAS SECÇÕES (as mesmas classes da apresentação)
 *   caixa-mestra-people  → caixa da secção
 *   hx-topo              → linha com o título à esquerda e o texto à direita
 *   coluna-esq-people    → título (26%)
 *   coluna-dir-people    → texto (70%), dividido em sub-colunas
 * ------------------------------------------------------------------ */
.pagina-hx .caixa-mestra-people,
.pagina-hx .hx-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    box-sizing: border-box;
}

.pagina-hx .hx-topo {
    width: 100%;
}

/* Secções com conteúdo por baixo do título (cartões, livro, equipa…) */
.pagina-hx .caixa-mestra-people.hx-pilha {
    flex-direction: column;
    align-items: stretch;
    gap: 56px;
}

.pagina-hx .coluna-esq-people {
    flex: 0 0 26%;
    max-width: 26%;
    margin: 0;
}

.pagina-hx .coluna-dir-people {
    flex: 0 0 70%;
    max-width: 70%;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin: 0;
}

.pagina-hx .sub-coluna-people {
    flex: 1;
}

/* Duas colunas iguais (programas e equipa) */
.pagina-hx .hx-grelha-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}


/* ------------------------------------------------------------------
 * 1. ABERTURA (logótipo HX)
 * ------------------------------------------------------------------ */
#top .hx-abertura:not(#n) {
    position: relative;
    min-height: 100vh !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 24px !important;
}

.hx-abertura .hx-logo {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
}

.hx-explorar {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.hx-explorar:hover {
    opacity: 1;
}

#top .hx-explorar span:not(#n) {
    font-size: var(--t-mini) !important;
    font-weight: 300 !important;
    letter-spacing: var(--ls-maiusculas) !important;
    text-transform: uppercase !important;
    color: var(--cor-texto) !important;
}

.hx-explorar i,
.hx-voltar-topo i {
    font-size: 24px;
    color: var(--dourado);
    animation: hx-flutuar 2s infinite;
}


/* ------------------------------------------------------------------
 * 2. SLOGAN COM A MÃO
 * ------------------------------------------------------------------ */
#top .hx-hero:not(#n) {
    position: relative;
    min-height: 75vh !important;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hx-hero .caixa-mestra-people {
    position: relative;
    z-index: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

#top .hx-slogan:not(#n) {
    max-width: 55%;
    margin: 0 0 32px 0 !important;
    font-size: 22px !important;
    font-weight: 200 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.5px !important;
    color: var(--cor-texto) !important;
}

#top .hx-slogan:last-child:not(#n) {
    margin-bottom: 0 !important;
}

.hx-mao {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}


/* ------------------------------------------------------------------
 * 3. SECÇÃO COM VÍDEO DE FUNDO (Preservation)
 * ------------------------------------------------------------------ */
#top .hx-video:not(#n) {
    position: relative;
    min-height: 70vh !important;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hx-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hx-video .hx-pelicula {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hx-video .caixa-mestra-people {
    position: relative;
    z-index: 3;
}


/* ------------------------------------------------------------------
 * 4. CLIENT BENEFITS (5 cartões com GIF)
 * ------------------------------------------------------------------ */
.pagina-hx .caixa-cartoes-mvv {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.pagina-hx .hx-beneficios .cartao-mvv {
    flex: 1 1 0;
    min-width: 0;
}

#top .hx-beneficios .cartao-mvv p:not(#n) {
    max-width: 220px;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* ------------------------------------------------------------------
 * 5. HX PLATFORM
 * ------------------------------------------------------------------ */
.hx-plataforma-texto {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
}

.hx-plataforma-imagem {
    text-align: center;
}

.hx-dispositivos {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-top: -30px;
}


/* ------------------------------------------------------------------
 * 6. HX BOOK
 * ------------------------------------------------------------------ */
.hx-livro {
    width: 100%;
}

.book-viewport {
    position: relative;
    max-width: 900px;
    height: 325px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

.book-stage img {
    max-height: 325px;
    max-width: 100%;
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.hx-livro-botoes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
}

/* O × do livro só aparece com o telemóvel na horizontal (ver no fim) */
#wrapper-fechar-book {
    display: none;
    text-align: right;
    max-width: 900px;
    margin: 0 auto 8px auto;
}


/* ------------------------------------------------------------------
 * 7. PROGRAMAS (Hycare & Hyvolution)
 * ------------------------------------------------------------------ */
.program-card {
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
}

.program-card:hover {
    transform: translateY(-6px);
    border-color: var(--dourado);
}

.program-card .hx-logo-programa {
    display: flex;
    justify-content: center;
    margin: 16px 0 40px 0;
}

.program-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.program-card:hover .program-logo {
    transform: scale(1.05);
}

#top .program-card p:not(#n) {
    font-size: var(--t-cartao) !important;
    text-align: center !important;
    margin: 0 !important;
}

#top .hx-selo:not(#n) {
    display: block;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: var(--t-mini) !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--dourado) !important;
}


/* ------------------------------------------------------------------
 * 8. EQUIPA
 * ------------------------------------------------------------------ */
.team-member {
    display: flex;
    align-items: center;
    gap: 30px;
}

.team-member .pic {
    width: 150px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.team-member .pic img {
    width: 100%;
    height: auto;
    display: block;
}

#top .team-member .hx-cargo:not(#n) {
    display: block;
    margin-bottom: 6px;
    font-size: var(--t-mini) !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: var(--dourado) !important;
}

#top .team-member h4:not(#n) {
    margin: 0 !important;
    font-size: var(--t-cartao) !important;
    font-weight: 300 !important;
    line-height: 1.8 !important;
    letter-spacing: 0 !important;
    color: var(--cor-texto) !important;
}

/* Seta para voltar ao topo */
.hx-voltar-topo {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

#top .hx-voltar-topo .scroll-top:not(#n) {
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
}


/* ==================================================================
 * TELEMÓVEL
 * (as margens laterais de 24px já vêm do componentes.css)
 * ================================================================== */
@media screen and (max-width: 768px) {

    .pagina-hx .caixa-mestra-people,
    .pagina-hx .hx-topo {
        flex-direction: column;
        gap: 24px;
    }

    .pagina-hx .caixa-mestra-people.hx-pilha {
        gap: 48px;
    }

    .pagina-hx .hx-grelha-2 {
        grid-template-columns: 1fr;
    }

    /* Slogan: texto por cima, mão mais pequena por trás */
    #top .hx-slogan:not(#n) {
        max-width: 100%;
        font-size: 17px !important;
        margin-bottom: 14px !important;
    }

    .hx-mao {
        top: auto;
        bottom: 40px;
        right: -10px;
        height: auto;
        width: 60%;
        max-width: 260px;
    }

    .hx-dispositivos {
        margin-top: 0;
        max-height: 250px;
    }

    .book-viewport {
        height: 220px;
    }

    .program-card {
        padding: 30px 20px;
    }

    .team-member {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Telemóvel na horizontal: livro maior e com o × visível */
@media (max-width: 992px) and (orientation: landscape) {
    .book-viewport {
        max-width: 95%;
        height: 260px;
    }

    #pagina-esquerda-container {
        display: block !important;
    }

    #wrapper-fechar-book {
        display: block;
    }
}
