/*
 * Public portal (PT + EN pages) on Bootstrap 5.3.8.
 *
 * Faithful port of the previous look, which came from Voyager's Bootstrap 3 stylesheet
 * (the former public/css/app.css) plus the former public/css/style_portal.css.
 * Values below were measured from the old pages (computed styles), not guessed.
 * Bootstrap 3 -> 5 breakpoint mapping used in the views: xs -> (none), sm -> md, md -> lg, lg -> xl.
 */

/* ---------- Voyager icon font (only the glyphs the portal uses) ---------- */
@font-face {
    font-family: voyager;
    src: url(../fonts/voyager.eot);
    src: url(../fonts/voyager.eot?#iefix) format("embedded-opentype"),
         url(../fonts/voyager.woff) format("woff"),
         url(../fonts/voyager.ttf) format("truetype"),
         url(../fonts/voyager.svg#voyager) format("svg");
    font-weight: 400;
    font-style: normal;
}
[class^="voyager-"]:before,
[class*=" voyager-"]:before {
    font-family: voyager !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-variant: normal !important;
    text-transform: none !important;
    speak: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.voyager-mail:before { content: "\e014"; }
.voyager-telephone:before { content: "\e033"; }
.voyager-location:before { content: "}"; }
.voyager-paper-plane:before { content: "Y"; }
.voyager-list:before { content: "G"; }

/* ---------- Base metrics (as rendered before: 1rem = 14px, Roboto 14/22, #333) ---------- */
html {
    font-size: 14px;
}
:root {
    --bs-body-font-family: 'Roboto', sans-serif;
    --bs-body-font-size: 14px;
    --bs-body-line-height: 1.5714286; /* 22px */
    --bs-body-color: #333;
    --bs-body-color-rgb: 51, 51, 51;
    --bs-link-color: #337ab7;
    --bs-link-color-rgb: 51, 122, 183;
    --bs-link-hover-color: #23527c;
    --bs-link-hover-color-rgb: 35, 82, 124;
}
a {
    text-decoration: none;
}
a:hover,
a:focus {
    text-decoration: underline;
}
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.1;
    color: inherit;
}
h1, h2, h3 { margin-top: 20px; margin-bottom: 10px; }
h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; }
h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }
p { margin: 0 0 10px; }
ul, ol { margin-bottom: 10px; padding-left: 40px; }
ul ul, ul ol, ol ul, ol ol { margin-bottom: 0; }
small { font-size: 85%; }

/* Bootstrap 3 grid widths and 30px gutters */
.container,
.container-fluid,
.row {
    --bs-gutter-x: 30px;
}
@media (min-width: 576px) { .container { max-width: none; } }
@media (min-width: 768px) { .container { max-width: 750px; } }
@media (min-width: 992px) { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }
@media (min-width: 1400px) { .container { max-width: 1170px; } }

/* Bootstrap 3 table look */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: #555;
    color: #555;
    margin-bottom: 20px;
}
.table > :not(caption) > * > * {
    padding: 8px;
    line-height: 20px;
    vertical-align: top;
    border-top: 1px solid #ddd;
    border-bottom-width: 0;
    box-shadow: none;
}

/* ---------- Components Bootstrap 5 removed (re-created with the measured values) ---------- */
.page-header {
    padding-bottom: 9px;
    margin: 40px 0 20px;
    border-bottom: 1px solid #eee;
}
.jumbotron {
    height: 30vh;
    padding-top: 13vh;
    padding-bottom: 0;
    margin-bottom: 30px;
    background: #fff;
}
/* .col-12 didn't exist in Bootstrap 3, so the logo column had no padding (logo 1170px wide on desktop) */
.jumbotron .row > .col-12 {
    padding-left: 0;
    padding-right: 0;
}
.no_jumbotron {
    height: 15vh;
    background: #fff;
}

/* Accordion panels (contacts, legislation) */
.panel-group {
    margin-bottom: 20px;
}
.panel {
    background-color: #fff;
    border: 0;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.panel + .panel {
    margin-top: 5px;
}
.panel-heading {
    background-color: #f5f5f5;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}
.panel-title {
    margin: 0;
    padding: 20px 30px;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 500;
    color: #37474f;
    text-align: left;
}
.panel-title > a {
    color: inherit;
}
.panel-body {
    padding: 15px 15px 15px 30px;
    border-top: 1px solid #ddd;
}
/* closed = double arrow down (as the page always looked initially), open = double arrow up.
   The toggles start with .collapsed, so the icon no longer flips meaning after the first click. */
.panel-heading .accordion-toggle:after {
    font-family: 'Voyager';
    content: "y";
    float: right;
    color: grey;
}
.panel-heading .accordion-toggle.collapsed:after {
    content: "x";
}
.panel-legislation ul {
    padding-left: 0;
}
.panel-legislation li {
    list-style: none;
    margin-bottom: 1.2rem;
    border-left: 2px solid #eee;
    padding: 4px 0 4px 8px;
}
.panel-legislation i {
    padding-left: 0;
}
.panel-legislation strong {
    font-weight: 700;
}

/* ---------- Navbar ---------- */
.portal-navbar {
    background: #f5f5f5;
    min-height: 60px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}
.portal-navbar > .container-fluid {
    padding-left: 0;
}
.portal-navbar .navbar-brand {
    height: 60px;
    line-height: 60px;
    padding: 0;
    margin-right: 0;
    font-size: 21px;
    font-family: "Fira Sans", sans-serif;
}
.portal-navbar .navbar-brand > img {
    display: initial;
    vertical-align: middle;
}
.portal-navbar .navbar-brand > span {
    font-size: .8rem;
    color: #000;
}
/* style_portal.css asked for margin-right: 1%, but Bootstrap 3's more specific .navbar-right:last-child won,
   so the menu effectively had no right margin */
.portal-navbar .navbar-nav {
    margin-right: 0;
}
.portal-navbar .navbar-nav .nav-link {
    height: 60px;
    line-height: 60px;
    padding: 0 10px;
    font-family: "Fira Sans", sans-serif;
    font-size: 14px;
    color: #337ab7;
    text-transform: capitalize;
    transition: all ease-out .5s;
}
.portal-navbar .navbar-nav .nav-link:hover,
.portal-navbar .navbar-nav .nav-link:focus,
.portal-navbar .navbar-nav .nav-link.show {
    text-decoration: none;
    color: #fff;
    background-color: #001789;
}
/* Bootstrap 3 caret: 4px triangle after a space */
.portal-navbar .dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: middle;
    border-top-width: 4px;
    border-right-width: 4px;
    border-left-width: 4px;
}
.portal-navbar .dropdown-menu {
    --bs-dropdown-min-width: 160px;
    --bs-dropdown-padding-y: 0;
    --bs-dropdown-spacer: 0;
    --bs-dropdown-font-size: 14px;
    --bs-dropdown-border-width: 0;
    --bs-dropdown-border-radius: 0 0 2px 2px;
    --bs-dropdown-link-color: #777;
    --bs-dropdown-link-hover-color: #262626;
    --bs-dropdown-link-hover-bg: #f5f5f5;
    --bs-dropdown-link-active-color: #262626;
    --bs-dropdown-link-active-bg: #f5f5f5;
    --bs-dropdown-item-padding-x: 5px;
    --bs-dropdown-item-padding-y: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
}
.portal-navbar .dropdown-item {
    line-height: 20px;
    border-radius: 3px;
}
.portal-navbar .dropdown-item:hover,
.portal-navbar .dropdown-item:focus {
    text-decoration: none;
}
/* measured from the old mobile menu button: 14px base, 22px/15px padding, 28px icon */
.portal-navbar .navbar-toggler {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 22px 15px;
    font-size: 14px;
    line-height: 22px;
    box-shadow: none;
}
.logo {
    padding: 0 0 0 10px;
}
.hamburguer {
    font-size: 2em;
}

/* ---------- Content ---------- */
i {
    font-size: 1.3em;
    vertical-align: sub;
    color: #f0ad4e;
    padding-left: 30px;
}
.heading {
    text-transform: uppercase;
    text-align: center;
    letter-spacing: -1px;
    margin-bottom: 4rem;
}
.heading3 {
    text-transform: uppercase;
}
.txt {
    text-align: justify;
}
.txt strong {
    font-weight: 700;
}
.img-fluid {
    max-width: 100%;
    height: auto;
    margin: 3rem 0;
}
.text-center > .img-fluid {
    margin: 0 0 3rem 0;
}
/* the old theme gave every content column 25px of bottom spacing */
.portal-content {
    margin-bottom: 25px;
}

/* ---------- Footer ---------- */
footer {
    padding-top: 2rem;
    margin-top: 2rem;
}
/* the logo strip used to sit in a plain (Bootstrap 3 had no .col-12) full-width block, 25px above the copyright */
footer > .row:first-child > .col-12 {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 25px;
}
#entities-quick-links {
    background-color: white;
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    max-width: 1920px;
    flex-wrap: wrap;
}
#entities-quick-links > div {
    text-align: center;
    padding-top: 10px;
    padding-right: 5px;
    padding-left: 5px;
}
#entities-quick-links > div:first-child {
    text-align: left;
    padding-left: 0;
}
#entities-quick-links > div:last-child {
    text-align: right;
    padding-right: 0;
}

/* ---------- Small screens (navbar collapsed: < 768px) ---------- */
@media (max-width: 767.98px) {
    .portal-navbar {
        background: #fff;
    }
    .portal-navbar .navbar-collapse {
        max-height: 500px;
        overflow-y: auto;
    }
    .portal-navbar .navbar-nav .nav-link {
        height: auto;
        line-height: 40px;
    }
    .portal-navbar .dropdown-menu {
        box-shadow: none;
    }
    .logo {
        width: 40px;
    }
    .portal-navbar .navbar-brand > span {
        font-size: .7rem;
    }
    #entities-quick-links {
        justify-content: center;
    }
    #entities-quick-links > div {
        padding-bottom: 10px;
    }
    .entity-link img {
        height: 40px;
    }
}
