/* ==========================================================================
   1. RESET E REGOLE BASE
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body { 
    width: 100%; 
    max-width: 100%; 
    overflow-x: hidden; 
}

body { 
    font-family: 'Helvetica Neue', Arial, sans-serif; 
    color: #333; 
    line-height: 1.6; 
    background-color: #fcfcfc; 
    scroll-behavior: smooth; 
}

/* ==========================================================================
   2. HEADER E NAVIGAZIONE (DESKTOP)
   ========================================================================== */
header { 
    background-color: #ffffff; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    height: 105px; 
    display: flex; 
    align-items: center; 
}

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

.logo img { 
    height: 105px; 
    display: block; 
    width: auto; 
    cursor: pointer;
}

nav ul { 
    display: flex; 
    list-style: none; 
}

nav ul li { 
    margin-left: 25px; 
}

nav ul li a { 
    text-decoration: none; 
    color: #555; 
    font-weight: 500; 
    font-size: 15px; 
    transition: color 0.3s; 
}

nav ul li a:hover { 
    color: #007791; 
}

.menu-toggle { 
    display: none; 
    flex-direction: column; 
    cursor: pointer; 
}

.menu-toggle span { 
    height: 3px; 
    width: 25px; 
    background-color: #333; 
    margin-bottom: 4px; 
    border-radius: 2px; 
}

/* ==========================================================================
   3. HERO CAROUSEL
   ========================================================================== */
.hero { 
    position: relative; 
    width: 100%; 
    height: calc(100vh - 105px); 
    margin-top: 105px; 
    padding: 1px;
    overflow: hidden; 
    background-color: #000; 
}

.carousel-inner { 
    position: relative; 
    width: 100%; 
    height: 100%; 
}

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

.carousel-slide.active { 
    opacity: 1; 
    visibility: visible; 
}

.carousel-slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
    display: block; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    padding: 0 20px;
    pointer-events: none;
}

.hero-overlay h1 {
    font-size: 80px;
    bottom: 350px;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: 1px;
}

.hero-overlay p {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 300px;
}

.scroll-down {
    position: absolute;
    bottom: 250px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.scroll-down .arrow {
    width: 15px;
    height: 15px;
    border-right: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    transform: rotate(45deg);
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translate(0, 0); }
    40% { transform: rotate(45deg) translate(5px, 5px); }
    60% { transform: rotate(45deg) translate(3px, 3px); }
}

/* ==========================================================================
   4. SEZIONI INTERNE
   ========================================================================== */
section { 
    padding: 80px 20px; 
    max-width: 1200px; 
    margin: 0 auto;
	scroll-margin-top: 105px;
}

.section-title { 
    text-align: center; 
    font-size: 32px; 
    margin-bottom: 40px; 
    color: #222; 
}

.section-title::after { 
    content: ''; 
    display: block; 
    width: 60px; 
    height: 3px; 
    background-color: #007791; 
    margin: 10px auto 0; 
}

.desc-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 40px; 
}

.features-list { 
    list-style: none; 
    background-color: #f4f9fA; 
    padding: 25px; 
    border-radius: 6px; 
    border-left: 4px solid #007791; 
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eef6f7;
    font-size: 15px;
}

.features-list li:last-child {
    border-bottom: none;
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
}

.service-card { 
    background: #fff; 
    padding: 25px; 
    border-radius: 6px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.03); 
    border: 1px solid #eee; 
}

.service-card h3 {
    color: #007791;
    margin-bottom: 10px;
    font-size: 18px;
}

/* GALLERY TABS & GRID */
.gallery-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 8px 20px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 20px;
    transition: all 0.3s;
}

.tab-btn.active, .tab-btn:hover {
    background-color: #007791;
    color: #fff;
    border-color: #007791;
}

.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 15px; 
}

.gallery-item { 
    position: relative; 
    overflow: hidden; 
    border-radius: 6px; 
    aspect-ratio: 16 / 9; 
    cursor: pointer; 
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* ==========================================================================
   5. LIGHTBOX AVANZATO CON TRASPARENZA OTTIMIZZATA
   ========================================================================== */
.lightbox { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background-color: rgba(0, 0, 0, 0.75); /* Trasparenza nitida e rilassante */
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 99999; 
}

.lightbox.active { 
    display: flex; 
}

.lightbox-container { 
    position: relative; 
    width: 90%; 
    max-width: 800px; 
    display: flex;
    flex-direction: column;
}

.lightbox-content { 
    width: 100%; 
    height: auto;
    max-height: 75vh; 
    object-fit: contain; 
    border-radius: 4px 4px 0 0; 
    display: block;
}

.lightbox-close-bar {
    width: 100%;
    background-color: #ffffff;
    color: #222222;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    user-select: none;
    border-radius: 0 0 4px 4px; 
    transition: background-color 0.2s, color 0.2s;
}

.lightbox-close-bar:hover {
    background-color: #007791;
    color: #ffffff;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 60px;
    font-weight: 300;
    font-family: monospace;
    cursor: pointer;
    padding: 20px 15px;
    user-select: none;
    z-index: 100000;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 4px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover, .lightbox-next:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   6. CONTATTI E PRENOTAZIONI
   ========================================================================== */
.rental-link-box { 
    background: #f4f9fA; 
    padding: 40px; 
    text-align: center; 
    border-radius: 8px; 
    max-width: 700px; 
    margin: 0 auto; 
    border: 1px solid #e2eff1;
}

.rental-link-box h3 { margin-bottom: 10px; }
.rental-link-box p { margin-bottom: 20px; color: #666; }

.btn-rental { 
    display: inline-block;
    background-color: #007791; 
    color: white; 
    padding: 12px 30px; 
    text-decoration: none; 
    border-radius: 4px; 
    font-weight: bold; 
    transition: background 0.3s;
}

.btn-rental:hover {
    background-color: #005f75;
}

.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; 
}

.contact-form { 
    background: #fff; 
    padding: 30px; 
    border-radius: 6px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.03); 
    border: 1px solid #eee; 
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-status {
    display: none;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #e6f4ea;
    color: #137333;
    font-size: 14px;
    text-align: center;
}

.btn-submit { 
    width: 100%; 
    background-color: #222; 
    color: #fff; 
    border: none; 
    padding: 13px; 
    font-size: 16px; 
    font-weight: bold; 
    border-radius: 4px; 
    cursor: pointer; 
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: #007791;
}

.contact-info em {
    display: block;
    margin-top: 15px;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    color: #666;
    border-left: 3px solid #ccc;
}

footer { 
    background-color: #222; 
    color: #fff; 
    text-align: center; 
    padding: 30px; 
    font-size: 14px; 
}

/* ==========================================================================
   7. MEDIA QUERIES SMARTPHONE
   ========================================================================== */
@media (max-width: 768px) {
    header { height: 85px; }
    .logo img { height: 80px; }
    .menu-toggle { display: flex; }
    
    .lightbox-container { width: 95%; }
    .lightbox-content { max-height: 70vh; }
    .lightbox-prev, .lightbox-next { display: none; }

    .hero {
        margin-top: 85px;
        height: calc(100vh - 85px);
        width: 100%;
    }

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

    .hero-overlay h1 { font-size: 36px; }
    .hero-overlay p { font-size: 18px; }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 85px;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
        padding: 15px 0;
    }

    nav ul.active { display: flex; }
    nav ul li { margin: 12px 0; text-align: center; margin-left: 0; }

    section { 
        padding: 50px 20px; 
        scroll-margin-top: 85px; /* <--- Sovrascrivi il valore per il mobile */
    }
    .desc-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form { padding: 20px; }
}