/* ================================================================
   CSS CUSTOM PROPERTIES
   ================================================================ */
 
:root {
    --background-color:           #ffffff;
    --background-color-footer:    #d5d9dd;
    --default-color:              #212529;
    --heading-color:              #39557d;
    --accent-color:               #777770;
    --hover-color:                #ffffff;
    --contrast-color:             #ffffff;

    /* Navbar */
    --nav-color:                  #212529;
    --nav-hover-color:            #777770;
    --nav-active-color:           #39557d;
    --nav-mobile-background-color: #ffffff;
    --nav-contrast-color:         #212529;

    /* Buttons */
    --bd-violet-bg:               #2D76C1;
    --bd-violet-text:             #212529;
    --bd-violet-border-color:     #2D76C1;
}

[data-bs-theme="dark"] {
    --background-color:           #212529;
    --background-color-footer:    #212529;
    --nav-background-color:       #212529;
    --default-color:              #ffffff;
    --heading-color:              #D3D3D3;
    --accent-color:               #A29850;
    --contrast-color:             #ffffff;

    --nav-color:                  #ffffff;
    --nav-hover-color:            #A29850;
    --nav-active-color:           #ffffff;
    --nav-mobile-background-color: #212529;
    --nav-contrast-color:         #ffffff;

    --bd-violet-bg:               #2D76C1;
    --bd-violet-text:             #ffffff;
    --bd-violet-border-color:     #2D76C1;
}

/* ================================================================
   GLOBAL
   ================================================================ */
body {
    overflow-x: hidden;
}

a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

label {
    font-weight: bold;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-bd-primary {
    --bs-btn-font-weight:         600;
    --bs-btn-color:               var(--bd-violet-text);
    --bs-btn-bg:                  var(--bd-violet-bg);
    --bs-btn-border-color:        var(--bd-violet-border-color);
    --bs-btn-hover-color:         var(--bd-violet-text);
    --bs-btn-hover-bg:            color-mix(in srgb, var(--bd-violet-bg) 85%, black);
    --bs-btn-hover-border-color:  var(--bd-violet-border-color);
    --bs-btn-focus-shadow-rgb:    144, 90, 80;
    --bs-btn-active-color:        var(--bd-violet-text);
    --bs-btn-active-bg:           color-mix(in srgb, var(--bd-violet-bg) 85%, black);
    --bs-btn-active-border-color: var(--bd-violet-border-color);
}

.btn-bd-primary:disabled {
    --bs-btn-bg:           #cccccc;
    --bs-btn-color:        #666666;
    --bs-btn-border-color: #cccccc;
}

.btnA {
    background-color: var(--heading-color);
    color: var(--contrast-color);
    border: none;
    border-radius: 5px;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.btnA:hover {
    background-color: var(--accent-color);
    color: var(--contrast-color);
}

/* ================================================================
   NAVBAR
   Using #mainNav ID prefix to override Bootstrap without !important
   ================================================================ */
#mainNav .navbar-nav {
    margin: 0;
    padding: 0;
}

#mainNav .navbar-nav .nav-link {
    color: var(--nav-color);
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Underline indicator for regular nav links */
#mainNav .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--nav-active-color);
    transition: width 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mainNav .navbar-nav .nav-link:hover::after,
#mainNav .navbar-nav .nav-link:focus::after,
#mainNav .navbar-nav .nav-link.active::after {
    width: 100%;
    opacity: 1;
}

/* Hide Bootstrap's generated caret on dropdown toggles */
#mainNav .navbar-nav .dropdown-toggle::after {
    display: none;
}

/* Underline indicator for dropdown toggles via ::before */
#mainNav .navbar-nav .dropdown-toggle {
    position: relative;
}

#mainNav .navbar-nav .dropdown-toggle::before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--nav-active-color);
    transition: width 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mainNav .navbar-nav .dropdown-toggle:hover::before,
#mainNav .navbar-nav .dropdown-toggle:focus::before,
#mainNav .navbar-nav .dropdown-toggle.active::before {
    width: 100%;
    opacity: 1;
}

/* ================================================================
   SITE NAME
   ================================================================ */
.site-name {
    font-family: 'Cormorant', serif;
    font-size: 1.5rem;
    color: var(--default-color);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .site-name { font-size: 1.35rem; }
}

@media (max-width: 576px) {
    .site-name { font-size: 1rem; }
}

/* ================================================================
   HERO / LAYOUT
   ================================================================ */
.text-center-div {
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

#image-column {
    height: calc(100vh - var(--navbar-height));
    min-height: 600px;
    object-position: center center;
}

.vh-mobile-50  { height: 50vh; }
.vh-desktop-100 { height: 100vh; }

@media (min-width: 992px) {
    .vh-mobile-50 { height: 100vh; }
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

#text-column {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

#animated-text {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    opacity: 0;
}

@media (max-width: 991.98px) {
    #image-column     { min-height: 400px; }
    #text-column      { min-height: 50vh; }
    .image-overlay h1 { font-size: 2rem; }
}

@media (max-width: 768px) {
    #image-column,
    #text-column    { height: 50vh; }
    .text-center-div { height: auto; padding: 20px; }
}

/* ================================================================
   EVENTS (list view)
   ================================================================ */
.event-box {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    background: #f9f9f9;
    margin: 20px 0;
}

.event-item    { margin-bottom: 15px; }

.event-title {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: var(--default-color);
}

.event-date,
.event-location { margin: 3px 0; color: #555; }

.event-desc {
    margin: 8px 0;
    color: #666;
    font-style: italic;
}

.event-passed  { color: #999; font-size: 0.9em; }

.event-divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

.no-events {
    padding: 15px;
    background: #f0f0f0;
    border-radius: 5px;
    text-align: center;
    color: #666;
}

/* ================================================================
   SITE FOOTER
   ================================================================ */
.site-footer {
    background-color: #39557d;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
}

.footer-heading {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
}

.footer-description {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.footer-quote {
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    padding-left: 0.75rem;
    margin: 1rem 0 0;
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-quote p    { margin-bottom: 0.2rem; }
.footer-quote cite { font-style: normal; font-size: 0.78rem; }

/* ── Noi icons ──────────────────────────────────────────────── */
.noi {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.noi:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.noi1 { color: #C54E51; }
.noi2 { color: #7A9082; }
.noi3 { color: #96af50; }
.noi4 { color: #396D88; }
.noi5 { color: #24B4DD; }

/* ── Footer navigation ──────────────────────────────────────── */
.footer-nav li { margin-bottom: 0.35rem; }

.footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover { color: #ffffff; }

.footer-nav-chevron {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-right: 4px;
}

/* ── Footer social ──────────────────────────────────────────── */
.footer-social li { margin-bottom: 0.6rem; }

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-social-link:hover { color: #ffffff; }

.footer-social-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ── Footer bottom bar ──────────────────────────────────────── */
.footer-bottom {
    background-color: #1e3252;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover { color: #ffffff; }

/* ================================================================
   PRELOADER
   ================================================================ */
@keyframes spin {
    to { transform: rotate(1turn); }
}

#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    z-index: 9999;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

#preloader::before {
    content: "";
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 8px solid var(--heading-color);
    border-right-color: #fae638;
    animation: spin 1s infinite linear;
}

body.form-submitting #preloader {
    z-index: 99999;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(2px);
}

body.form-submitting .navbar,
body.form-submitting .modal-backdrop,
body.form-submitting .toast-container {
    display: none;
}

button[disabled][type="submit"] {
    position: relative;
    padding-left: 2.5rem;
}

button[disabled][type="submit"]::after {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid #fff;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s infinite linear;
}

/* ================================================================
   BACK TO TOP
   ================================================================ */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 996;
    background: #e8e300;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.4s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.back-to-top i {
    font-size: 28px;
    color: var(--contrast-color);
    line-height: 0;
}

.back-to-top:hover {
    background: var(--bd-violet-bg);
    color: var(--contrast-color);
}

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

@media (max-width: 768px) {
    .back-to-top   { width: 35px; height: 35px; }
    .back-to-top i { font-size: 24px; }
}

/* ================================================================
   TYPOGRAPHY UTILITIES
   ================================================================ */
.ArsBlu { color: var(--heading-color); }

.ArsMov {
    font-weight: 400;
    font-size: 2em;
}

.ArsMov .letter {
    display: inline-block;
    line-height: 1em;
}

.Mt { margin-top: 4rem; }

@media (max-width: 992px) {
    .ArsMov { font-size: 1.2em; }
}

@media (max-width: 768px) {
    .Mt { margin-top: 3rem; }
}

@media (max-width: 576px) {
    .ArsTitlePagina h2 { margin-bottom: 0.8rem; }
    .ArsMov            { font-size: 1em; margin-top: 0.5rem; }
    .Mt                { margin-top: 2rem; }
}

/* ================================================================
   FORMS
   ================================================================ */
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: #007BFF;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 1px solid var(--default-color);
}

.form-check-label {
    font-weight: bold;
    color: var(--default-color);
    margin-left: 10px;
}

.form-check-input:checked {
    background-color: var(--default-color);
    border-color: var(--default-color);
}

.form-check-input:focus {
    box-shadow: 0 0 5px var(--default-color);
}

/* Password toggle */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container .form-control {
    flex: 1;
    padding-right: 40px;
}

.btn-toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.375rem;
    cursor: pointer;
    outline: none;
    z-index: 5;
    border-radius: 0.375rem;
    color: #6c757d;
    transition: all 0.15s ease-in-out;
}

.btn-toggle-password:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #495057;
}

.btn-toggle-password:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-toggle-password i {
    font-size: 1.2rem;
}

/* Minimal form */
.minimal-form .form-control {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: #fff;
    transition: all 0.2s ease;
}

.minimal-form .form-control:focus {
    border-color: #495057;
    box-shadow: 0 0 0 0.1rem rgba(73, 80, 87, 0.1);
    background-color: #fff;
}

.minimal-form .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.minimal-form .form-check-input:checked {
    background-color: #2f3133;
    border-color: #2f3133;
}

.minimal-form a {
    color: #6c757d;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.minimal-form a:hover {
    color: #495057;
}

.minimal-btn {
    background-color: #495057;
    border: 1px solid #495057;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.minimal-btn:hover:not(:disabled) {
    background-color: #343a40;
    border-color: #343a40;
    color: white;
}

.minimal-btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    opacity: 0.6;
}

/* Validation — only when .was-validated is present */
.minimal-form.was-validated .form-control:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.minimal-form.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v2'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.minimal-form .form-control.is-valid   { border-color: #198754; }
.minimal-form .form-control.is-invalid { border-color: #dc3545; }

.privacy-agreement {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.privacy-agreement .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ================================================================
   ADMIN MENU
   ================================================================ */
.menusx {
    background-color: var(--background-color);
    border-right: 1px solid #e0e0e0;
    height: 100vh;
    overflow-y: auto;
}

.menusx .titlemenu {
    text-align: center;
    color: #2D2E39;
    text-transform: uppercase;
    padding: 10px 0;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.menusx .titlemenu.active {
    background-color: #2D2E39;
    color: var(--contrast-color);
}

.menusx a.item {
    display: block;
    color: #4a4a4a;
    padding: 10px;
    border-left: 4px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 4px;
    border-radius: 4px;
}

.menusx a.item:hover {
    background-color: #f5f5f5;
    color: #2D2E39;
    border-left-color: #2D2E39;
}

.menusx a.item.active {
    background-color: #2D2E39;
    color: var(--contrast-color);
    border-left-color: #106eea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menusx a.item:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 110, 234, 0.2);
}

.menusx .menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 10px 15px;
}

@media (max-width: 768px) {
    .menusx              { width: 60px; overflow-x: hidden; }
    .menusx .titlemenu   { font-size: 0; padding: 15px 0; }
    .menusx .titlemenu::before { content: "≡"; font-size: 1.2rem; }
    .menusx a.item       { text-align: center; padding: 12px 5px; margin: 0 5px; }
    .menusx a.item span  { display: none; }
    .menusx a.item i     { display: block; margin: 0 auto 5px; font-size: 1.2rem; }
}

/* ================================================================
   AUTOCOMPLETE
   ================================================================ */
#autocomplete-list {
    border: 1px solid #ccc;
    background-color: var(--background-color);
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#autocomplete-list li          { padding: 8px; cursor: pointer; }
#autocomplete-list li:hover    { background-color: #f0f0f0; }

/* ================================================================
   NOI CARDS (chi siamo)
   ================================================================ */
.noiCard {
    height: 350px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeInCard 0.5s ease-out backwards;
}

@media (max-width: 1024px) { .noiCard { height: 510px; } }
@media (max-width: 768px)  { .noiCard { height: 460px; } }

.noi1Card { background-color: #D96C6E; }
.noi2Card { background-color: #98B2A8; }
.noi3Card { background-color: #96af50; }
.noi4Card { background-color: #3F7A99; }
.noi5Card { background-color: #3DBFE6; }

.noiCard::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.noiCard .card-body {
    position: relative;
    z-index: 2;
}

.noiCard h2 {
    font-size: 1.5rem;
    color: var(--default-color);
    transition: color 0.3s ease;
}

.card-text {
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Hover lift */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.hover-lift:hover::before { opacity: 1; }
.hover-lift:hover h2      { color: #fff; }

/* Icon circle — two distinct sizes by context */
.noiCard .icon-circle {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /*background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));*/
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card .icon-circle {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
}

.icon-circle svg {
    transition: transform 0.3s ease;
}

.hover-lift:hover .icon-circle {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.hover-lift:hover .icon-circle svg {
    transform: rotate(5deg);
}

@media (max-width: 768px) {
    .noiCard .icon-circle      { width: 100px; height: 100px; }
    .noiCard .icon-circle svg  { width: 56px; height: 56px; }
    .noiCard h2                { font-size: 1.25rem; }
}

/* Staggered card entry */
.col-12:nth-child(2) .noiCard { animation-delay: 0.1s; }
.col-12:nth-child(3) .noiCard { animation-delay: 0.2s; }
.col-12:nth-child(4) .noiCard { animation-delay: 0.3s; }
.col-12:nth-child(5) .noiCard { animation-delay: 0.4s; }
.col-12:nth-child(6) .noiCard { animation-delay: 0.5s; }

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   BOX (generic event/content card)
   ================================================================ */
.box {
    transition: 0.5s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.box img                        { max-height: 200px; border-radius: 5px; }
.box .d-flex > div:first-child img { display: block; max-width: 100%; }

.box h4 {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 22px;
    color: var(--heading-color);
    text-align: center;
}

.box .titolo  { text-align: center; font-size: 26px; font-weight: 600; }
.box .luogo   { font-size: 16px; margin: 0 auto; }

.box span.subtitle {
    font-size: 18px;
    font-weight: 500;
    padding-bottom: 5px;
    color: var(--accent-color);
}

.box .mt-3 { padding-top: 15px; }

/* ================================================================
   COUNT BOX / STATS
   ================================================================ */
.count-box {
    padding: 30px 30px 25px;
    width: 100%;
    position: relative;
    text-align: center;
    background: #F9F6F1;
}

.count-box i {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    background: var(--heading-color);
    color: var(--background-color);
    width: 56px;
    height: 56px;
    line-height: 1;
    border-radius: 50px;
    border: 5px solid var(--background-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.counts .count-box span {
    font-size: 36px;
    display: block;
    font-weight: 600;
    color: var(--heading-color);
}

.counts .count-box p {
    padding: 0;
    margin: 0;
    color: var(--default-color);
}

.stats-card {
    background: var(--background-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.avatar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--background-color);
}

/* ================================================================
   BREADCRUMB
   ================================================================ */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: #0d6efd;
    transform: translateY(-1px);
}

.breadcrumb-item.active                    { color: #495057; font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { color: #6c757d; opacity: 0.6; }

@media (max-width: 768px) {
    .breadcrumb { padding: 0.5rem 0.75rem; font-size: 0.8rem; }
}

/* ================================================================
   YEAR NAVIGATION
   ================================================================ */
.year-navigation {
    font-family: Arial, sans-serif;
    font-size: 16px;
    margin: 10px 0;
}

.year-navigation a,
.year-navigation span { padding: 5px 10px; margin: 0 2px; text-decoration: none; }

.year-navigation a       { color: #0066cc; border-radius: 3px; }
.year-navigation a:hover { background-color: #f0f0f0; }

.current-year {
    color: var(--default-color);
    font-weight: bold;
    background-color: #e0e0e0;
    border-radius: 3px;
}

.year-navigation-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.year-link-simple {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.year-link-simple:hover {
    color: #2c6aa1;
    background-color: rgba(44, 106, 161, 0.1);
    transform: translateY(-2px);
}

.year-link-simple.active {
    color: var(--contrast-color);
    background: linear-gradient(135deg, #2c6aa1, #1a4d7a);
    font-weight: 700;
    cursor: default;
    box-shadow: 0 4px 12px rgba(44, 106, 161, 0.3);
}

.year-link-simple.active:hover { transform: none; }

.year-navigation-simple .separator {
    color: #adb5bd;
    font-weight: 300;
    padding: 0 0.5rem;
    user-select: none;
}

@media (max-width: 768px) {
    .year-navigation-simple { padding: 0.5rem 1rem; border-radius: 35px; }
    .year-link-simple        { font-size: 1.1rem; padding: 0.4rem 1rem; }
}

/* ================================================================
   EVENT CARDS (calendario)
   ================================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.evento-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.evento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.evento-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    cursor: pointer;
}

.evento-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.evento-card:hover .evento-image-wrapper img { transform: scale(1.1); }

.evento-image-wrapper::after {
    content: '\F573';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.evento-card:hover .evento-image-wrapper::after { opacity: 1; }

.evento-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #2c6aa1, #1a4d7a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-data {
    background: linear-gradient(135deg, #2c6aa1, #1a4d7a);
    color: white;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
}

.card-body-evento { padding: 1.5rem; }

.evento-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--default-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.evento-subtitle {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 1rem;
}

.badge-sezione-wrapper {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.evento-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.evento-info i      { color: #2c6aa1; width: 20px; }

.evento-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    margin-top: 1rem;
}

.btn-scopri {
    background: linear-gradient(135deg, #2c6aa1, #1a4d7a);
    border: none;
    color: white;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-scopri:hover {
    background: linear-gradient(135deg, #1a4d7a, #2c6aa1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 106, 161, 0.4);
    color: white;
}

@media (max-width: 768px) {
    .evento-image-wrapper,
    .evento-placeholder { height: 180px; }
    .evento-title       { font-size: 1.1rem; }
    .card-body-evento   { padding: 1rem; }
}

/* ================================================================
   LOGO SECTION
   ================================================================ */
.logo-section {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    color: white;
    min-height: 400px;
}

#curved-lines-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.logo-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.logo-content .icon { font-size: 4rem; margin-bottom: 20px; }

.logo-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    background: linear-gradient(to right, var(--heading-color), #fce72c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ================================================================
   SECTION COMPONENTS
   ================================================================ */
.section-title {
    color: var(--heading-color);
    border-left: 4px solid var(--heading-color);
    padding-left: 1rem;
    margin-bottom: 2rem;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--heading-color);
    opacity: 0.3;
}

.header-section {
    background: linear-gradient(135deg, var(--heading-color), #1e3a8a);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.year-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.alert-dismissible { text-align: center; }

/* ================================================================
   ARTISTIC CONTAINER
   ================================================================ */
.artistic-container {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

#artistic-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.content           { position: relative; z-index: 10; }

.associazione-title {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    animation: fadeInUp 1s ease-out;
}

.subtitle { color: rgba(255, 255, 255, 0.9); font-size: 1rem; margin-top: 10px; }

.stats {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    color: white;
}

.stat-item   { margin: 15px 0; }
.stat-number { font-size: 2rem; font-weight: bold; display: block; }
.stat-label  { font-size: 0.9rem; opacity: 0.9; }

/* ================================================================
   NEWSLETTER FORM
   ================================================================ */
.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.newsletter-form .form-check-input:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

@media (max-width: 991.98px) {
    .content-wrapper { padding: 3rem 2rem; }
    .newsletter-form .col-md-7,
    .newsletter-form .col-md-auto { width: 100%; }
    .newsletter-form .btnA        { width: 100%; }
}

/* ================================================================
   HERO HEADER
   ================================================================ */
.hero-header {
    animation: fadeInUp 0.6s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .hero-header              { min-height: 60px; padding: 1.5rem; }
    .hero-header h1           { font-size: 1.75rem; }
    .hero-header .lead        { font-size: 1rem; }
}

/* ================================================================
   MISC
   ================================================================ */
.bg-secondary:hover { color: var(--default-color); }

.Ars-header {
    background-color: #96af50;
    color: var(--default-color);
}

.captcha-container {
    background: #f8f9fa;
    border: 2px dashed var(--heading-color);
}

.minimal-card {
    background: var(--background-color);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.minimal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 90vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 100%);
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: clamp(1.9rem, 5vw, 3.4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: .02em;
}
.hero-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px);
    animation: heroLetterIn .48s ease forwards;
    white-space: pre;
}
@keyframes heroLetterIn {
    to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
    color: rgba(255,255,255,.86);
    font-size: 1.15rem;
    animation: fadeInUpHero .8s ease 1.6s both;
}
.hero-actions {
    animation: fadeInUpHero .8s ease 1.85s both;
}
@keyframes fadeInUpHero {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Stats strip ──────────────────────────────────────────────────────── */
.stats-strip {
    background: var(--heading-color, #39557d);
    color: #fff;
    padding: 2.6rem 0;
}
.stats-strip .stat-number {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
}
.stats-strip .stat-label {
    font-size: .82rem;
    opacity: .78;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-top: .3rem;
}
.stats-strip .stat-divider {
    width: 1px;
    min-height: 60px;
    background: rgba(255,255,255,.22);
    align-self: stretch;
}

.footer-partner-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}


.footer-partner-logo {
    height: 40px;
    width: auto;
 
}
.footer-partner-logo:hover { opacity: 1; }

/* ================================================================
   ADMIN OFF-CANVAS
   ================================================================ */

/* Top navbar */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 56px;
    background-color: #2D2E39;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 1.4rem;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.admin-toggler:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.admin-brand {
    color: #fff;
}

.admin-brand:hover {
    color: rgba(255,255,255,0.85);
}

.admin-brand img {
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.admin-brand-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.admin-username {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.admin-logout {
    border: 1px solid rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
    background: transparent;
}

.admin-logout:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

/* Off-canvas panel */
.admin-offcanvas {
    width: 280px;
    border-right: none;
    box-shadow: 4px 0 20px rgba(0,0,0,0.12);
}

.admin-offcanvas-header {
    background-color: #2D2E39;
    padding: 0.9rem 1rem;
    border-bottom: none;
}

.admin-offcanvas-header .offcanvas-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.admin-offcanvas-header img {
    filter: brightness(0) invert(1);
}

/* Sidebar nav */
.admin-nav-title {
    padding: 0.5rem 1rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
}

.admin-nav-divider {
    margin: 0.35rem 1rem;
    border-color: #e5e7eb;
    opacity: 1;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.52rem 1rem;
    margin: 1px 0.5rem;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-left-color 0.15s ease;
}

.admin-nav-item:hover {
    background-color: #f0f2f5;
    color: #2D2E39;
    border-left-color: #2D2E39;
}

.admin-nav-item.active {
    background-color: #2D2E39;
    color: #fff;
    border-left-color: #106eea;
    box-shadow: 0 2px 6px rgba(45,46,57,0.18);
}

.admin-nav-icon {
    font-size: 1rem;
    flex-shrink: 0;
    color: #6b7280;
    transition: color 0.15s ease;
}

.admin-nav-item:hover .admin-nav-icon  { color: #2D2E39; }
.admin-nav-item.active .admin-nav-icon { color: #fff; }

/* Dropdown */
.admin-nav-dropdown { cursor: pointer; }

.admin-nav-arrow {
    margin-left: auto;
    font-size: 0.72rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.admin-nav-dropdown[aria-expanded="true"] .admin-nav-arrow {
    transform: rotate(180deg);
}

.admin-nav-submenu { margin: 0 0.5rem; }

.admin-nav-subitem {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.44rem 1rem 0.44rem 2rem;
    border-radius: 6px;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    margin: 1px 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-nav-subitem:hover {
    background-color: #f0f2f5;
    color: #2D2E39;
}

.admin-nav-subitem.active {
    background-color: #eef2fb;
    color: #106eea;
    font-weight: 600;
}

.admin-nav-subitem .admin-nav-icon { font-size: 0.875rem; }

/* Badge numerico */
.admin-nav-badge {
    margin-left: auto;
    background-color: #dc3545;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.1em 0.48em;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.5;
}

.admin-nav-item.active .admin-nav-badge {
    background-color: #fff;
    color: #dc3545;
}
.tesseramento-card {
    border-radius: 1rem;
    overflow: hidden;
    border: none;
}
.tesseramento-card .card-header {
    background: #39557d;
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.choice-card {
    border: 2px solid #e2e8f0;
    border-radius: .875rem;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    background: #fff;
    height: 100%;
}
.choice-card:hover {
    border-color: #39557d;
    box-shadow: 0 8px 24px rgba(57,85,125,.15);
    transform: translateY(-4px);
    color: inherit;
}
.choice-card .choice-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}
.choice-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #39557d;
    margin-bottom: .5rem;
}
.choice-card p {
    font-size: .9rem;
    color: #6c757d;
    margin-bottom: 0;
}
.benefit-card {
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    padding: 1.25rem;
    height: 100%;
}
.tipo-card {
    border: 2px solid #e2e8f0;
    border-radius: .875rem;
    padding: 1.5rem 1.25rem;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background .2s;
    display: block;
    height: 100%;
    user-select: none;
}
.tipo-card:hover {
    border-color: #39557d;
    box-shadow: 0 4px 16px rgba(57,85,125,.12);
}
.tipo-card.selected {
    border-color: #39557d;
    background: #eef3fa;
}
.tipo-card .tipo-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .75rem;
    font-size: 1.5rem;
}
.tipo-card .tipo-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #39557d;
    line-height: 1.1;
}
.tipo-card .tipo-label {
    font-size: .95rem;
    font-weight: 600;
    color: #2d3748;
}
.tipo-card .tipo-desc {
    font-size: .82rem;
    color: #6c757d;
    margin-top: .35rem;
    margin-bottom: 0;
}
.tipo-card.is-invalid-card {
    border-color: #dc3545;
}