/* ============================================================
   PEOPLE CONTACT - PERSONALIZACION WIMBLE
   Joomla 5.4.10 / Helix Ultimate / SP Page Builder
   ============================================================ */


/* ============================================================
   1. ENCABEZADO GENERAL Y STICKY
   ============================================================ */

#sp-header.transparent-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
}

#sp-header.header-sticky {
    z-index: 9999;
}


/* ============================================================
   2. PAGINAS INTERNAS - FONDO BLANCO
   ============================================================ */

body:not(.default-home) #sp-header {
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body:not(.default-home) #sp-header
.sp-megamenu-parent > li > a,
body:not(.default-home) #sp-header
.sp-megamenu-parent > li > span {
    color: #17161a !important;
}


/* ============================================================
   3. INICIO - FONDO OSCURO Y STICKY BLANCO
   ============================================================ */

body.default-home
#sp-header.transparent-header:not(.header-sticky) {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.50) 100%
    ) !important;

    box-shadow: none !important;
}

body.default-home
#sp-header.transparent-header:not(.header-sticky)
.sp-megamenu-parent > li > a,
body.default-home
#sp-header.transparent-header:not(.header-sticky)
.sp-megamenu-parent > li > span {
    color: #ffffff !important;
}

body.default-home #sp-header.header-sticky {
    background: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.default-home #sp-header.header-sticky
.sp-megamenu-parent > li > a,
body.default-home #sp-header.header-sticky
.sp-megamenu-parent > li > span {
    color: #17161a !important;
}


/* ============================================================
   4. DISTRIBUCION DEL MENU - ESCRITORIO AMPLIO
   ============================================================ */

@media (min-width: 1400px) {

    /* Margenes del encabezado */
    #sp-header {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Reservar espacio para los logotipos */
    #sp-header #sp-logo {
        flex: 0 0 19%;
        max-width: 19%;
    }

    /* Ampliar la columna de navegacion */
    #sp-header #sp-menu {
        flex: 0 0 81%;
        max-width: 81%;
        min-width: 0;
    }

    /* Distribuir navegacion y buscador */
    #sp-header #sp-menu > .sp-column {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100%;
        min-width: 0;
    }

    /*
       El menu utiliza todo el espacio disponible
       antes del buscador.
    */
    #sp-header #sp-menu
    nav.sp-megamenu-wrapper {
        display: block;
        flex: 1 1 0 !important;
        min-width: 0;
        width: auto !important;
        max-width: none !important;
        margin: 0 20px 0 0 !important;
    }

    /* Distribuir las ocho opciones */
    #sp-header .sp-megamenu-parent {
        display: flex !important;
        align-items: center;
        justify-content: space-between !important;
        float: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 6px;
    }

    /* Evitar saltos de linea */
    #sp-header .sp-megamenu-parent > li {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Tamaño de letra mas legible */
    #sp-header .sp-megamenu-parent > li > a,
    #sp-header .sp-megamenu-parent > li > span {
        font-size: 14px !important;
        font-weight: 500;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 10px 2px !important;
        white-space: nowrap;
    }
}


/* ============================================================
   5. ESCRITORIO MEDIANO
   ============================================================ */

@media (min-width: 1200px) and (max-width: 1399px) {

    #sp-header {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    #sp-header #sp-menu
    nav.sp-megamenu-wrapper {
        margin-right: 12px !important;
        margin-top: 0 !important;
    }

    #sp-header .sp-megamenu-parent > li > a,
    #sp-header .sp-megamenu-parent > li > span {
        font-size: 12px !important;
        margin-left: 4px !important;
        margin-right: 4px !important;
        white-space: nowrap;
    }
}


/* ============================================================
   6. SUBMENUS - TEXTO COMPLETO
   ============================================================ */

#sp-header .sp-megamenu-parent .sp-dropdown,
#sp-header .sp-megamenu-parent .sp-dropdown li,
#sp-header .sp-megamenu-parent .sp-dropdown a,
#sp-header .sp-megamenu-parent .sp-dropdown span {
    white-space: normal !important;
}

#sp-header .sp-megamenu-parent .sp-dropdown li a,
#sp-header .sp-megamenu-parent .sp-dropdown li span {
    overflow-wrap: break-word;
    line-height: 1.5 !important;
}

@media (min-width: 1200px) {

    #sp-header .sp-megamenu-parent
    .sp-dropdown.sp-dropdown-main:not(.sp-menu-full) {
        width: 400px !important;
        max-width: calc(100vw - 30px);
    }

    #sp-header .sp-megamenu-parent
    .sp-dropdown:not(.sp-menu-full) > .sp-dropdown-inner {
        max-height: calc(100vh - 115px);
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
}


/* ============================================================
   7. ENCABEZADO DE LOS ARTICULOS
   ============================================================ */

body.view-article .wimble-article-details-title-wraper {
    position: relative;
    height: 420px;
    overflow: hidden;
}

body.view-article
.wimble-article-details-title-wraper
.article-full-image {
    height: 100%;
    margin: 0;
}

body.view-article
.wimble-article-details-title-wraper
.article-full-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}


/* ============================================================
   8. TITULOS Y METADATOS DE LOS ARTICULOS
   ============================================================ */

body.view-article .article-details
.wimble-article-details-title-wraper
.wimble-article-details-title-wrap {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    margin: 0;
    padding: 20px;
    z-index: 2;
    text-align: center;
}

body.view-article .article-details
.wimble-article-details-title-wraper
.wimble-article-details-title-wrap
.article-header h1,
body.view-article .article-details
.wimble-article-details-title-wraper
.wimble-article-details-title-wrap
.article-header h2 {
    font-size: 42px;
    line-height: 1.2;
    width: 90%;
    max-width: 900px;
    margin: 0 auto 20px;
}


/* ============================================================
   9. TABLETAS Y PANTALLAS MEDIANAS
   ============================================================ */

@media (max-width: 1199px) {

    #sp-header {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    body.view-article .wimble-article-details-title-wraper {
        height: 360px;
    }

    body.view-article .article-details
    .wimble-article-details-title-wraper
    .wimble-article-details-title-wrap
    .article-header h1,
    body.view-article .article-details
    .wimble-article-details-title-wraper
    .wimble-article-details-title-wrap
    .article-header h2 {
        font-size: 34px;
        line-height: 1.25;
    }
}


/* ============================================================
   10. CELULARES
   ============================================================ */

@media (max-width: 767px) {

    body.view-article .wimble-article-details-title-wraper {
        height: 300px;
    }

    body.view-article .article-details
    .wimble-article-details-title-wraper
    .wimble-article-details-title-wrap
    .article-header h1,
    body.view-article .article-details
    .wimble-article-details-title-wraper
    .wimble-article-details-title-wrap
    .article-header h2 {
        font-size: 28px;
        line-height: 1.3;
        max-width: 100%;
    }
}