/* Bottone "torna su" */
.back-to-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    border: 2px solid #f8f9fa;
    color: #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

.back-to-top-btn:hover {
    background-color: #f2f2f2;
    color: #000;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* Card dei numeri (section_3) */
.counter-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 24px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    will-change: transform;
}

.counter-card-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.counter-card .counter-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.counter-card .counter-number-text {
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.7;
}

.counter-card .counter-text {
    font-size: 0.95rem;
    margin: 0;
    color: #555;
}

.section-bg .counter-card {
    background-color: #f8f9fa;
}

.counter-card.tilt-active {
    box-shadow: 0 18px 45px rgba(0,0,0,0.18);
}

/* --- SECTION_4: stile in linea con il template --- */

/* Wrapper del toggle (piccola "pill" bianca con ombra tenue) */
#interventiTabs {
    background-color: #ffffff;
    padding: 4px;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

#interventiTabs .nav-item {
    margin: 0 4px;
}

#interventiTabs .nav-link {
    border-radius: 999px;
    border: none;
    padding: 8px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #5a6f80;
    background: transparent;
    transition: all 0.2s ease-in-out;
}

#interventiTabs .nav-link:hover {
    background-color: rgba(91,193,172,0.08);
    color: #5a6f80;
}

#interventiTabs .nav-link.active {
    background-color: #5bc1ac;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(91,193,172,0.35);
}

/* Card menu (temi + anni) in linea con featured-block del template */
#section_4 .featured-block {
    width: 100%;
    min-height: 160px;
    border-radius: 18px;
    padding: 20px 14px;
    text-align: center;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

#section_4 .featured-block a {
    text-decoration: none;
    color: inherit;
}

#section_4 .featured-block-image {
    max-width: 56px;
    margin-bottom: 10px;
}

#section_4 .featured-block-text {
    margin-bottom: 0;
    font-size: 0.95rem;
}

#section_4 .featured-block strong {
    color: #5bc1ac;
}

#section_4 .featured-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
}

/* Card anni: testo un po' più grande per dare importanza alla data */
#menu-anni .featured-block-text {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

@media (max-width: 575.98px) {
    #section_4 .featured-block {
        min-height: 150px;
        padding: 16px 10px;
    }
}
