:root {
    --sand: #f5efe6;
    --sand-dark: #e8ddd0;
    --ocean: #0a7ea4;
    --ocean-deep: #064e6b;
    --ocean-light: #5bbdd6;
    --white: #ffffff;
    --text: #1a2530;
    --text-muted: #6b7f8e;
    --accent: #e8a45a;
}

.bg-sand {
    background: var(--sand);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    overflow-x: hidden;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 5%;
    background: rgba(10, 38, 55, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--white);
    letter-spacing: 0.03em;
}

.nav-logo span {
    color: var(--accent);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.2rem;
}

nav ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav ul a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: var(--white) !important;
    padding: 0.55rem 1.3rem;
    border-radius: 2px;
}

.nav-cta:hover {
    background: #d4913f;
    color: var(--white) !important;
}

.hero {
    height: 100vh;
    background-image: url(/img/Bagni_Saitta.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='200'%3E%3Cellipse cx='400' cy='200' rx='600' ry='120' fill='%23f5efe6' opacity='0.08'/%3E%3C/svg%3E") bottom/cover no-repeat;
}

.waves {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
    background: var(--sand);
    border-radius: 50% 50% 0 0 / 80px 80px 0 0;
    opacity: 0.9;
}

.wave:nth-child(2) {
    opacity: 0.5;
    animation-duration: 10s;
    animation-delay: -3s;
    background: rgba(245, 239, 230, 0.7);
}

@keyframes waveAnim {

    0%,
    100% {
        transform: translateX(-20px);
    }

    50% {
        transform: translateX(20px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.hero-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.2rem;
    animation: fadeUp 0.8s ease both;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 3rem;
    animation: fadeUp 0.9s 0.15s ease both;
}

@media (max-width: 576px) {
    .hero h1 {
        margin-top: 10rem;
    }
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.78);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    font-weight: 300;
    animation: fadeUp 1s 0.3s ease both;
}

@media (max-width: 576px) {
    .hero p {
        margin-bottom: 0.5rem;
    }
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 1s 0.45s ease both;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    padding: 0.9rem 2.2rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: #d4913f;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    padding: 0.9rem 2.2rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    transition: border-color 0.2s, transform 0.2s;
}

.btn-outline:hover {
    border-color: var(--white);
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    padding: 6rem 5%;
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ocean);
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.section-title em {
    font-style: italic;
    color: var(--ocean);
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 560px;
    font-weight: 300;
}

#servizi {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3.5rem;
}

.service-card {
    background: var(--sand);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    transition: transform 0.25s, box-shadow 0.25s;
    border-top: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(10, 126, 164, 0.12);
    border-top-color: var(--ocean);
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}

.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

#galleria {
    background: var(--sand);
    padding-bottom: 4rem;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    gap: 1rem;
}

.gallery-item {
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    background: var(--ocean-deep);
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item:first-child {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.5s ease;
}

.carousel-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.5s ease;
    border-radius: 24px;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--ocean-deep), var(--ocean));
    transition: opacity 0.2s;
    overflow: hidden;
}

.gallery-placeholder .ph-icon {
    font-size: 2.5rem;
    opacity: 0.4;
}

.gallery-item:hover .gallery-placeholder {
    opacity: 0.7;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 78, 107, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

#ristorante {
    background: var(--ocean-deep);
    color: var(--sand-dark);
}

#ristorante em {
    color: var(--accent);
}


#contatti {
    background: var(--white);
}

.contacts-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.contact-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--sand-dark);
}

.contact-detail:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.c-icon {
    font-size: 1.4rem;
    min-width: 2rem;
    text-align: center;
}

.c-text h4 {
    font-size: 0.78rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ocean);
    margin-bottom: 0.3rem;
}

.c-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.map-container {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(10, 126, 164, 0.12);
    height: 400px;
    background: var(--sand-dark);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 1.1rem;
}

.footer-logo span {
    color: var(--accent);
}

footer p {
    font-size: 0.8rem;
}


.phone-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.carousel {
    margin: 0 auto;
    padding: 20px 0;
    max-width: 800px;
    overflow: hidden;
    display: flex;

    >* {
        flex: 0 0 100%;
    }

    &:hover .group {
        animation-play-state: paused;
    }
}


.event-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent); 
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(232, 164, 90, 0.4);
}

.event-day {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.event-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 15px;
    line-height: 1.1;
}

.event-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.event-footer {
    width: 100%;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.event-tag {
    color: var(--ocean-light); 
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.card {
    width: 100%;
    border-radius: 24px;
    box-shadow: rgba(0, 0, 0, 10%) 5px 5px 20px 0;
    padding: 20px;
    font-size: xx-large;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    min-width: 300px;
    background: var(--ocean-deep);
    border: none;
    color: var(--white);
}

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start; 
    text-align: left;
    padding: 40px 30px 30px 30px; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card p {
    font-size: 0.95rem;
}

.card h4 {
    color: var(--accent);
}

.group {
    display: flex;
    gap: 20px;
    padding-right: 20px;
    will-change: transform;
    animation: scrolling 15s linear infinite;
}

@keyframes scrolling {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}


.parent {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    max-height: 800px;
    max-width: 1700px;
    gap: 15px;
}

@media (max-width: 576px){
    .parent{
        max-height: 300px;
    }
}

.div1 {
    grid-area: 4 / 1 / 6 / 3;
}

.div2 {
    grid-area: 4 / 3 / 6 / 5;
}

.div3 {
    grid-area: 1 / 1 / 4 / 5;
}

.div4 {
    grid-area: 4 / 5 / 6 / 7;
}

.div5 {
    grid-area: 1 / 5 / 4 / 7;
}

.grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wrapper {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}

@media (min-width: 768px){
    .wrapper {
        height: 450px;
    }
}

p footer{
    margin-top:0.4rem; 
    font-size:0.78rem;
}

.logo{
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Modifica queste regole nel tuo style.css */

nav.navbar {
    padding: 0.8rem 2%; /* Ridotto per mobile */
    background: rgba(10, 38, 55, 0.95); /* Leggermente più opaco per leggibilità */
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

/* Rimuovi "display: flex" e "justify-content" da nav perché Bootstrap usa container-fluid */

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: var(--accent) !important;
}

/* Stile specifico per il menu aperto su Mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(10, 38, 55, 0.98);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 10px;
    }
    
    .nav-logo {
        font-size: 1.1rem; /* Più piccolo su mobile */
    }
}