@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --accent: #00ccff;
    --accent-dark: #009ec4;
    --accent-soft: rgba(0, 204, 255, 0.12);
    --ink: #0b1720;
    --ink-soft: #4c5a67;
    --surface: #f5f9fc;
    --surface-2: #ffffff;
    --line: rgba(11, 23, 32, 0.08);
    --shadow: 0 30px 60px rgba(5, 21, 34, 0.15);
    --shadow-soft: 0 15px 35px rgba(5, 21, 34, 0.08);
    --shadow-glow: 0 20px 40px rgba(0, 204, 255, 0.2);
    --radius: 22px;
    --verde-whatsapp: #25D366;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bouncy: cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(0, 204, 255, 0.05), transparent 40%),
        linear-gradient(180deg, #f8fcff 0%, #edf5fa 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(11, 23, 32, 0.75);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s var(--ease-out-expo);
}

.logo {
    text-decoration: none;
    font-size: 1.9rem;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(0, 204, 255, 0.4);
}

.navbar nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.navbar nav a {
    text-decoration: none;
    color: rgba(255,255,255,0.86);
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar nav a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-nav,
.btn-primary,
.btn-secondary,
.btn-dettagli,
.btn-whatsapp,
.btn-chiama {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-bouncy);
}

.btn-primary::after, .btn-nav::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg) translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.btn-primary:hover::after, .btn-nav:hover::after {
    animation: shine 1.5s ease-out infinite;
    opacity: 1;
}

@keyframes shine {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

.btn-nav,
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #56dfff);
    color: #04131b;
    box-shadow: 0 8px 20px rgba(0, 204, 255, 0.25);
    border: 1px solid rgba(255,255,255,0.4);
}

.btn-nav {
    padding: 11px 22px;
    font-size: 0.9rem;
}

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 72px 24px;
    background:
        linear-gradient(120deg, rgba(6, 18, 28, 0.88), rgba(6, 18, 28, 0.35)),
        url('img/sfondo-hero.jpg') center/cover;
    background-attachment: fixed; 
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 204, 255, 0.15), transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    margin: 0 auto;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 24px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #b3f0ff;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 1.05;
    background: linear-gradient(to right, #ffffff, #cceeff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.hero-text {
    max-width: 760px;
    margin: 26px 0 0;
    font-size: 1.15rem;
    color: rgba(255,255,255,0.85);
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 16px 28px;
    font-size: 1.05rem;
}

.btn-secondary {
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 204, 255, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.15);
    border-color: #ffffff;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    max-width: 760px;
    margin-top: 55px;
}

.stat-box {
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.stat-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-color: rgba(0, 204, 255, 0.4);
}

.stat-box strong {
    display: block;
    font-size: 2.2rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,204,255,0.3);
}

.stat-box span {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
}

.intro-strip {
    width: min(1180px, calc(100% - 32px));
    margin: -60px auto 0;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.intro-card {
    padding: 32px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,1);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--ease-bouncy);
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.intro-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: var(--shadow-glow);
    border-color: rgba(0, 204, 255, 0.3);
}

.intro-card:hover::before {
    opacity: 1;
}

.intro-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #e0f8ff, #ffffff);
    color: var(--accent-dark);
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 204, 255, 0.15), inset 0 2px 0 rgba(255,255,255,0.9);
    transition: transform 0.4s var(--ease-bouncy);
}

.intro-card:hover .intro-icon {
    transform: scale(1.1) rotate(5deg);
}

.intro-card span {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--ink);
}

.intro-card p {
    margin: 0;
    color: var(--ink-soft);
    position: relative;
    z-index: 1;
}

.sezione-zona {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 100px 0 20px;
    position: relative;
}

.sezione-zona::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.3), transparent);
}

.sezione-zona[id="lido-san-giovanni"] {
    margin-top: 60px;
    padding: 100px 32px 40px;
    border-radius: 40px;
    background: linear-gradient(180deg, rgba(0, 204, 255, 0.03), rgba(255,255,255,0.8));
    border: 1px solid rgba(0, 204, 255, 0.15);
    box-shadow: inset 0 20px 40px rgba(255,255,255,0.5);
}

.titolo-sezione {
    margin: 0 0 42px;
    text-align: center;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: var(--ink);
}

.titolo-sezione::after {
    content: '';
    display: block;
    width: 60px;
    height: 5px;
    margin: 20px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #45d8ff);
    transition: width 0.4s ease;
}

.sezione-zona:hover .titolo-sezione::after {
    width: 100px; 
}

.sottotitolo-sezione {
    max-width: 760px;
    margin: -18px auto 50px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 1.1rem;
}

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

.card-casa {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: rgba(255,255,255,1);
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s var(--ease-bouncy);
}

.card-casa::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 120px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
    z-index: 1;
    pointer-events: none;
}

.card-casa:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: var(--shadow);
    border-color: rgba(0, 204, 255, 0.4);
}

.badge-posti {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(11, 23, 32, 0.85);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.card-casa .img-container {
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.card-casa img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out-expo);
}

.card-casa:hover img {
    transform: scale(1.08);
}

.card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
    background: #ffffff;
    position: relative;
    z-index: 2;
}

.card-info h3 {
    margin: 0 0 12px;
    font-size: 1.55rem;
    color: var(--ink);
    transition: color 0.3s ease;
}

.card-casa:hover .card-info h3 {
    color: var(--accent-dark);
}

.card-info p {
    margin: 0 0 28px;
    color: var(--ink-soft);
    font-size: 1rem;
    min-height: 72px;
}

.btn-dettagli {
    margin-top: auto;
    padding: 14px 22px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.card-casa:hover .btn-dettagli {
    background: linear-gradient(135deg, var(--accent), #56dfff);
    color: #03161e;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(0, 204, 255, 0.3);
    transform: translateY(-2px);
}

.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatOrb {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-30px, -30px, 0) scale(1.1); }
}

.hero::before {
    content: '';
    position: absolute;
    inset: auto -10% -18% auto;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 204, 255, 0.35), transparent 70%);
    filter: blur(20px);
    animation: floatOrb 12s ease-in-out infinite;
}

.hero-content > * {
    animation: fadeUp 1s var(--ease-out-expo) both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300ccff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -2;
}

@media (max-width: 980px) {
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 16px 20px;
    }
    .hero-stats,
    .intro-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar nav a {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .btn-nav {
        width: auto;
        flex: 0 0 auto;
    }

    .hero {
        min-height: auto;
        padding: 56px 18px 88px;
    }

    .hero h1 {
        line-height: 1.05;
    }

    .hero-text {
        font-size: 1.05rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sezione-zona,
    .sezione-zona[id="lido-san-giovanni"] {
        width: min(1200px, calc(100% - 24px));
        padding-top: 70px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .card-casa img {
        height: 240px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-content > *, .reveal, .card-casa img, .intro-card, .hero::before, .btn-primary::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

.dettaglio-casa { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 24px; 
}

.dettaglio-header { 
    margin-bottom: 30px; 
}

.dettaglio-header h1 { 
    font-size: clamp(2.2rem, 4vw, 3.5rem); 
    margin-bottom: 5px; 
    color: var(--ink); 
}

.dettaglio-header p.posizione { 
    color: var(--accent-dark); 
    font-weight: 600; 
    font-size: 1.1em; 
    margin-top: 0;
}

.quick-info { 
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap; 
    margin-top: 15px; 
    margin-bottom: 25px; 
}

.info-chip { 
    background: var(--accent-soft); 
    color: var(--accent-dark); 
    padding: 8px 18px; 
    border-radius: 999px; 
    font-size: 0.9em; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    border: 1px solid rgba(0, 204, 255, 0.2); 
}

.swiper { 
    width: 100%;
    height: 500px;
    border-radius: var(--radius);
    margin-bottom: 50px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f9fc;
}

.swiper-slide img { 
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.swiper-button-next, .swiper-button-prev { 
    color: var(--accent) !important; 
    background: rgba(255,255,255,0.9); 
    width: 50px !important; 
    height: 50px !important; 
    border-radius: 50%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.swiper-button-next:after, .swiper-button-prev:after { 
    font-size: 20px !important; 
    font-weight: bold; 
}

.swiper-pagination-bullet-active { 
    background: var(--accent) !important; 
}

.contenuto-casa { 
    display: flex; 
    gap: 50px; 
    flex-wrap: wrap; 
}

.descrizione { 
    flex: 2; 
    min-width: 300px; 
    font-size: 1.1em; 
    color: var(--ink-soft); 
}

.descrizione h3 { 
    color: var(--ink); 
    font-size: 1.8em; 
    margin-top: 40px; 
    font-weight: 700; 
}

.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 20px; 
    margin-top: 25px; 
}

.feature-card { 
    background: var(--surface-2); 
    padding: 24px; 
    border-radius: 20px; 
    border: 1px solid var(--line); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.02); 
    transition: all 0.3s var(--ease-bouncy); 
}

.feature-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent); 
    box-shadow: var(--shadow-glow); 
}

.feature-icon { 
    font-size: 2em; 
    margin-bottom: 15px; 
    display: block; 
}

.feature-title { 
    font-weight: 700; 
    color: var(--ink); 
    margin-bottom: 8px; 
    font-size: 1.1em; 
}

.feature-desc { 
    font-size: 0.95em; 
    color: var(--ink-soft); 
    line-height: 1.5; 
    margin: 0; 
}

.box-contatti { 
    flex: 1; 
    min-width: 320px; 
    background: var(--surface-2); 
    padding: 40px; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow-soft); 
    align-self: flex-start; 
    position: sticky; 
    top: 120px; 
    border: 1px solid var(--line); 
}

.box-contatti h3 { 
    margin-top: 0; 
    font-size: 1.6em; 
    font-weight: 700; 
    margin-bottom: 12px; 
    color: var(--ink); 
}

.btn-whatsapp, .btn-chiama { 
    display: flex; 
    justify-content: center; 
    width: 100%; 
    padding: 16px; 
    text-decoration: none; 
    margin-bottom: 15px; 
    font-size: 1.1em; 
    border: none; 
    cursor: pointer; 
}

.btn-whatsapp { 
    background-color: var(--verde-whatsapp); 
    color: white; 
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25); 
}

.btn-chiama { 
    background-color: var(--accent); 
    color: #04131b; 
    box-shadow: 0 8px 20px rgba(0, 204, 255, 0.25); 
}

@media (max-width: 768px) {
    .swiper { height: 300px; }
    .contenuto-casa { flex-direction: column; gap: 30px; }
    .box-contatti { position: static; margin-top: 20px; }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
