/* I CSS locali e i font sono linkati singolarmente (e versionati) in inc/style.php */
* {
    font-family: 'Karla', sans-serif;
}

html, body {
    height: 100%;
    background-color: #193547;
}

b {
    color: #193547;
}

.body {
    background-color: #F4F5FA;
}

footer {
    background-color: #193547;
    color: #fff;
    font-size: 1rem;
    padding: 44px 0 0;
    margin-top: 3rem;
}

footer b {
    color: #fff;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding-bottom: 28px;
}

.footer-name {
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.footer-slogan {
    color: rgba(255, 255, 255, .65);
    max-width: 420px;
    margin-bottom: 0;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 0.7rem;
}

.footer-contacts p {
    margin-bottom: 0.45rem;
}

.footer-contacts i {
    width: 22px;
    text-align: center;
    margin-right: 4px;
    color: rgba(255, 255, 255, .55);
    font-size: 0.9rem;
}

.footer-contacts a {
    color: #fff;
}
.footer-contacts a:hover {
    color: #B8D8DE;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 16px 0 18px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, .65);
}

.footer-bottom a {
    color: #fff;
}

a, a:active, a:focus {
    outline: none;
}

a:hover {
    text-decoration: none;
}

.animated-background {
    background-size: cover !important;
    -webkit-transition: opacity 1s ease-in;
    -moz-transition: opacity 1s ease-in;
    -o-transition: opacity 1s ease-in;
    -ms-transition: opacity 1s ease-in;
    transition: opacity 1s ease-in;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    position: absolute;
    min-height: 660px;
}

.animated-background.before {
    z-index: 1;
    opacity: 1;
}

.hero-section, .hero-content {
    height: 100%;
    min-height: 660px;
}

.hero-content {
    position: absolute;
    z-index: 5;
    width: 100%;
}

.hero-content::after {
    position: absolute;
    bottom: 0;
    left: 0;
    content: '';
    width: 100%;
    height: 80%;
    background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .7) 90%, rgba(0, 0, 0, .8) 100%);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .7) 90%, rgba(0, 0, 0, .8) 100%);
}

.hero-news {
    color: #fff;
    z-index: 2;
    text-shadow: 1px 1px 5px #2020209c;
}

.hero-news h1 {
    font-weight: 700;
    font-size: 4rem;
}

.hero-news h2 {
    font-weight: 400;
    font-size: 2rem;
}

@media (max-width: 750px) {
    .hero-news h1 {
        font-size: 2.8rem;
        word-wrap: break-word;
        hyphens: auto;
    }
    .hero-news h2 {
        font-size: 1.5rem;
    }
}

.read-more-link {
    width: auto;
}

.read-more-link:hover {
    color: #fff;
    text-decoration: none;
}

.read-more-link:hover:after {
    opacity: 1;
}

.read-more-link:after {
    vertical-align: middle;
    padding-left: 2px;
    content: "\00bb";
    opacity: 0;
    font-size: 1.5rem;
    transition: 0.5s;
}

.hero-read-more {
    cursor: pointer;
}

.hero-content .scrolldown {
    z-index: 2;
    display: inline-block;
    -webkit-transform: translate(0, -50%);
    transform: translate(0, -50%);
    color: #fff;
    font: normal 400 20px/1 'Josefin Sans', sans-serif;
    letter-spacing: .1em;
    text-decoration: none;
    transition: opacity .3s;
}

.hero-content .scrolldown:hover {
    opacity: .5;
}

.hero-content .scrolldown {
    padding-top: 60px;
}

.hero-content .scrolldown span {
    position: absolute;
    top: 0;
    left: 50%;
    width: 30px;
    height: 50px;
    margin-left: -15px;
    border: 2px solid #fff;
    border-radius: 50px;
    box-sizing: border-box;
}

.hero-content .scrolldown span::before {
    position: absolute;
    top: 10px;
    left: 50%;
    content: '';
    width: 6px;
    height: 6px;
    margin-left: -3px;
    background-color: #fff;
    border-radius: 100%;
    -webkit-animation: sdb10 2s infinite;
    animation: sdb10 2s infinite;
    box-sizing: border-box;
}

.progressbar {
  width: 100%;
  margin: 0px auto;
  z-index: 9999;
}
.progressbar .inner {
  height: 5px;
  animation: progressbar-countdown;
  animation-duration: 40s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  animation-play-state: paused;
  animation-timing-function: linear;
}

.small-header {
    height: 132px;
}

.quote-card:before {
    font-family: "Font Awesome 5 Free";
    content: "\f10d";
    font-weight: 900;
    position: absolute;
    font-size: 2.8rem;
    left: 10px;
    color: rgba(0, 0, 0, 0.253);
}

.quote-card:after {
    font-family: "Font Awesome 5 Free";
    content: "\f10e";
    font-weight: 900;
    position: absolute;
    font-size: 2.8rem;
    right: 10px;
    bottom: 0;
    color: rgba(0, 0, 0, 0.253);
}

.quote-text {
    font-size: 1.4rem;
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-variant: small-caps;
}

.article-card img {
    width: 220px;
    height: 220px;
    object-fit: none;
    object-position: center;
}

@media (max-width: 767px) {
    .article-card > a {
        width: 100%;
    }

    .article-card img {
        width: 100%;
        height: 220px;
    }
}

.article-card .title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #193547;
}

.article-card .news-body {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .article-card .news-body {
        max-height: 220px;
    }
    .article-card .news-body p {
        max-height: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.article-card .read-more {
    color: black;
}

.article-card {
    transition: transform .18s ease, box-shadow .18s ease;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(25, 53, 71, .16);
}
@media (prefers-reduced-motion: reduce) {
    .article-card, .article-card:hover { transform: none; transition: none; }
}

.breadcrumb {
    font-size: 12px;
    font-family: 'PT Sans', sans-serif;
}

.breadcrumb a {
    padding-left: 2px;
    padding-right: 2px;
}

.page-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.25rem;
    -webkit-box-shadow: 0 1px 15px 1px rgba(62, 57, 107, 0.07);
    box-shadow: 0 1px 15px 1px rgba(62, 57, 107, 0.07);
    margin-bottom: 2rem;
}

.response-error-title {
    color: #193547;
    font-weight: bold;
    font-size: 10rem;
    text-align: center;
}

/* Condivisione articolo: deeplink puri, nessuno script esterno */
.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: -0.75rem 0 1.5rem;
}

.share-label {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7A8A97;
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #D5DCE2;
    background: #fff;
    color: #365061;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.share-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}
.share-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

.share-btn.facebook:hover { background: #1877F2; border-color: #1877F2; }
.share-btn.twitter:hover  { background: #000; border-color: #000; }
.share-btn.whatsapp:hover { background: #25D366; border-color: #25D366; }
.share-btn.linkedin:hover { background: #0A66C2; border-color: #0A66C2; }
.share-btn.email:hover,
.share-btn.copylink:hover { background: #365061; border-color: #365061; }

/* Allegati: griglia di card compatte */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.attachment-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #E3E7EC;
    border-radius: 8px;
    background: #fff;
    min-width: 0;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.attachment-card:hover {
    text-decoration: none;
    border-color: #365061;
    box-shadow: 0 4px 14px rgba(25, 53, 71, .12);
    transform: translateY(-1px);
}
.attachment-card img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}
.attachment-card .attachment-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}
.attachment-card .attachment-name {
    font-weight: bold;
    color: #193547;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.attachment-card .attachment-meta {
    font-size: 0.75rem;
    color: #7A8A97;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.attachment-card > i {
    flex-shrink: 0;
    color: #7A8A97;
    font-size: 0.85rem;
    transition: color .15s;
}
.attachment-card:hover > i { color: #365061; }

/* Chip filtro delle tassonomie: outline, piena solo l'attiva */
.filter-container {
    flex-wrap: wrap;      /* su desktop vanno a capo su piu' righe centrate */
    row-gap: 0.25rem;
}

.tag-badge {
    margin: 0.25rem;
    padding: 0.3rem 1rem;
    background-color: transparent;
    color: #365061;
    border: 1px solid #B8C4CC;
    font-weight: bold;
    border-radius: 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: border-color .15s, color .15s, background-color .15s;
}
.tag-badge:hover {
    color: #193547;
    border-color: #365061;
    text-decoration: none;
}
.tag-badge.active {
    background-color: #365061;
    border-color: #365061;
    color: #fff;
}
.tag-badge.active:hover { color: #fff; }

/* Menu a tendina "Altri anni", stilizzato come una chip */
.tag-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    height: auto;
    line-height: 1.2;
    padding-right: 2.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23365061' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.7rem;
}
.tag-select.active {
    background-color: #365061;
    border-color: #365061;
    color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23ffffff' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
}
.tag-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(54, 80, 97, .18); }
.tag-select option { color: #193547; }

/* su mobile le chip stanno su una riga scorrevole invece di andare a capo */
@media (max-width: 767px) {
    .filter-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .filter-container::-webkit-scrollbar { display: none; }
    .filter-container .tag-badge { flex-shrink: 0; }
}

/* tag dentro le card articolo: etichetta discreta, non un filtro */
.tag-label {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.6rem;
    background-color: #E9EFF3;
    color: #365061;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
}
