/* vim: set foldmethod=expr: */

/**
 *
 * colores tema base (light)
 *
 */

:root {
    --app-theme-fg:                             #262d42;
    --app-theme-bg:                             #ffffff;
    --app-theme-light:                          #ffffff;

    /* blues: azul garantizado para enlaces */

    --app-theme-blue-extradark:                 #282d3e;
    --app-theme-blue-dark:                      #49526f;
    --app-theme-blue-middle:                    #7782a6;
    --app-theme-blue-light:                     #b5bbcf;
    --app-theme-blue-extralight:                #e6e8ef;

    --app-theme-blue-contrast-extradark:        #ffffff;
    --app-theme-blue-contrast-dark:             #ffffff;
    --app-theme-blue-contrast-middle:           #ffffff;
    --app-theme-blue-contrast-light:            #04294e;
    --app-theme-blue-contrast-extralight:       #04294e;

    /* neutral: delimita elementos primarios/secundarios */

    --app-theme-neutral-extradark:              #433c47;
    --app-theme-neutral-dark:                   #70655c;
    --app-theme-neutral-middle:                 #918378;
    --app-theme-neutral-light:                  #c8c1bc;
    --app-theme-neutral-extralight:             #f7f3f0;

    --app-theme-neutral-contrast-extradark:     #ffffff;
    --app-theme-neutral-contrast-dark:          #ffffff;
    --app-theme-neutral-contrast-middle:        #ffffff;
    --app-theme-neutral-contrast-light:         #262d42;
    --app-theme-neutral-contrast-extralight:    #262d42;

    /* accent: énfasis */

    --app-theme-accent-extradark:               #262d42;
    --app-theme-accent-dark:                    #434f75;
    --app-theme-accent-middle:                  #6474a6;
    --app-theme-accent-light:                   #a4aecb;
    --app-theme-accent-extralight:              #e5e8f0;

    --app-theme-accent-contrast-extradark:      #ffffff;
    --app-theme-accent-contrast-dark:           #ffffff;
    --app-theme-accent-contrast-middle:         #ffffff;
    --app-theme-accent-contrast-light:          #262d42;
    --app-theme-accent-contrast-extralight:     #262d42;

    /* contrast: complementa los otros colores */

    --app-theme-contrast-extradark:             #6f410b;
    --app-theme-contrast-dark:                  #ba6c12;
    --app-theme-contrast-middle:                #e8881a;
    --app-theme-contrast-light:                 #f0b26a;
    --app-theme-contrast-extralight:            #fbecda;

    --app-theme-contrast-contrast-extradark:    #ffffff;
    --app-theme-contrast-contrast-dark:         #ffffff;
    --app-theme-contrast-contrast-middle:       #ffffff;
    --app-theme-contrast-contrast-light:        #262d42;
    --app-theme-contrast-contrast-extralight:   #262d42;

    --app-logo-src:                             url("../images/logo-r4mE_L3.svg");
    --mh-color-nav-bg:                          var(--app-theme-bg);
    --mh-color-nav-fg:                          var(--app-theme-fg);
    --mh-color-header-bg:                       var(--app-theme-bg);
    --mh-color-header-fg:                       var(--app-theme-fg);
    --mh-color-header-time-fg:                  var(--app-theme-blue-dark);
    --mh-color-header-resumen-fg:               var(--app-theme-blue-dark);
    --mh-color-header-claseAutoridadNombre-fg:  var(--app-theme-blue-dark);
    --mh-color-header-claseAutoridadCargo-fg:   var(--app-theme-blue-dark);
}

/**
 *
 * colores tema dark
 *
 */

:root[data-bs-theme="dark"] {
    --app-theme-fg:                             #ffffff;
    --app-theme-bg:                             #262d42;
    --app-theme-light:                          #262d42;

    /* blues: azul garantizado para enlaces */

    --app-theme-blue-extradark:                 #848eae;
    --app-theme-blue-dark:                      #7782a6;
    --app-theme-blue-middle:                    #6b779e;
    --app-theme-blue-light:                     #616d94;
    --app-theme-blue-extralight:                #596488;

    --app-theme-blue-contrast-extradark:        #ffffff;
    --app-theme-blue-contrast-dark:             #ffffff;
    --app-theme-blue-contrast-middle:           #ffffff;
    --app-theme-blue-contrast-light:            #ffffff;
    --app-theme-blue-contrast-extralight:       #ffffff;

    /* neutral: delimita elementos primarios/secundarios */

    --app-theme-neutral-extradark:              #D2D7D9;
    --app-theme-neutral-dark:                   #C8CED0;
    --app-theme-neutral-middle:                 #BDC4C7;
    --app-theme-neutral-light:                  #717F84;
    --app-theme-neutral-extralight:             #464C5e;

    --app-theme-neutral-contrast-extradark:     #262d42;
    --app-theme-neutral-contrast-dark:          #262d42;
    --app-theme-neutral-contrast-middle:        #262d42;
    --app-theme-neutral-contrast-light:         #ffffff;
    --app-theme-neutral-contrast-extralight:    #ffffff;

    /* accent: énfasis */

    --app-theme-accent-extradark:               #252c41;
    --app-theme-accent-dark:                    #2d354e;
    --app-theme-accent-middle:                  #343e5b;
    --app-theme-accent-light:                   #3c4768;
    --app-theme-accent-extralight:              #434F75;

    --app-theme-accent-contrast-extradark:      #ffffff;
    --app-theme-accent-contrast-dark:           #ffffff;
    --app-theme-accent-contrast-middle:         #ffffff;
    --app-theme-accent-contrast-light:          #ffffff;
    --app-theme-accent-contrast-extralight:     #ffffff;

    /* contrast: complementa los otros colores */

    --app-theme-contrast-extradark:             #6f410b;
    --app-theme-contrast-dark:                  #ba6c12;
    --app-theme-contrast-middle:                #e8881a;
    --app-theme-contrast-light:                 #f0b26a;
    --app-theme-contrast-extralight:            #fbecda;

    --app-theme-contrast-contrast-extradark:    #ffffff;
    --app-theme-contrast-contrast-dark:         #ffffff;
    --app-theme-contrast-contrast-middle:       #ffffff;
    --app-theme-contrast-contrast-light:        #262d42;
    --app-theme-contrast-contrast-extralight:   #262d42;

    --app-logo-src:             url("../images/logo-w-CVHisxI.svg");
}

/**
 *
 * body flex
 *
 */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    > article {
        flex-grow: 1;
    }
}

/**
 *
 * fonts
 *
 */

body {
    font-family: "Instrument Sans", sans-serif;
    font-weight: 500;
}

/**
 *
 * customs
 *
 */

a.boton.custom {
    color: var(--app-theme-contrast-contrast-middle);
    background-color: var(--app-theme-contrast-middle);
    padding: .5rem 2.5rem;
    border-radius: 1.5rem;
    &::after {
        content: "\F138";
        font-family: bootstrap-icons;
        vertical-align: bottom;
        transition: transform .2s;
        display: inline-block;
    }
    &:hover::after {
        transform: translateX(1rem);
    }
}

/**
 *
 * nav: línea superior
 *
 */

body > header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--mh-color-breadcrumb-border);
    div.d-flex {
        a {
            color: var(--bs-body-color);
        }
        .redes {
            div {
                display: inline;
            }
            a {
                color: var(--app-theme-accent-contrast-extradark);
                background-color: var(--app-theme-accent-extradark);
            }
        }
    }
}

/**
 *
 * nav
 *
 */

nav.navbar {
    a.nav-link {
        font-weight: normal;
    }
    img {
        width: 150px;
        content: var(--app-logo-src);
    }
    ul.navbar-nav {
        margin-left: auto;
    }
    button.navbar-toggler {
        & .navbar-toggler-icon {
            &::before {
            }
        }
    }
}

/**
 *
 * nodo/contexto/.../header
 *
 */

article.nodo.contexto-cols1 > header,
article.nodo.contexto-cols2 > header,
article.nodo.contexto-cols3 > header,
article.nodo.contexto-noticia > header {
    background-image: none;
    border-top: 1px solid var(--mh-color-breadcrumb-border);
    border-bottom: 1px solid var(--mh-color-breadcrumb-border);
    padding-bottom: 0;
    h2 {
        margin: 0 auto 70px auto;
    }
}

/**
 *
 * Portada: destacado
 *
 */

body.body-7297178893f96, body.body-200e6664d81a6 {
    > .destacado {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        > a {
            font-weight: 700;
            color: var(--app-theme-light);
            &:first-child {
                font-size: 2rem;
                transition: color .2s ease-in-out;
                margin-bottom: 1rem;
                &:hover {
                    color: var(--app-theme-contrast-middle);
                }
            }
        }
        background-position: center;
        background-size: cover;
        height: 340px;
    }
}

/**
 *
 * Portada: noticias
 *
 */

body.body-7297178893f96, body.body-200e6664d81a6 {
    > .noticias {
        background-color: var(--app-theme-accent-extradark);
        color: var(--app-theme-accent-contrast-extradark);
        padding: 1rem 0;
        .row > * {
            &:not(:first-child) {
                border-left: 1px solid var(--app-theme-neutral-extradark);
            }
        }
        a {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 100%;
            color: var(--app-theme-accent-contrast-extradark);
            div:last-child {
                margin-top: 1rem;
                &::after {
                    font-family: bootstrap-icons;
                    content: "\F138";
                    vertical-align: text-top;
                    margin-left: .5rem;
                    color: var(--app-theme-contrast-middle);
                    font-size: .8rem;
                    font-weight: 800;
                    transition: transform .2s;
                    display: inline-block;
                }
            }
            &:hover div:last-child {
                &::after {
                    transform: translateX(.5rem);
                }
            }
        }
    }
}

/**
 *
 * Portada: estudios publicados
 *
 */

body.body-7297178893f96, body.body-200e6664d81a6 {
    > * {
        h2 {
            text-align: center;
            font-weight: 700;
            & + div {
                padding-top: 1rem;
                max-width: 54rem;
                text-align: center;
                margin: 0 auto;
            }
        }
    }
    .nav-pills.custom {
        border-radius: var(--bs-nav-pills-border-radius);
        --bs-nav-pills-border-radius: 1.5rem;
        --bs-nav-link-color: var(--app-theme-blue-dark);
        --bs-nav-link-hover-color: var(--app-theme-contrast-middle);
        --bs-nav-pills-link-active-bg: var(--app-theme-contrast-middle);
        --bs-nav-pills-link-active-color: var(--app-theme-contrast-contrast-middle);
        background-color: var(--app-theme-neutral-extralight);
        border: 1px solid var(--app-theme-neutral-extralight);
        > .nav-item {
            flex: 1 1 0;
            .nav-link {
                padding: .5rem 2.5rem;
                width: 100%;
                height: 100%;
            }
        }
    }
}

/**
 *
 * portada: estudios
 *
 */

body.body-7297178893f96, body.body-200e6664d81a6 {
    > .estudios {
        padding-top: 4rem;
        h2 {
            color: var(--app-theme-contrast-middle);
        }
        .nav {
            margin: 2rem 0;
        }
        section.hijos.formato-grilla {
            .row > * {
                margin-bottom: 0;
            }
            & + div {
                text-align: center;
            }
        }
        a.boton {
            display: inline-block;
            margin: 2rem auto 3rem auto;
        }
    }
}

/**
 *
 * portada: dashboards
 *
 */

body.body-7297178893f96, body.body-200e6664d81a6 {
    > .dash {
        text-align: center;
        padding: 3rem 0;
        .row {
            --bs-gutter-y: 1rem;
            margin-top: 1rem;
            > * > * {
                padding: 1rem 2rem;
                border-radius: .5rem;
                height: 100%;
                > *:first-child {
                    font-size: 300%;
                    font-weight: 100;
                }
            }
            + div {
                margin-top: 3rem;
            }
        }
        &:nth-child(odd) {
            border-radius: 1rem 1rem 0 0;
            background-color: var(--app-theme-accent-extradark);
            color: var(--app-theme-accent-contrast-extradark);
            .row > * > * {
                background-color: var(--app-theme-accent-dark);
            }
        }
        &:nth-child(even) {
            h2 {
                color: var(--app-theme-contrast-middle);
            }
            .row > * > * {
                background-color: var(--app-theme-neutral-extralight);
                > *:first-child {
                    color: var(--app-theme-contrast-middle);
                }
            }
        }
    }

}

/**
 *
 * portada: destacados
 *
 */

body.body-7297178893f96, body.body-200e6664d81a6 {
    > .destacados {
        background-color: var(--app-theme-neutral-extralight);
        padding-top: 3rem;
        > .container > * {
            margin-top: 2rem;
            h3 {
                font-size: 1.2rem;
                font-weight: 600;
            }
            .resumen {
                margin: 2rem 0 2.5rem 0;
            }
            .card-body {
                background-color: var(--app-theme-bg);
            }
        }
    }
}

/**
 *
 * Pie
 *
 */

body > footer {
    font-size: .95rem;
    a {
        color: var(--app-theme-accent-contrast-extradark);
        text-decoration: underline;
    }
    img {
        height: 5rem;
        margin-bottom: 1rem;
    };
    .redes a {
        font-size: 1rem;
        margin: 1rem 1rem 1rem 0;
        color: var(--app-theme-accent-contrast-extralight);
        background-color: var(--app-theme-accent-extralight);
    }
    padding: 3rem 0;
}

/**
 *
 * Redes sociales
 *
 */

.redes {
    a {
        border-radius: 50%;
        padding: 8px;
        width: 28px;
        height: 28px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        i::before {
            vertical-align: -3px;
        }
    }
}

/**
 *
 * Personalización despliegues
 *
 */

aside.toc.i-b38c04f4d81a6 {
    display: none;
}

article.nodo {
    & form {
        button[type="submit"] {
        }
    }
}

div.overrideable-placeholder {
    background-image: url("../images/logo-r4mE_L3.svg");
    background-size: contain !important;
}

.distintivo {
    text-transform: uppercase;
}
