/* Site footer (markup: footer.inc.php; link columns, offices and social links are the
   HTML_FOOTER_* translations). Loaded on every page from site.cabecalho.inc.php.
   Base rules are the 390px design; desktop (1920px design) overrides are under 992px. */

/* Rules the old inline footer styles set on every page; other pages still rely on them */
@font-face {
    font-family: myFirstFont;
    src: url(/fonts/ProximaNova-Regular.otf);
}

body {
    font-family: myFirstFont;
}

.card {
    background-color: transparent !important;
}

/* Footer */
.ep-footer {
    background: #0A1E2C;
    color: #D4EAF0;
    font-family: "ProximaNova-Regular", myFirstFont, sans-serif;
    font-size: 16px;
    line-height: 25px;
    padding: 40px 0 33px;
}

.ep-footer__inner {
    max-width: min(1440px, 100% - 60px);
    margin: 0 auto;
}

/* :where() keeps the reset at class weight, so the element classes below override it */
.ep-footer :where(p, ul, address) {
    margin: 0;
    padding: 0;
}

.ep-footer :where(ul) {
    list-style: none;
}

.ep-footer a {
    color: inherit;
    text-decoration: none;
}

.ep-footer a:hover {
    color: #00EBA4;
}

.ep-footer__logo {
    display: block;
    width: 250px;
}

.ep-footer__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.ep-footer__title {
    font-family: "FontsFree-Net-Proxima-Nova-Sbold", sans-serif;
    font-size: 18px;
    line-height: 22px;
    text-transform: uppercase;
    color: #E2F4F9;
}

.ep-footer__rule {
    margin: 0;
    border: 0;
    border-top: 1px solid #1D3240;
    opacity: 1;
}

/* Link columns */
.ep-footer__nav {
    display: grid;
    gap: 29px;
    margin: 30px 0 26px;
}

.ep-footer__nav .ep-footer__title {
    margin-bottom: 11px;
}

.ep-footer__nav li {
    line-height: 30px;
}

.ep-footer__nav a {
    color: #97B7BC;
}

.ep-footer__nav a:hover {
    color: #00EBA4;
}

/* Offices */
.ep-footer__offices {
    display: grid;
    gap: 38px;
    margin: 30px 0 24px;
}

.ep-footer__office {
    position: relative;
    padding-left: 34px;
    font-style: normal;
}

.ep-footer__office img {
    position: absolute;
    left: 0;
    top: 1px;
}

.ep-footer__city {
    display: block;
    margin-bottom: 3px;
    font-family: "Proxima Nova Bold", sans-serif;
    color: #E2F4F9;
}

/* Institutional / certification / social */
.ep-footer__info {
    display: grid;
    gap: 32px;
    margin: 34px 0 64px;
}

.ep-footer__info .ep-footer__title {
    margin-bottom: 14px;
}

.ep-footer__company {
    display: block;
}

.ep-footer__phone {
    display: block;
    margin-top: 8px;
}

.ep-footer__phone-note {
    display: block;
    font-size: 12px;
    line-height: 14px;
    color: #667B87;
}

.ep-footer__email {
    display: block;
    margin-top: 12px;
}

.ep-footer__cert {
    display: block;
    width: 140px;
}

.ep-footer__cert img {
    display: block;
    width: 100%;
    height: auto;
}

.ep-footer__social {
    display: flex;
    gap: 20px;
    margin: 20px 0 32px; /* collapses with the title's 14px */
}

.ep-footer__social a {
    display: block;
}

.ep-footer__social img {
    display: block;
    height: 28px;
    width: auto;
}

.ep-footer__social a:hover img {
    filter: brightness(1.25);
}

.ep-footer__legal {
    max-width: 410px;
    font-size: 14px;
    line-height: 24px;
}

/* Awards and funding logos */
.ep-footer__badges {
    display: grid;
    gap: 33px;
    margin: 35px 0 30px;
}

.ep-footer__label {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 16px;
    text-transform: uppercase;
    color: #4B606B;
}

.ep-footer__support .ep-footer__label {
    margin-bottom: 21px;
}

.ep-footer__badges img {
    display: block;
    width: 100%;
    max-width: 330px;
    height: auto;
}

/* ES: European funds logo */
.ep-footer__badges .funds-logo {
    max-width: 200px;
}

.ep-footer__copy {
    font-size: 14px;
    line-height: 16px;
    text-align: center;
}

/* Tablets: link columns three across */
@media (min-width: 768px) {
    .ep-footer__nav {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .ep-footer {
        padding: 60px 0 82px;
    }

    .ep-footer__logo {
        width: 240px;
    }

    .ep-footer__nav {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
        margin: 38px 0 36px;
    }

    .ep-footer__nav li {
        line-height: 32px;
    }

    .ep-footer__offices,
    .ep-footer__info {
        grid-template-columns: repeat(3, 1fr);
        gap: 48px;
    }

    .ep-footer__offices {
        margin: 38px 0 58px;
    }

    .ep-footer__rule--mobile {
        display: none;
    }

    .ep-footer__info {
        margin: 0 0 42px;
    }

    .ep-footer__phone-note {
        margin-top: -2px;
    }

    .ep-footer__cert {
        width: 141px;
    }

    .ep-footer__social {
        gap: 18px;
        margin: -4px 0 24px;
    }

    .ep-footer__social img {
        height: 27px;
    }

    /* Awards under the first link column, funding logos under the fourth */
    .ep-footer__badges {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
        align-items: start;
        margin: 40px 0 66px;
    }

    .ep-footer__awards {
        grid-column: 1 / span 3;
    }

    .ep-footer__support {
        grid-column: 4 / span 2;
    }

    /* No awards (ES): the funding block takes the awards' place */
    .ep-footer__support:first-child {
        grid-column: 1 / span 3;
    }

    .ep-footer__awards img {
        max-width: 468px;
    }

    /* Funding logos vertically centred on the awards row */
    .ep-footer__support .ep-footer__label {
        margin-bottom: 24px;
    }

    .ep-footer__support img {
        max-width: 456px;
    }

    .ep-footer__support .funds-logo {
        max-width: 240px;
    }
}
