/* ==========================================================
   PRENOTAZIONE.CSS
   Stili per Prenotazione.html, recap.html, conferma.html
   ========================================================== */

/* ── 1. RESET & BASE ────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ── 2. FOCUS STATES ────────────────────────────────────── */
input:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 2px solid #2f5d2a;
    border-radius: 2px;
}

/* ── 3. LINKS ───────────────────────────────────────────── */
a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* ── 4. NAVBAR TOGGLER ──────────────────────────────────── */
body .navbar-toggler,
.navbar .navbar-toggler,
.navbar-light .navbar-toggler {
    background: #3a6b35 !important;
    background-image: none !important;
    border: none !important;
}

body .navbar-toggler:hover,
.navbar .navbar-toggler:hover,
.navbar-light .navbar-toggler:hover {
    background: #2f5d2a !important;
    background-image: none !important;
}

body .navbar-toggler:focus,
.navbar .navbar-toggler:focus,
.navbar-light .navbar-toggler:focus {
    background: #3a6b35 !important;
    background-image: none !important;
    box-shadow: 0 0 0 3px rgba(58, 107, 53, 0.3) !important;
    outline: none !important;
}

/* ── 5. FORM SECTION ────────────────────────────────────── */
.form-section {
    background-image: url(Img/Natura.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-x: hidden;
    width: 100%;
}

.form-section .container {
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 249, 250, 0.85) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(61, 145, 59, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(61, 145, 59, 0.1);
}

.form-section .container h1 {
    text-align: center;
    color: #3d913b;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.info-label {
    color: #555;
    font-size: 12px;
    font-style: italic;
}

/* ── 6. FORM ELEMENTS ───────────────────────────────────── */
form {
    display: flex;
    flex-direction: column;
}

form label {
    font-weight: 600;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    color: #3d913b;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

form input,
form textarea {
    padding: 14px 16px;
    margin-top: 5px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    width: 100%;
}

form input::placeholder,
form textarea::placeholder {
    font-style: italic;
    color: #999;
}

form input:hover,
form textarea:hover {
    border-color: #3d913b;
    background-color: #fff;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: #3d913b;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(61, 145, 59, 0.1);
    transform: translateY(-2px);
}

form textarea {
    min-height: 120px;
    resize: vertical;
}

.errore {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

/* ── 7. CALENDARIO FLATPICKR ────────────────────────────── */
.flatpickr-calendar {
    z-index: 99999 !important;
}

.flatpickr-month,
.flatpickr-monthDropdown-months,
.flatpickr-weekdays,
.flatpickr-weekdays .flatpickr-weekday {
    background: #4CAF50 !important;
}

.flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
    background: #4CAF50 !important;
}

.flatpickr-weekdays .flatpickr-weekday {
    color: #fff;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
    color: white !important;
}

.flatpickr-day.today {
    border: 1px solid #4CAF50 !important;
}

.flatpickr-calendar.arrowTop::after {
    border-bottom-color: #4CAF50 !important;
}

.calendar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.calendar-wrapper input {
    width: 100%;
    padding-right: 50px !important;
}

.calendar-icon {
    position: absolute;
    right: 15px;
    top: 14px;
    cursor: pointer;
    background-color: #3d913b;
    border-radius: 8px;
    padding: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-icon:hover {
    background-color: #2f5d2a;
}

.calendar-icon img {
    max-width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

@media (max-width: 1000px) {
    .date-box {
        max-width: 90% !important;
        margin: 0 auto !important;
    }
}

/* ── 8. BOTTONI ─────────────────────────────────────────── */
button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.btn-primary:disabled,
button:disabled {
    background: linear-gradient(135deg, #b0b0b0 0%, #9a9a9a 100%) !important;
    cursor: not-allowed !important;
    opacity: 0.55 !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    color: white;
    text-decoration: none;
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #a4a3a3 0%, #8a8a8a 100%);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #555;
}

.form-buttons,
.buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.form-buttons button,
.form-buttons .btn-primary,
.form-buttons .btn-secondary,
.buttons-container button,
.buttons-container .btn-primary,
.buttons-container .btn-secondary {
    flex: 1;
    margin: 0;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── 9. MODALE ──────────────────────────────────────────── */
#modale-conferma {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modale-contenuto {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modale-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3);
    color: white;
}

.modale-contenuto h2 {
    color: #3d913b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.modale-contenuto p {
    color: #555;
    font-size: 1.05rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modale-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modale-buttons button {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

.chiudi-modale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    line-height: 1;
    margin: 0;
    box-shadow: none;
}

.chiudi-modale:hover {
    background: #f0f0f0;
    color: #3d913b;
    transform: rotate(90deg);
}

/* ── 10. BREADCRUMB ─────────────────────────────────────── */
.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb {
    background-color: transparent !important;
    margin: 10px 60px;
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    border-radius: 0.25rem;
    max-width: 100%;
    overflow-x: hidden;
}

nav[aria-label="breadcrumb"] {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.breadcrumb-item a {
    color: #3d913b;
    text-decoration: none;
    font-weight: bold;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
    color: #2f5d2a;
}

/* ── 11. RECAP PAGE ─────────────────────────────────────── */
.recap-box {
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 40px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(61, 145, 59, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(61, 145, 59, 0.1);
}

.recap-box h1 {
    text-align: center;
    color: #3d913b;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.recap-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.recap-item {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.recap-item:last-child {
    border-bottom: none;
}

.recap-label {
    font-weight: 600;
    color: #2f5d2a;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.recap-value {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
}

.info-alert {
    background: linear-gradient(135deg, #e9fbe5 0%, #f0f9ee 100%);
    border-left: 4px solid #3d913b;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-alert svg {
    color: #3d913b;
    flex-shrink: 0;
}

.info-alert p {
    margin: 0;
    color: #2f5d2a;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── 12. CONFERMA PAGE ──────────────────────────────────── */
.conferma-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #f9fdf9;
    padding: 60px 20px;
}

.conferma-box {
    background: #fff;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 8px 40px rgba(61, 145, 59, 0.12);
    max-width: 560px;
    margin: 0 auto;
}

.conferma-icon {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #e9fbe5, #c8f0c4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #3d913b;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.conferma-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2f5d2a;
    margin-bottom: 15px;
}

.conferma-subtitle {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 35px;
}

.conferma-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.conferma-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    text-decoration: none;
    color: white !important;
}

/* ── 13. SCROLL TO TOP ──────────────────────────────────── */
.scroll-to-top-btn {
    width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ── 14. MEDIA QUERIES ──────────────────────────────────── */
@media (max-width: 768px) {
    .breadcrumb {
        margin: 10px 15px;
        padding-left: 0;
        padding-right: 0;
    }

    nav[aria-label="breadcrumb"] {
        padding: 96px 10px 10px !important;
    }

    nav[aria-label="breadcrumb"].recap-breadcrumb {
        padding: 20px 10px 10px !important;
    }

    .form-section {
        padding: 30px 0 !important;
    }

    .form-section .container {
        padding: 35px 20px !important;
        max-width: 95% !important;
        width: 95% !important;
    }

    .form-section .container h1 {
        font-size: 1.8rem !important;
        margin-bottom: 1.2rem !important;
    }

    form label {
        font-size: 0.9rem;
        margin-top: 1rem;
    }

    form input,
    form textarea {
        padding: 12px 14px;
        font-size: 15px;
    }

    form textarea {
        min-height: 100px;
    }

    .calendar-wrapper {
        width: 100%;
    }

    .calendar-icon {
        right: 12px;
        top: 28px !important;
        transform: none;
    }

    .calendar-icon img {
        width: 24px;
        height: 24px;
    }

    .flatpickr-calendar.animate.open {
        left: 27.9375px !important;
    }

    .flatpickr-calendar.arrowBottom::after {
        border-top-color: #3d913b !important;
        left: 274px !important;
    }

    .form-buttons,
    .buttons-container {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .form-buttons button,
    .form-buttons .btn-primary,
    .form-buttons .btn-secondary,
    .buttons-container button,
    .buttons-container .btn-primary,
    .buttons-container .btn-secondary {
        width: 100%;
        margin: 0;
    }

    .recap-box {
        padding: 30px 20px;
    }

    .recap-item {
        padding: 12px 0;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 68px 0 !important;
    }

    .form-section .container {
        padding: 25px 15px !important;
        max-width: 95% !important;
        width: 95% !important;
        border-radius: 15px;
        margin-top: 0 !important;
    }

    .form-section .container h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    form label {
        font-size: 0.85rem;
        margin-top: 0.8rem;
        margin-bottom: 0.4rem;
    }

    form input,
    form textarea {
        padding: 11px 12px;
        font-size: 14px;
    }

    form textarea {
        min-height: 90px;
    }

    .form-buttons,
    .buttons-container {
        margin-top: 15px;
    }

    .form-buttons button,
    .form-buttons .btn-primary,
    .form-buttons .btn-secondary,
    .buttons-container button,
    .buttons-container .btn-primary,
    .buttons-container .btn-secondary {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .calendar-icon {
        right: 10px !important;
        top: 10px !important;
    }

    .calendar-icon img {
        width: 22px;
        height: 22px;
    }

    .recap-box {
        padding: 25px 15px;
    }

    .recap-item {
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .info-alert p {
        text-align: left;
    }

    .flatpickr-calendar.animate.open {
        left: 70px !important;
    }

    .flatpickr-calendar.arrowTop:before,
    .flatpickr-calendar.arrowTop:after {
        left: 287px !important;
    }
}