/* CSS RESET & VARIABILI - PALETTE PURAMENTE MARE + GALLERY LIGHTBOX */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #005F9E;       /* Blu Oltremare / Mare Classico */
    --primary-dark: #003F6B;  /* Blu Notte / Profondo */
    --accent: #00B4D8;        /* Ceruleo Brillante / Turchese */
    --accent-hover: #0096B4;  /* Ceruleo Scuro al passaggio del mouse */
    --text-dark: #1B2A38;     /* Blu Scuro per i testi */
    --text-light: #526B82;    /* Azzurro polvere scuro per i testi secondari */
    --bg-light: #F0F8FF;      /* Alice Blue / Schiuma di mare chiarissima */
    --white: #ffffff;
    --dark: #0A192F;          /* Footer e sfondi scuri */
    --font-main: 'Inter', sans-serif;
    --shadow: 0 4px 15px rgba(0, 95, 158, 0.08);
    --radius: 8px;
    --transition: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
}

body {
    background-color: var(--white);
}

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

/* UTILITÀ */
.section {
    padding: 80px 0;
}
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--dark); }
.text-white { color: var(--white); }
.text-center { text-align: center; }
.text-muted { color: #88A0B8; }
.shadow { box-shadow: var(--shadow); }
.rounded { border-radius: var(--radius); }
.img-responsive { max-width: 100%; height: auto; display: block; }
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.items-center { align-items: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.btn-block { display: block; width: 100%; }

/* PULSANTI */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}
.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 180, 216, 0.3);
}
.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}
.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

/* HEADER & NAVIGATION */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background-color: transparent;
}
.main-header.sticky {
    background-color: var(--white);
    padding: 12px 0;
    box-shadow: var(--shadow);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}
.logo span { color: var(--accent); }
.main-header.sticky .logo { color: var(--primary); }

.nav-menu ul {
    display: flex;
    list-style: none;
    align-items: center;
}
.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}
.main-header.sticky .nav-link { color: var(--text-dark); }
.nav-link:hover, .nav-link.active { color: var(--accent) !important; }

.btn-nav {
    background-color: var(--accent);
    color: var(--white) !important;
    border-radius: 4px;
    padding: 8px 20px;
}
.btn-nav:hover { background-color: var(--accent-hover); }

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 2px 0;
    transition: var(--transition);
}
.main-header.sticky .menu-toggle span { background-color: var(--primary); }

/* HERO SECTION */
.hero {
    height: 100vh;
    background-image: url('splash.jpg'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0, 31, 54, 0.4), rgba(0, 31, 54, 0.7));
}
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}
.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero p {
    font-size: 18px;
    margin-bottom: 35px;
    font-weight: 300;
    color: #E6F3FA;
}
.hero-btns .btn { margin-right: 15px; }

/* TITOLI SEZIONE */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}
.section-title p {
    color: var(--text-light);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* CARDS E SPAZI */
.about-text {
    font-size: 16px;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}
.about-main-img {
    position: relative;
}
.gallery-hint {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}
.spaces-grid { margin-top: 60px; }
.spaces-grid h3 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 30px;
    text-align: center;
}
.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card:hover { transform: translateY(-5px); }

.card-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}
.card-img-wrapper img, .about-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s ease;
}
.card-img-wrapper img:hover, .about-main-img img:hover {
    transform: scale(1.05);
}

.card-body { padding: 20px; }
.card-body h4 { font-size: 18px; color: var(--primary); margin-bottom: 10px; }
.card-body p { font-size: 14px; color: var(--text-light); margin-bottom: 15px; }

/* MINI MINI STRIP DI ANTEPRIME */
.thumbnail-strip {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    border-top: 1px solid #EAF4FA;
    padding-top: 12px;
    overflow-x: auto;
}
.thumb-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.thumb-img:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}


/* --- Regole per le card orizzontali (Desktop) --- */
.space-card-horizontal {
    display: flex;
    flex-direction: row; 
    min-height: 150px;
}
.horizontal-img-wrapper { 
    width: 40%; 
    overflow: hidden; 
}
.horizontal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
}
.horizontal-img-wrapper img:hover { transform: scale(1.05); }

.space-card-horizontal .card-body { 
    width: 60%; 
    padding-top: 15px; 
    padding-bottom: 15px; 
}


/* SERVIZI */
.service-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.service-box:hover {
    border-bottom-color: var(--primary);
}
.service-icon {
    margin-bottom: 15px;
    color: var(--primary); /* Modifica qui: Usa il colore primario (titoli) per le SVG */
    display: flex;
    justify-content: center;
}
.service-box h3 { font-size: 18px; margin-bottom: 10px; color: var(--primary); }
.service-box p { font-size: 14px; color: var(--text-light); }

/* ACCORDION (TERRITORIO) */
.accordion { margin-top: 25px; }
.accordion-item {
    background-color: var(--white);
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 95, 158, 0.05);
}
.accordion-header {
    padding: 15px 20px;
    background-color: #EAF4FA;
    font-weight: 600;
    cursor: pointer;
    color: var(--primary);
    transition: var(--transition);
}
.accordion-header:hover { background-color: #D6EBF5; }
.accordion-body {
    padding: 20px;
    display: none;
    font-size: 14px;
    color: var(--text-light);
    border-top: 1px solid #D6EBF5;
}
.accordion-item.active .accordion-body { display: block; }

/* TABELLA TARIFFE */
.table-responsive { overflow-x: auto; margin: 0 auto; max-width: 800px; }
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}
.price-table th {
    background-color: var(--primary);
    color: var(--white);
    padding: 15px 20px;
    font-weight: 600;
    text-align: left;
}
.price-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #EAF4FA;
    color: var(--text-dark);
}
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:nth-child(even) { background-color: #F8FBFC; }
.price-table .price {
    font-weight: 700;
    color: var(--accent);
    font-size: 18px;
    text-align: right;
}
.price-table small { color: var(--text-light); display: block; font-size: 12px; }

.info-card h4 { color: var(--accent); margin-bottom: 15px; }
.info-card ul { list-style: none; }
.info-card ul li {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}
.info-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* CONTATTI */
.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.contact-item .icon {
    font-size: 24px;
    background: rgba(255,255,255,0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.contact-item a { color: var(--white); text-decoration: none; transition: var(--transition); }
.contact-item a:hover { color: var(--accent); }
.whatsapp-link { font-size: 18px; font-weight: 600; }

.contact-cta-box {
    background-color: rgba(0, 180, 216, 0.1);
    padding: 40px;
    border: 1px solid rgba(0, 180, 216, 0.2);
}
.contact-cta-box h3 { margin-bottom: 15px; color: var(--accent); }
.contact-cta-box p { font-size: 14px; color: #B0C4D9; margin-bottom: 25px; }

/* MODAL DESIGN LIGHTBOX PROFESSIONALE */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.95); /* Sfondo blu notte quasi totalmente coprente */
    z-index: 2000;
    display: none; 
    align-items: center;
    justify-content: center;
    user-select: none;
}
.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomEffect 0.3s ease-out;
}
@keyframes zoomEffect {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
}
.lightbox-close:hover { color: var(--accent); }

.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--white);
    font-size: 28px;
    padding: 15px 22px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-nav:hover {
    background: rgba(0, 180, 216, 0.2);
    color: var(--accent);
}
.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

.lightbox-caption {
    color: #EAF4FA;
    margin-top: 15px;
    font-size: 15px;
    text-align: center;
    max-width: 600px;
    font-weight: 400;
}

/* EFFETTI FADE IN / REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* MEDIA QUERIES RESPONSIVE */
@media (max-width: 992px) {
    .hero h1 { font-size: 38px; }
    .lightbox-prev { left: 15px; }
    .lightbox-next { right: 15px; }
    .lightbox-close { top: 15px; right: 20px; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
        display: none;
    }
    .nav-menu.active { display: block; }
    .nav-menu ul { flex-direction: column; gap: 15px; }
    .nav-link { color: var(--text-dark); display: block; width: 100%; text-align: center; }
    .main-header { background-color: rgba(0,31,54,0.3); }
    .main-header.sticky { background-color: var(--white); }
    .main-header.sticky .menu-toggle span { background-color: var(--primary); }
    .menu-toggle span { background-color: var(--white); }
    
    .hero h1 { font-size: 32px; }

    /* Modifica cruciale per l'adattamento mobile delle card orizzontali */
    .space-card-horizontal { 
        flex-direction: column; 
    }
    .horizontal-img-wrapper { 
        width: 100% !important; 
        height: 220px !important; 
    }
    .space-card-horizontal .card-body { 
        width: 100% !important; 
    }
    
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
}
