/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-container {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.logo-equialibriom,
.logo-daimon {
    max-height: 80px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.data-evento {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Messaggio */
.messaggio {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.messaggio code {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Griglia trattamenti */
.trattamenti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Card trattamento */
.trattamento-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.trattamento-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.trattamento-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trattamento-content {
    padding: 1.5rem;
}

.trattamento-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.trattamento-content h2 .icon-expand {
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.trattamento-card.expand-desc:hover .icon-expand {
    opacity: 1;
    transform: scale(1.1);
}

.trattamento-card.expand-desc {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trattamento-card.expand-desc:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.descrizione {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.trattamento-info {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.durata {
    display: inline-block;
    background: #e8f4f8;
    color: #2c5f7d;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.prezzo {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Bottone prenota */
.btn-prenota {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: opacity 0.3s ease, transform 0.2s ease;
    position: relative;
    z-index: 5;
}

.btn-prenota:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Bottone prenota soldout */
.btn-prenota.soldout {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

.btn-prenota.soldout:hover {
    opacity: 0.7;
    transform: none;
}

/* Card contatti Marco */
.contatti-card {
    background: rgba(102, 126, 234, 0.08);
    border: 2px dashed #667eea;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    max-width: 280px;
    margin: 0 auto;
}

.contatti-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: rgba(102, 126, 234, 0.05);
}

.contatti-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contatti-content {
    padding: 1.25rem;
    text-align: center;
}

.contatti-intro {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.contatti-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contatto-link {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.contatto-link:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

/* Form prenotazione */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group label .obbligatorio {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group .error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e74c3c;
}

.form-group.error .error {
    display: block;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn-submit:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Riepilogo costo */
.riepilogo-costo {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.riepilogo-costo-header {
    margin-bottom: 1rem;
}

.riepilogo-costo-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.2rem;
    font-weight: 600;
}

.riepilogo-costo-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.riepilogo-riga {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.riepilogo-label {
    font-weight: 600;
    color: #333;
}

.riepilogo-valore {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.riepilogo-pagamento {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.riepilogo-pagamento p {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.loading {
    display: none;
    text-align: center;
    padding: 1rem;
    color: #667eea;
}

.loading.active {
    display: block;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message.active,
.error-message.active {
    display: block;
}

/* Orari disponibili */
.orari-disponibili {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Input orario nascosto (usiamo solo i bottoni) */

.orario-slot {
    padding: 0.75rem;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.orario-slot:hover {
    background: #e8f4f8;
    border-color: #667eea;
}

.orario-slot.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Box soldout */
.soldout-box {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.soldout-message {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.6;
}

.soldout-message strong {
    color: #e65100;
    font-weight: 700;
}

/* Messaggio feedback soldout */
.soldout-feedback {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
}

.soldout-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.soldout-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.soldout-email-form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.soldout-nome-input {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1rem;
    border: 2px solid #ff9800;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.soldout-nome-input:focus {
    outline: none;
    border-color: #e65100;
}

.soldout-email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ff9800;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.soldout-email-input:focus {
    outline: none;
    border-color: #e65100;
}

.btn-soldout-email {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.btn-soldout-email:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.btn-soldout-email:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form disabilitato quando soldout */
.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled,
.form-group button:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.orario-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.orari-loading {
    text-align: center;
    padding: 1rem;
    color: #666;
}

/* Bottone indietro */
.btn-indietro {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-indietro:hover {
    background: #e0e0e0;
}

/* Modale descrizione completa */
.descrizione-modale {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.descrizione-modale-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.descrizione-modale-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 1001;
    background: white;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.descrizione-modale-content h2 {
    margin-bottom: 0rem;
    color: #667eea;
    font-size: 1.5rem;
    padding-right: 2rem;
    flex-shrink: 0;
}

.descrizione-modale-testo {
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
}

.descrizione-modale-close:hover {
    color: #333;
}

.descrizione-modale-content h2 {
    margin-bottom: 0rem;
    color: #667eea;
    font-size: 1.5rem;
    padding-right: 2rem;
}

.descrizione-modale-testo {
    color: #333;
    line-height: 1.8;
    font-size: 1rem;
}

.descrizione-modale-testo p {
    margin-bottom: 0.75rem;
    color: #444;
}

.descrizione-modale-testo p:last-child {
    margin-bottom: 0;
}

/* Titoli principali (sezioni) - h2 */
.descrizione-modale-testo h2.titolo-sezione {
    display: block;
    color: #8b5cf6;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.descrizione-modale-testo h2.titolo-sezione:first-child {
    margin-top: 0;
}

/* "È per Te se..." - strong speciale */
.descrizione-modale-testo strong.titolo-sezione {
    display: inline;
    color: #8b5cf6;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Titoletti (sottosezioni) - strong inline come prima */
.descrizione-modale-testo strong.titolo-sottosezione {
    color: #333;
    font-weight: 700;
    font-size: 1.05em;
    display: inline;
    margin-right: 0.5rem;
}

.descrizione-modale-testo strong:not(.titolo-sezione):not(.titolo-sottosezione) {
    color: #333;
    font-weight: 600;
    font-size: 1.05em;
    display: inline;
}

.descrizione-modale-testo em {
    font-style: italic;
    color: #555;
}

.descrizione-modale-testo br {
    margin-bottom: 0.5rem;
    display: block;
    content: "";
}

.descrizione-modale-content h2 {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Titolo principale della modale (nome trattamento) */
#descrizioneModaleTitolo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    margin-top: 3rem;
}

.contatti-testo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.contatti-footer {
    margin-bottom: 1rem;
}

.contatti-footer p {
    margin: 0;
}

.contatti-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contatti-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.contatti-footer .separatore {
    margin: 0 0.5rem;
    color: #999;
}

.copyright {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #999;
}

/* Sezione Indirizzo e Mappa */
.indirizzo-mappa-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.indirizzo-mappa-titolo {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
}

.indirizzo-mappa-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.indirizzo-info {
    padding: 1rem;
}

.indirizzo-nome {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
}

.indirizzo-dettagli {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-maps {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-maps:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mappa-container {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mappa-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mappa-link iframe {
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
}

.mappa-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 15px;
    text-align: center;
}

.mappa-overlay-text {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .soldout-email-form {
        flex-direction: column;
    }
    
    .soldout-nome-input,
    .soldout-email-input {
        width: 100%;
        min-width: auto;
    }
    
    .btn-soldout-email {
        width: 100%;
    }
    
    .soldout-box {
        padding: 1rem;
    }
    
    .soldout-message {
        font-size: 1rem;
    }
    
    .logo-container {
        gap: 1rem;
    }
    
    .logo {
        height: 50px;
        max-height: 50px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .trattamenti-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .orari-disponibili {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .trattamento-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    
    .durata {
        flex: 0 0 auto;
    }
    
    .prezzo {
        flex: 0 0 auto;
        margin-top: 0;
        margin-left: auto;
    }
    
    .descrizione-modale-content {
        padding: 1.5rem;
        max-height: 85vh;
    }
    
    .indirizzo-mappa-container {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
    
    .indirizzo-mappa-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .indirizzo-info {
        text-align: center;
    }
    
    .mappa-container {
        height: 250px;
    }
}

