/* STILI GENERALI */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* PULSANTE TORNA SU (Back to Top) */
#backToTopBtn {
    display: none; 
    position: fixed;
    bottom: 20px;
    right: 20px; 
    z-index: 99999;
    border: none;
    outline: none;
    background-color: #bc181d; 
    color: white;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#backToTopBtn:hover {
    background-color: #444;
    transform: translateY(-3px);
}

/* --- MENU LATERALE FLUTTUANTE --- */
#toggleMenuBtn {
    position: fixed; top: 50%; right: 0; transform: translateY(-50%);
    z-index: 9999; background-color: #ffffff; color: #bc181d;
    border: 2px solid #bc181d; border-right: none;
    border-radius: 5px 0 0 5px; padding: 12px 15px;
    box-shadow: -2px 2px 10px rgba(0,0,0,0.15); cursor: pointer;
    transition: all 0.3s ease;
}
#toggleMenuBtn:hover { background-color: #f8f8f8; padding-right: 20px; }

.custom-floating-menu {
    position: fixed; top: 50%; right: 60px; transform: translateY(-50%) translateX(20px);
    z-index: 9998; background-color: #ffffff; border: 1px solid #ddd;
    border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 240px; padding: 15px 0; opacity: 0; visibility: hidden;
    transition: all 0.3s ease-in-out;
}
.custom-floating-menu.active { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.custom-floating-menu a {
    display: block; padding: 10px 20px; color: #333; text-decoration: none;
    font-weight: 600; font-size: 0.95rem; border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s, color 0.2s; text-transform: uppercase;
}
.custom-floating-menu a:last-child { border-bottom: none; }
.custom-floating-menu a:hover { background-color: #f9f9f9; color: #bc181d; padding-left: 25px; }

/* NAVBAR */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.navbar-brand img {
    height: 60px;
    width: auto;
}

.btn-back-site {
    border: 1px solid #bc181d;
    color: #bc181d;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.btn-back-site:hover {
    background-color: #bc181d;
    color: #fff;
}

/* MAIN LOGIN WRAPPER */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 20px 20px;
}

.login-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-brand-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 20px;
}

.sectionTitle {
    font-family: 'Caveat', cursive;
    font-weight: 500;
    color: #bc181d;
    font-size: 2.2rem;
    margin-bottom: 30px;
    line-height: 1.2;
}

/* Override Bootstrap Floating Labels */
.form-floating > .form-control:focus ~ label {
    color: #bc181d;
}
.form-floating > .form-control:focus {
    border-color: #bc181d;
    box-shadow: 0 0 0 0.25rem rgba(188, 24, 29, 0.25);
}

/* BUTTONS */
.pribttn {
    background-color: #bc181d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background 0.3s;
}

.pribttn:hover {
    background-color: #444;
}

.ctaBoxFoot {
    margin-top: 20px;
}

.ctaBoxFoot a {
    display: inline-block;
    margin-top: 10px;
    color: #555;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.ctaBoxFoot a:hover {
    color: #bc181d;
}

/* --- STILI BOX CONTATTI --- */
.contacts-wrapper {
    background-color: #fff;
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.btn-custom {
    background-color: #bc181d;
    color: #ffffff !important;
    border: none;
    transition: background-color 0.3s ease;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    display: inline-block;
}
.btn-custom:hover { background-color: #444444; color: #ffffff !important; }

.btn-lg-custom {
    padding: 12px 30px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-map {
    background-color: #ffffff;
    color: #bc181d !important;
    border: 2px solid #bc181d;
    font-weight: 600;
}
.btn-map:hover { background-color: #bc181d; color: #fff !important; }

.mid-contacts-box {
    margin-top: 30px; padding-top: 30px; border-top: 1px solid #eee;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    max-width: 700px; margin-left: auto; margin-right: auto;
}

.mid-contacts-text { font-weight: 600; font-size: 1.1rem; color: #555; margin-bottom: 0px !important; }

.opening-hours-box {
    background-color: #f9f9f9; padding: 20px; border-radius: 8px; border: 1px solid #eee;
    margin: 15px 0; width: 100%; text-align: left;
}
.hours-main { text-align: center; margin-bottom: 15px; font-size: 1.05rem; }
.emergency-title { font-weight: 700; color: #bc181d; margin-bottom: 10px; font-size: 0.95rem; }
.emergency-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: #555; }
.emergency-list li { margin-bottom: 8px; display: flex; align-items: flex-start; }
.emergency-list li i { color: #bc181d; margin-right: 10px; margin-top: 5px; width: 20px; text-align: center; }

/* --- STILI BOX PAGAMENTI (Card Boxata) --- */
.client-area-section { background-color: #f4f4f4; padding: 60px 20px; text-align: center; border-top: 1px solid #ddd; }
.client-area-section h3 { font-family: 'Caveat', cursive; color:#bc181d; font-size: 2.8rem; margin-bottom: 15px; }
.client-area-section p { font-size: 1.1rem; margin-bottom: 25px; color: #444; }

.client-card-box {
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}
.client-card-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- STILI CERTIFICAZIONI E FOOTER --- */
.partners-section {
    background-color: #ffffff;
    padding: 60px 20px;
    border-top: 1px solid #eee;
}

.section-title {
    font-family: 'Caveat', cursive;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 500;
    color: #bc181d; 
    font-size: 2.8rem;
}

.partner-box {
    text-align: center;
    padding: 20px;
    height: 100%;
}

.partner-logo-wrapper {
    height: 130px; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    margin-bottom: 20px;
}

.partner-logo-img {
    max-width: 240px; 
    height: auto;
    max-height: 100%; 
    object-fit: contain;
}

.microsoft-logo-text {
    font-family: "Segoe UI", Segoe, Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400; 
    font-size: 1.8rem; 
    color: #5e5e5e; 
    line-height: 1;
}

.partner-description { font-size: 0.95rem; color: #555; line-height: 1.5; }

/* FOOTER */
footer {
    background-color: #fff; 
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 24px;
    text-align: center;
}

.footer-details {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 700px;
}

.footer-details .logo {
    width: 160px;
    height: auto;
    flex-shrink: 0;
}

.contact-info {
    text-align: left;
    color: #555;
    font-size: 0.8em;
    line-height: 1.5;
    flex-grow: 1;
    min-width: 280px;
    max-width: 400px;
}

.contact-info p {
    margin: 3px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: flex-start;
}

.contact-info a {
    color: #bc181d; 
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #444444;
    text-decoration: underline;
}

.contact-info i {
    margin-right: 5px;
    flex-shrink: 0;
    font-size: 1.1em;
    color: #555; 
}

/* Media query Footer */
@media (max-width: 600px) {
    .footer-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .contact-info {
        text-align: center;
    }
    .contact-info p {
        justify-content: center;
    }
}

/* Iubenda */

#iubenda-cs-banner.iubenda-cs-overlay {
  visibility: visible;
  opacity: 1;
  backdrop-filter: blur(10px);
}

body #iubenda-iframe, .offcanvas-overlay {
  transition: 0.4s;
  backdrop-filter: blur(10px);
  background-color: rgba(0, 0, 0, .4) !important;
}

#iub-legalDoc p, #iub-legalDoc {font-size: 1rem !important;}