/* Ported from the legacy symfony 1 site (custom.css + component.css) to Bootstrap 5 */

/* ===== Bootstrap 3 look of the legacy site (typography, container, navbar) ===== */
:root {
    --bs-body-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --bs-body-font-size: 14px;
    --bs-body-line-height: 1.42857143;
    --bs-body-color: #333;
}

a { text-decoration: none; }
a:hover, a:focus { color: #23527c; text-decoration: underline; }
a.btn:hover, a.btn:focus, .site-navbar a:hover, .site-navbar a:focus { text-decoration: none; }

h1, h2, h3, h4, h5, h6, .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, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; }
ul, ol { margin-bottom: 10px; }

/* BS3 container (750/970/1170 with 15px gutters) instead of BS5 (540/720/960/1140/1320 with 12px) */
.container, .row { --bs-gutter-x: 30px; }
.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; } }

hr { margin: 20px 0; border: 0; border-top: 1px solid #eee; opacity: 1; color: inherit; box-sizing: content-box; }
hr.thickline { border-top: 1px solid #777; }
ul, ol { padding-left: 40px; }
img.img-fluid { display: block; }

/* --- navbar: Bootstrap 3 navbar-default + bootstrap-theme --- */
.site-navbar {
    padding: 0; min-height: 50px;
    background: #f8f8f8 linear-gradient(to bottom, #fff 0, #f8f8f8 100%);
    border-bottom: 1px solid #e7e7e7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.site-navbar .navbar-nav .nav-link {
    padding: 15px; line-height: 20px; color: #777; font-weight: normal;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.site-navbar .navbar-nav .nav-link:hover, .site-navbar .navbar-nav .nav-link:focus { color: #333; }
.site-navbar .navbar-nav .nav-link.active, .site-navbar .navbar-nav .nav-link.show, .site-navbar .navbar-nav .nav-item.show > .nav-link {
    color: #555; font-weight: normal;
    background: #e7e7e7 linear-gradient(to bottom, #ebebeb 0, #f3f3f3 100%);
    box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.site-navbar .navbar-toggler {
    margin: 8px 0;
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.site-navbar .navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}

.site-navbar .dropdown-toggle::after { margin-left: 2px; vertical-align: middle; border-top-width: 4px; border-left-width: 4px; border-right-width: 4px; }
.site-navbar .dropdown-menu {
    min-width: 160px; padding: 5px 0; margin: 0; font-size: 14px; line-height: 1.42857143;
    border: 1px solid rgba(0, 0, 0, .15); border-top-left-radius: 0; border-top-right-radius: 0; border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.site-navbar .dropdown-item, .site-navbar .dropdown-item.active { padding: 3px 20px; color: #333; font-weight: normal; background: transparent; }
.site-navbar .dropdown-item:hover, .site-navbar .dropdown-item:focus {
    color: #262626; background: #f5f5f5 linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);
}

body {
    padding-top: 51px; /* fixed navbar (50px + 1px border) */
}

h2 {
    text-align: center;
}

a {
    color: #45a63a;
}

p {
    margin: 5px 0 15px;
}

/* --- text helpers used by the home page --- */
.greentext { color: #109431; font-weight: bold; font-size: 1em; }
.greentext h2 { font-weight: bold; font-size: 1.8em; font-style: normal; }
.graytext { color: #777; font-weight: normal; font-size: 1em; font-style: italic; }
.graytext h2 { font-weight: bold; font-size: 1.8em; font-style: normal; }
.largetext { font-size: 3em; }
.middlesized { font-size: 2em; }
.middlesized h2 { font-size: 1.5em; }
.smallsized { font-size: 1.8em; }
.smallsized h2 { font-size: 1.3em; }
.justified, .text-justify { text-align: justify; }
.normal { font-style: normal; }
.olalpha { list-style-type: lower-alpha; }

.thickline {
    background-color: #777;
    color: #777;
    height: 0.3em;
    opacity: 1;
}

.error {
    color: red !important;
    margin-left: 5px;
}

#homepage-container {
    text-align: center;
    padding: 10px 0 0; /* the legacy page let the partner logos float out of the container: no bottom padding */
}

#homepage-container .valori {
    margin: auto;
    width: 40%;
}

#homepage-container .partners img {
    float: left;
    margin: 15px 5px;
    max-width: 100%;
}

/* --- news ticker (replaces <marquee>) ---
   Same geometry as the legacy `.well` with a marquee: the box ends where the header image starts. */
.news-ticker {
    overflow: hidden;
    white-space: nowrap;
    height: 90px;
    padding: 9px;
    margin: 0;
    border: 1px solid #dcdcdc;
    border-radius: 3px;
    background: #f5f5f5 linear-gradient(to bottom, #e8e8e8 0, #f5f5f5 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}

.news-ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 30s linear infinite;
}

.news-ticker-text:hover {
    animation-play-state: paused;
}

.news-ticker-text > p {
    display: inline;
    margin: 0;
}

.news-ticker-text h3 {
    margin: 0;
}

@keyframes ticker {
    to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .news-ticker { white-space: normal; }
    .news-ticker-text { animation: none; padding-left: 0; }
}

/* --- panels --- */
.site-panel {
    border: 0;
}

.site-panel-heading {
    padding: 10px 0;
    background: #fff;
    border-bottom: 3px solid #5cb85c;
    color: #000;
}

.site-panel-title {
    margin: 0;
    font-size: 16px;
}

.site-panel-title a {
    color: inherit;
}

.site-panel-body {
    padding: 10px;
    background-image: linear-gradient(to top, #fff 0%, #f5f5f5 100%);
}

/* --- gallery --- */
.thumbnail {
    display: block;
    padding: 9px;
    margin-bottom: 20px;
    line-height: 1.42857143;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: left;
}

.thumbnail .caption {
    padding: 9px;
    color: #333;
}

/* --- footer --- */
#footer {
    position: relative;
}

#footer-info {
    width: 100%;
    position: absolute;
    bottom: 5%;
    color: #fff;
    text-align: center;
    font-size: 1.2em;
}

#footer-info p {
    display: block;
    margin: 0 9% 5% 0;
    text-align: right;
}

#footer a {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

/* --- error page --- */
.error-container {
    max-width: 50rem;
    margin: 20px auto;
}

/* --- team tabs (legacy CBPFWTabs look) --- */
.team-tabs {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 1em 0 2em;
    font-weight: 300;
}

.team-tabs nav {
    text-align: center;
}

.team-tabs nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: inline-block;
}

.team-tabs nav ul li {
    margin: 0 2em;
    font-family: 'EB Garamond', serif; /* not loaded on the legacy site either: renders as the browser's serif */
    display: block;
    float: left;
    position: relative;
    width: 11em;
    height: 11em;
    border-radius: 100px;
    background: #45a63a;
    color: #fff;
}

.team-tabs nav ul li:hover,
.team-tabs nav li.tab-current {
    background: #45a63a url('/images/shape.png') no-repeat 50% 112%;
}

.team-tabs nav li.tab-current {
    border: 1px solid #008000;
    box-shadow: inset 0 3px #008000;
    border-bottom: none;
    z-index: 100;
}

/* green rule through the active tab, as in the legacy CBPFWTabs */
.team-tabs nav li.tab-current::before,
.team-tabs nav li.tab-current::after {
    content: '';
    position: absolute;
    height: 1px;
    right: 7em;
    bottom: 0;
    width: 1000px;
    background: #45a63a;
}

.team-tabs nav li.tab-current::after {
    right: auto;
    left: 7em;
    width: 4000px;
}

.team-tabs nav a {
    color: #fff;
    display: block;
    font-size: 16px;
    line-height: 25px;
    padding-top: 2em;
    outline: 0;
}

.opp-title {
    width: 87%;
    margin: 0 auto;
}

.team-tabs .content section {
    padding: 3em 1em;
    display: none;
    max-width: 1230px;
    margin: 0 auto;
}

.team-tabs .content section::after {
    content: '';
    display: table;
    clear: both;
}

.team-tabs .content section.content-current,
.team-tabs:not(.tabs-ready) .content section {
    display: block;
}

@media (min-width: 1100px) {
    .team-tabs nav a {
        padding-top: 3.5em;
    }

    .team-tabs nav li.tab-current::before {
        right: 6.4em;
    }

    .team-tabs nav li.tab-current::after {
        left: 6.4em;
    }
}

@media (max-width: 670px) {
    .team-tabs nav ul li {
        width: 100%;
        margin: 5px 0 0 -1px;
        border-radius: 5px;
        height: 30px;
    }

    .team-tabs nav a {
        padding-top: 0;
    }

    .team-tabs nav a span {
        display: block;
        line-height: 28px;
    }

    .team-tabs nav li.tab-current::before,
    .team-tabs nav li.tab-current::after {
        height: 0;
    }

    /* on a phone the tabs are bars and the active one points left with the horizontal arrow (shape2.png) */
    .team-tabs nav ul li:hover {
        background: url('/images/shape2.png') no-repeat scroll -4% 100% #45a63a !important;
    }

    .team-tabs nav li.tab-current {
        background: url('/images/shape2.png') no-repeat scroll -4% 100% #45a63a !important;
        border-width: 0 !important;
        box-shadow: none !important;
    }
}

/* --- responsive sizing from the legacy site (custom.css) --- */
#homepage-container p { font-size: 2em; }

@media (min-width: 1200px) {
    h4 { font-size: 17px; font-weight: bold; }
}

@media (max-width: 1200px) {
    body { font-size: 11px; }
    .dropdown-menu { font-size: 11px; }
    .site-navbar .navbar-nav .nav-link { padding: 8px; }
    /* the legacy ticker box (marquee of 11px text) ends at y=133; keep the header image there */
    .news-ticker { height: 82px; }
}

@media (min-width: 992px) and (max-width: 1200px) {
    /* navbar is 37px tall here (8px link padding) */
    body { padding-top: 37px; }
    .news-ticker { height: 96px; }
}

@media (max-width: 1000px) {
    h4 { font-size: 1.2em; font-weight: bold; }
    #homepage-container p { font-size: 1.5em; }
    #footer { font-size: 0.8em; }
}

@media (max-width: 700px) {
    #footer { font-size: 0.6em; }
}

@media (max-width: 400px) {
    h4 { font-size: 1em; }
    ul, ol { padding-left: 2em; }
    #newsfeed { padding: 2px; font-size: 0.8em; }
    #homepage-container { padding: 10px 40px; }
    #homepage-container p { font-size: 1em; }
    #footer { font-size: 0.4em; }
}

@media (max-width: 320px) {
    #newsfeed { font-size: 0.6em; }
    #footer { font-size: 0.3em; }
}

/*
 * Compatibility shims: page content in `static_pages` was written for Bootstrap 3.
 * Remove once the stored HTML has been migrated to Bootstrap 5 classes.
 */
.img-responsive { max-width: 100%; height: auto; display: block; }
.pull-left { float: left; }
.pull-right { float: right; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.hidden-xs { }
@media (max-width: 575.98px) { .hidden-xs { display: none !important; } }
.well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; }

/* --- ANAF form: Bootstrap 3 look (labels, controls, native checkboxes, gradient buttons) --- */
#anaf_form label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: 700;
}

#anaf_form .form-check {
    display: block;
    min-height: 0;
    padding-left: 0;
    margin: 0;
}

#anaf_form .form-check-label {
    display: inline;
    margin: 0;
    font-weight: normal;
}

#anaf_form .form-check-input {
    float: none;
    width: auto;
    height: auto;
    margin: 4px 4px 0 0;
    background: none;
    border: 0;
    appearance: auto;
}

#anaf_form .form-control {
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

#anaf_form .form-control::placeholder {
    color: #999;
    opacity: 1;
}

#anaf_form .form-control:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

#anaf_form .btn {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.42857143;
    border-radius: 4px;
    color: #fff;
}

#anaf_form .btn-warning {
    background: #f0ad4e linear-gradient(to bottom, #f0ad4e 0, #eb9316 100%);
    border-color: #e38d13;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
}

#anaf_form .btn-primary {
    background: #337ab7 linear-gradient(to bottom, #337ab7 0, #265a88 100%);
    border-color: #245580;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
}

/* --- ANAF form --- */
.signature-pad canvas {
    display: block;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 2 / 1;
    background: #fff;
    border: 1px solid #888;
    touch-action: none;
}

label.required::after {
    content: ' *';
    color: #c00;
}

.split-line {
    margin-top: .25rem;
}
