/* =========================================================
   SISTEMA DE NAVEGACIÓN POR SECCIONES — SOLO page-id-6627
   ========================================================= */

body.page-id-6627 #wrapper .fusion-tb-header .fusion-fullwidth {
    background-color: #e9e5e2 !important;
}

/* Menú */
#h_menu {
    display: flex;
    flex-direction: column;
    max-width: 175px;
    max-height: 160px;
    height: 100%;
    padding-top: 30px;
    margin-left: 90px;
    position: absolute;
    top: -300px;
}

#h_menu .i_menu {
    font-family: 'Poppins';
    margin-bottom: 10px;
    font-size: 14px;
}

#h_menu .i_menu.active {
    font-weight: bold;
}

.references {
    font-family: Roboto;
    font-size: 14px;
    color: #6f6767;
}

.references a {
    text-decoration: underline;
    color: #6f6767;
}

.references p {
    margin-bottom: 10px !important;
}

/* ============================================
   ESTILOS BASE FULLPAGE (Desktop)
   ============================================ */
body.page-id-6627 {
    overflow: hidden !important;
    height: 100% !important;
}

/* Contenedor principal */
body.page-id-6627 .fusion-builder-row-2 {
    height: 100vh !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Cada sección ocupa toda la pantalla y se posiciona absolutamente */
body.page-id-6627 .highlight {
  /*  min-height: 100vh !important; */
    /*height: 100vh !important;*/
    width: 100% !important;
    display: flex !important;
    opacity: 0;
    visibility: hidden;
    position: absolute !important;
    top: 0 !important;
    left: 27px !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

@media (max-height: 730px) {
  body.page-id-6627 .highlight .highlight_img img {
    width: 40%;
    margin: 0 auto;
    display: block;
  }
}

/* Solo la sección con .is-active es visible */
body.page-id-6627 .highlight.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
}

/* Texto con scroll real */
body.page-id-6627 .inner_text {
    height: 60vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 15px !important;
    position: relative;
    max-width: 100%;
    scroll-behavior: smooth;
}

/* Forzar scroll con padding extra al último párrafo */
body.page-id-6627 .inner_text p:last-child {
    padding-bottom: 120px !important;
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */

/* WebKit (Chrome, Safari, Edge) */
body.page-id-6627 .inner_text::-webkit-scrollbar {
    width: 8px;
}

body.page-id-6627 .inner_text::-webkit-scrollbar-track {
    background: #e9e5e2 !important;
    border-radius: 4px;
}

body.page-id-6627 .inner_text::-webkit-scrollbar-thumb {
    background: #6f6767 !important;
    border-radius: 4px;
}

body.page-id-6627 .inner_text::-webkit-scrollbar-thumb:hover {
    background: #413b47 !important;
}

/* Firefox */
body.page-id-6627 .inner_text {
    scrollbar-width: thin;
    scrollbar-color: #6f6767 #e9e5e2;
}

/* Ocultar scrollbar SOLO del contenedor principal */
body.page-id-6627 .fusion-builder-row-2::-webkit-scrollbar {
    display: none;
}

body.page-id-6627 .fusion-builder-row-2 {
    scrollbar-width: none;
}


/* ============================================
   MENÚ SELECT PARA ALTURA < 950px
   ============================================ */
#h_menu_select {
    display: none;
    position: absolute;
    top: -123px;
    left: 20px;
    max-width: 232px;
    padding: 10px 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #413b47;
    border: 1px solid #413b47;
    border-radius: 25px;
    background: #e9e5e2;
    cursor: pointer;
    z-index: 100;
    font-weight: 600;
}

/* Cuando la altura es menor a 950px */
@media (max-height: 949px) {
    #h_menu {
        display: none !important;
    }
    #h_menu_select {
        display: block !important;
    }
}



/* Cuando la altura es 950px o mayor */
@media (min-height: 950px) {
    #h_menu {
        display: flex !important;
    }
    #h_menu_select {
        display: none !important;
    }
}

/* ============================================
   📱 MODO MÓVIL: SIN SCROLL, SOLO SHOW/HIDE CON FADE
   ============================================ */
@media (max-width: 649px) {
    /* Desbloquear scroll natural */
    body.page-id-6627,
    body.page-id-6627 html {
        overflow: auto !important;
        height: auto !important;
        scroll-behavior: auto;
    }

    body.page-id-6627 #main {
        padding-top: 90px;
    }

    body.page-id-6627 .column_text {
        padding-bottom: 50px;
    }

    /* Contenedor principal vuelve a su flujo normal */
    body.page-id-6627 .fusion-builder-row-2 {
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
        padding: 0 30px 0 15px;
    }

    /* Secciones apiladas, ocultas por defecto */
    body.page-id-6627 .highlight {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        display: none !important;
        opacity: 0 !important;
        visibility: visible !important;
        z-index: 1 !important;
        margin: 0 !important;
        padding: 20px 0 !important;
        /* 🆕 Transición fade para móvil */
        transition: opacity 0.5s ease !important;
    }

    /* Solo la activa se muestra */
    body.page-id-6627 .highlight.is-active {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        opacity: 1 !important;
    }

    /* Texto sin scroll, altura automática */
    body.page-id-6627 .inner_text {
        height: auto !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
        padding-right: 0 !important;
        max-height: none !important;
    }

    body.page-id-6627 .inner_text p:last-child {
        padding-bottom: 30px !important;
    }

    /* Imágenes responsivas */
    body.page-id-6627 .highlight .highlight_img img {
        max-height: none !important;
        width: 80% !important;
        height: auto !important;
    }

    /* Select fijo y visible en móvil */
    #h_menu {
        display: none !important;
    }

    #h_menu_select {
        display: block !important;
        position: absolute !important;
        top: -85px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        width: 90% !important;
        max-width: 320px;
        background: #e9e5e2 !important;
        color: #413b47 !important;
        border: 1px solid #413b47 !important;
    }
}
