
.wrapper-header{
    position: relative;
    height: 40vh;
    min-height: 300px;
    background-image: url('../images/carousel/pellegrino.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.header-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-family: var(--text-font), serif;
    font-size: 4em;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.header-content p {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (max-width: 870px){
    .header-content h1{
        font-size: 2.7rem;
        margin: auto 5px;
    }

    .header-content p{
        font-size: 1rem;
        margin: auto 1rem;
    }
}


/* --- SEZIONE PRENOTAZIONE --- */
.booking-section {
    padding: 60px 20px;
    background-color: var(--light-color);
}

.booking-container {
    max-width: 1200px;
    margin: -100px auto 0;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
}

@media (max-width: 1300px) {
    .booking-container {
        max-width: 800px;
    }
}

.form-intro {
    text-align: center;
    margin-bottom: 30px;
}

.form-intro h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

/* --- GRIGLIA FORM --- */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

/* Gestione larghezza campi */
.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.full-width {
    width: 100%;
}

/* STILE INPUT E LABEL */
label {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
}

input, select, textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fcfcfc;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color:  var(--primary-color);
    background-color: white;
    outline: none;
    box-shadow: 0 0 5px rgba(46, 46, 92, 0.2);
}

input::placeholder, select::placeholder, textarea::placeholder{
    opacity: 0.5;
}


textarea {
    resize: vertical;
    font-family: var(--text-font), sans-serif;
}

.checkbox-row{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.checkbox-row input{
    width: auto;
    cursor: pointer;
}
.checkbox-row label{
    margin-bottom: 0;
    font-weight: normal;
}
.checkbox-row a{
    color: var(--primary-color);
}

/* STILE BOTTONE */
.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
    align-self: center;
    min-width: 200px;
}

.btn-submit:hover {
    background-color: var(--primary-color-hover);
    transform: translateY(-2px);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 870px) {
    .booking-container {
        margin-top: 0;
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .header-content h1 {
        font-size: 2rem;
    }
}

/* MESSAGGI DI NOTIFICA FLASH MESSAGES */
.alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    animation: fadeInDown 0.5s ease-out;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 5px solid #4caf50;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 5px solid #f44336;
}


@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/*js*/
.loader-overlay.active {
    visibility: visible;
    opacity: 1;
}


.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e0e0e0;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loader-overlay p {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}