/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;500;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Mulish', sans-serif;
    --color-primary: #C9AD6C;
    --color-text-primary: #656359;
    --color-background: #FFF;
    --color-text-secondary: #AFAB9C;
    --color-background-alt: #F4EEE7;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    text-rendering:optimizeLegibility;
    -moz-osx-font-smoothing:grayscale;
    -webkit-font-smoothing:antialiased
}
.text-center {
    text-align: center;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.adventure img, .personalized-planning img {
    max-width: 100%;
}

.adventure-section img {
    width: 100%;
    min-height: 15rem;
    object-fit: cover;
}

header {
    text-align: center;
    margin-bottom: 40px;
}
h1 {
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: 400;
    font-style: italic;
}
h2 {
    font-family: var(--font-primary);
    color: var(--color-primary);
    font-size: 2.2rem;
    font-style: italic;
    font-weight: 400;
    margin: 0 auto 20px;
}
p {
    font-size: 1.1rem;
    color: var(--color-text-primary);
    margin: 0 auto 30px;
    line-height: 1.6;
}

.logo {
    width: 25%;
    margin: 0 1rem;
}

.top-section {
    height: 100vh;
}

.btn-container {
    text-align: center;
    margin-bottom: 40px;
}
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-primary:hover, .btn-secondary:hover {
    background-color: #b3875e;
    color: white;
}

.gallery {
    position: absolute;
    top: 10%;
    height: 100%;
    width: 95%;
    left: 0; 
    right: 0; 
    margin-inline: auto;
    z-index: -1;
}
.gallery img {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
    object-fit: cover;
}

.gallery img:nth-child(1) {
    width: 22%;
    height: 60%;
    top: 0;
    left: 0;
}
.gallery img:nth-child(2) {
    width: 20%;
    height: 40%;
    bottom: 20%;
    left: 10%;
}
.gallery img:nth-child(3) {
    width: 20%;
    height: 50%;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gallery img:nth-child(4) {
    width: 22%;
    height: 45%;
    top: 0;
    right: 0;
}
.gallery img:nth-child(5) {
    width: 25%;
    height: 40%;
    bottom: 22%;
    right: 5%;
}

.personalized-planning {
    margin-top: 8rem;
}

.features img:nth-child(2) {
    margin-top: -6rem;
    margin-left: -6rem;
}

.locations {
    background-color: var(--color-background-alt);
}

.locations h2 {
    color: var(--color-text-primary);
}

.locations .card {
    background-color: white;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-radius: 5px;
}

.locations .card img {
    width: 100%;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-family: var(--font-primary);
    font-weight: 600;
}

.packages-container {
    background-color: var(--color-background-alt);
}

.packages-container .card {
    background-color: white;
    border-radius: 5px;
    border: 1px solid var(--color-text-primary);
    box-shadow: 0px 2.3663px 4.7326px rgba(0, 0, 0, 0.25);
}

.list-unstyled {
    padding: 0;
}

.price {
    font-size: 2rem;
}

.price s {
    color: var(--color-text-secondary);
}

.badge {
    display: flex;
    vertical-align: center;
}

.pricing-packages small {
    display: flex;
    align-items: center;
    justify-content: center;
}

.adventure-section h2,
.faq-section h2 {
    font-family: 'Playfair Display', serif;
    color: #C3976E;
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 20px;
}

.adventure-section p,
.faq-section p {
    color: var(--color-text-primary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-text-secondary);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 15px 0;
    background: none;
    border: none;
    font-weight: bold;
    color: #656359;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
}

.faq-question.active::after {
    content: '-';
}

.faq-answer {
    display: none;
    padding: 0 0 15px;
}

.faq-answer p {
    margin: 0;
}

/* Footer styles */
.site-footer {
    background-color: #F4EFE9;
    padding: 60px 0;
    text-align: center;
}

.site-footer img {
    width: 40%;
    margin-bottom: 1rem;
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #666359;
    margin-bottom: 10px;
}

.footer-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #C3976E;
    font-weight: 400;
    margin-bottom: 20px;
}

.footer-description {
    color: #656359;
    margin-bottom: 30px;
}

.footer-buttons {
    margin-bottom: 30px;
}

.footer-buttons .btn {
    margin: 0 10px;
}

.footer-links {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.footer-links a {
    color: var(--color-text-primary);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #F4EFE9;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    padding-right: 10px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #656359;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-text-secondary);
    border-radius: 4px;
    box-sizing: border-box;
}

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

.real-stories {
    padding: 3.75rem 0;
}

.real-stories .card {
    background-color: var(--color-background);
    border: 1px solid var(--color-primary);
    height: 24rem;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.real-stories .card-title {
    font-family: var(--font-primary);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.real-stories .card-text {
    color: var(--color-text-primary);
    font-size: 1rem;
}

.real-stories .rounded-circle {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 15px;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
}

.feature-text {
    text-align: left;
}

.feature-item p {
    margin-bottom: 0;
}

.card-text {
    font-size: 1rem;
}

/* Policy page styles */
/* Stili del modale per le policy */
.policy-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #fff;
}

.policy-modal-content {
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.policy-close {
    color: #aaa;
    float: right;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    position: fixed;
    right: 30px;
    top: 10px;
    padding-right: 10px;
}

.policy-close:hover,
.policy-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}


#policyContent {
    font-family: var(--font-secondary);
    color: var(--color-text-primary);
    line-height: 1.6;
    padding-top: 40px; /* Spazio per il pulsante di chiusura */
}

#policyContent h1, #policyContent h2 {
    font-family: var(--font-primary);
}

#policyContent h1 {
    color: var(--color-primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#policyContent h2 {
    color: var(--color-text-primary);
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

#footer {
    display: none;
}

.footer-vat {
    font-size: 1rem;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.spinner {
    border: 8px solid #C9AD6C;
    border-top: 8px solid #F4EEE7;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

/* Nascondi lo spinner predefinito di CF7 */
.wpcf7-spinner {
    display: none !important;
}

/* Contenitore dello spinner custom */
.wpcf7 .custom-spinner {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -40px;
}

/* Stili per lo spinner custom */
.wpcf7 .custom-spinner .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary, #C9AD6C);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

/* Loading text sotto lo spinner */
.wpcf7 .custom-spinner .loading-text {
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-primary, #656359);
    text-align: center;
}

/* Animazione di rotazione */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mostra lo spinner durante l'invio */
.wpcf7 form.submitting .custom-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Assicurati che il form abbia spazio per lo spinner */
.wpcf7 form {
    position: relative;
    margin-bottom: 50px;
}

/* Disabilita il pulsante durante l'invio */
.wpcf7 form.submitting .wpcf7-submit {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.cky-revisit-bottom-left {
    display: none !important;
}

/* Stili per input di tipo date che matchano gli altri input */
.wpcf7-form input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-text-secondary);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: var(--font-secondary);
    font-size: 16px;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-appearance: none;
    appearance: none;
    min-height: 41px; /* Per mantenere l'altezza coerente con gli altri input */
}

/* Stili per l'icona del calendario */
.wpcf7-form input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23C9AD6C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px;
    cursor: pointer;
    height: 20px;
    padding: 4px;
    width: 20px;
    filter: opacity(0.7);
}

/* Stili per il testo del placeholder */
.wpcf7-form input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.wpcf7-form input[type="date"]::-webkit-datetime-edit-text,
.wpcf7-form input[type="date"]::-webkit-datetime-edit-month-field,
.wpcf7-form input[type="date"]::-webkit-datetime-edit-day-field,
.wpcf7-form input[type="date"]::-webkit-datetime-edit-year-field {
    color: var(--color-text-primary);
}

/* Stili specifici per iOS */
@supports (-webkit-touch-callout: none) {
    .wpcf7-form input[type="date"] {
        min-height: 41px;
        line-height: normal;
    }
}

/* Responsive styles */

/* Manteniamo il layout desktop fino a 1280px */
@media screen and (max-width: 1280px) {
    /* Aggiustamenti specifici per MacBook 13" a 1280px */
    .gallery {
        width: 100%;
    }
    
    .gallery img:nth-child(1) {
        width: 20%;
        height: 55%;
        top: 5%;
        left: 0;
    }
    
    .gallery img:nth-child(2) {
        width: 18%;
        height: 35%;
        bottom: 25%;
        left: 8%;
    }
    
    .gallery img:nth-child(3) {
        width: 18%;
        height: 45%;
        top: 75%;
    }
    
    .gallery img:nth-child(4) {
        width: 20%;
        height: 40%;
        top: 5%;
        right: 0;
    }
    
    .gallery img:nth-child(5) {
        width: 22%;
        height: 35%;
        bottom: 25%;
        right: 5%;
    }
    
    /* Assicuriamoci che il testo centrale abbia abbastanza spazio */
    .top-section section.text-center {
        margin-bottom: 2rem;
    }
}

/* Aggiustamenti specifici per MacBook 13" (1280x800) */
@media screen and (width: 1280px) and (height: 800px), 
       screen and (min-width: 1200px) and (max-width: 1280px) and (max-height: 800px) {
    .top-section {
        height: auto;
        min-height: 90vh;
        position: relative;
        padding-bottom: 2rem;
    }
    
    .gallery {
        top: 15%;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .gallery img:nth-child(1) {
        width: 16%;
        height: 45%;
        top: 5%;
        left: 0;
    }
    
    .gallery img:nth-child(2) {
        width: 14%;
        height: 28%;
        bottom: 35%;
        left: 8%;
    }
    
    .gallery img:nth-child(3) {
        width: 14%;
        height: 35%;
        top: 65%;
    }
    
    .gallery img:nth-child(4) {
        width: 16%;
        height: 30%;
        top: 5%;
        right: 0;
    }
    
    .gallery img:nth-child(5) {
        width: 18%;
        height: 28%;
        bottom: 35%;
        right: 5%;
    }
    
    /* Assicuriamoci che il testo centrale abbia abbastanza spazio */
    .top-section section.text-center {
        margin-bottom: 1rem;
        padding-top: 1rem;
    }
    
    h1 {
        font-size: 2.3rem;
    }
}

/* Manteniamo il layout desktop fino a 990px */
@media screen and (max-width: 990px) {
    .real-stories .card {
        height: 100%;
    }
    .packages-boxes {
        align-items: flex-start !important;
    }
    .features img:nth-child(2) {
        margin-top: 0;
    }
    
    /* Qui iniziamo a modificare il layout della galleria */
    .top-section {
        height: auto;
        min-height: 80vh;
        padding-bottom: 4rem;
        position: relative;
    }
    
    .gallery {
        position: relative;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin-top: 2rem;
        z-index: 0;
    }
    
    .gallery img {
        position: relative;
        margin-bottom: 1rem;
        object-fit: cover;
    }
    
    .gallery img:nth-child(1) {
        width: 30%;
        height: 200px;
        top: auto;
        left: auto;
    }
    
    .gallery img:nth-child(2) {
        display: none;
    }
    
    .gallery img:nth-child(3) {
        width: 40%;
        height: 200px;
        top: auto;
        left: auto;
        transform: none;
    }
    
    .gallery img:nth-child(4) {
        width: 30%;
        height: 200px;
        top: auto;
        right: auto;
    }
    
    .gallery img:nth-child(5) {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    p {
        font-size: 1rem;
    }
    .pricing-packages small {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    .logo {
        width: 50%;
    }
    
    /* Modifica layout galleria per schermi più piccoli */
    .gallery img:nth-child(1) {
        width: 48%;
        height: 180px;
    }
    
    .gallery img:nth-child(3) {
        width: 48%;
        height: 180px;
    }
    
    .gallery img:nth-child(4) {
        width: 48%;
        height: 180px;
    }
    
    .personalized-planning {
        margin-top: 2rem;
    }
    .site-footer .logo {
        width: 40%;
    }
    .modal-content {
        width: 90%;
    }
}

/* Aggiunta di regole specifiche per schermi molto piccoli */
@media screen and (max-width: 576px) {
    .gallery img:nth-child(1),
    .gallery img:nth-child(3),
    .gallery img:nth-child(4) {
        width: 100%;
        height: 200px;
        margin-bottom: 1rem;
    }
    
    .top-section {
        min-height: auto;
        padding-bottom: 2rem;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Aggiunta di regole specifiche per risoluzioni intorno a 1100x635 */
@media screen and (max-width: 1100px) and (max-height: 700px) {
    /* Solo se siamo già sotto i 990px di larghezza, applichiamo queste regole */
    @media screen and (max-width: 990px) {
        .top-section {
            height: auto;
            min-height: auto;
            padding-bottom: 2rem;
            position: relative;
            margin-bottom: 200px; /* Spazio per la galleria sotto */
        }
        
        .gallery {
            margin-top: 1rem;
            padding: 0 1rem;
        }
        
        .gallery img:nth-child(1) {
            height: 120px; /* Ridotta l'altezza delle immagini */
        }
        
        .gallery img:nth-child(3) {
            height: 120px; /* Ridotta l'altezza delle immagini */
        }
        
        .gallery img:nth-child(4) {
            height: 120px; /* Ridotta l'altezza delle immagini */
        }
        
        .personalized-planning {
            margin-top: 1rem;
        }
        
        h1 {
            font-size: 2.2rem;
            margin-bottom: 0.5rem;
        }
        
        p {
            margin-bottom: 15px;
            font-size: 0.95rem;
        }
        
        .btn {
            padding: 8px 16px;
            font-size: 0.9rem;
        }
        
        /* Riduci lo spazio tra le sezioni */
        section {
            margin-bottom: 1rem;
        }
        
        /* Assicurati che il contenuto principale non sia nascosto */
        main {
            overflow-x: hidden;
        }
    }
}

/* Regole specifiche per schermi con altezza molto ridotta */
@media screen and (max-height: 650px) and (max-width: 990px) {
    .top-section {
        margin-bottom: 150px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    p {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .gallery {
        margin-top: 0;
    }
    
    .gallery img:nth-child(1),
    .gallery img:nth-child(3),
    .gallery img:nth-child(4) {
        height: 100px;
    }
    
    .personalized-planning {
        margin-top: 0;
    }
}

/* Aggiustamenti specifici per MacBook 13" (varie risoluzioni) */
@media screen and (min-width: 1200px) and (max-width: 1440px) and (max-height: 900px) {
    .top-section {
        height: auto;
        min-height: 85vh;
    }
    
    .gallery {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .gallery img {
        transform-origin: center;
        transform: scale(0.9);
    }
    
    .gallery img:nth-child(1) {
        width: 16%;
        height: 45%;
        top: 5%;
        left: 0;
    }
    
    .gallery img:nth-child(2) {
        width: 14%;
        height: 28%;
        bottom: 35%;
        left: 8%;
    }
    
    .gallery img:nth-child(3) {
        width: 14%;
        height: 35%;
        top: 65%;
        transform: translate(-50%, -50%) scale(0.9);
    }
    
    .gallery img:nth-child(4) {
        width: 16%;
        height: 30%;
        top: 5%;
        right: 0;
    }
    
    .gallery img:nth-child(5) {
        width: 18%;
        height: 28%;
        bottom: 35%;
        right: 5%;
    }
}

/* Aggiustamenti ancora più specifici per MacBook 13" a 1280x800 */
@media screen and (width: 1280px), 
       screen and (min-width: 1270px) and (max-width: 1290px) {
    .gallery img:nth-child(1) {
        width: 15%;
        height: 42%;
        top: 8%;
        left: 1%;
    }
    
    .gallery img:nth-child(2) {
        width: 13%;
        height: 26%;
        bottom: 38%;
        left: 9%;
    }
    
    .gallery img:nth-child(3) {
        width: 13%;
        height: 32%;
        top: 62%;
    }
    
    .gallery img:nth-child(4) {
        width: 15%;
        height: 28%;
        top: 8%;
        right: 1%;
    }
    
    .gallery img:nth-child(5) {
        width: 17%;
        height: 26%;
        bottom: 38%;
        right: 6%;
    }
}
