html {
    scroll-behavior: smooth;
}

:root {
    --marine: #0178a7;
    --sand: #f2e8cf;
    --dark: #1e1e1e;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--sand);
    color: #333;
}

/* Navbar */
/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
    background-color: var(--marine);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 100%;
    background: #e4cbb5;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: #e4cbb5;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Toggle hamburger */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    z-index: 1001;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 75%;
        background: var(--marine);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 2rem;
        gap: 1.5rem;
        transition: right 0.4s ease-in-out;
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.8rem;
    }

    .menu-toggle {
        display: block;
    }
}

/* Hero */
.hero {
    padding-top: 80px; /* o quanto è alta la navbar */
    position: relative;
    height: 90vh;
    background: url('https://media.istockphoto.com/id/1300107681/it/foto/superficie-delloceano-atlantico.jpg?s=612x612&w=0&k=20&c=NoonkG0Bp4zQZ9WHnhgasXIPDrdD_Hcl8lSok9wE8fQ=') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-bottom: 100px; /* Spazio per non sovrapporre il bottone */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 128, 180, 0.4);
    opacity: 0.45; /* più basso = più trasparente */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Pulsante hero */
.btn {
    background: var(--marine);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(1, 120, 167, 0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(1, 120, 167, 0.5);
}

/* Onda */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 120px;
    fill: var(--sand);
}

.hero-wave path {
    fill: var(--sand);
}

@media (max-width: 768px) {
    .hero {
        padding-bottom: 140px; /* più spazio sotto per evitare sovrapposizione */
    }

    .hero-wave svg {
        height: 160px; /* onda più grande su mobile */
    }
}

/* About */
#about {
    padding: 4rem 1rem;
    text-align: center;
    background: var(--sand);
}

#about h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--marine);
}

#about p {
    max-width: 800px;
    margin: 1rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

.about-list {
    list-style: none;
    padding: 0;
    max-width: 700px;
    margin: 1rem auto;
    text-align: left;
}

.about-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.about-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--marine);
    font-size: 1rem;
}

.services-section {
    padding: 4rem 1rem;
    background-color: var(--sand); /* colore mare */
    color: var(--marine);
    text-align: center;
}

.services-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.services-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.service-icon {
    width: 32px;
    height: 32px;
    fill: currentColor; /* fa sì che l'icona prenda il colore del testo */
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.4;
}

/* === Sezione Gallery === */
.gallery-section {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--sand); /* colore di sfondo */
}

.gallery-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333; /* o un colore coerente col tema */
}

/* Swiper container */
.mySwiper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 3rem; /* margine sotto */
    padding-bottom: 2rem; /* spazio per paginazione */
}

/* Slide */
.swiper-slide {
    height: 450px; /* altezza fissa per uniformità */
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide .slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Immagine nello slide */
.swiper-slide img {
    width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* Effetto leggero al passaggio mouse */
.swiper-slide img:hover {
    transform: scale(1.05);
}

/* Paginazione */
.swiper-pagination {
    bottom: 0;
    margin-top: 1rem;
}

/* Frecce di navigazione */
.swiper-button-prev,
.swiper-button-next {
    color: var(--marine); /* colore coerente con tema */
    top: 50%;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: -1.25rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    opacity: 1;
}

/* Responsive */

/* Più slide visibili su schermi più grandi */
@media (min-width: 640px) {
    .swiper-slide {
        height: 400px;
    }
}

@media (min-width: 768px) {
    .swiper-slide {
        height: 420px;
    }
}

@media (min-width: 1024px) {
    .swiper-slide {
        height: 450px;
    }
}

.caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--marine); /* o colore che preferisci */
    text-align: center;
    font-weight: 500;
}

.cta {
    padding: 3rem 1rem;
    background-color: var(--marine);
    color: #003049; /* colore testo - blu mare */
    font-family: 'Montserrat', sans-serif;
}

.cta h2 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 2rem;
}

#contact h2 {
    color: white;
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.contact-container {
    display: flex;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-form {
    flex: 1 1 350px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem 1rem;
    border: 2px solid #003049;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0077b6;
    outline: none;
}

.contact-form button {
    background-color: #0077b6;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #005f86;
}

.map-wrapper {
    flex: 1 1 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 300px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
    display: block;
    border-radius: 12px;
}

/* Responsive */

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }

    .contact-form,
    .map-wrapper {
        flex: 1 1 100%;
    }
}

.social-section {
    padding: 3rem 1rem;
    background-color: var(--marine); /* un blu scuro coerente con tema mare */
    color: var(--sand);
    text-align: center;
}

.social-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.social-icons a img {
    width: 48px;
    height: 48px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.social-icons a:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.8));
}

/* Footer */
footer {
    background: var(--marine);
    color: var(--sand);
    text-align: center;
    padding: 2rem 1rem;
}

footer a {
    color: var(--sand);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background-color: #fff;
    color: #00303f;
    padding: 1rem 2rem;
    font-size: 1rem;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 480px;
    width: calc(100% - 40px);
    opacity: 0;
    gap: 1rem;
    z-index: 9999;
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: auto;
}

#cookie-banner p {
    margin: 0;
    font-weight: 500;
    flex: 1;
    color: #00303f;
}

#cookie-banner a {
    color: #0077cc;
    text-decoration: underline;
}

#cookie-banner button {
    background-color: #0077cc;
    border: none;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

#cookie-banner button:hover {
    background-color: #005fa3;
}

/* Classe per far comparire il banner con fade-in + slide-up */
#cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.privacy-consent {
    display: block;
    font-size: 0.9rem;
    margin: 1rem 0;
    color: #00303f;
}

.privacy-consent input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.privacy-consent a {
    color: white;
    text-decoration: underline;
}