/* RESET E BASI */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TOP BAR */
.top-bar {
    background: #111;
    color: #fff;
    font-size: 14px;
    padding: 10px 0;
}

/* Correzione Logo nel Banner 2 */
.title-with-logo {
    display: flex;
    flex-direction: column; /* Mette logo sopra e testo sotto */
    align-items: center;    /* Centra tutto orizzontalmente */
    justify-content: center;
    text-align: center;
    width: 100%;            /* Occupa tutta la larghezza per centrare */
    margin: 0 auto;
}

.title-with-logo img {
    height: 80px !important; /* Forza l'altezza corretta del logo SkyDesign */
    width: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); /* Lo rende leggibile */
}

.title-with-logo span {
    color: #ffffff !important; /* Forza il testo bianco */
    font-size: 50px;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8); /* Ombra per staccare dallo sfondo */
}
.top-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
}

/* HEADER */
.header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img { height: 65px; }

.menu { display: flex; gap: 25px; }
.menu a { text-decoration: none; color: #222; font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 25px; }

.partner-header img { height: 45px; transition: 0.3s; }
.partner-header img:hover { transform: scale(1.05); }

.cta {
    background: #ff6600;
    color: #fff;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 600;
}

.menu-toggle { display: none; font-size: 30px; background: none; border: none; cursor: pointer; }

/* HERO SLIDER */
.hero-slider {
    position: relative;
    width: 100%;
    height: 75vh;
    background: #000;
    overflow: hidden;
}

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

.slide.active { opacity: 1; visibility: visible; z-index: 2; }

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

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
}

.hero-content { text-align: center; color: #fff; }
.hero-content h1 { font-size: 55px; margin-bottom: 10px; }
.hero-content p { font-size: 22px; font-weight: 300; }

/* GRIGLIA SERVIZI - CORRETTA */
.section { padding: 80px 0; }
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 COLONNE */
    gap: 30px;
}

.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h4 { margin: 0; font-size: 18px; }

/* FOOTER - RIPRISTINATO */
.footer {
    background: #111;
    color: #bbb;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer h3 { color: #fff; margin-bottom: 20px; }
.footer a { color: #bbb; text-decoration: none; display: block; margin-bottom: 10px; }
.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 1150px) {
    .menu-toggle { display: block; }
    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: #fff; padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    .menu.show { display: flex; }
    .header-actions { display: none; }
}

@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, 1fr); } /* 2 COLONNE SU TABLET */
}

@media (max-width: 600px) {
    .cards { grid-template-columns: 1fr; } /* 1 COLONNA SU MOBILE */
    .hero-content h1 { font-size: 32px; }
    .hero-slider { height: 50vh; }
}

.hero-content .cta {
    display: inline-block;
    padding: 15px 35px; /* Più grande per risaltare nel banner */
    font-size: 18px;
    transition: transform 0.3s ease;
}

.hero-content .cta:hover {
    transform: scale(1.1); /* Effetto ingrandimento al passaggio del mouse */
}

/* Per il logo dentro l'H1 */
.hero-content h1 img {
    max-width: 200px; /* Evita che il logo diventi troppo grande su mobile */
}

@media (max-width: 768px) {
    .hero-content h1 img {
        height: 40px !important; /* Più piccolo su cellulare */
    }
}

.title-with-logo {
    display: flex;
    flex-direction: column; /* Sposta il logo sopra il testo */
    align-items: center;    /* Centra entrambi orizzontalmente */
    justify-content: center;
    gap: 15px;              /* Spazio verticale tra logo e testo */
    margin-bottom: 20px;
}

.title-with-logo img {
    height: 80px;           /* Puoi regolare l'altezza desiderata del logo */
    width: auto;
    object-fit: contain;
}

.title-with-logo span {
    display: block;         /* Assicura che il testo occupi la sua riga */
    font-size: 55px;        /* Ripristina la dimensione del titolo */
}

/* Regolazione per dispositivi mobili */
@media (max-width: 768px) {
    .title-with-logo span {
        font-size: 32px;
    }
    .title-with-logo img {
        height: 50px;
    }
}

/* --- RIPRISTINO LAYOUT PAGINA VILLETTA --- */

/* Contenitore principale a due colonne */
.listing-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
    align-items: flex-start;
}

/* Colonna sinistra (Descrizione e Gallerie) */
.listing-main {
    flex: 2;
    min-width: 300px;
}

/* Colonna destra (Sidebar dettagli) */
.listing-sidebar {
    flex: 1;
    min-width: 280px;
    position: sticky;
    top: 100px;
}

/* Box dei dettagli (Prezzo, Mq, ecc.) */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #eee;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.features-list i {
    font-size: 24px;
    color: #ff6600;
}

/* Griglia galleria immagini */
.property-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0 40px;
}

.property-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.property-gallery img:hover {
    transform: scale(1.02);
}

/* Sidebar Card */
.summary-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sidebar-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

/* Responsive per Tablet e Mobile */
@media (max-width: 900px) {
    .listing-grid {
        flex-direction: column;
    }
    .listing-sidebar {
        position: static;
        width: 100%;
    }
}

/* Forza visualizzazione Logo Header */
.logo a img {
    display: block !important;
    height: 70px !important; /* Regola questa altezza in base al tuo logo */
    width: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* --- FIX SPECIFICO PAGINA VILLETTA --- */

/* 1. Centra Logo SkyDesign e Titolo nella Hero */
.epigrafe-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.logo-epigrafe {
    height: 80px !important; /* Dimensione corretta */
    width: auto !important;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.listing-hero-overlay h1 {
    color: #ffffff !important; /* Forza il bianco */
    font-size: 48px;
    margin-top: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.listing-hero-overlay .sub-hero {
    color: #ffffff !important;
    font-size: 20px;
    opacity: 0.9;
}

/* 2. Fix Logo Studio Ciraci nell'Header */
.header .logo img {
    height: 70px !important; /* Regola l'altezza */
    width: auto !important;
    display: block !important;
}

/* FIX BANNER VILLETTA TAGLIATO */
.listing-hero {
    height: 80vh; /* Aumentiamo un po' l'altezza */
    min-height: 500px;
    background-size: cover;
    background-position: center center; /* Forza l'immagine a stare centrata */
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Assicuriamoci che l'overlay scuro copra tutto bene */
.listing-hero-overlay {
    background: rgba(0, 0, 0, 0.4); /* Scurisce l'immagine per far leggere il testo */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Centratura Logo e Titolo sopra l'immagine */
.epigrafe-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-epigrafe {
    height: 100px !important; /* Dimensione controllata del logo SkyDesign */
    width: auto;
    margin-bottom: 15px;
}

.listing-hero h1 {
    font-size: 50px;
    color: white !important;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
    margin: 0;
}

/* Mobile: riduciamo l'altezza per evitare tagli eccessivi su smartphone */
@media (max-width: 768px) {
    .listing-hero {
        height: 60vh;
    }
    .listing-hero h1 {
        font-size: 30px;
    }
    .logo-epigrafe {
        height: 60px !important;
    }
}