/* CSS per Sul Prado Bed & Breakfast */

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

body {
    font-family: 'Lora', serif;
    line-height: 1.6;
    color: #4a3728;
    background-color: #faf8f5;
}

/* Variabili colore */
:root {
    --brown-dark: #6b4423;
    --brown-light: #8b6f47;
    --beige: #f5f0e8;
    --cream: #faf8f5;
    --text-dark: #4a3728;
    --text-light: #6b5b4f;
}

/* Top Bar */
.top-bar {
    background-color: var(--brown-dark);
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-link {
    color: white;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--beige);
}

.language .lang-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.language .lang-link:hover {
    color: var(--beige);
}

/* Header */
header {
    background-color: var(--beige);
    text-align: center;
    padding: 40px 0;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 350px;
    height: 106px;
    object-fit: contain;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 500;    
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background-color: var(--brown-light);
    color: white;
}

.main-nav a.active {
    background-color: var(--brown-light);
    color: white;
}

/* Slideshow */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    height: 800px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0; /* <-- aggiunto */
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 2; /* <-- in primo piano */
}

.slide.fade-out {
    opacity: 0 !important;
    z-index: 1; /* <-- sotto a active, sopra alle altre */
}

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

.slide-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: white;
}


/* Container generale */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* Aggiungi questa classe al tuo CSS esistente */
.slide.fade-out {
    opacity: 0;
}
/* Sezioni */
.section {
    padding: 80px 0;
}

.section.bg-light {
    background-color: var(--beige);
}

.section h1 {
    font-size: 42px;
    color: var(--brown-dark);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 400;
}

.section h2 {
    font-size: 36px;
    color: var(--brown-dark);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 400;    
}

.section h3 {
    font-size: 24px;
    color: var(--brown-dark);
    margin-bottom: 15px;
    font-weight: 500;    
}

/* Home Section */
.intro-text {
    font-size: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
    line-height: 1.8;
}
/* Privacy Section */
.privacy-text {
    font-size: 20px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
    line-height: 1.8;
}
/* Dove Siamo Section */
.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.location-text p {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-light);
}

.address {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--brown-light);
    margin-top: 30px;
}

.map-placeholder {
    background-color: var(--brown-light);
    height: 300px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

/* Camere Section */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.room-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(107, 68, 35, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(107, 68, 35, 0.15);
}

.room-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.room-info {
    padding: 25px;
}

.room-info p {
    color: var(--text-light);
    margin-top: 10px;
}

/* Contatti Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    height: fit-content;
}

.contact-item p {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Form Contatti */
.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0d5c7;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-dark);
    background-color: #fafafa;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brown-light);
    background-color: white;
}

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

/* Checkbox personalizzata */
.checkbox-group {
    position: relative;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e0d5c7;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--brown-light);
    border-color: var(--brown-light);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Submit Button */
.submit-btn {
    background-color: var(--brown-dark);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: lowercase;
}

.submit-btn:hover {
    background-color: var(--brown-light);
    transform: translateY(-2px);
}

/* Messaggi di form */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

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

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

/* Error Messages */
.error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Footer */
footer {
    background-color: var(--brown-dark);
    color: white;
    text-align: center;
    padding: 30px 0;
}

footer p {
    font-size: 14px;
}
/* Pulsante torna su */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--brown-dark);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(107, 68, 35, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--brown-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(107, 68, 35, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}
/* Responsive Design */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo {
        width: 280px;
        height: 85px;
    }
    
    .location-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
    }
    
    .section h1 {
        font-size: 32px;
    }
    
    .section h2 {
        font-size: 28px;
    }
    
    .slideshow-container {
        height: 300px;
    }
    
    .social-icons {
        gap: 10px;
    }
    
    .top-bar {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .logo {
        width: 250px;
        height: 76px;
    }
    
    .intro-text {
        font-size: 18px;
    }
}