/* --- Global Base Styles --- */
body {
    font-family: 'Arial', sans-serif; /* A clean, readable font */
    margin: 0; /* Removes default browser margins */
    padding: 0; /* Removes default browser padding */
    background-color: #F5F5DC; /* Bianco Sporco */
    color: #5D6D7E; /* Grigio Pietra - Colore principale del testo */
    line-height: 1.6; /* Line height for better readability */
}

.container {
    max-width: 1200px; /* Maximum width for the main content area */
    margin: 0 auto; /* Centers the container on the page */
    padding: 0 20px; /* Padding on the sides to prevent content from touching edges */
}

/* --- Header --- */
header {
    background-color: #A22E37; /* Rosso Pompeiano */
    color: white;
    padding: 1.5em 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 3em; /* Increased font size for better visibility */
    font-weight: 900; /* Made bolder */
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); /* Ombra scura mantenuta, colore testo Bianco come da suggerimento implicito */
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* --- Navigation (Menu) --- */
nav ul {
    list-style: none; /* Removes bullet points from lists */
    padding: 0;
    margin: 20px 0 0 0;
    display: flex; /* Makes menu items side-by-side */
    justify-content: center; /* Centers the menu */
    flex-wrap: wrap; /* Allows items to wrap on small screens */
}

nav ul li {
    margin: 0 15px; /* Space between menu items */
}

nav ul li a {
    color: white;
    text-decoration: none; /* Removes underline from links */
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease; /* Smooth transition on hover */
}

nav ul li a:hover,
nav ul li a.active { /* Style on hover and for active page */
    color: #D4AF37; /* Oro Antico */
}

/* --- Hero Section (Homepage) --- */
.hero-section {
    position: relative;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.hero-image {
    width: 100%;
    height: 500px; /* Fixed height for hero image */
    object-fit: cover; /* Ensures image covers area without distortion */
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay on image */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box; /* Includes padding in width/height calculation */
}

.hero-overlay h2 {
    font-size: 3em;
    margin-bottom: 15px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.hero-overlay p {
    font-size: 1.3em;
    max-width: 800px;
    margin-bottom: 30px;
    text-align: center;
}

/* --- Generic Content Sections (main) --- */
main section {
    background-color: #F5F5DC; /* Bianco Sporco per coerenza con il body */
    padding: 40px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Slight shadow for depth */
    border-radius: 8px; /* Slightly rounded corners */
    text-align: center; /* Important for centering inline/inline-block children */
}

/* Centering for H2 titles that need the underline to match text width */
main section h2 {
    /*color: #5D6D7E; /* Grigio Pietra */
	color: #191970;
    font-size: 2.2em;
    margin-bottom: 30px;
    border-bottom: 2px solid #D4AF37; /* Oro Antico */
    display: inline-block; /* To make the underline fit the text, will be centered by parent's text-align */
    padding-bottom: 10px;
    margin-top: 20px;
}

/* General centering for H3 and H4 within main sections */
main section h3,
main section h4 {
    text-align: center; /* Simple text centering for block elements */
    color: #5D6D7E; /* Grigio Pietra */
    margin-top: 20px;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
    display: block; /* Ensure they are block-level elements */
    position: static;
    transform: none;
}

main section p {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 20px auto;
}

/* --- Buttons --- */
.button {
    display: inline-block;
    background-color: #3498DB; /* Blu Mediterraneo */
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: #2185D0; /* Blu leggermente più scuro */
    transform: translateY(-2px); /* Slight "lift" effect */
}

.primary-button {
    background-color: #27ae60; /* Mantenuto verde esistente per coerenza con l'azione "prenota" */
}

.primary-button:hover {
    background-color: #229a53; /* Mantenuto verde più scuro esistente */
}

/* --- Info Section (Homepage) --- */
.info-section {
    /* text-align: center; already handled by main section */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adaptive columns */
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    background-color: #ECECEC; /* Grigio Chiaro */
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.feature-item h3 {
    color: #5D6D7E; /* Grigio Pietra */
    font-size: 1.4em;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 0;
    position: static;
    transform: none;
    display: block;
    text-align: center;
}

.feature-item i {
    font-size: 2.5em;
    color: #D4AF37; /* Oro Antico */
    margin-bottom: 15px;
}

/* --- Property Details Section (property.html) --- */
.property-details h2 {
    /* This will be handled by main section h2 for centering and underline */
}

.property-details h3 { /* Specific rule for h3 within property-details */
    text-align: left; /* Align these specific titles to the left */
    color: #D4AF37; /* Oro Antico per renderli distinti */
    /* Inherits other properties like font-size, color, margins from main section h3 */
}


.property-details p {
    text-align: center; /* Description text now aligns center */
    margin-bottom: 15px;
}

/* Specific styling for lists within property-details for better alignment */
.property-details ul {
    list-style: disc; /* Standard bullet points */
    margin-left: 20px; /* Indentation for the list */
    margin-bottom: 20px;
    text-align: left; /* Ensures text is left-aligned within the list items */
    width: 100%; /* Ensure the list takes full width for consistent alignment */
    padding-left: 0; /* Reset default padding to control indentation with margin-left */
}

.property-details ul li {
    margin-bottom: 8px;
    font-size: 1.1em;
    text-align: left; /* Explicitly ensure list item text is left-aligned */
    padding-left: 0.5em; /* Small padding to separate text from bullet */
}


.room-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ccc; /* Light separator between sections */
}

.room-section:last-child {
    border-bottom: none; /* Removes separator from the last item */
}

.room-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- Photo Gallery (gallery.html) --- */
.photo-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adaptive columns */
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    background-color: #ECECEC; /* Grigio Chiaro */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px; /* Fixed height for gallery images */
    object-fit: cover;
    display: block;
}

.image-caption {
    padding: 15px;
    font-size: 1em;
    color: #5D6D7E; /* Grigio Pietra */
    text-align: center;
}

/* --- Availability (availability.html) --- */
.availability-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    text-align: left;
}

.availability-section th, .availability-section td {
    border: 1px solid #ddd;
    padding: 12px;
}

.availability-section th {
    background-color: #5D6D7E; /* Grigio Pietra */
    color: white;
    font-weight: bold;
}

.availability-section tr:nth-child(even) {
    background-color: #f2f2f2;
}

.availability-section .availability-calendar-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.availability-section hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

.availability-section .small-text {
    font-size: 0.9em;
    color: #5D6D7E; /* Grigio Pietra */
    text-align: center;
}

/* --- Pricing Section --- */
.pricing-section {
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

.price-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.price-item {
    background-color: #ECECEC; /* Grigio Chiaro */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.price-item h3 {
    color: #5D6D7E; /* Grigio Pietra */
    font-size: 1.5em;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 0;
    position: static;
    transform: none;
    display: block;
    text-align: center;
}

.price-item p {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.price-item ul {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    text-align: center;
}

.price-item ul li {
    margin-bottom: 5px;
}


/* --- Contact (contact.html) --- */
.contact-section .contact-info, .contact-section .contact-form-placeholder {
    background-color: #ECECEC; /* Grigio Chiaro */
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center; /* Mantenuto centrato per il blocco .contact-info */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Nuove regole per allineare l'elenco nel contact-info */
.contact-section .contact-info ul {
    list-style: disc; /* Punti elenco standard */
    list-style-position: outside; /* Modificato da 'inside' a 'outside' */
    padding-left: 20px; /* Aggiunto padding per il rientro */
    margin: 0 auto; /* Centra l'intero blocco UL all'interno del suo contenitore */
    max-width: 600px; /* Limita la larghezza dell'UL per un migliore aspetto quando centrato, puoi regolare questo valore */
    text-align: left; /* Assicura che il testo della lista sia allineato a sinistra */
}

/* Regola specifica per l'UL all'interno di .contact-form-placeholder */
.contact-section .contact-form-placeholder ul {
    list-style: disc; /* Manteniamo i punti elenco */
    list-style-position: outside; /* Questo sposta il bullet point fuori dal contenuto del <li> */
    text-align: left; /* Allinea il testo delle voci a sinistra */
    padding-left: 20px; /* Aggiungi un padding a sinistra per far rientrare la lista e i bullet point */
    margin: 20px auto; /* Centra la lista orizzontalmente, aggiungi un po' di margine verticale */
    max-width: 600px; /* Mantieni la larghezza massima per coerenza */
}


.contact-section .contact-info ul li,
.contact-section .contact-form-placeholder ul li { /* Applica a entrambe le sezioni per coerenza */
    margin-bottom: 8px; /* Spaziatura consistente */
    font-size: 1.1em; /* Dimensione del font consistente */
    text-align: left; /* Assicura che il testo delle voci sia allineato a sinistra */
}

/* Questa regola esistente continuerà a centrare il paragrafo introduttivo e il paragrafo small-text */
.contact-section p {
    font-size: 1.1em;
    margin-bottom: 10px;
    text-align: center;
}

/* Questa regola esistente continuerà a centrare i titoli h3 */
.contact-section h3 {
    text-align: center;
}

.contact-section a {
    color: #3498DB; /* Blu Mediterraneo */
    text-decoration: none;
    font-weight: bold;
}

.contact-section a:hover {
    text-decoration: underline;
}

.map-container {
    overflow: hidden;
    padding-bottom: 75%;
    position: relative;
    height: 0;
    margin-bottom: 20px;
}

.map-container iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border-radius: 8px;
}


/* --- Social Links --- */
.social-links {
    margin-top: 20px;
    text-align: center;
}


.social-links a {
    color: #D4AF37; /* Nuovo colore per i link nel footer */
    font-size: 1.8em;
    margin: 0 10px;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

/* Specific colors for social media (optional, come da suggerimento) */
.social-links a.fa-facebook:hover { color: #3b5998; }
.social-links a.fa-twitter:hover { color: #1da1f2; }
.social-links a.fa-instagram:hover { color: #c32aa3; }
.social-links a.fa-envelope:hover { color: #dd4b39; }
.social-links a.fa-airbnb:hover { color: #FF5A5F; }

.social-links a:hover {
    transform: translateY(-3px);
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    .hero-overlay h2 {
        font-size: 2.5em;
    }
    .hero-overlay p {
        font-size: 1.1em;
    }
    nav ul {
        flex-direction: column;
        margin-top: 10px;
    }
    nav ul li {
        margin: 5px 0;
    }
    main section {
        padding: 30px 15px;
    }
    main section h2,
    main section h3,
    main section h4 {
        font-size: 1.8em;
        padding-bottom: 5px;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .map-container {
        padding-bottom: 100%;
    }
}

/* --- Fix per Calendario Google Responsive --- */
.calendar-container {
    position: relative;
    width: 100%;
    /* Calcolo (altezza / larghezza) * 100% = (600 / 800) * 100% = 75% */
    padding-bottom: 75%; /* Mantiene il rapporto d'aspetto 4:3 */
    height: 0; /* L'altezza è determinata dal padding-bottom */
    overflow: hidden; /* Nasconde il contenuto in eccesso */
    max-width: 100%; /* Assicura che non superi la larghezza del genitore */

    /* Stili aggiuntivi per il contenitore (opzionali, ma li avevo inclusi per consistenza) */
    margin: 30px auto; /* Centra il calendario e aggiunge margine */
    border-radius: 8px; /* Bordi arrotondati */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Ombra leggera */
}

.calendar-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Rimuove il bordo predefinito dell'iframe */
}

/* Regole opzionali per schermi molto piccoli, se 75% non è l'ideale */
@media (max-width: 600px) {
    .calendar-container {
        /* Se su schermi molto piccoli vuoi un rapporto d'aspetto diverso (es. più quadrato o più alto) */
        /* Esempio: rapporto 16:9 (9/16 = 0.5625 = 56.25%) */
        /* padding-bottom: 56.25%; */

        /* Oppure un'altezza fissa, ma meno flessibile per la responsività */
        /* height: 350px; */
        /* padding-bottom: 0; */ /* Se usi height fissa, disabilita padding-bottom */
    }
}
