/**
 * @file
 * Subtheme specific CSS.
 */

/* Fuentes
***********************/

/* --------------------

MONTSERRAT

font-family: 'Montserrat', sans-serif;
Light 300 / Regular 400 / Bold 700 / Extra Bold 800

-------------------- */

/* Font family
***********************/

:root {
    --montserrat: 'Montserrat', sans-serif;
}

/* Font size
***********************/

:root {
    --title-page: clamp(32px, 2vw, 52px);
    /* */
    --title-block: clamp(18px, 1vw, 26px);
    /* */
    --text-general: clamp(14px, 1.5vw, 16px);
    /* */
    --text-general-small: clamp(14px, 1.3vw, 16px);
    /* */
    --text-general-big: clamp(20px, 2vw, 22px);
}

/* Font weight
***********************/

:root {
    --light: 300;
    /* */
    --regular: 400;
    /* */
    --bold: 700;
    /* */
    --extrabold: 800;
}

/* Colores
***********************/

:root {
    --rojo: #be0f2e;
    /*  */
    --amarillo: #faefde;
    /*  */
    --verde: #76b2b2;
    /*  */
    --verde-light: #b7e8df;
    /*  */
    --gris-claro: #828282;
    /*  */
    --gris-medio: #444;
    /*  */
    --gris-oscuro: #1a1a1a;
    /* */
    --shadow: linear-gradient(rgba(0, 0, 0, 0.49) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Padding & Margin
***********************/

:root {
    --pm-block: clamp(100px, 9vw, 300px) 0;
    /* */
    --pm-blend-block: clamp(25px, 3.5vw, 50px) 0;
    /* */
    --pm-top-block: clamp(100px, 9vw, 300px) 0 0;
    /* */
    --pm-top--blend-block: clamp(50px, 4.5vw, 150px) 0 0;
    /* */
    --pm-bottom-block: 0 0 clamp(100px, 9vw, 300px);
    /* */
    --pm-bottom-blend-block: 0 0 clamp(50px, 4.5vw, 150px);
    /* */
    --pm-interior-block: clamp(30px, 4vw, 50px) clamp(30px, 4vw, 80px);
    /* */
    --pm-interior-block-min: clamp(15px, 2vw, 25px) clamp(15px, 2vw, 40px);
    /* */
    --pm-interior-block-v: clamp(60px, 7vw, 100px) 0;
    /* */
    --pm-interior-block-h: 0 clamp(30px, 4vw, 80px);
}

/* Base
***********************/

:root {
    --width-base: 1660px;
}

.toast-wrapper {
    position: fixed;
    right: 2em;
    bottom: 2em;
    z-index: 9;
}

/* Reset Styles
***********************/

* {
    min-width: 0;
    min-height: 0;
}

html {
    scroll-behavior: smooth;
    background: #fff;
    line-height: normal;
}

*,
*:before,
*:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    font-size: 100%;
    overflow-x: hidden;
    font-family: var(--montserrat);
    width: 100%;
    margin: auto;
    background: white !important;
}

html,
body,
textarea,
p {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

.container,
.container-fluid,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
    padding: 0;
}

#navbar-top,
#navbar-main,
.site-footer {
    background: white !important;
    background-color: white !important;
    padding: 0;
}

#page,
#main-wrapper,
.region-primary-menu .menu-item a.is-active,
.region-primary-menu .menu-item--active-trail a {
    background: transparent !important;
}

/* Generales */

h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4 {
    line-height: 1.1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: var(--montserrat);
    font-weight: var(--extrabold);
}

h1.title {
    font-size: 2.5rem;
    margin-bottom: .5em;
    text-transform: uppercase;
}

.field-type-image figure {
    margin: 0;
}

figcaption {
    color: #a3a3a3;
    font-size: var(--text-general-small);
}

img {
    width: 100%;
    height: auto;
}

::before,
::after {
    transition: all .2s;
}

p,
li {
    font-weight: var(--bold);
}

a,
button {
    transition: all .2s;
    cursor: pointer;
}

#main #block-semiotics-content a {
    word-break: break-all;
}

/* Blazy loader */

.is-b-loading:not(.is-b-loaded):not([data-animation])::before {
    width: 10px;
    height: 10px;
    max-width: 10px;
    background: var(--rojo) !important;
    border-radius: 50%;
    margin-left: -15px;
    margin-top: -15px;
    font-size: 0;
    z-index: 22;
    -webkit-animation: rotateplane 1.2s infinite ease-in-out;
    animation: rotateplane 1.2s infinite ease-in-out;
}

/* Branding */

#block-cenefahome,
#block-cenefahome>.content,
#block-cenefahome>.content>.field--name-body {
    width: 100%;
    height: 100vh;
}

#block-cenefahome>.content>.field--name-body img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#block-cenefahome {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#block-logo {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    width: clamp(300px, 20vw, 600px);
}

#block-cenefainterior,
#block-cenefainterior>.content,
#block-cenefainterior>.content>.field--name-body {
    width: 100%;
    height: 465px;
    position: relative;
}

#block-cenefainterior>.content>.field--name-body img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

#block-cenefainterior>.content>.field--name-body::before {
    position: absolute;
    content: "";
    z-index: 99;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 230px;
    background: url(images/cenefa-interior-curva.png) transparent center bottom / 100% 100% no-repeat;
}

/* Menú */

.block-superfish,
ul.sf-menu.sf-accordion.sf-expanded,
ul.sf-menu.sf-vertical,
ul.sf-menu.sf-accordion li {
    width: auto;
}

ul.sf-menu.sf-accordion.sf-expanded,
ul.sf-menu li,
ul.sf-menu.sf-accordion li {
    float: none;
}

#block-navegacionprincipal,
#block-semiotics-main-menu {
    position: absolute;
    top: clamp(30px, 5vw, 50px);
    right: clamp(50px, 5vw, 100px);
    z-index: 999;
}

#block-navegacionprincipal .nav-link,
#block-semiotics-main-menu .nav-link {
    font-size: var(--text-general-big);
    font-family: var(--montserrat);
    display: inline-block;
    text-transform: uppercase;
    padding: .2em .1em .1em;
    font-weight: var(--extrabold);
    color: black;
}

#block-navegacionprincipal .nav-link:hover,
#block-semiotics-main-menu .nav-link:hover {
    background: black;
    color: white;
}

/* Partners */

#block-partnerscustom {
    position: absolute;
    top: 65px;
    left: 0;
    z-index: 99;
    /* background: url(images/white-circle.svg) transparent right bottom / 100% auto no-repeat;
    padding: 100px 50px 50px 50px; */
    width: clamp(300px, 20vw, 600px);
    max-height: 60vh;
}

#partners-custom-bottom {
    padding: 40px 0 0 40px;
    margin: auto;
    width: clamp(300px, 20vw, 600px);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    justify-content: space-between;
    grid-gap: 1em;
}

#partners-custom-bottom img {
    width: auto;
    height: auto;
    max-height: 60px;
    max-width: 100%;
}

#partners-custom-bottom p {
    grid-column: span 2;
}

#partners-second {
    width: clamp(300px, 10vw, 500px);
    padding: 50px 0 0 50px;
}

#partners-second img:nth-child(2) {
    width: 70%;
    margin: .5em 0;
}

#partners-custom-bottom p,
#partners-second p {
    font-family: var(--montserrat);
    font-weight: var(--bold);
    padding: .5em;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    color: #000;
    text-align: center;
    font-size: 0.8em;
}

#block-partners-2 {
    width: 90%;
    max-width: var(--width-base);
    margin: auto;
}

#partners-h-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4em;
    padding: 60px 0;
}

#partners-h-left,
#partners-h-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2em;
}

#partners-h-left {
    flex-basis: 55%;
}

#partners-h-left img:nth-child(1) {
    flex-basis: auto;
    width: auto !important;
    max-height: 40px;
}

#partners-h-left img:nth-child(2) {
    flex-basis: auto;
    width: auto !important;
    max-height: 100px;
}

#partners-h-left img:nth-child(3) {
    flex-basis: auto;
    width: auto !important;
    max-height: 50px;
}

#partners-h-right {
    padding-left: 4em;
    border-left: 1px solid #000;
    flex-basis: 45%;
}

#partners-h-right img:nth-child(1) {
    flex-basis: 25%;
}

#partners-h-right img:nth-child(2) {
    flex-basis: 25%;
}

#partners-h-right img:nth-child(3) {
    flex-basis: 50%;
}

.image-map-wrap img {
    max-height: 100px !important;
}

#partners-h-right img {
    max-height: 40px !important;
}

#partners-h-wrap p {
    font-family: var(--montserrat);
    font-weight: var(--bold);
    padding: .5em 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    color: #000;
    margin: 0;
    white-space: nowrap;
    text-align: center;
    font-size: 0.7em;
}

/* Presentación */

#block-presentacionhome {
    position: absolute;
    top: 350px;
    right: -300px;
    width: calc(50% + 300px);
    padding: 210px;
    padding-right: 350px;
    padding-bottom: 100px;
    background: url(images/beige-circle.svg) transparent left top / 100% auto no-repeat;
    z-index: 9;
}

/* Contenido */

#main-wrapper {
    position: relative;
    z-index: 99;
    margin-top: -50px;
}

#main {
    width: 90%;
    max-width: var(--width-base);
    margin: auto;
}

#main>.row {
    gap: 2em;
    padding-bottom: clamp(40px, 5vw, 60px);
}

.sidebar h2 {
    margin: 0 0 0.5em;
    border-bottom: 0;
    padding-bottom: 0;
    text-shadow: none;
    font-size: 2.5rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.sidebar .block {
    padding: 0;
}

/* Noticias */

.node--type-noticias .field--name-field-imagen .field--type-image {
    float: none;
    width: 100%;
    min-width: 100%;
    margin: 0;
}

.node--type-noticias .field--name-field-fecha {
    margin: 2em 0 1em;
    font-weight: var(--light);
}

.node--type-noticias .field--name-body p {
    font-weight: var(--regular) !important;
}

.noticias-fecha {
    font-weight: var(--bold);
    margin-bottom: .5em;
}

.noticias-titulo {
    font-size: var(--text-general);
    margin-bottom: 1em;
}

.noticias-titulo a {
    text-decoration: none;
}

.noticias-titulo a:hover {
    color: var(--verde);
}

#block-noticias--2 p {
    margin-top: 1em;
    margin-bottom: 0;
    font-weight: var(--regular);
}

#block-noticias--2 .row {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

#block-noticias-page .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 3em 2em;
}

#block-noticias-page .noticias-titulo {
    margin-top: 1em;
}

/* Publicaciones */

#block-views-block-publicaciones-pagina .views-row {
    margin-bottom: 2em;
}

#block-views-block-publicaciones-pagina .views-row:last-child {
    margin-bottom: 0;
}

#block-views-block-publicaciones-pagina .view-filters {
    margin: 1em 0;
    width: 100%;
    max-width: 350px;
}

#views-exposed-form-publicaciones-pagina .d-flex {
    display: grid !important;
    grid-template-columns: auto 100px !important;
    grid-gap: .5em;
}

#block-views-block-publicaciones-pagina .view-filters label {
    font-weight: var(--bold);
    margin-bottom: .5em;
}

#block-views-block-publicaciones-pagina .row h3 {
    margin-bottom: .6em !important;
    color: var(--verde);
}

#block-views-block-publicaciones-pagina .views-row p {
    margin-bottom: .6em;
}

.publicaciones-titulo {
    font-size: var(--text-general-big);
    margin-bottom: .9em;
}

.publicaciones-tipo {
    padding: .2em .8em;
    margin-bottom: 1em !important;
    background: #efefef;
    font-weight: var(--light);
    display: inline-block;
}

.publicaciones-doi a {
    word-break: break-all;
}

/* Footer */

.site-footer {
    padding: 1em 50px;
    background: var(--verde-light) !important;
}

.path-frontpage .site-footer {
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;
    z-index: 999;
}

.site-footer__top .region {
    width: 100%;
}

.site-footer__bottom {
    margin: 0;
    border: 0;
}

.site-footer .block {
    margin: 0;
    border: 0;
    padding: 0;
}

.site-footer__bottom .region {
    margin-top: 0;
}

.site-footer .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#block-logofooter img {
    width: 200px;
    margin: 0;
}

#block-logofooter .field--name-body {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2em;
}

#block-logofooter .field--name-body p {
    padding-left: 1em;
    border-left: 1px solid #000;
    color: #000;
    margin: 0;
    font-size: 14px;
}

.site-footer__bottom .navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 2em;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.site-footer__bottom .navbar-nav .nav-link {
    color: #000;
    text-decoration: none;
    padding: 0;
    font-size: 14px;
    white-space: nowrap;
}

.clearfix::after {
    display: none;
}

@media all and (max-width: 1100px) {
    #block-cenefainterior>.content>.field--name-body::before {
        background: url(images/cenefa-interior-curva-1024px.png) transparent center bottom / 100% 100% no-repeat;
    }

    #partners-h-wrap {
        flex-wrap: wrap;
    }

    #partners-h-left {
        flex-basis: 100%;
    }

    #partners-h-right {
        padding-left: 0;
        border-left: 0;
        flex-basis: 100%;
    }

    .site-footer .container-fluid {
        flex-direction: column;
        gap: 2em;
    }

    #block-noticias-page .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media all and (max-width: 768px) {

    #block-cenefainterior>.content>.field--name-body::before {
        background: url(images/cenefa-interior-curva-780px.png) transparent center bottom / 100% 100% no-repeat;
    }

    #block-navegacionprincipal {
        top: 50px;
    }

    #block-navegacionprincipal>.content {
        padding-top: 40px;
        position: relative;
    }

    #superfish-main-accordion {
        padding: 1em;
        background: var(--verde-light);
    }

    .sf-accordion-toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 40px;
        z-index: 999;
    }

    #superfish-main-toggle {
        width: 100%;
        height: 100%;
        display: block;
        font-size: 0;
    }

    #superfish-main-toggle span,
    #superfish-main-toggle::before,
    #superfish-main-toggle::after {
        position: absolute;
        width: 100%;
        height: 3px;
        display: block;
        background: #000;
        transition: all .2s;
    }

    #superfish-main-toggle::before,
    #superfish-main-toggle::after {
        content: "";
    }

    #superfish-main-toggle span {
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }

    #superfish-main-toggle::before {
        top: 5px;
    }

    #superfish-main-toggle::after {
        bottom: 5px;
    }

    #superfish-main-toggle.sf-expanded span {
        opacity: 0;
    }

    #superfish-main-toggle.sf-expanded::before {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    #superfish-main-toggle.sf-expanded::after {
        top: 50%;
        transform: translateY(-50%) rotate(-45deg);
    }

    #partners-h-left,
    #partners-h-right {
        flex-direction: column;
    }

    #partners-h-left img,
    #partners-h-right img {
        max-width: 200px;
    }

    .site-footer {
        padding: 1em 20px;
    }

    #block-logofooter .field--name-body p,
    .site-footer__bottom .navbar-nav .nav-link {
        font-size: 12px;
    }

    #block-logofooter .field--name-body,
    .site-footer__bottom .navbar-nav {
        gap: 1em;
    }
}

@media all and (max-width: 480px) {
    #block-cenefainterior>.content>.field--name-body::before {
        background: url(images/cenefa-interior-curva-480px.png) transparent center bottom / 100% 100% no-repeat;
    }

    #block-noticias-page .row {
        grid-template-columns: 1fr;
    }
}

@media all and (min-width: 2048px) {
    #block-presentacionhome {
        position: absolute;
        top: 750px;
        right: -300px;
        width: calc(50% + 300px);
        padding: 210px;
        padding-right: 350px;
        padding-bottom: 100px;
        background: url(images/beige-circle.svg) transparent left top / 100% auto no-repeat;
        z-index: 9;
        padding-left: 310px;
    }

    #block-presentacionhome {
        font-size: 1.5em;
    }
}