/* vim: set foldmethod=expr: */

/**
 *
 * En este archivo: Elementos base confidare/front
 *
 */

/**
 *
 * comunes
 *
 */

body {
    font-size: 1rem;
    font-weight: 400;
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    line-height: 1.5;
}

a {
    text-decoration: none;
    background-color: transparent;
    transition: color .2s ease;
}

div.modal-title > * {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.card.front-card-banner1 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 0;

    .card-body {
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        h4 i {
            font-size: 140%;
            filter: brightness(0.75) saturate(150%);
        }

        a {
            display: flex;
            justify-content: space-between;
            align-items: end;
            i {
                line-height: 1.5rem;
            }
            &:hover {
                color: inherit;
            }
        }
    }

    &:hover .card-body a .fas {
        transition: all .2s;
        transform: translateX(7px);
    }
}

.card.front-card-banner2 {
    height: 6rem;
    .row {
        height: 100%;
        align-items: center;
        justify-content: center;
        > div:first-child {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
            i {
                font-size: 150%;
            }
        }
        .card-body {
            padding-top: 0;
            padding-bottom: 0;
        }
    }
}

/**
 *
 * breadcrumb
 *
 */

.breadcrumb {
    background-color: transparent;
    border-radius: 0;
    flex-wrap: wrap;
    list-style: none;
    padding: 18px 0;
    position: relative;

    &:before {
        border-bottom: 1px solid #d6d6d6;
        bottom: 0;
        content: "";
        left: calc((-100vw - -100%)/2);
        position: absolute;
        width: 100vw;
    }

    .breadcrumb-item {
        display: flex;

        & + .breadcrumb-item {
            padding-left: .5rem;
            &:before {
                align-self: center;
                bottom: 0;
                content: "";
                display: inline-block;
                height: 7px;
                margin-left: 4px;
                margin-right: 1px;
                padding: 0;
                position: relative;
                right: 7px;
                top: 4px;
                transform: translateY(-50%) rotate(-45deg);
                width: 7px;
            }
        }
    }
}


/**
 *
 * toc
 *
 */

aside.toc {
    transition: .8s ease;
    margin-right: 22px;
    position: relative;
    padding: 16px 26px 18px 26px;
    margin-bottom: 0;

    h3 {
        margin-bottom: 1.5rem;
        margin-left: -26px;
        margin-right: -26px;
        padding: 0 26px 16px;

        .retornar {
            margin: 16px -26px -17px;
            transition: .5s;
            a {
                display: block;
                padding: 13px 0 13px 26px;
                transition: .2s;
                &:before {
                    content: "\F060";
                    font-family: Font Awesome\ 5 Free;
                    color: #0f69b4;
                    vertical-align: initial;
                    font-size: 13px;
                    margin-right: 3px;
                }
            }
            &:hover {
                border-left: 4px solid #0f69b4;
                transition: .2s;
            }
        }
    }

    ul {
        li {
            margin-bottom: 1rem;
            position: relative;

            ul {
                padding-top: 15px;
                margin-bottom: 26px;
            }

            &.active {
                > a {
                    font-weight: bold;

                }
            }
        }
    }
}

/**
 *
 * rel
 *
 */

aside.rel {
    border: 0;
    float: right;
    margin-left: 0;
    margin-right: 0;
    padding: 16px 26px 18px 26px;

    h3 {
        margin-left: -26px;
        margin-right: -26px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        &:after {
            content: "\F02E";
            font-family: Font Awesome\ 5 Free;
            float: right;
        }
    }

    a {
        display: block;
        margin-bottom: 10px;
        padding: 0;
    }
}

/**
 *
 * buscar
 *
 */

ol.buscar {
    div.ancestros {
        display: flex;
        flex-wrap: wrap;

        > span {
            & + span {
                padding-left: .5rem;
                &:before {
                    align-self: center;
                    border-bottom: 1px solid #576873;
                    border-right: 1px solid #576873;
                    bottom: 0;
                    color: #6c757d;
                    content: "";
                    display: inline-block;
                    height: 7px;
                    margin-left: 4px;
                    margin-right: 1px;
                    padding: 0;
                    position: relative;
                    right: 6px;
                    top: 2px;
                    transform: translateY(-50%) rotate(-45deg);
                    width: 7px;
                }
            }

        }
    }

    time, div.ancestros {
        opacity: .8;
    }
}

/**
 *
 * nodo
 *
 */

article.nodo {
    form {
        textarea {
            min-height: 6rem;
        }
    }
    div.container {
        margin-bottom: 50px;
    }
}
/**
 *
 * nodo/contexto/cols-{1,2,3}/header
 *
 */

article.nodo.contexto-cols1 > header,
article.nodo.contexto-cols2 > header,
article.nodo.contexto-cols3 > header {
    background-image: url("../images/placeholder-OQNYHsI.svg");
    background-size: cover;
    background-position: center;
    color: #fff; /* Fondo header será oscuro en general */
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: calc((-100vw - -100%)/2);
    overflow: hidden;
    padding: 60px 0 97px;
    position: relative;
    text-align: center;
    width: 100vw;

    h2 {
        align-self: center;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
        max-width: 730px;
        z-index: 1;
    }

    .imagen {
        width: 1440px;
        position: unset;
        img {
            object-fit: cover;
            object-position: center;
            position: absolute;
            top: 0;
            width: 100%;
            bottom: 0;
            left: 0;
            right: 0;
            height: 100%;
            min-height: 100%;
        }
    }

}

/**
 * nodo/contexto/noticia/header
 */

article.nodo.contexto-noticia > header {
    background-image: url("../images/placeholder-OQNYHsI.svg");
    background-size: cover;
    background-position: center;
    color: #fff; /* Fondo header será oscuro en general */
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: calc((-100vw - -100%)/2);
    overflow: hidden;
    padding-top: 60px;
    position: relative;
    text-align: left;
    width: 100vw;

    time, h2 {
        position: relative;
        left: 36px;
    }
    h2 {
        margin: 0 auto 70px auto;
        max-width: 730px;
        padding: 0 20px;
    }
    time {
        margin: auto;
        padding: 0 20px 20px;
        width: 730px;
    }
    .resumen {
        width: 730px;
        margin: -50px auto 60px auto;
        position: relative;
        left: 36px;
        p {
            padding-left: 20px;
        }
        li > p {
            padding-left: 0;
        }
        p, li {
            margin: 0;
        }
        ul {
            padding-left: 3rem;
        }
    }
    .imagen, .ratio {
        max-height: 720px;
        max-width: 1440px;
        margin: auto;
        width: 100vw;
        position: relative;
        left: calc((-100vw - -100%)/2);
        img {
            object-fit: cover;
            object-position: center;
            position: absolute;
            top: 0;
            width: 100%;
            bottom: 0;
            left: 0;
            right: 0;
            height: 100%;
            min-height: 100%;
            margin-top: 0;
            margin-bottom: 0;
            max-height: 720px;
            height: auto;
            position: relative;
        }
    }
}

/**
 *
 * nodo/main (resumen + cuerpo)
 *
 */

article.nodo main {
    div.body-main-center, section.hijos {
        time,
        div.imagen img,
        div.ratio,
        div.chart-container
        {
            display: block;
        }

        > time,
        div.imagen img,
        div.ratio,
        div.chart-container {
            margin-bottom: 25px;
        }

        img {
            max-width: 100%; /* pseudo-img-fluid */
        }

        h1, h2, h3, h4, h5, h6 {
            margin-bottom: 1.5rem;
        }

        h1, h2, h3 { /* h1, h2 y h3 homologados */
            font-size: 1.18rem;
        }

        h4 {
            font-size: 1.1rem;
        }

        h5, h6 {
            font-size: 1rem;
        }

        p, ul:not(.nav) {
            margin-bottom: 1.5rem;
        }

        ul:not(.nav) li {
            margin-bottom: 1rem;
            > p {
                margin-bottom: 0;
            }
            ul, li {
                margin-bottom: 0;
            }
        }

        section:not(.hijos, .paginas) ul {
            padding-left: 30px;
        }

        table {
            border-collapse: collapse;
            margin-bottom: 32px;
            width: 100%;

            th, th p {
                font-weight: bold;
            }

            td, th {
                padding: 12px 10px;
            }

            h1, h2, h3, h4, p {
                margin: 0;
                padding: 0;
            }
        }
    }
}

/**
 *
 * nodo/clase/autoridad
 *
 */

article.nodo.clase-autoridad {
    > header {
        padding: 0;

        div.imagen {
            max-height: 600px;
            width: 100%;

            &::before {
                content: "";
                left: 0;
                background: -moz-linear-gradient(0deg,rgba(0,0,0,.55) 0,transparent 80%,rgba(0,0,0,.45) 100%);
                background: -webkit-linear-gradient(0deg,rgba(0,0,0,.55),transparent 80%,rgba(0,0,0,.45));
                background: linear-gradient(0deg,rgba(0,0,0,.55),transparent 80%,rgba(0,0,0,.45));
                position: absolute;
                top: 0;
                bottom: 0;
                right: 0;
                z-index: 1;
            }

            img {
                position: relative;
            }

        }

        div.nombre {
            padding: 0 77px;
            text-align: left;
            position: absolute;
            width: 100%;
            left: 0;
            z-index: 1;
            margin-bottom: 0;
            bottom: 15%;
            right: 0;
            max-width: 100%;
        }

        div.cargo {
            bottom: 9%;
            left: 0;
            margin-bottom: 0;
            padding: 0 77px;
            position: absolute;
            text-align: left;
            width: 100%;
            z-index: 1;
        }
    }
}

/**
 *
 * nodo/clase/globos
 *
 */

article.nodo.clase-globos, div.hijo.clase-globos {

    /* comunes */
    .valor > * {
        background-color: rgb(24, 47, 91);
        color: rgb(255, 255, 255);
        font-weight: bold;
        text-align: center;
        display: inline-block;
        width: 75px;
        height: 75px;
        line-height: 75px;
        font-size: 120%;
        border-radius: 50%;
        margin: 0px auto;
    }

    /* como nodo principal */
    div.body-main-center {
        > .row {
            margin-bottom: 25px;
            .etiqueta {
                font-weight: bold;
            }
        }
    }
}

/**
 *
 * nodo/clase/grafico
 *
 */

article.nodo.clase-grafico {
    div.body-main-center {
        div.data {
            text-align: right;
        }
    }
}

/**
 *
 * nodo/clase/persona
 *
 */

article.nodo.clase-persona, div.hijo.clase-persona {

    /* comunes */
    div.imagen {
        position: unset;
        width: 100%;
        img {
            border-radius: 100px;
            height: 150px;
            width: 150px !important;
            margin: 0 auto 30px auto;
            object-fit: cover;
        }
    }
    div.cargo, div.resumen {
        margin-bottom: 30px;
    }

    div.anexo,
    div.fono,
    div.email,
    div.ubicacion {
        display: list-item;
        margin-left: 1rem;
        font-weight: bold;

        &::before {
            font-weight: normal;
        }
    }

    div.anexo::before     { content: "Anexo: " }
    div.fono::before      { content: "Fono: " }
    div.email::before     { content: "E-mail: " }
    div.ubicacion::before { content: "Ubicación: " }

    /* como nodo principal */
    div.body-main-center {
        div.cargo, div.resumen {
            text-align: center;
            ul {
                text-align: left;
            }
        }
    }

    /* como hijo */
    &.hijo.clase-persona {
        margin-bottom: 32px;

        div.flex-shrink-0 {
            padding: 20px 20px;
        }

        h3 {
            margin-bottom: 12px;
        }

        div.cargo {
            margin-bottom: 20px;
            padding-bottom: 20px;
        }
    }

}

/**
 *
 * nodo/hijos
 *
 */

section.hijos {
    time {
        display: block;
        margin-bottom: .5rem;
    }
    > .hijo > ul > li {
        p, li, div.resumen {
            margin-bottom: .5rem;
        }
    }
    ul.pagination {
        margin-bottom: 30px;
    }
}

/**
 *
 * nodo/hijos/formato/listado, personalizado
 *
 */

section.hijos.formato-listado, section.hijos.formato-personalizado {
    > ul {
        list-style: none;
        padding: 0;

        > li {
            margin-bottom: 16px;
            padding: 16px 20px;

            time {
                display: block;
                margin-bottom: 10px;
            }

            h3 {
                margin-left: 24px;
                margin-bottom: 0;
                padding: 0;
                &:last-child {
                    margin-bottom: 0;
                }
            }

            &:before {
                content: "\F111";
                font-family: Font Awesome\ 5 Free;
                font-weight: 600;
                position: absolute;
                font-size: 16px;
                margin-left: 0;
                margin-top: -2px;
            }

            &.clase-nodo:before       { content: "\F07B"; }
            &.clase-articulo:before   { content: "\F249"; }
            &.clase-enlace:before     { content: "\F0C1"; }
            &.clase-documento:before  { content: "\F56D"; }
            &.clase-tabla:before      { content: "\F0CE"; }

            ul {
                margin-top: 10px;
                margin-bottom: 0;

                li {
                    padding: 0 0 0 11px;
                }

            }

            p,
            ul li {
                margin: 5px 25px;
                p {
                    margin: 5px 0;
                }
            }
        }
    }


    div.mas {
        padding: 11px 0 0 41px;
    }
}

/**
 *
 * nodo/hijos/formato/galeria
 *
 */

section.hijos.formato-galeria {
    > .row > div {
        margin-bottom: 25px;
    }
    img, div.overrideable-placeholder {
        height: 100%;
        object-fit: cover;
    }
}

/**
 *
 * nodo/hijos/formato/galeriaAloAncho
 *
 */

section.hijos.formato-galeriaALoAncho {
    div.hijo {
        &:not(:first-child) {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
        }
        img {
            margin-bottom: 15px;
        }
    }
}

/**
 *
 * nodo/hijos/formato/grilla, grillaResponsiva
 *
 */

section.hijos.formato-grilla, section.hijos.formato-grillaResponsiva {
    .col-lg-4 {
        margin-bottom: 50px;

        .card {
            margin-bottom: 0;
            height: 100%;

            .card-img-top {
                height: 168px;
                margin-bottom: 0;
                object-fit: cover;
                object-position: center;
                border-radius: 0;
            }
            .card-body {
                padding: 16px;
                height: 100%;
                time {
                    padding: 0;
                    margin: 0 0 7px;
                }
                h3 {
                    margin-top: 0;
                    max-height: 80px;
                    overflow: hidden;
                    margin-bottom: 0;
                }
            }
        }
    }
}

section.hijos.formato-grillaResponsiva {
    .col-lg-4 {
        .card {
            .card-img-top {
                height: auto;
            }
        }
    }
}

/**
 *
 * nodo/hijos/formato/composicion
 *
 */

section.hijos.formato-composicion {
    div.hijo {
        &:not(:first-child) {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
        }
    }
}

/**
 *
 * nodo/hijos/formato/listadoConImagenesRelacionadas
 *
 */

section.hijos.formato-listadoConImagenesRelacionadas {
    div.flex-shrink-0 {
        max-width: 16rem;
        img, div.overrideable-placeholder {
            width: 256px;
            object-fit: cover;
        }
    }
    div.flex-grow-1 {
        padding: 33px 40px;
    }
}

/**
 *
 * nodo/hijos/formato/panelesColapsables, panelesColapsablesMultiples
 *
 */

section.hijos.formato-panelesColapsables, section.hijos.formato-panelesColapsablesMultiples {
    .accordion-header {
        margin-bottom: 0;
    }
    .mas, .resumen {
        margin-bottom: 15px;
    }
}

