/* Sezioni colorate per alternare sfondi */
.bg-white { background: #fff; }
.bg-lightgreen { background: #eafaf1; }
.bg-beige { background: #f8f5f0; }
.bg-lightgray { background: #f4f4f7; }

/* Pulsanti moderni e colorati */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    background: var(--accent, #2b7a2b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}
.btn.btn-outline {
    background: transparent;
    color: var(--accent, #2b7a2b);
    border: 2px solid var(--accent, #2b7a2b);
}
.btn:hover, .btn:focus {
    background: #218c4a;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.btn.btn-outline:hover, .btn.btn-outline:focus {
    background: var(--accent, #2b7a2b);
    color: #fff;
}
/* Enhanced styles for L'Antico Portone */

/* Sezione Olio: ora usa le stesse classi della sezione appartamento (apartment-showcase) */

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav a {
        display: block;
        padding: 1rem;
        text-align: center;
    }
}

/* Sticky Header */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* when header has scrolled class, use dark links */
.site-header.scrolled .nav a { color: var(--text-dark, #222); }
.site-header.scrolled .brand-text h1, .site-header.scrolled .brand-text p { color: var(--text-dark, #222); }

/* Header overlay on hero: keep links visible on the image */
.site-header {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 60;
}

.header-inner { /* small spacing inside header */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.site-header .nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}
/* nav link color when over hero (default) */
.site-header .nav a { color: #fff; text-decoration: none; }
.site-header .nav a:hover { color: #f0f0f0; }

/* Map styles for olio section */
.map-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}
.map-item h6 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-dark, #222);
}
.map-item iframe {
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: 8px;
}
.map-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.6rem;
}

@media (max-width: 768px) {
    .map-pair { grid-template-columns: 1fr; }
    .map-item iframe { height: 200px; }
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 2rem 0;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Sections */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.amenity-item {
    text-align: center;
    padding: 1rem;
}

.amenity-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials {
    background: #f9f9f9;
    padding: 5rem 0;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary);
}

/* Location Map */
.map-container {
    height: 400px;
    margin: 2rem 0;
}

/* Enhanced Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

/* Price List */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.price-table th,
.price-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.price-table th {
    background: #f5f5f5;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO specific styles: use variables set in :root for easy tuning */
.hero {
    position: relative;
    min-height: var(--hero-height, 80vh);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: var(--hero-pos-x, center) var(--hero-pos-y, center);
    filter: saturate(0.95) contrast(1);
    z-index: 1;
}

.hero-bg::after {
    /* overlay controlled by variable */
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-overlay, rgba(0,0,0,0.35));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 3rem 1rem;
    max-width: var(--maxw, 1100px);
    text-align: center;
}

/* Header logo size limit to avoid accidental overflow */
.logo-img{
    max-height:56px;
    width:auto;
    display:block;
}

/* remove heavy box effect in hero content — keep it clean over image */
.hero-content{
    background: transparent; /* ensure no white background */
    padding: 2rem 1rem;
}

.hero-title{
    font-size:2.6rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.hero .lead{ color: rgba(255,255,255,0.95); max-width:760px; margin: 0 auto 1.25rem; }

.hero-ctas .btn {
    margin: 0 .5rem;
}

/* Move nav to top-right over the hero on wide screens */
@media (min-width: 769px) {
    .site-header .nav {
        position: absolute;
        right: 2rem;
        top: 1.1rem;
        background: transparent;
    }
    .site-header .brand { /* keep logo smaller on hero */
        display: flex;
        align-items: center;
        gap: .75rem;
    }
}

@media (max-width: 768px) {
    /* mobile: header becomes solid to keep contrast */
    .site-header { position: fixed; background: rgba(255,255,255,0.98); }
    .site-header .nav { position: static; }
    .site-header .nav a { color: var(--text-dark, #222); }
}