/* --- BASE & BACKGROUND --- */
body { margin: 0; padding: 0; font-family: 'Montserrat', sans-serif; color: #2c3e50; background-color: #F8F5EE; background-image: url('immagini/logo_sfondo.png'); background-attachment: fixed; background-repeat: no-repeat; background-position: left -40vh; background-size: cover; background-blend-mode: multiply; }
h1, h2, h3 { font-family: 'Bodoni Moda', serif; }

/* --- HEADER & MENU --- */
header { background-color: rgba(248, 245, 238, 0.90); padding: 15px 60px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(191,160,113,0.2); backdrop-filter: blur(8px); transition: all 0.3s ease; flex-wrap: wrap; }
.logo-container { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.logo-img { height: 60px; mix-blend-mode: darken; transition: all 0.3s ease; }
.logo-text { display: flex; flex-direction: column; color: #2c3e50; }
.logo-title { font-family: 'Bodoni Moda', serif; font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.logo-subtitle { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 1.5px; color: #7f8c8d; }

.menu-btn { display: none; font-size: 32px; cursor: pointer; color: #2c3e50; user-select: none; background: none; border: none; padding: 0; line-height: 1; }

nav { display: block; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 35px; }
nav a { text-decoration: none; color: #2c3e50; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s ease; }
nav a:hover { color: #bfa071; }

/* --- PAGE TITLE --- */
.page-header { text-align: center; padding: 60px 20px 30px 20px; }
.page-title { font-family: 'Bodoni Moda', serif; font-size: 65px; color: #2c3e50; margin: 0; font-weight: 700; }

/* --- APARTMENT HERO --- */
.apartment-hero { width: 100%; height: 55vh; background-size: cover; background-position: center; position: relative; box-shadow: 0 5px 20px rgba(0,0,0,0.05); overflow: hidden; }
.scroll-down-btn { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: #ffffff; font-size: 30px; cursor: pointer; animation: bounce 2.5s infinite; opacity: 0.8; transition: all 0.3s ease; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.scroll-down-btn:hover { opacity: 1; color: #bfa071; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -10px); } 60% { transform: translate(-50%, -5px); } }

/* --- GALLERY --- */
.gallery-title { font-size: 36px; color: #2c3e50; text-align: center; margin-top: 120px; margin-bottom: 40px; scroll-margin-top: 130px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; max-width: 1200px; margin: 0 auto 40px auto; padding: 0 40px; }
.gallery-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; object-position: center; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.3s ease; }
.gallery-img:hover { transform: scale(1.03); }

/* --- DETAILS, AMENITIES & BUTTON --- */
.details-container { max-width: 1000px; margin: 20px auto 20px auto; padding: 40px; background-color: rgba(255,255,255,0.85); backdrop-filter: blur(5px); border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); text-align: center; }
.cin-code { color: #7f8c8d; font-size: 14px; letter-spacing: 2px; margin-bottom: 30px; }
.description { font-size: 18px; line-height: 1.8; color: #444; margin-bottom: 40px; }

.apartment-amenities { max-width: 1000px; margin: 0 auto 60px auto; padding: 40px; background-color: #ffffff; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); }
.amenities-heading { font-size: 26px; color: #2c3e50; margin-bottom: 30px; text-align: center; font-family: 'Bodoni Moda', serif; }
.amenities-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0 0 40px 0; text-align: left; }
.amenities-list li { display: flex; align-items: center; gap: 15px; font-size: 16px; color: #555; }
.amenities-list li span { font-size: 22px; }

.btn-gold { display: block; width: 250px; margin: 0 auto; background-color: transparent; color: #bfa071; border: 2px solid #bfa071; padding: 15px 45px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; text-decoration: none; transition: all 0.3s ease; cursor: pointer; font-family: 'Montserrat', sans-serif; text-align: center; }
.btn-gold:hover { background-color: #bfa071; color: #ffffff; box-shadow: 0 5px 20px rgba(191,160,113,0.3); }

/* --- CONTACT MODAL --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px); }
.modal-content { background-color: #F8F5EE; margin: 15vh auto; padding: 40px; border-radius: 4px; width: 90%; max-width: 450px; text-align: center; position: relative; box-shadow: 0 15px 40px rgba(0,0,0,0.2); border: 1px solid rgba(191,160,113,0.4); }
.close-btn { position: absolute; top: 15px; right: 20px; color: #7f8c8d; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.3s; }
.close-btn:hover { color: #2c3e50; }
.modal-content h3 { font-size: 28px; color: #2c3e50; margin-bottom: 10px; }
.modal-content p { font-size: 15px; line-height: 1.6; color: #555; margin-bottom: 30px; }
.contact-options { display: flex; flex-direction: column; gap: 15px; }
.btn-contact { padding: 15px; border-radius: 4px; font-size: 15px; font-weight: bold; text-decoration: none; color: white; transition: opacity 0.3s, transform 0.2s; text-transform: uppercase; letter-spacing: 1px; }
.btn-contact:hover { opacity: 0.9; transform: translateY(-2px); }
.whatsapp { background-color: #25D366; }
.email { background-color: #2c3e50; }

/* --- LIGHTBOX --- */
.lightbox { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: #F8F5EE; background-image: url('immagini/logo_sfondo.png'); background-position: left -40vh; background-size: cover; background-blend-mode: multiply; }
.lightbox-header { position: absolute; top: 30px; width: 100%; text-align: center; z-index: 3002; }
.lightbox-title { font-family: 'Bodoni Moda', serif; font-size: 32px; color: #2c3e50; margin: 0; }
.lightbox-counter { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 500; color: #7f8c8d; letter-spacing: 1px; margin-top: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 40px; color: #2c3e50; font-size: 50px; font-weight: bold; cursor: pointer; transition: 0.3s; z-index: 3003; line-height: 0.8; background: none; border: none; padding: 0; }
.lightbox-close:hover { color: #bfa071; }
.lightbox-content-wrapper { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding-top: 40px; box-sizing: border-box; overflow: hidden; }
.lightbox-content { position: absolute; max-width: 85%; max-height: 75vh; object-fit: contain; box-shadow: 0 15px 50px rgba(0,0,0,0.15); border-radius: 4px; transition: transform 0.4s ease-in-out; }
.lightbox-prev, .lightbox-next { cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); padding: 20px; color: #2c3e50; font-weight: bold; font-size: 45px; transition: 0.3s; user-select: none; background: transparent; border: none; z-index: 3005; }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }
.lightbox-prev:hover, .lightbox-next:hover { color: #bfa071; }

/* --- STICKY MOBILE CTA --- */
.sticky-cta { display: none; }
@media (max-width: 768px) {
    .sticky-cta { display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; padding: 12px 20px; background: rgba(248,245,238,0.97); border-top: 1px solid rgba(191,160,113,0.3); backdrop-filter: blur(6px); }
    .sticky-cta-btn { display: block; width: 100%; background-color: #bfa071; color: #ffffff; border: none; padding: 14px; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; border-radius: 2px; transition: background-color 0.3s ease; }
    .sticky-cta-btn:hover { background-color: #a8895e; }
    footer { padding-bottom: 90px; }
}

/* --- OTHER APARTMENTS --- */
.other-apts { max-width: 1000px; margin: 0 auto 60px auto; padding: 0 40px; text-align: center; }
.other-apts h2 { font-size: 32px; color: #2c3e50; margin-bottom: 30px; }
.other-apts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.other-apt-card { text-decoration: none; color: inherit; display: block; border-radius: 4px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease; background: #ffffff; }
.other-apt-card:hover { transform: translateY(-5px); }
.other-apt-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.other-apt-name { font-family: 'Bodoni Moda', serif; font-size: 17px; color: #2c3e50; padding: 12px 10px; }

footer { background-color: #2c3e50; color: #F8F5EE; padding: 50px 60px; font-size: 14px; text-align: center; line-height: 1.8; letter-spacing: 1px; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    header { padding: 10px 20px; flex-direction: row; }
    .logo-img { height: 40px; }
    .logo-title { font-size: 22px; margin-bottom: 0; }
    .logo-subtitle { display: none; }

    .menu-btn { display: block; }
    nav { display: none; width: 100%; margin-top: 15px; border-top: 1px solid rgba(191,160,113,0.3); padding-top: 15px; }
    nav.open { display: block; animation: scendiGiù 0.3s ease-out; }
    nav ul { flex-direction: column; gap: 15px; align-items: center; padding-bottom: 10px; }
    nav a { font-size: 16px; }

    .page-title { font-size: 42px; }
    .gallery-title { font-size: 32px; margin-top: 80px; scroll-margin-top: 100px; }
    .gallery-grid { padding: 0 15px; grid-template-columns: 1fr; gap: 15px; }

    .details-container, .apartment-amenities { margin: 20px 15px; padding: 25px 20px; }
    .amenities-list { grid-template-columns: 1fr; }

    .lightbox-title { font-size: 24px; }
    .lightbox-close { right: 15px; top: 15px; font-size: 40px; }
    .lightbox-prev, .lightbox-next { padding: 10px; font-size: 30px; }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
    .lightbox-content { max-width: 95%; max-height: 60vh; }

    .modal-content { width: 85%; padding: 30px 20px; margin: 20vh auto; }
    footer { padding: 30px 20px; }
    .other-apts { padding: 0 15px; }
    .other-apts-grid { grid-template-columns: repeat(2, 1fr); }
}

@keyframes scendiGiù {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
