﻿        :root {
            --primary-color: #003B46;
            --secondary-color: #07575B;
            --accent-color: #66A5AD;
            --danger-color: #c94c4c;
            --success-color: #4caf50;
            --warning-color: #f0ad4e;
            --light-color: #FFFFFF;
            --dark-text: #333333;
            --light-text: #f4f4f4;
            --font-family: 'Montserrat', sans-serif;
            --star-color: #ffd700;
        }

        /* Stili per la notifica fluttuante */
        #floating-notification {
            visibility: hidden;
            min-width: 250px;
            max-width: 90%;
            color: #fff;
            text-align: center;
            border-radius: 5px;
            padding: 16px;
            position: fixed;
            z-index: 2000;
            /* Assicura che sia sopra a tutto */
            left: 50%;
            transform: translateX(-50%);
            bottom: 30px;
            font-size: 1rem;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transition: opacity 0.5s, bottom 0.5s;
        }

        #floating-notification.show {
            visibility: visible;
            opacity: 1;
            bottom: 50px;
        }

        #floating-notification.success {
            background-color: var(--success-color);
        }

        #floating-notification.error {
            background-color: var(--danger-color);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            overflow-x: hidden;
            scroll-behavior: smooth;
        }

        body {
            font-family: var(--font-family);
            background-color: var(--light-color);
            color: var(--dark-text);
        }

        body.modal-open,
        html.modal-open {
            overflow: hidden;
        }

        .page-container {
            display: flex;
            min-height: 100vh;
            transition: margin-left .3s;
        }

        h1,
        h2,
        h3,
        h4 {
            color: var(--primary-color);
            font-weight: 700;
            margin-bottom: 1rem;
        }

        p {
            line-height: 1.6;
            margin-bottom: 1rem;
        }

        a {
            color: var(--secondary-color);
            text-decoration: none;
        }

        .contacts-cta a,
        .site-footer a,
        #contatti-page a,
        .contact-cta-item a {
            transition: color 0.2s;
        }

        .contacts-cta a:hover,
        .site-footer a:not(.social-icons a):hover,
        #contatti-page a:hover,
        .contact-cta-item a:hover {
            color: #CCCCCC;
            /* Grigio chiaro */
            text-decoration: underline;
        }

        button {
            font-family: var(--font-family);
        }

        .page {
            display: none;
            padding: 40px;
            animation: fadeIn 0.5s;
        }

        .page.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .sidebar {
            height: 100vh;
            width: 250px;
            position: fixed;
            top: 0;
            left: 0;
            background-color: var(--primary-color);
            color: var(--light-text);
            padding-top: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 100;
        }

        .sidebar-header {
            text-align: center;
            margin-bottom: 15px;
            padding: 0 10px;
            flex-shrink: 0;
        }

        /* --- Logica per mostrare/nascondere i loghi --- */

        /* Su schermi grandi (desktop), per impostazione predefinita: */
        /* --- Stili per il logo della sidebar (Replica del branch MAIN) --- */

        /* Nascondi il logo mobile per impostazione predefinita (Desktop) */
        .logo-mobile {
            display: none;
        }

        /* Applica lo stile grande del MAIN al logo desktop */
        .logo-desktop {
            display: block;
            /* Assicurati che sia visibile */
            width: 350px;
            /* RIDOTTO: 350px è troppo largo per una sidebar da 250px. Partiamo da 200px. */
            height: auto;
            margin: 0 auto 10px;
            /* Centra e aggiunge spazio sotto */
        }

        /* Su schermi piccoli (mobile), inverti la visibilità e applica lo stile piccolo del MAIN */
        @media (max-width: 992px) {
            .logo-desktop {
                display: none;
                /* Nascondi il logo desktop */
            }

            .logo-mobile {
                display: block;
                /* Mostra il logo mobile */
                width: 50px;
                height: auto;
                margin-bottom: 0;
                margin-right: 15px;
            }
        }

        .sidebar-header .sidebar-title-group {
            display: none;
        }

        .sidebar-header h2 {
            color: var(--light-color);
        }

        .sidebar-header p {
            font-size: 0.9em;
            color: var(--accent-color);
        }

        .sidebar ul {
            list-style-type: none;
            width: 100%;
            padding-top: 15px;
            overflow-y: auto;
            flex-grow: 1;
        }

        .sidebar ul li a {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            padding: 15px 25px;
            color: var(--light-text);
            transition: background-color 0.3s, padding-left 0.3s;
            cursor: pointer;
            position: relative;
        }

        .sidebar ul li a .fas {
            margin-right: 15px;
            width: 20px;
            text-align: center;
        }

        .sidebar ul li a:hover,
        .sidebar ul li a.active {
            background-color: var(--secondary-color);
            padding-left: 35px;
        }

        .content {
            margin-left: 250px;
            width: calc(100% - 250px);
            display: flex;
            flex-direction: column;
        }

        .main-content {
            flex-grow: 1;
        }

        section {
            margin-bottom: 50px;
            padding: 20px;
            border-radius: 8px;
            background: #fdfdfd;
        }

        .highlight {
            font-weight: 600;
            color: var(--secondary-color);
        }

        .announcements-cta {
            margin-top: 2rem;
            padding: 1.5rem;
            background-color: #f0f8ff;
            border-left: 5px solid var(--accent-color);
            border-radius: 5px;
        }

        .announcement-cta-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 0.8rem;
            font-size: 1rem;
        }

        .announcement-cta-item:last-child {
            margin-bottom: 0;
        }

        .announcement-cta-item .announcement-cta-info {
            flex-grow: 1;
        }

        .announcement-cta-item .announcement-cta-info h4 {
            margin-bottom: 0.2rem;
            color: var(--primary-color);
            display: flex;
            align-items: center;
        }

        .announcement-cta-item .announcement-cta-info p {
            margin-bottom: 0;
            font-size: 0.9em;
        }

        .announcement-cta-item .admin-controls {
            background: none;
            gap: 10px;
            position: relative;
            top: unset;
            right: unset;
            padding: 0;
        }

        .announcement-cta-item .drag-handle {
            padding: 8px;
            background-color: rgba(0, 59, 70, 0.1);
            position: relative;
            top: unset;
            left: unset;
            transform: none;
        }

        .announcement-cta-item .admin-controls .admin-btn {
            color: var(--dark-text);
        }

        .home-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            margin-top: -120px;
            margin-bottom: 10px;
        }

        .home-header-logo-group {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
        }

        .home-header img {
            width: 500px;
            height: auto;
        }

        .home-header .title-group {
            text-align: left;
        }

        .home-header h1,
        .home-header h2 {
            margin-bottom: 0;
            color: var(--primary-color);
        }

        .home-header h1 {
            font-size: 2em;
        }

        .home-header h2 {
            font-size: 1.2em;
            font-weight: 400;
            color: var(--secondary-color);
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
        }

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            height: 250px;
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .gallery-item:hover:not(body.admin-mode) img {
            transform: scale(1.05);
        }

        body.admin-mode .gallery-item {
            cursor: default;
        }

        .lightbox,
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.8);
            animation: fadeIn 0.3s;
        }

        .modal-content-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100%;
            padding: 20px;
        }

        .lightbox-content,
        .modal-content {
            margin: auto;
            display: block;
            position: relative;
            background-color: #fefefe;
            padding: 20px;
            border: 1px solid #888;
            width: 80%;
            max-width: 700px;
            border-radius: 8px;
        }

        .lightbox-content {
            width: auto;
            max-width: 80vw;
            max-height: 80vh;
            padding: 0;
            background: none;
            border: none;
        }

        .lightbox-nav {
            cursor: pointer;
            position: absolute;
            top: 50%;
            width: auto;
            padding: 16px;
            margin-top: -50px;
            color: white;
            font-weight: bold;
            font-size: 2em;
            transition: 0.6s ease;
            border-radius: 0 3px 3px 0;
            user-select: none;
            -webkit-user-select: none;
            background-color: rgba(0, 0, 0, 0.3);
        }

        .lightbox-nav.next {
            right: 0;
            border-radius: 3px 0 0 3px;
        }

        .lightbox-nav.prev {
            left: 0;
        }

        .lightbox-nav:hover {
            background-color: rgba(0, 0, 0, 0.8);
        }

        .lightbox-caption-container {
            text-align: center;
            margin-top: 15px;
            width: 100%;
        }

        #lightbox-caption {
            color: var(--light-color);
            font-size: 1.2em;
            padding: 10px 20px;
            background-color: rgba(0, 0, 0, 0.5);
            border-radius: 5px;
            display: inline-block;
        }

        .close-btn {
            position: absolute;
            top: -15px;
            right: -15px;
            width: 35px;
            height: 35px;
            background-color: var(--danger-color);
            color: white;
            font-size: 20px;
            font-weight: bold;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1001;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
            transition: transform 0.2s, background-color 0.2s;
        }

        .close-btn:hover {
            transform: scale(1.1);
            background-color: #a93c3c;
        }

        .close-lightbox {
            color: white;
        }

        #team-cards-container {
            display: flex;
            gap: 30px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 2rem;
        }

        .card {
            position: relative;
            width: 300px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .card img {
            width: 100%;
            display: block;
        }

        .card-overlay {
            position: absolute;
            bottom: 10px;
            right: 10px;
            left: 10px;
            background-color: rgba(255, 255, 255, 0.9);
            padding: 10px 15px;
            border-radius: 5px;
            text-align: right;
        }

        .card-overlay h3 {
            margin-bottom: 0.2rem;
        }

        .card-overlay p {
            margin-bottom: 0;
            font-size: 0.9em;
            white-space: normal;
        }

        .dynamic-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        /* FIX: Aggiunto stile per il wrapper di Instagram */
        .instagram-post-wrapper {
            width: 100%;
            min-height: 100px;
            /* Evita collapse se vuoto */
            display: flex;
            /* Centra il contenuto */
            justify-content: center;
            margin-bottom: 20px;
            position: relative;
        }

        /* Debug border (opzionale, rimuovere in produzione se da fastidio, ma utile ora) */
        .instagram-post-wrapper.debug-border {
            border: 2px dashed red;
        }

        .dynamic-card {
            position: relative;
            background: var(--light-color);
            border: 1px solid #eee;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            /* Added to clip the closed banner */
        }

        .dynamic-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .dynamic-card-content {
            padding: 15px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            /* RIGA AGGIUNTA */
        }

        .dynamic-card-content button.view-event-btn {
            margin-top: auto;
            padding: 8px 15px;
            background-color: var(--secondary-color);
            color: var(--light-color);
            border: none;
            border-radius: 5px;
            cursor: pointer;
            align-self: flex-start;
        }

        .dynamic-card.event-closed>*:not(.closed-banner) {
            filter: grayscale(100%);
        }

        .dynamic-card.event-closed {
            position: relative;
        }

        .closed-banner {
            position: absolute;
            width: 250px;
            top: 40px;
            left: -70px;
            text-align: center;
            background-color: var(--danger-color);
            color: white;
            padding: 8px 10px;
            transform: rotate(-45deg);
            font-weight: bold;
            font-size: 0.9em;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
            z-index: 5;
            text-transform: uppercase;
        }

        #modal-event-image {
            width: 100%;
            height: 250px;
            object-fit: cover;
            border-radius: 8px;
            margin-bottom: 15px;
        }

        #event-map-container {
            width: 100%;
            height: 300px;
            margin: 15px 0;
            border-radius: 8px;
            overflow: hidden;
        }

        #event-map {
            width: 100%;
            height: 100%;
            border: none;
        }

        #navigate-btn {
            display: inline-block;
            padding: 10px 20px;
            background-color: var(--success-color);
            color: white;
            border-radius: 5px;
            text-align: center;
            margin-top: 10px;
            text-decoration: none;
        }

        #navigate-btn i {
            margin-right: 8px;
        }

        #event-closed-notice {
            text-align: center;
            padding: 20px;
            background-color: #fff0f0;
            border: 1px solid var(--danger-color);
            color: var(--danger-color);
            border-radius: 5px;
            font-weight: bold;
        }

        .form-container {
            max-width: 700px;
        }

        .form-container input,
        .form-container textarea:not(.ql-container),
        .form-container select {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 5px;
            font-family: var(--font-family);
            font-size: 1rem;
        }

        .form-container label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            font-size: 0.9em;
        }

        .form-container button {
            padding: 12px 25px;
            background-color: var(--primary-color);
            color: var(--light-color);
            border: none;
            cursor: pointer;
            border-radius: 5px;
            transition: background-color: 0.3s;
        }

        .form-container button:hover {
            background-color: var(--secondary-color);
        }

        .quill-editor-container {
            margin-bottom: 15px;
        }

        .ql-toolbar.ql-snow {
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            border: 1px solid #ccc;
            border-bottom: none;
        }

        .ql-container.ql-snow {
            border-bottom-left-radius: 5px;
            border-bottom-right-radius: 5px;
            border: 1px solid #ccc;
            min-height: 250px;
            font-family: var(--font-family);
        }

        .ql-editor p {
            margin-bottom: 0.5rem;
        }

        .image-upload-choice {
            margin-bottom: 15px;
        }

        .image-upload-choice label {
            margin-right: 15px;
            font-weight: normal;
        }

        #contatti-page .contact-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        #contatti-page .contact-photo {
            width: 100%;
            max-width: 400px;
            height: auto;
            border-radius: 8px;
            margin-bottom: 30px;
        }

        #contatti-page .contact-details p {
            margin-bottom: 0.8rem;
            font-size: 1.1em;
        }

        #contatti-page .contact-details a {
            text-decoration: none;
        }

        .star-rating-display .fa-star {
            color: var(--star-color);
        }

        #approved-reviews-section {
            margin-top: 40px;
        }

        #reviews-slider-wrapper {
            position: relative;
            padding: 0 50px;
        }

        #reviews-display-container {
            display: flex;
            gap: 25px;
            overflow-x: auto;
            scroll-behavior: smooth;
            padding: 10px;
            align-items: flex-start;
            scrollbar-width: none;
            -ms-overflow-style: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        #reviews-display-container::-webkit-scrollbar {
            display: none;
        }

        .slider-nav {
            position: absolute;
            top: 45px;
            transform: translateY(0);
            background: rgba(0, 59, 70, 0.5);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 1.2em;
            cursor: pointer;
            z-index: 10;
            transition: background-color 0.2s, opacity 0.2s;
        }

        .slider-nav#prev-review-btn {
            left: 0;
        }

        .slider-nav#next-review-btn {
            right: 0;
        }

        .slider-nav:hover {
            background: var(--primary-color);
        }

        .slider-nav:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            background: #ccc;
        }

        #pending-reviews-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 25px;
        }

        .review-card {
            background: #ffffff;
            border: 1px solid #e9e9e9;
            border-radius: 10px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            display: flex;
            flex-direction: column;
            transition: transform 0.2s, box-shadow 0.2s;
            position: relative;
            flex: 0 0 320px;
            width: 320px;
        }

        .review-card:hover:not(body.admin-mode) {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        }

        .review-card .review-quote-icon {
            font-size: 2em;
            color: var(--accent-color);
            margin-bottom: 10px;
        }

        .review-card p.review-text {
            font-style: italic;
            color: #555;
            flex-grow: 1;
            margin-bottom: 15px;
            white-space: pre-wrap;
        }

        .review-card .review-footer {
            text-align: right;
        }

        .review-card .author {
            font-weight: 700;
            font-style: normal;
            color: var(--primary-color);
            margin-bottom: 5px;
        }

        .review-item {
            background-color: #fffbe6;
            border: 1px solid #eee;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 0;
            position: relative;
        }

        .review-item .author {
            font-weight: bold;
            font-style: normal;
            color: var(--primary-color);
        }

        .review-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .star-rating-input {
            display: flex;
            flex-direction: row-reverse;
            justify-content: flex-end;
            margin-bottom: 20px;
        }

        .star-rating-input input[type="radio"] {
            display: none;
        }

        .star-rating-input label {
            font-size: 2.5rem;
            color: #ddd;
            cursor: pointer;
            transition: color 0.2s;
            font-weight: normal;
            margin-bottom: 0;
        }

        .star-rating-input input[type="radio"]:checked~label,
        .star-rating-input label:hover,
        .star-rating-input label:hover~label {
            color: var(--star-color);
        }

        #review-form button[type="submit"] {
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 5px;
            /* Angoli arrotondati, non più un cerchio */
            width: auto;
            /* Larghezza automatica basata sul testo */
            height: auto;
            /* Altezza automatica */
            font-size: 1rem;
            /* Dimensione del font standard */
            font-weight: 600;
            /* Testo in grassetto */
            cursor: pointer;
            display: inline-block;
            /* Comportamento standard per un pulsante */
            transition: background-color 0.3s ease;
            padding: 12px 25px;
            /* Spaziatura interna per renderlo più grande */
            margin-top: 10px;
            /* Aggiunge un po' di spazio sopra */
        }

        #review-form button[type="submit"]:hover {
            background-color: var(--secondary-color);
        }

        /* La regola per .fas non è più necessaria, puoi cancellarla se vuoi */
        #review-form button[type="submit"] .fas {
            margin: 0;
        }

        .site-footer {
            background-color: var(--primary-color);
            color: var(--light-text);
            text-align: center;
            padding: 20px 40px;
            position: relative;
        }

        .site-footer a:focus {
            outline: 2px solid #fff;
            outline-offset: 2px;
        }

        .site-footer p {
            margin-bottom: 0.5rem;
        }

        .site-footer a {
            color: var(--light-text);
            text-decoration: none;
        }

        .social-icons {
            margin: 10px 0;
        }

        .social-icons a {
            font-size: 2em;
            margin: 0 10px;
        }

        .copyright {
            margin-top: 1rem;
            font-size: 0.8em;
            color: var(--accent-color);
        }

        #chat-widget {
            position: fixed;
            bottom: 30px;
            right: 30px;
            z-index: 999;
        }

        body.admin-mode #chat-widget {
            display: none !important;
        }

        .chat-bubble {
            width: 60px;
            height: 60px;
            background-color: var(--primary-color);
            color: var(--light-text);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: transform 0.2s;
            position: relative;
        }

        .chat-bubble:hover {
            transform: scale(1.1);
        }

        .chat-window {
            position: absolute;
            bottom: 80px;
            right: 0;
            width: 350px;
            height: 500px;
            background: var(--light-color);
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            display: none;
            flex-direction: column;
            overflow: hidden;
            animation: fadeIn 0.3s;
        }

        .chat-window.active {
            display: flex;
        }

        .chat-header {
            background-color: var(--primary-color);
            color: var(--light-text);
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-header h3 {
            color: var(--light-text);
            margin: 0;
            font-size: 1.1em;
        }

        #close-chat {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }

        .chat-body {
            padding: 15px;
            flex-grow: 1;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        #chat-user-info-form {
            padding: 20px;
        }

        .chat-footer {
            display: flex;
            padding: 10px;
            border-top: 1px solid #eee;
            align-items: center;
        }

        #chat-input {
            flex-grow: 1;
            border: 1px solid #ddd;
            padding: 10px;
            border-radius: 20px;
            background: #f0f0f0;
            margin-right: 10px;
        }

        #send-chat-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: 5px;
        }

        .chat-message {
            padding: 8px 12px;
            border-radius: 15px;
            max-width: 80%;
            word-wrap: break-word;
            display: flex;
            flex-direction: column;
        }

        .chat-message p {
            margin: 0;
            padding: 0;
        }

        .chat-message .message-time {
            font-size: 0.7em;
            color: #555;
            margin-top: 4px;
            text-align: right;
        }

        .chat-message.user {
            background-color: var(--accent-color);
            color: var(--dark-text);
            align-self: flex-end;
            border-bottom-right-radius: 3px;
        }

        .chat-message.user .message-time {
            color: var(--dark-text);
        }

        .chat-message.admin {
            background-color: #e9e9eb;
            color: var(--dark-text);
            align-self: flex-start;
            border-bottom-left-radius: 3px;
        }

        #chat-response-notice {
            font-size: 0.8em;
            color: grey;
            text-align: center;
            padding: 5px;
            display: none;
        }

        .chat-date-separator {
            text-align: center;
            margin: 10px 0;
            font-size: 0.8em;
            color: #888;
            font-weight: 600;
        }

        #chat-auto-reply p {
            font-size: 0.85em;
            /* Rende il testo leggermente più piccolo */
            font-style: italic;
            /* Lo mette in corsivo per distinguerlo */
            line-height: 1.4;
            /* Riduce l'interlinea */
            margin-bottom: 0;
            /* Rimuove lo spazio extra sotto */
        }

        #chat-admin-page {
            display: flex;
            position: relative;
            overflow: hidden;
            gap: 0;
            height: calc(100vh - 80px);
            padding: 0;
            background-color: #f4f4f4;
        }

        #chat-list-panel {
            width: 320px;
            background-color: #fff;
            border-right: 1px solid #eee;
            overflow-y: auto;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }

        .chat-list-header {
            padding: 20px;
            border-bottom: 1px solid #eee;
            flex-shrink: 0;
        }

        .chat-list-header h3 {
            margin: 0;
            font-size: 1.3em;
        }

        #chat-list-container {
            overflow-y: auto;
            flex-grow: 1;
        }

        .chat-list-item {
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            transition: background-color 0.2s;
            position: relative;
            border-left: 4px solid transparent;
        }

        .chat-list-item:hover {
            background-color: #f9f9f9;
        }

        .chat-list-item.unread {
            border-left-color: var(--accent-color);
            background-color: #fdfdfd;
        }

        .chat-list-item.unread h4 {
            font-weight: 700;
        }

        .chat-list-item.active {
            background-color: var(--secondary-color);
            border-left-color: var(--primary-color);
        }

        .chat-list-item.active h4,
        .chat-list-item.active .chat-list-email,
        .chat-list-item.active .chat-list-last-message {
            color: var(--light-text);
        }

        .chat-list-item h4 {
            margin: 0 0 4px 0;
            font-size: 1em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .chat-list-item .chat-list-email {
            font-size: 0.8em;
            color: #999;
            margin-bottom: 8px;
        }

        .chat-list-item .chat-list-last-message {
            font-size: 0.9em;
            color: #555;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin: 0;
        }

        .delete-chat-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            color: #ccc;
            font-size: 16px;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s;
            padding: 5px;
        }

        .chat-list-item:hover .delete-chat-btn {
            opacity: 1;
        }

        .delete-chat-btn:hover {
            color: var(--danger-color);
        }

        .chat-list-item.active .delete-chat-btn {
            color: rgba(255, 255, 255, 0.7);
        }

        .chat-list-item.active .delete-chat-btn:hover {
            color: #fff;
        }

        #chat-detail-panel {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            background-color: #e5ddd5;
            background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
        }

        #chat-detail-header {
            background-color: #f9f9f9;
            padding: 15px 20px;
            border-bottom: 1px solid #ddd;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        #chat-detail-header .chat-user-info {
            flex-grow: 1;
        }

        #chat-detail-header h4 {
            margin: 0;
        }

        #chat-detail-header span {
            font-size: 0.9em;
            color: #777;
        }

        #chat-detail-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: #888;
            text-align: center;
        }

        #chat-detail-placeholder i {
            font-size: 4em;
            margin-bottom: 20px;
            color: #ccc;
        }

        #chat-detail-placeholder p {
            font-size: 1.2em;
        }

        #chat-detail-body {
            flex-grow: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        #chat-reply-form {
            display: flex;
            align-items: center;
            padding: 10px 20px;
            background-color: #f0f0f0;
            border-top: 1px solid #ddd;
            flex-shrink: 0;
        }

        #chat-reply-input {
            flex-grow: 1;
            margin-right: 15px;
            padding: 12px 20px;
            border: 1px solid #ccc;
            border-radius: 25px;
            background-color: #fff;
        }

        #chat-reply-form #send-reply-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0;
            transition: background-color 0.2s;
        }

        #chat-reply-form #send-reply-btn:hover {
            background-color: var(--secondary-color);
        }

        .unread-badge {
            background-color: var(--danger-color);
            color: white;
            border-radius: 50%;
            padding: 2px 6px;
            font-size: 0.75em;
            font-weight: bold;
            position: absolute;
            top: 10px;
            right: 15px;
            display: none;
        }

        .unread-badge.visible {
            display: inline-block;
        }

        #chat-bubble .unread-badge {
            top: -2px;
            right: -2px;
        }

        #mobile-chat-back-btn {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--primary-color);
            cursor: pointer;
        }

        .admin-only {
            display: none !important;
        }

        body.admin-mode .admin-only {
            display: block !important;
        }

        body.admin-mode #chat-admin-page.page.admin-only,
        body.admin-mode #event-signups-page.page.admin-only {
            display: none !important;
        }

        body.admin-mode #event-signups-page.page.admin-only.active {
            display: block !important;
        }

        body.admin-mode #chat-admin-page.page.admin-only.active {
            display: flex !important;
        }

        body.admin-mode .announcement-cta-item .admin-only,
        body.admin-mode .card .admin-only {
            display: inline-flex !important;
        }

        body.admin-mode #gallery-section.admin-only {
            display: block !important;
        }

        .admin-controls {
            position: absolute;
            top: 5px;
            right: 5px;
            background: rgba(0, 0, 0, 0.6);
            border-radius: 5px;
            padding: 5px;
            display: none;
            gap: 5px;
            z-index: 5;
        }

        body.admin-mode .admin-controls {
            display: flex !important;
        }

        .admin-controls .admin-btn {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 16px;
            margin: 0;
        }

        .admin-btn.delete-btn:hover {
            color: var(--danger-color);
        }

        .admin-btn.edit-btn:hover {
            color: var(--accent-color);
        }

        .admin-btn.toggle-close-btn:hover {
            color: #f0ad4e;
        }

        .drag-handle {
            cursor: move;
            color: white;
            background-color: rgba(0, 0, 0, 0.6);
            padding: 10px 8px;
            border-radius: 5px;
            font-size: 1.2em;
            z-index: 5;
        }

        .dynamic-card .drag-handle,
        .gallery-item .drag-handle {
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
        }

        .card .drag-handle {
            top: 5px;
            left: 5px;
        }

        .announcement-cta-item .fa-exclamation-circle {
            color: var(--secondary-color);
            font-size: 20px;
            margin-right: 8px;
        }

        .add-content-btn {
            background-color: var(--success-color);
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin: 0 0 10px 10px;
            font-size: 16px;
        }

        .add-content-btn .fas {
            margin-right: 8px;
        }

        .add-content-btn .fab {
            margin-right: 8px;
        }

        #pending-reviews-section {
            background: transparent;
            border: none;
        }

        .review-actions {
            margin-top: 10px;
            text-align: right;
        }

        .review-actions .admin-btn {
            padding: 5px 10px;
            border-radius: 5px;
            color: white;
            font-size: 14px;
            margin-left: 5px;
        }

        .review-actions .approve-btn {
            background-color: var(--success-color);
        }

        .review-actions .delete-btn {
            background-color: var(--danger-color);
        }

        .footer-admin-controls {
            margin-top: 15px;
        }

        .footer-admin-controls .admin-btn,
        #admin-logout-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            cursor: pointer;
            font-size: 18px;
        }

        #admin-logout-btn {
            margin: 15px auto 0;
        }

        body.admin-mode .footer-admin-controls {
            display: none;
        }

        body.admin-mode #admin-login-btn {
            display: none !important;
        }

        #signups-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
        }

        .signup-card {
            background: #fafafa;
            border: 1px solid #eee;
            border-left: 5px solid var(--accent-color);
            border-radius: 8px;
            padding: 20px;
            position: relative;
        }

        .signup-card .signup-controls {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            gap: 8px;
        }

        .signup-card .admin-btn {
            background: none;
            border: none;
            color: #ccc;
            font-size: 18px;
            cursor: pointer;
            padding: 0;
        }

        .signup-card .admin-btn:hover {
            color: var(--primary-color);
        }

        .signup-card .admin-btn.delete-signup-btn:hover {
            color: var(--danger-color);
        }

        .signup-card .admin-btn.mark-signup-read-btn:hover {
            color: var(--success-color);
        }

        .signup-card h4 {
            margin-top: 0;
            color: var(--primary-color);
            font-size: 1.2em;
        }

        .signup-card p {
            margin-bottom: 0.5rem;
            font-size: 0.9em;
        }

        .signup-card strong {
            color: var(--secondary-color);
        }

        #scrollToTopBtn {
            position: fixed;
            bottom: 30px;
            left: 280px;
            width: 50px;
            height: 50px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            cursor: pointer;
            text-decoration: none;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            z-index: 998;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease, left 0.3s, right 0.3s;
        }

        #scrollToTopBtn.visible {
            opacity: 1;
            visibility: visible;
        }

        #instagram-posts-container {
            display: flex;
            gap: 25px;
            overflow-x: auto;
            scroll-behavior: smooth;
            padding: 10px;
            align-items: flex-start;
            scrollbar-width: none;
            -ms-overflow-style: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        #instagram-posts-container::-webkit-scrollbar {
            display: none;
        }

        #instagram-slider-wrapper {
            position: relative;
            padding: 0 50px;
        }

        #instagram-slider-wrapper .slider-nav {
            position: absolute;
            top: 45px;
            transform: translateY(0);
            background: rgba(0, 59, 70, 0.5);
            color: white;
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            font-size: 1.2em;
            cursor: pointer;
            z-index: 10;
            transition: background-color 0.2s, opacity 0.2s;
        }

        #instagram-slider-wrapper .slider-nav#prev-instagram-btn {
            left: 0;
        }

        #instagram-slider-wrapper .slider-nav#next-instagram-btn {
            right: 0;
        }

        #instagram-slider-wrapper .slider-nav:hover {
            background: var(--primary-color);
        }

        #instagram-slider-wrapper .slider-nav:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            background: #ccc;
        }

        .instagram-post-wrapper {
            position: relative;
            flex: 0 0 320px;
            max-width: 540px;
            margin: 0;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
            border-radius: 8px;
            overflow: hidden;
        }

        .instagram-post-wrapper .admin-controls {
            top: 5px;
            right: 5px;
            background: rgba(0, 0, 0, 0.6);
            border-radius: 5px;
            padding: 5px;
            display: none;
            gap: 5px;
            z-index: 5;
        }

        body.admin-mode .instagram-post-wrapper .admin-controls {
            display: flex !important;
        }

        .instagram-post-wrapper blockquote.instagram-media {
            width: 100% !important;
            min-width: unset !important;
            max-width: unset !important;
            margin: 0 !important;
        }

        #instagram-modal .modal-content {
            width: 90%;
            max-width: 600px;
        }

        #instagram-embed-code {
            resize: vertical;
        }

        /* Stili per il calendario Accordion su mobile */
        @media (max-width: 768px) {
            .day-column.mobile-accordion .day-slots {
                display: none;
                padding-top: 10px;
            }
        }

        .day-column.mobile-accordion.active .day-slots {
            display: block;
        }

        .day-column.mobile-accordion .day-header {
            cursor: pointer;
            transition: background-color 0.2s;
            border-radius: 5px;
        }

        .day-column.mobile-accordion.fully-booked .day-header {
            background-color: #616161;
            /* Grigio scuro */
            color: #bdbdbd;
            text-decoration: line-through;
            cursor: not-allowed;
        }

        /* --- INIZIO STILI PER MODIFICA TESTO --- */
        body.admin-mode [data-editable-text] {
            cursor: text;
            transition: box-shadow 0.2s ease-in-out;
        }

        body.admin-mode [data-editable-text]:hover {
            box-shadow: 0 0 0 2px var(--accent-color);
            border-radius: 3px;
        }

        [data-editable-text].editing-now {
            outline: 2px solid var(--primary-color) !important;
            box-shadow: 0 0 10px rgba(0, 59, 70, 0.4) !important;
        }

        #text-editor-toolbar {
            position: absolute;
            z-index: 1010;
            background: var(--dark-text);
            padding: 5px 8px;
            border-radius: 5px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
            display: flex;
            gap: 8px;
        }

        #text-editor-toolbar button {
            background: none;
            border: none;
            color: white;
            font-size: 16px;
            cursor: pointer;
            width: 30px;
            height: 30px;
            border-radius: 3px;
            transition: background-color 0.2s;
        }

        #text-editor-toolbar button.save-text-btn:hover {
            background-color: var(--success-color);
        }

        #text-editor-toolbar button.cancel-text-btn:hover {
            background-color: var(--danger-color);
        }

        /* --- FINE STILI PER MODIFICA TESTO --- */
        /* --- STILI PER GRUPPI DI SERVIZI --- */
        .service-group {
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            margin-bottom: 25px;
            background: #fdfdfd;
        }

        .service-group-header {
            padding: 15px 20px;
            font-size: 1.3em;
            font-weight: 600;
            color: var(--primary-color);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #e0e0e0;
            transition: background-color 0.2s;
        }

        .service-group-header:hover {
            background-color: #f5f5f5;
        }

        .service-group-header .fas {
            transition: transform 0.3s ease;
        }

        .service-group-content {
            display: none;
            /* Nascosto di default */
            padding: 20px;
        }

        .service-group.expanded .service-group-content {
            display: block;
            /* Mostrato quando espanso */
        }

        .service-group.expanded .service-group-header .fas {
            transform: rotate(180deg);
        }

        .service-group-header .admin-controls {
            position: static;
            background: none;
            padding: 0;
        }

        .service-group-header .admin-controls .admin-btn {
            color: #999;
        }

        #services-unassigned .service-group-header {
            cursor: default;
        }

        #services-unassigned .service-group-header:hover {
            background-color: transparent;
        }

        /* --- INIZIO NUOVI STILI RECENSIONI DESKTOP --- */
        @media (min-width: 993px) {

            /*
         * Correzione 1: Altezza Uniforme delle Card
         * Diciamo al testo di occupare tutto lo spazio verticale disponibile,
         * forzando il footer ad allinearsi in fondo e rendendo tutte le card alte uguali.
        */
            .review-card p.review-text {
                flex-grow: 1;
                /* Fondamentale: fa espandere il paragrafo */
                min-height: 260px;
                /* Altezza minima per garantire spazio anche a recensioni corte */
                max-height: 260px;
                /* Altezza massima per uniformare tutto */
                overflow: hidden;
                position: relative;
            }

            /* Applica l'effetto dissolvenza solo alle recensioni lunghe */
            .review-card p.review-text.truncated::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                height: 40px;
                background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 90%);
            }

            .review-footer {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-top: auto;
                /* Spinge il footer in basso */
            }

            .review-author-stars {
                text-align: right;
            }

            .read-more-link {
                font-weight: 600;
                color: var(--secondary-color);
                cursor: pointer;
                font-size: 0.9em;
                transition: color 0.2s;
            }

            .read-more-link:hover {
                color: var(--primary-color);
                text-decoration: underline;
            }

            /*
         * Correzione 2: Layout del Modal
         * Invertiamo l'ordine di stelle e autore e li centriamo.
        */
            #modal-review-header {
                display: flex;
                flex-direction: column-reverse;
                /* Inverte l'ordine degli elementi (stelle sopra, nome sotto) */
                align-items: center;
                gap: 5px;
                /* Aggiunge spazio tra stelle e nome */
            }
        }

        /* --- FINE NUOVI STILI RECENSIONI DESKTOP --- */

        @media (max-width: 992px) {
            .page-container {
                flex-direction: column;
            }

            .sidebar {
                width: 100%;
                height: auto;
                position: relative;
                padding-top: 10px;
                padding-bottom: 10px;
            }

            .sidebar-header {
                display: flex;
                align-items: center;
                justify-content: center;
                margin-bottom: 10px;
                padding: 0 10px;
            }


            .sidebar-header .sidebar-title-group {
                display: block;
                text-align: left;
            }

            .sidebar-header h2,
            .sidebar-header p {
                margin: 0;
                line-height: 1.2;
            }

            .sidebar-header h2 {
                font-size: 1.2rem;
            }

            .sidebar-header p {
                font-size: 0.8rem;
            }

            .sidebar ul {
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
                padding: 0 5px;
            }

            .sidebar ul li a {
                padding: 8px 10px;
                font-size: 0.85em;
                justify-content: center;
            }

            .sidebar ul li a:hover,
            .sidebar ul li a.active {
                padding-left: 10px;
            }

            .content {
                margin-left: 0;
                width: 100%;
            }

            .page {
                padding: 20px;
            }

            #team-cards-container {
                flex-direction: column;
                align-items: center;
            }

            .chat-window {
                width: 90vw;
                height: 70vh;
                bottom: 80px;
                right: 10px;
            }

            #chat-admin-page {
                position: relative;
                overflow-x: hidden;
                height: calc(100vh - 120px);
            }

            #chat-list-panel,
            #chat-detail-panel {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                transition: transform 0.3s ease-in-out;
                will-change: transform;
            }

            #chat-list-panel {
                transform: translateX(0);
                z-index: 2;
            }

            #chat-detail-panel {
                transform: translateX(100%);
                z-index: 1;
            }

            #chat-admin-page.detail-view-active #chat-list-panel {
                transform: translateX(-100%);
            }

            #chat-admin-page.detail-view-active #chat-detail-panel {
                transform: translateX(0);
            }

            #mobile-chat-back-btn {
                display: block;
            }

            .home-header {
                margin-top: 0;
            }

            .home-header img {
                width: 250px;
            }

            .modal-content {
                width: 95%;
                padding: 15px;
            }

            #reviews-slider-wrapper,
            #instagram-slider-wrapper {
                padding: 0;
            }

            .slider-nav {
                display: none !important;
            }

            #reviews-display-container,
            #instagram-posts-container {
                display: grid;
                grid-template-columns: 1fr;
                overflow-x: hidden;
                padding: 0;
                cursor: default;
            }

            #reviews-display-container.active,
            #instagram-posts-container.active {
                cursor: default;
            }

            .review-card,
            .instagram-post-wrapper {
                width: 100%;
                flex-basis: auto;
            }

            #scrollToTopBtn {
                left: 30px;
                right: auto;
            }

            #enable-notifications-btn {
                bottom: 90px;
                left: 30px;
                right: auto;
            }
        }

        .image-viewer {
            display: none;
            position: fixed;
            z-index: 1050;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.85);
            justify-content: center;
            align-items: center;
            animation: fadeIn 0.3s;
        }

        .image-viewer .viewer-content {
            max-width: 90%;
            max-height: 85%;
            object-fit: contain;
            border-radius: 5px;
        }

        .image-viewer .close-viewer-btn {
            position: absolute;
            top: 20px;
            right: 35px;
            color: #fff;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.2s;
        }

        .image-viewer .close-viewer-btn:hover {
            color: #bbb;
        }

        .dynamic-card img.event-thumbnail {
            cursor: zoom-in;
            transition: opacity 0.2s ease-in-out;
        }

        .dynamic-card img.event-thumbnail:hover {
            opacity: 0.8;
        }

        .card-share-wrapper {
            position: absolute;
            bottom: 15px;
            right: 15px;
        }

        .share-event-card-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--secondary-color);
            cursor: pointer;
            padding: 5px;
            transition: color 0.2s;
        }

        .share-event-card-btn:hover {
            color: var(--primary-color);
        }

        .card-share-popup {
            display: none;
            position: absolute;
            bottom: 100%;
            right: 0;
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            padding: 12px 15px;
            gap: 15px;
            z-index: 10;
            margin-bottom: 8px;
        }

        .card-share-popup.visible {
            display: flex;
        }

        .card-share-popup a,
        .card-share-popup button {
            font-size: 1.8rem;
            text-decoration: none;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            color: #555;
            transition: transform 0.2s;
        }

        .card-share-popup a:hover,
        .card-share-popup button:hover {
            transform: scale(1.15);
        }

        .card-share-popup .share-fb {
            color: #1877F2;
        }

        .card-share-popup .share-wa {
            color: #25D366;
        }

        .card-share-popup .share-ig {
            color: #E1306C;
        }

        .card-share-popup .share-em {
            color: #7f7f7f;
        }

        .card-share-popup .share-cp {
            color: var(--accent-color);
        }

        #install-banner {
            display: none;
            position: sticky;
            top: 0;
            width: 100%;
            background-color: var(--accent-color);
            color: white;
            padding: 10px 15px;
            z-index: 999;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            text-align: center;
        }

        #install-banner-content {
            flex-grow: 1;
            text-align: center;
        }

        #install-banner p {
            margin: 0;
            font-weight: 600;
            font-size: 0.9em;
            line-height: 1.4;
        }

        #install-banner-ios-instructions {
            display: none;
            font-size: 0.85em;
            font-weight: normal;
        }

        #install-banner-ios-instructions .fa-share-square {
            margin: 0 4px;
        }

        #install-btn {
            background-color: white;
            color: var(--primary-color);
            border: none;
            border-radius: 20px;
            padding: 6px 15px;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }

        #close-install-banner {
            background: none;
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            padding: 0 5px;
            line-height: 1;
        }

        #notification-callout {
            display: none;
            position: absolute;
            bottom: 110%;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--dark-text);
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 0.9em;
            white-space: nowrap;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #notification-callout.show {
            display: block;
            opacity: 1;
        }

        #notification-callout::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: var(--dark-text) transparent transparent transparent;
        }

        /* NUOVI STILI PER IL SISTEMA DI PRENOTAZIONE */
        #prenotazioni-page .admin-view,
        #prenotazioni-page .user-view {
            display: none;
        }

        body.admin-mode #prenotazioni-page .admin-view {
            display: block;
        }

        body:not(.admin-mode) #prenotazioni-page .user-view {
            display: block;
        }

        .booking-agenda-item {
            background-color: #f9f9f9;
            border-left: 4px solid var(--secondary-color);
            padding: 15px;
            margin-bottom: 10px;
            border-radius: 4px;
        }

        .booking-agenda-item p {
            margin-bottom: 5px;
        }

        .booking-container {
            max-width: 900px;
            margin: 0 auto;
        }

        .lesson-selector button {
            display: block;
            width: 100%;
            padding: 20px;
            margin-bottom: 15px;
            font-size: 1.2em;
            font-weight: 600;
            background-color: var(--secondary-color);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color: 0.3s;
        }

        .lesson-selector button:hover {
            background-color: var(--primary-color);
        }

        .calendar-view {
            margin-top: 30px;
        }

        .week-navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .week-navigation button {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 5px;
            cursor: pointer;
        }

        .week-navigation button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        #current-week-display {
            font-size: 1.2em;
            font-weight: 600;
            color: var(--primary-color);
            text-align: center;
        }

        .slots-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            /* Da Lun a Dom */
            gap: 10px;
        }

        .day-column {
            background-color: #f8f8f8;
            border-radius: 8px;
            padding: 10px;
        }

        .day-header {
            text-align: center;
            font-weight: 700;
            color: var(--secondary-color);
            padding-bottom: 10px;
            margin-bottom: 10px;
            border-bottom: 2px solid #eee;
        }

        .time-slot {
            padding: 12px;
            text-align: center;
            background-color: var(--success-color);
            color: white;
            border-radius: 5px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.2s;
            font-weight: 600;
        }

        .time-slot:hover:not(.disabled):not(.booked) {
            transform: scale(1.05);
        }

        .time-slot.booked {
            background-color: var(--danger-color);
            cursor: not-allowed;
            text-decoration: line-through;
        }

        .time-slot.partially-booked {
            background-color: var(--warning-color);
        }

        .time-slot.selected {
            background-color: var(--primary-color);
            transform: scale(1.05);
            box-shadow: 0 0 10px rgba(0, 59, 70, 0.5);
        }

        .time-slot.disabled {
            background-color: #e0e0e0;
            color: #999;
            cursor: not-allowed;
        }

        .booking-confirmation-step {
            display: none;
            margin-top: 30px;
        }

        #booking-loader {
            text-align: center;
            padding: 40px;
            font-size: 1.5em;
            color: var(--secondary-color);
        }

        #booking-loader .fas {
            margin-right: 15px;
            animation: spin 2s linear infinite;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .back-to-selection-btn {
            background: none;
            border: 2px solid var(--secondary-color);
            color: var(--secondary-color);
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .admin-weeks-manager label {
            font-weight: 600;
            margin-right: 10px;
        }

        .admin-weeks-manager input[type="week"] {
            padding: 8px;
            border-radius: 5px;
            border: 1px solid #ccc;
            margin-right: 10px;
        }

        #visible-weeks-list span {
            display: inline-block;
            background: #e0e0e0;
            padding: 5px 10px;
            border-radius: 15px;
            margin: 5px;
            font-size: 0.9em;
        }

        #visible-weeks-list span button {
            background: none;
            border: none;
            color: var(--danger-color);
            cursor: pointer;
            margin-left: 8px;
            font-weight: bold;
        }

        @media (max-width: 992px) {
            .slots-grid {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            }
        }

        /* --- INIZIO NUOVI STILI CALENDARIO PRENOTAZIONI --- */
        .calendar-view-wrapper {
            margin-top: 30px;
        }

        #slots-grid-container {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 10px;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        #time-agenda-view {
            display: none;
            animation: fadeIn 0.4s;
        }

        .calendar-view-wrapper.agenda-active #slots-grid-container {
            opacity: 0;
            transform: scale(0.98);
            pointer-events: none;
            display: none;
            /* Aggiunto per compatibilità */
        }

        .calendar-view-wrapper.agenda-active #time-agenda-view {
            display: block;
        }

        .day-cell {
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 10px;
            background-color: #f9f9f9;
            text-align: center;
            min-height: 100px;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
        }

        .day-cell .day-name {
            font-size: 0.8em;
            font-weight: 600;
            color: var(--secondary-color);
            text-transform: uppercase;
        }

        .day-cell .day-number {
            font-size: 1.8em;
            font-weight: 700;
            color: var(--dark-text);
            line-height: 1.2;
        }

        .day-cell.unavailable {
            background-color: #f5f5f5;
            color: #ccc;
        }

        .day-cell.unavailable .day-name,
        .day-cell.unavailable .day-number {
            color: #ccc;
            text-decoration: line-through;
        }

        .day-cell.available {
            background-color: #e8f5e9;
            /* Verde molto chiaro */
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .day-cell.available:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            border-color: var(--success-color);
        }

        .day-cell.today {
            border-color: var(--primary-color);
            border-width: 2px;
        }

        .day-cell.selected {
            background-color: var(--primary-color);
            color: white;
        }

        .day-cell.selected .day-name,
        .day-cell.selected .day-number {
            color: white;
        }

        #agenda-header {
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        #agenda-title {
            font-size: 1.3em;
            font-weight: 600;
            color: var(--primary-color);
        }

        #back-to-calendar-btn {
            background: none;
            border: 1px solid #ccc;
            color: #555;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
        }

        #time-slots-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 15px;
        }

        .time-agenda-slot {
            padding: 15px;
            text-align: center;
            background-color: var(--success-color);
            color: white;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.2s;
            font-weight: 600;
            font-size: 1.1em;
        }

        .time-agenda-slot:hover {
            transform: scale(1.05);
            background-color: var(--secondary-color);
        }

        .time-agenda-slot.partially-booked {
            background-color: var(--warning-color);
        }

        /* Stile per l'orario selezionato nella nuova vista agenda */
        .time-agenda-slot.selected {
            background-color: var(--primary-color);
            transform: scale(1.05);
            box-shadow: 0 0 10px rgba(0, 59, 70, 0.5);
        }

        /* Rimuoviamo gli stili vecchi che non servono più */
        .slots-grid .day-column {
            display: none;
        }

        /* --- FINE NUOVI STILI CALENDARIO PRENOTAZIONI --- */
        /* Rimuoviamo gli stili vecchi che non servono più */
        .slots-grid .day-column {
            display: none;
        }

        /* --- FINE NUOVI STILI CALENDARIO PRENOTAZIONI --- */

        /* ===== INIZIO NUOVI STILI PER BOOKING CHATBOT ===== */
        #booking-chatbot-container {
            position: fixed;
            bottom: 0;
            right: 0;
            width: 400px;
            height: 650px;
            max-width: 100%;
            max-height: 100%;
            background-color: white;
            border-top-left-radius: 15px;
            box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
            z-index: 1001;
            /* Sopra la chat normale */
            display: flex;
            flex-direction: column;
            transform: translateY(100%);
            transition: transform 0.4s ease-in-out;
        }

        #booking-chatbot-container.active {
            transform: translateY(0);
        }

        #booking-chatbot-header {
            background-color: var(--primary-color);
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top-left-radius: 15px;
        }

        #booking-chatbot-header h3 {
            margin: 0;
            color: white;
            font-size: 1.1em;
        }

        #close-booking-chatbot {
            background: none;
            border: none;
            color: white;
            font-size: 28px;
            cursor: pointer;
            line-height: 1;
        }

        #booking-chatbot-body {
            flex-grow: 1;
            overflow-y: auto;
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            /* <-- ECCO LA MODIFICA: Aggiunge spazio tra tutti gli elementi figli */
        }

        /* Adattamenti degli stili esistenti per il nuovo contenitore */
        #booking-chatbot-body .chat-message.admin {
            align-self: flex-start;
        }

        #booking-chatbot-body .chat-options,
        #booking-chatbot-body .chat-options-grid,
        #booking-chatbot-body .chat-day-group {
            align-self: stretch;
            /* Assicura che i pulsanti occupino la larghezza */
        }

        #booking-chatbot-body .chat-reset-button {
            align-self: center;
        }

        #booking-chatbot-body #booking-chat-form-container {
            padding: 0;
        }


        @media (max-width: 768px) {
            #booking-chatbot-container {
                width: 100%;
                height: 100%;
                border-top-left-radius: 0;
            }

            #booking-chatbot-header {
                border-top-left-radius: 0;
            }
        }

        /* ===== FINE NUOVI STILI PER BOOKING CHATBOT ===== */


        /* ====================================================================== */
        /* ========= INIZIO BLOCCO CORREZIONI PER CALENDARIO MOBILE ========= */
        /* ====================================================================== */
        @media (max-width: 768px) {

            /* 1. Forza la griglia del calendario mensile a 7 colonne e la rende più compatta.
       Questa è la correzione principale che impedisce ai giorni di andare a capo. */
            #slots-grid-container {
                grid-template-columns: repeat(7, 1fr);
                /* FORZA sempre 7 colonne. */
                gap: 3px;
                /* Riduci drasticamente lo spazio tra le celle. */
            }

            /* 2. Rende le celle dei giorni molto più piccole. */
            .day-cell {
                min-height: 60px;
                /* Altezza minima ridotta per la vista mobile. */
                padding: 4px;
                /* Meno spazio interno. */
                border-radius: 4px;
                /* Angoli meno arrotondati per risparmiare spazio. */
            }

            /* 3. Rimpicciolisce il numero del giorno, che occupa la maggior parte dello spazio. */
            .day-cell .day-number {
                font-size: 1.2em;
                /* Notevolmente più piccolo del 1.8em del desktop. */
            }

            /* 4. Rende le intestazioni dei giorni (Lun, Mar...) più piccole e adeguate. */
            .day-cell.day-header {
                font-size: 0.7em;
                /* Testo molto piccolo per le intestazioni. */
                min-height: auto;
                padding: 4px 0;
                border: none;
                background: transparent;
            }

            /* 5. CORREZIONE CHIAVE: Sistema la navigazione del mese su una sola riga. */
            .week-navigation {
                flex-direction: row;
                /* Ripristina la direzione orizzontale */
                justify-content: space-between;
                /* Mantiene gli elementi distanziati */
                align-items: center;
                /* Allinea verticalmente al centro */
                gap: 5px;
                /* Riduci lo spazio se necessario */
            }

            /* 6. CORREZIONE CHIAVE: Nasconde il testo nei pulsanti di navigazione per risparmiare spazio. */
            .week-navigation button .nav-text {
                display: none;
            }

            /* 7. CORREZIONE CHIAVE: Rende i pulsanti più compatti ora che hanno solo l'icona. */
            .week-navigation button {
                padding: 8px 12px;
            }

            /* 8. Adegua la lista degli orari del giorno per una migliore visualizzazione mobile. */
            #time-slots-list {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
                gap: 10px;
            }
        }

        /* ====================================================================== */
        /* ========== FINE BLOCCO CORREZIONI PER CALENDARIO MOBILE ========== */
        /* ====================================================================== */

        /* Stile del Modal per Termini e Condizioni */
        .terms-modal {
            display: none;
            /* Nascosto di default */
            position: fixed;
            /* Rimane fisso durante lo scroll */
            z-index: 1000;
            /* In primo piano */
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            /* Abilita lo scroll se il contenuto è troppo lungo */
            background-color: rgba(0, 0, 0, 0.6);
            /* Sfondo nero semi-trasparente */
            animation: fadeIn 0.5s;
        }

        .terms-modal-content {
            background-color: #ffffff;
            margin: 5% auto;
            padding: 20px 40px 40px 40px;
            border-radius: 8px;
            width: 85%;
            max-width: 800px;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            animation: slideIn 0.5s;
        }

        .terms-close-button {
            color: #aaa;
            position: absolute;
            top: 15px;
            right: 25px;
            font-size: 35px;
            font-weight: bold;
            transition: color 0.3s;
        }

        .terms-close-button:hover,
        .terms-close-button:focus {
            color: #333;
            text-decoration: none;
            cursor: pointer;
        }

        /* Stile del contenuto dentro il modal */
        .terms-modal-text-content h1,
        .terms-modal-text-content h2 {
            color: var(--primary-color);
            border-bottom: 2px solid #e0e0e0;
            padding-bottom: 10px;
            margin-top: 30px;
        }

        .terms-modal-text-content h1 {
            font-size: 1.8em;
            text-align: center;
            margin-bottom: 30px;
        }

        .terms-modal-text-content h2 {
            font-size: 1.4em;
        }

        .terms-modal-text-content p {
            font-size: 1em;
            color: #555;
        }

        .terms-modal-text-content .footer-note {
            text-align: center;
            margin-top: 40px;
            font-size: 0.9em;
            color: #777;
        }

        @keyframes slideIn {
            from {
                top: -100px;
                opacity: 0;
            }

            to {
                top: 0;
                opacity: 1;
            }
        }


        @media (max-width: 768px) {

            /* Pulsante "Torna su" in basso a sinistra */
            #back-to-top {
                left: 15px;
                right: auto;
                bottom: 15px;
            }

            /* Pulsante "Chat" in basso a destra */
            #chat-button {
                right: 15px;
                left: auto;
                bottom: 15px;
            }

            /* Spazio extra nel footer per non essere coperto */
            .site-footer {
                padding-bottom: 50px;
                /* spazio per i pulsanti flottanti */
            }
        }

        /* Badge durata servizio (in basso a destra della scheda) */
        .service-duration-badge {
            position: absolute;
            right: 10px;
            bottom: 17px;
            padding: 6px 10px;
            border-radius: 14px;
            background: rgba(0, 59, 70, .92);
            /* vicino a var(--primary-color) */
            color: #fff;
            font-weight: 600;
            font-size: 0.85em;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
            z-index: 2;
        }

        .service-duration-badge i {
            font-size: 0.95em;
            opacity: .9;
        }

        /* Rimuoviamo il layout a griglia dal contenitore principale */
        #signups-container {
            display: block;
            /* In questo modo gli elementi figli andranno a capo automaticamente */
            gap: 0;
        }

        /* Nuovo stile per il gruppo di un intero evento */
        .event-group {
            border: 1px solid #ddd;
            border-radius: 8px;
            margin-bottom: 25px;
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        /* Stile per l'header dell'evento */
        .event-group>h2 {
            margin-top: 0;
            padding-bottom: 15px;
            border-bottom: 2px solid #f0f0f0;
        }

        /* Stile per il contenitore di uno slot orario */
        .slot-group {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px dashed #ccc;
        }

        .event-group>.slot-group:first-of-type {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
        }

        /* Aggiustiamo lo stile dell'header dello slot */
        .slot-group>h4 {
            background-color: #f7f7f7;
            padding: 8px 12px;
            border-radius: 5px;
            margin-bottom: 15px;
            /* Spazio tra il titolo dello slot e le card */
        }

        /* Aggiungiamo un po' di spazio tra le card di iscrizione all'interno di uno slot */
        .signup-card {
            margin-bottom: 10px;
        }

        .signup-card:last-child {
            margin-bottom: 0;
        }

        /* Stile per il pulsante di conferma email disabilitato */
        #confirm-email-correct-btn:disabled {
            background-color: #ccc;
            cursor: not-allowed;
            opacity: 0.6;
        }

        #email-confirmation-modal {
            z-index: 1002;
            /* Superiore allo z-index 1001 del chatbot */
        }

        /* ===== NUOVI STILI PER INFO SERVIZIO E TESTO GRATUITO (CORRETTI) ===== */
        .service-title-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
        }

        .service-title-container h3 {
            margin-bottom: 0;
        }

        .service-info-btn-new {
            width: 24px;
            height: 24px;
            background-color: var(--secondary-color);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            flex-shrink: 0;
            font-family: 'Times New Roman', serif;
            font-weight: bold;
            font-style: italic;
            font-size: 16px;
            line-height: 24px;
            transition: background-color 0.2s;
            /* Rimosso position: relative da qui */
        }

        .service-info-btn-new:hover {
            background-color: var(--primary-color);
        }

        .dynamic-card.z-index-boost {
            z-index: 15;
        }

        .service-description-balloon {
            display: none;
            position: absolute;
            top: 25px;
            /* Posizione dall'alto della card, allineata con la 'i' */
            left: calc(100% + 12px);
            /* Posiziona a destra della card + margine */
            width: 280px;
            background-color: rgba(20, 20, 20, 0.9);
            color: #f0f0f0;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            z-index: 20;
            font-size: 0.9em;
            line-height: 1.5;
            font-family: var(--font-family);
            pointer-events: none;
            text-align: left;
        }

        .service-description-balloon.visible {
            display: block;
        }

        /* Triangolo del balloon che punta a sinistra */
        .service-description-balloon::after {
            content: '';
            position: absolute;
            top: 10px;
            /* Allineamento verticale del triangolo */
            right: 100%;
            /* Posiziona a sinistra del balloon */
            border-width: 8px 10px 8px 0;
            border-style: solid;
            border-color: transparent rgba(20, 20, 20, 0.9) transparent transparent;
        }

        .service-free-tag-new {
            font-weight: bold;
            color: #0d6efd;
            font-size: 1em;
            margin-top: 8px;
            margin-bottom: 15px;
        }

        /* Stili per Mobile: Centra il balloon come overlay RELATIVO ALLA CARD */
        @media (max-width: 992px) {
            .service-description-balloon {
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                /* Centra rispetto alla card */
                margin-left: 0;
                width: calc(100% - 30px);
            }

            .service-description-balloon::after {
                display: none;
                /* Nasconde il triangolo su mobile */
            }
        }

        /* ===== FINE NUOVI STILI ===== */

        /* FIX PER BALLOON INFO SU DESKTOP */
        /* I servizi non hanno banner "Closed", quindi possiamo permettere l'overflow */
        .dynamic-card.service-card {
            overflow: visible;
        }

        /* Poiché rimuoviamo overflow:hidden, dobbiamo arrotondare manualmente gli angoli dell'immagine */
        .dynamic-card.service-card img {
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
        }

        @media (min-width: 993px) {
            .service-description-balloon.left-aligned {
                left: auto;
                right: calc(100% + 12px);
            }

            .service-description-balloon.left-aligned::after {
                left: 100%;
                right: auto;
                border-width: 8px 0 8px 10px;
                border-color: transparent transparent transparent rgba(20, 20, 20, 0.9);
            }
        }

.page-static { display: block; padding: 40px; animation: fadeIn 0.5s; }

/* --- STILI MODALE CALENDARIO --- */
.booking-view-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Sfondo scuro semitrasparente */
    z-index: 9999; /* Sopra tutto */
    display: none; /* Nascosto di default */
    overflow-y: auto; /* Permetti scroll se contenuto troppo lungo */
    padding: 20px;
    box-sizing: border-box;
}

/* Wrapper interno per centrare e contenere il calendario */
.booking-view-container > div { 
    /* Questo selettore è un po' generico, meglio se wrappiamo il contenuto in un div specifico, ma per ora applichiamo stile al contenuto diretto se possibile o assumiamo che booking-view sia il wrapper */
}

/* Modifichiamo il comportamento dei figli diretti per essere contenuti in una card */
.booking-view-container .booking-steps-container,
.booking-view-container .booking-selection-step,
.booking-view-container .booking-calendar-step,
.booking-view-container .booking-confirmation-step {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative; /* Per il pulsante chiudi */
}

/* Pulsante Chiudi */
.close-booking-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-booking-modal-btn:hover {
    background-color: #f0f0f0;
    color: red;
}

/* --- STILI BOOKING STEPS (Ripristino) --- */
#booking-steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    max-width: 800px;
    margin: 0 auto 20px auto; /* Centrato */
    background: transparent !important; /* Override card background if inherited */
    box-shadow: none !important;
    padding: 0 !important;
}

#booking-steps-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step {
    background: white;
    z-index: 1;
    padding: 5px 15px;
    border-radius: 20px;
    border: 2px solid #e0e0e0;
    color: #999;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step-number {
    width: 24px;
    height: 24px;
    background: #e0e0e0;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.step.active .step-number {
    background: var(--primary-color);
}


/* --- STILI CALENDARIO FULL-SCREEN RESTYLING --- */
/* Sovrascriviamo le regole del modale precedente per avere un full-screen pulito */
.booking-view-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: white !important; /* Sfondo bianco come una pagina normale */
    z-index: 99999 !important; /* Sopra tutto */
    padding: 20px; /* Margine interno per il contenuto */
    overflow-y: auto; /* Scroll se il contenuto è lungo */
    display: none; /* Gestito da JS */
}

/* Rimuoviamo stile 'card' dai figli se presente */
.booking-view-container .booking-selection-step,
.booking-view-container .booking-calendar-step,
.booking-view-container .booking-confirmation-step {
    max-width: 1200px; /* Larghezza massima contenuto */
    margin: 0 auto;
    box-shadow: none !important; /* Niente ombre */
    padding: 0 !important; /* Niente padding extra */
}

/* Rimuoviamo stili vecchi degli step che non servono più */
#booking-steps-container {
    display: none;
}


/* --- FIX MOBILE OVERFLOW SERVIZI --- */
@media (max-width: 480px) {
    /* Rimuoviamo la larghezza minima di 300px per le card su mobile */
    .service-group .dynamic-container {
        grid-template-columns: 1fr !important;
    }

    /* Riduciamo il padding del contenitore del gruppo per dare più spazio alla card */
    .service-group-content {
        padding: 10px !important;
    }
    
    /* Assicuriamo che la card non abbia margini negativi o strani */
    .dynamic-card.service-card {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Forza l'immagine a stare dentro (anche se abbiamo border-radius, overflow visible potrebbe causare problemi, ma con max-width 100% dovrebbe andare) */
    .dynamic-card.service-card img {
        max-width: 100%;
        width: 100%;
        height: auto; /* Lascia l'altezza automatica per mantenere aspect ratio, o fissa se preferito, ma auto è più sicuro per evitare distortion */
        border-top-left-radius: 8px; /* Manteniamo stile */
        border-top-right-radius: 8px;
    }
}


/* --- FIX LAYOUT CHAT ADMIN --- */
/* Override per risolvere conflitti con .page-static */
#chat-admin-page {
    display: flex !important;
    flex-direction: row !important;
    padding: 0 !important;
    height: calc(100vh - 60px) !important; /* Aggiusta altezza per footer */
    width: 100% !important;
    overflow: hidden !important; /* Evita scroll sulla pagina principale */
}

/* Assicuriamo che il pannello laterale e il dettaglio siano affiancati e scrollabili */
#chat-list-panel {
    height: 100% !important;
    border-right: 1px solid #ddd;
}
#chat-detail-panel {
    height: 100% !important;
    flex-grow: 1;
}

/* Fix mobile height */
@media (max-width: 768px) {
    #chat-admin-page {
        height: calc(100vh - 120px) !important; /* Più spazio per header mobile */
        flex-direction: column !important; /* Su mobile forse colonne? No, slider */
        /* In realtà su mobile usa transform toggle, quindi display flex row va bene, ma uno è nascosto */
        display: block !important; /* O flex? Il JS gestisce transform. */
        /* Lasciamo flex row come desktop, il CSS esistente gestisce transform */
        display: flex !important;
        flex-direction: row !important;
    }
}

