/* CSS per il calendario di prenotazione casa vacanze */

body { 
    font-family: Arial, sans-serif; 
    margin: 0; 
    padding: 20px; 
    background: #f8f9fa; 
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Overlay per migliorare leggibilità con immagine di sfondo */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: rgba(248, 249, 250, 0.9);*/
    z-index: -1;
    pointer-events: none;
}

/* Sezione introduttiva homepage */
.homepage-intro {
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.homepage-logo {
    max-height: 80px;
    max-width: 300px;
    height: auto;
    width: auto;
    margin-bottom: 20px;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.homepage-logo:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

.homepage-intro h1 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.homepage-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.6;
}

/* Layout a due colonne */
.booking-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    column-gap: 30px;
    row-gap: 30px;
    padding: 0 20px;
}

/* Colonna calendario */
.calendar-column {
    min-width: 0;
}

/* Colonna informazioni */
.info-column {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 5px;
}

.info-column > * {
    margin-bottom: 20px;
}

.info-column > *:last-child {
    margin-bottom: 0;
}

/* Scrollbar personalizzata per info-column */
.info-column::-webkit-scrollbar {
    width: 6px;
}

.info-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.info-column::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.info-column::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Container calendario */
#calendar-container { 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
    overflow: hidden; 
}

/* Card informazioni check-in/check-out */
.checkin-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
}

.checkin-info-card h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.checkin-info-card h3 i {
    color: #007bff;
    margin-right: 10px;
}

.checkin-info-grid {
    display: flex;
    flex-direction: column;
}

.checkin-item {
    display: flex;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.checkin-item:last-child {
    margin-bottom: 0;
}

.checkin-icon {
    font-size: 24px;
    color: #007bff;
    flex-shrink: 0;
    margin-right: 15px;
}

.checkin-details h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
    font-weight: bold;
}

.checkin-time {
    margin: 0 0 5px 0;
    color: #007bff;
    font-weight: bold;
    font-size: 15px;
}

.checkin-instructions {
    margin: 0;
    color: #6c757d;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive: su schermi piccoli torna a colonna singola */
@media (max-width: 1024px) {
    .booking-layout {
        grid-template-columns: 1fr;
        max-width: 800px;
    }
    
    .info-column {
        order: 2;
    }
    
    .calendar-column {
        order: 1;
    }
}

/* Header calendario con navigazione */
.calendar-header { 
    background: #007bff; 
    color: white; 
    padding: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* Sezioni header */
.header-left, .header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Logo nell'header */
.calendar-logo {
    max-height: 40px;
    max-width: 200px;
    height: auto;
    width: auto;
    margin-bottom: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
}

.calendar-logo:hover {
    transform: scale(1.05);
}

.calendar-title { 
    font-size: 24px; 
    font-weight: bold; 
    margin: 0;
    transition: all 0.3s ease;
    text-align: center;
}

/* Quando c'è il logo, riduci il titolo */
.calendar-title.with-logo {
    font-size: 18px;
    margin-top: 4px;
}

.calendar-title.loading-month {
    opacity: 0.7;
    animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.nav-button { 
    background: rgba(255,255,255,0.2); 
    border: none; 
    color: white; 
    padding: 8px 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    margin: 0 5px; 
}

.nav-button:hover { 
    background: rgba(255,255,255,0.3); 
}

.nav-button:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* Griglia calendario */
.calendar-grid { 
    padding: 0; 
}

.weekdays { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    background: #f8f9fa; 
    border-bottom: 1px solid #dee2e6; 
}

.weekday { 
    padding: 12px; 
    text-align: center; 
    font-weight: bold; 
    color: #6c757d; 
    font-size: 14px; 
}

.days-grid { 
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 1px; 
    background: #dee2e6; 
}

/* Singole celle giorno */
.day { 
    background: white; 
    aspect-ratio: 1; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    padding: 4px;
}

.day:hover:not(.booked):not(.past):not(.start-selected):not(.range-start):not(.range-end):not(.range-middle) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.day-number {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
}

.day-price {
    font-size: 10px;
    color: #28a745;
    font-weight: bold;
    line-height: 1;
}

/* Stati del giorno */
.day.other-month { 
    color: #adb5bd; 
    background: #f8f9fa; 
}

.day.other-month .day-price {
    color: #adb5bd;
}

.day.today { 
    background: #e3f2fd; 
    font-weight: bold; 
}

.day.free:hover { 
    background: #e8f5e9; 
}

.day.past { 
    color: #adb5bd; 
    cursor: not-allowed; 
    background: #f8f9fa; 
}

.day.past:hover { 
    background: #f8f9fa; 
    transform: none;
    box-shadow: none;
}

.day.past .day-price {
    color: #adb5bd;
}

/* Tipi di prenotazioni - tutte appaiono come "non disponibile" al cliente */
.day.booked { 
    cursor: not-allowed; 
    color: white; 
    font-weight: bold; 
    background: #6c757d;
}

.day.booked .day-price {
    display: none; /* Nascondi prezzo sui giorni non disponibili */
}

/* Stili specifici per tipo di blocco/prenotazione */
.day.booked-internal {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.day.booked-external {
    background: linear-gradient(135deg, #fd7e14, #e56910);
}

.day.booked-manual {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.day.booked-maintenance {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.day.booked-generic {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

/* Selezione date */
.day.range-start,
.day.range-start.free,
.day.range-start.today { 
    background: #007bff !important; 
    color: white !important; 
    border-radius: 6px 0 0 6px !important; 
    font-weight: bold !important; 
    border: 3px solid #0056b3 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0,123,255,0.4) !important;
}

.day.range-end,
.day.range-end.free,
.day.range-end.today { 
    background: #007bff !important; 
    color: white !important; 
    border-radius: 0 6px 6px 0 !important; 
    font-weight: bold !important; 
    border: 3px solid #0056b3 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0,123,255,0.4) !important;
}

.day.range-middle,
.day.range-middle.free,
.day.range-middle.today { 
    background: rgba(0,123,255,0.3) !important; 
    border-top: 2px solid #007bff !important; 
    border-bottom: 2px solid #007bff !important; 
    color: #0056b3 !important;
    font-weight: 600 !important;
}

.day.range-start.range-end { 
    border-radius: 6px; 
}

/* Solo inizio selezione (prima di selezionare fine) - MASSIMA PRIORITÀ */
.day.start-selected,
.day.start-selected.today,
.day.start-selected.free { 
    background: #28a745 !important; 
    color: white !important; 
    border-radius: 6px !important; 
    font-weight: bold !important; 
    border: 3px solid #1e7e34 !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 15px rgba(40,167,69,0.5) !important;
    animation: pulse-green 1.5s ease-in-out infinite !important;
    z-index: 10 !important;
}

@keyframes pulse-green {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(40,167,69,0.5);
        transform: scale(1.08);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(40,167,69,0.7);
        transform: scale(1.1);
    }
}

/* Preview range durante hover */
.day.hover-preview { 
    background: rgba(0,123,255,0.15); 
    border: 1px dashed #007bff; 
    color: #0056b3;
    font-weight: 500;
}

.day.hover-preview-start { 
    background: rgba(0,123,255,0.4); 
    border: 2px dashed #007bff; 
    border-radius: 6px 0 0 6px;
    color: #0056b3;
    font-weight: bold;
}

.day.hover-preview-end { 
    background: rgba(0,123,255,0.4); 
    border: 2px dashed #007bff; 
    border-radius: 0 6px 6px 0;
    color: #0056b3;
    font-weight: bold;
}

.day.hover-preview-start.hover-preview-end { 
    border-radius: 6px; 
}

.day.range-start .day-price,
.day.range-end .day-price,
.day.range-middle .day-price {
    color: rgba(255,255,255,0.9);
}

.day.start-selected .day-price {
    color: rgba(255,255,255,0.9);
}

.day.hover-preview .day-price,
.day.hover-preview-start .day-price,
.day.hover-preview-end .day-price {
    color: #0056b3;
    font-weight: bold;
}

/* Area selezione e prezzo */
.selection-info { 
    padding: 20px; 
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Input rapidi - ottimizzati per colonna */
.quick-inputs-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    line-height: 1.3;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    height: 42px;
    box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    transform: translateY(-1px);
}

.clear-btn {
    background: #6c757d;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    height: 42px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    margin: 0;
}

/* Gruppo pulsante */
.input-group.button-group {
    justify-content: flex-end;
}

.button-label {
    visibility: hidden;
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.clear-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Display selezione - ottimizzato per colonna */
.selection-display { 
    margin-top: 20px;
}

.selection-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #007bff;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
}

.date-range { 
    font-size: 16px; 
    font-weight: bold; 
    color: #495057; 
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.date-range::before {
    content: "📅";
    font-size: 18px;
    margin-right: 8px;
}

.guests-display {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.guests-display::before {
    content: "👥";
    font-size: 16px;
    margin-right: 8px;
}

.price-display { 
    font-size: 22px; 
    font-weight: bold; 
    color: #007bff; 
    margin: 0;
    line-height: 1.2;
    padding-top: 12px;
    border-top: 2px solid #dee2e6;
    display: flex;
    align-items: center;
}

.price-display::before {
    content: "💰";
    font-size: 20px;
    margin-right: 8px;
}

/* Payment method selector */
.payment-method-selector {
    margin: 15px 0;
}

.payment-method-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-btn i {
    margin-right: 8px;
}

.payment-method-btn:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.payment-method-btn.active {
    border-color: #007bff;
    background: #e7f3ff;
    color: #007bff;
}

.payment-method-btn i {
    font-size: 18px;
}

.book-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    min-height: 48px;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.book-btn::before {
    content: "💳";
    font-size: 18px;
}

.book-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

/* Animazione pulse per attirare l'attenzione sul pulsante */
.book-btn.pulse-animation {
    animation: pulse-glow 0.8s ease-in-out 3;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 8px rgba(0,123,255,0.3);
        background: #007bff;
    }
    50% {
        box-shadow: 0 0 25px rgba(0,123,255,0.8), 0 0 50px rgba(0,123,255,0.4);
        background: #0069d9;
    }
    100% {
        box-shadow: 0 4px 8px rgba(0,123,255,0.3);
        background: #007bff;
    }
}

/* Form di prenotazione - ottimizzato per colonna */
.booking-form {
    margin: 20px 0 0 0;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.booking-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-form h3::before {
    content: "✍️";
    font-size: 20px;
}

.booking-form h4 {
    margin-top: 20px;
    margin-bottom: 12px;
    color: #495057;
    font-size: 15px;
    font-weight: 600;
}

/* Riepilogo prenotazione nel form - compatto */
.booking-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.booking-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

.booking-summary .summary-item:last-child {
    border-bottom: none;
}

.booking-summary .summary-item.total {
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #007bff;
}

.booking-summary .summary-label {
    font-weight: 600;
    color: #495057;
}

.booking-summary .summary-value {
    font-weight: 500;
    color: #212529;
}

.booking-summary .summary-item.total .summary-value {
    font-size: 18px;
    color: #007bff;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    line-height: 1.3;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    height: 42px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    transform: translateY(-1px);
}

.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.confirm-btn {
    background: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    flex: 1;
    transition: background-color 0.2s ease;
}

.confirm-btn:hover {
    background: #218838;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    flex: 1;
    transition: background-color 0.2s ease;
}

.cancel-btn:hover {
    background: #545b62;
}

/* Legenda - ottimizzata per colonna */
.legend { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0; 
    font-size: 12px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.legend-item { 
    display: flex; 
    align-items: center; 
    gap: 8px;
    padding: 5px;
}

.legend-color { 
    width: 14px; 
    height: 14px; 
    border-radius: 3px;
    flex-shrink: 0;
}

/* Animazione caricamento */
.calendar-loading {
    opacity: 0.6;
    pointer-events: none;
}

.calendar-loading .day {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive - Tablet e inferiore */
@media (max-width: 1024px) {
    /* Layout torna a colonna singola */
    .booking-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    /* Info column non più sticky su tablet */
    .info-column {
        position: relative;
        max-height: none;
    }
    
    /* Input tornano in griglia su tablet */
    .quick-inputs-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    
    .legend {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body { 
        padding: 10px; 
    }
    
    /* Homepage intro più compatta */
    .homepage-intro {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .homepage-intro h1 {
        font-size: 24px;
    }
    
    .homepage-intro p {
        font-size: 15px;
    }
    
    .homepage-logo {
        max-height: 60px;
        max-width: 200px;
    }
    
    /* Calendario header compatto */
    .calendar-header { 
        padding: 12px 15px;
        flex-wrap: nowrap;
    }
    
    .calendar-title { 
        font-size: 18px;
        white-space: nowrap;
    }
    
    .calendar-title.with-logo { 
        font-size: 14px;
    }
    
    .calendar-logo { 
        max-height: 28px;
        max-width: 120px;
        margin-bottom: 4px;
    }
    
    .nav-button { 
        padding: 8px 12px;
        font-size: 16px;
        min-width: 36px;
    }
    
    /* Celle calendario ottimizzate per tocco */
    .day { 
        font-size: 13px;
        min-height: 50px;
        padding: 6px 4px;
    }
    
    .day-number { 
        font-size: 15px;
    }
    
    .day-price { 
        font-size: 10px;
    }
    
    .weekday { 
        padding: 10px 4px;
        font-size: 11px;
    }
    
    /* Info cards più compatte */
    .checkin-info-card {
        padding: 15px;
    }
    
    .checkin-info-card h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .checkin-item {
        padding: 12px;
    }
    
    .checkin-icon {
        font-size: 20px;
    }
    
    .checkin-details h4 {
        font-size: 14px;
    }
    
    .checkin-time {
        font-size: 14px;
    }
    
    .checkin-instructions {
        font-size: 12px;
    }
    
    /* Input rapidi responsive */
    .quick-inputs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .input-group label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .input-group input,
    .input-group select {
        padding: 10px;
        font-size: 14px;
        height: 44px;
    }
    
    /* Riepilogo selezione */
    .selection-summary {
        padding: 15px;
    }
    
    .date-range { 
        font-size: 15px;
    }
    
    .guests-display {
        font-size: 13px;
    }
    
    .price-display { 
        font-size: 20px;
    }
    
    .book-btn { 
        padding: 14px 20px;
        font-size: 15px;
        min-height: 52px;
    }
    
    /* Legenda compatta */
    .legend { 
        font-size: 11px;
        gap: 8px;
        padding: 12px;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    /* Homepage ancora più compatta */
    .homepage-intro {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .homepage-intro h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .homepage-intro p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .homepage-logo {
        max-height: 50px;
        max-width: 180px;
        margin-bottom: 12px;
    }
    
    .booking-layout {
        padding: 0 5px;
        gap: 15px;
    }
    
    /* Header calendario mobile-first */
    .calendar-header { 
        padding: 10px 12px;
        gap: 8px;
    }
    
    .header-center {
        min-width: 0;
    }
    
    .calendar-title { 
        font-size: 16px;
        line-height: 1.2;
    }
    
    .calendar-title.with-logo { 
        font-size: 13px;
    }
    
    .calendar-logo {
        max-height: 24px;
        max-width: 100px;
        margin-bottom: 3px;
    }
    
    .nav-button {
        padding: 6px 10px;
        font-size: 18px;
        margin: 0 2px;
        min-width: 32px;
    }
    
    /* Giorni settimana abbreviati su mobile */
    .weekday {
        padding: 8px 2px;
        font-size: 10px;
    }
    
    /* Celle giorno ottimizzate per tocco su small screen */
    .day {
        min-height: 48px;
        padding: 4px 2px;
        font-size: 12px;
    }
    
    .day-number {
        font-size: 14px;
        margin-bottom: 1px;
    }
    
    .day-price {
        font-size: 9px;
    }
    
    /* Disabilita hover effects su mobile per migliore UX touch */
    .day:hover:not(.booked):not(.past) {
        transform: none;
        box-shadow: none;
    }
    
    /* Check-in info compatta */
    .checkin-info-card {
        padding: 12px;
    }
    
    .checkin-info-card h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .checkin-info-grid {
        gap: 12px;
    }
    
    .checkin-item {
        padding: 10px;
        gap: 10px;
    }
    
    .checkin-icon {
        font-size: 18px;
    }
    
    .checkin-details h4 {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .checkin-time {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .checkin-instructions {
        font-size: 11px;
    }
    
    /* Input rapidi su mobile - colonna singola per migliore usabilità */
    .quick-inputs-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .input-group input,
    .input-group select,
    .clear-btn {
        height: 46px;
        font-size: 15px;
        padding: 12px;
    }
    
    .input-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    /* Selection info compatta */
    .selection-info {
        padding: 15px;
    }
    
    .selection-summary {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .date-range { 
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .date-range::before {
        font-size: 16px;
    }
    
    .guests-display {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .guests-display::before {
        font-size: 14px;
    }
    
    .price-display { 
        font-size: 18px;
        padding-top: 10px;
    }
    
    .price-display::before {
        font-size: 18px;
    }
    
    /* Pulsante prenotazione ottimizzato per tocco */
    .book-btn { 
        padding: 15px 20px;
        font-size: 16px;
        min-height: 54px;
        font-weight: 700;
    }
    
    .book-btn::before {
        font-size: 20px;
    }
    
    /* Legenda compatta */
    .legend { 
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
        font-size: 11px;
    }
    
    .legend-item {
        padding: 4px;
    }
    
    /* Form compatto */
    .form-grid {
        gap: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .form-group input {
        height: 46px;
        font-size: 15px;
        padding: 12px;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .confirm-btn,
    .cancel-btn {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 48px;
    }
    
    /* Footer mobile */
    .site-footer {
        margin-top: 30px;
        padding: 30px 0 15px 0;
    }
}

/* Extra small devices (< 360px) */
@media (max-width: 359px) {
    .calendar-title {
        font-size: 14px;
    }
    
    .calendar-title.with-logo {
        font-size: 12px;
    }
    
    .nav-button {
        padding: 5px 8px;
        font-size: 16px;
        min-width: 28px;
    }
    
    .day {
        min-height: 44px;
        font-size: 11px;
    }
    
    .day-number {
        font-size: 13px;
    }
    
    .day-price {
        font-size: 8px;
    }
    
    .weekday {
        font-size: 9px;
        padding: 6px 1px;
    }
}

/* Footer aziendale */
.site-footer {
    background: #343a40;
    color: white;
    margin-top: 50px;
    padding: 40px 0 20px 0;

}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    padding: 0 20px;
}

.footer-section h4 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 18px;
    font-weight: bold;
}

.footer-section p {
    margin: 8px 0;
    color: #ced4da;
    line-height: 1.5;
}

.footer-year {
    margin-top: 20px !important;
    font-size: 14px;
    text-align: center;
    border-top: 1px solid #495057;
    padding-top: 15px;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
}

/* ===== MODAL PRENOTAZIONE ===== */
.modal-booking-container {
    text-align: left;
    max-height: 70vh;
    overflow-y: auto;
    padding: 5px;
}

/* Riepilogo nel modal - compatto e discreto */
.modal-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #e9ecef;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total-row {
    background: none;
    border-top: 2px solid #dee2e6;
    border-bottom: none;
    padding: 10px 0 0 0;
    margin-top: 5px;
}

.summary-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
    opacity: 0.8;
}

.summary-info {
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}

.summary-info strong {
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

/* Form nel modal */
.modal-form {
    padding-top: 10px;
}

.form-grid-modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Personalizzazione SweetAlert2 per booking modal */
.booking-modal-popup {
    font-family: Arial, sans-serif;
    max-width: 600px !important;
    width: 90% !important;
}

.booking-modal-popup .swal2-title {
    color: #495057;
    font-size: 24px;
    padding: 20px 20px 10px 20px;
}

.booking-modal-popup .swal2-html-container {
    padding: 10px 20px 20px 20px;
}

.booking-modal-confirm {
    font-size: 16px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
    min-width: 140px !important;
}

.booking-modal-cancel {
    font-size: 16px !important;
    padding: 12px 30px !important;
    min-width: 140px !important;
}

/* Scrollbar per modal */
.modal-booking-container::-webkit-scrollbar {
    width: 8px;
}

.modal-booking-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-booking-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.modal-booking-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive modal - Tablet */
@media (max-width: 768px) {
    .booking-modal-popup {
        max-width: 540px !important;
        width: 92% !important;
    }
    
    .booking-modal-popup .swal2-title {
        font-size: 20px;
        padding: 15px 15px 10px 15px;
    }
    
    .booking-modal-popup .swal2-html-container {
        padding: 10px 15px 15px 15px;
    }
    
    .modal-booking-container {
        max-height: 65vh;
    }
    
    .modal-summary {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .summary-row {
        padding: 5px 0;
        font-size: 12px;
    }
    
    .summary-icon {
        font-size: 14px;
    }
    
    .form-grid-modal {
        gap: 12px;
    }
    
    .modal-input {
        padding: 11px;
        font-size: 14px;
    }
    
    .booking-modal-confirm,
    .booking-modal-cancel {
        font-size: 15px !important;
        padding: 11px 25px !important;
        min-width: 120px !important;
    }
}

/* Responsive modal - Mobile */
@media (max-width: 480px) {
    .booking-modal-popup {
        max-width: 100% !important;
        width: 95% !important;
        margin: 10px !important;
    }
    
    .booking-modal-popup .swal2-title {
        font-size: 18px;
        padding: 12px 12px 8px 12px;
        line-height: 1.3;
    }
    
    .booking-modal-popup .swal2-html-container {
        padding: 8px 12px 12px 12px;
    }
    
    .booking-modal-popup .swal2-actions {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100%;
        padding: 15px 12px !important;
    }
    
    .modal-booking-container {
        max-height: 60vh;
        padding: 2px;
    }
    
    .modal-summary {
        padding: 10px;
        margin-bottom: 12px;
        border-radius: 6px;
    }
    
    .summary-details {
        gap: 6px;
    }
    
    .summary-row {
        padding: 5px 0;
        font-size: 12px;
        gap: 8px;
    }
    
    .summary-row.total-row {
        padding: 8px 0 0 0;
        margin-top: 4px;
    }
    
    .summary-icon {
        font-size: 15px;
    }
    
    .summary-info strong {
        font-size: 12px;
    }
    
    /* Form su mobile - colonna singola per migliore usabilità */
    .form-grid-modal {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal-input {
        padding: 13px;
        font-size: 15px;
        height: 48px;
        border-width: 2px;
    }
    
    .modal-input:focus {
        transform: none;
    }
    
    /* Pulsanti modal ottimizzati per tocco */
    .booking-modal-confirm,
    .booking-modal-cancel {
        font-size: 16px !important;
        padding: 14px 20px !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 50px !important;
        border-radius: 8px !important;
    }
    
    .booking-modal-confirm {
        order: 1;
    }
    
    .booking-modal-cancel {
        order: 2;
    }
}

/* Extra small devices - Modal ancora più compatto */
@media (max-width: 359px) {
    .booking-modal-popup {
        width: 98% !important;
        margin: 5px !important;
    }
    
    .booking-modal-popup .swal2-title {
        font-size: 16px;
        padding: 10px 10px 6px 10px;
    }
    
    .booking-modal-popup .swal2-html-container {
        padding: 6px 10px 10px 10px;
    }
    
    .modal-booking-container {
        max-height: 55vh;
    }
    
    .modal-summary {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .summary-row {
        font-size: 11px;
        padding: 4px 0;
        gap: 6px;
    }
    
    .summary-icon {
        font-size: 13px;
    }
    
    .modal-input {
        padding: 12px;
        font-size: 14px;
        height: 46px;
    }
    
    .booking-modal-confirm,
    .booking-modal-cancel {
        font-size: 15px !important;
        padding: 13px 18px !important;
        min-height: 48px !important;
    }
}

/* ===== LOADER CALENDARIO ===== */
.calendar-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.loader-content {
    text-align: center;
    padding: 40px;
}

/* Spinner rotante */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px auto;
    position: relative;
}

/* Animazione rotazione */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Effetto pulsante sul spinner */
.spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.8); }
}

/* Testo del loader */
.loader-text h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 24px;
    font-weight: bold;
}

.loader-text p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
    line-height: 1.5;
}

/* Animazione fade-in per il testo */
.loader-text {
    animation: fadeInText 2s ease-in-out infinite alternate;
}

@keyframes fadeInText {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Transizione smooth per nascondere/mostrare */
.calendar-main {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.calendar-main.loaded {
    opacity: 1;
    transform: translateY(0);
}

.calendar-loader.hide {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

/* Responsive loader */
@media (max-width: 768px) {
    .calendar-loader {
        min-height: 400px;
    }
    
    .loader-content {
        padding: 20px;
    }
    
    .spinner {
        width: 50px;
        height: 50px;
        border-width: 5px;
        margin-bottom: 20px;
    }
    
    .spinner::after {
        width: 15px;
        height: 15px;
    }
    
    .loader-text h3 {
        font-size: 20px;
    }
    
    .loader-text p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calendar-loader {
        min-height: 350px;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
    
    .spinner::after {
        width: 12px;
        height: 12px;
    }
    
    .loader-text h3 {
        font-size: 18px;
    }
}