:root {
    --sand: #f6f1e8;
    --paper: #fffdf9;
    --ink: #1f2a30;
    --muted: #5f6b70;
    --line: #e4dccd;
    --sea: #0f6b83;
    --accent: var(--sea);
    --accent-soft: #e2f0f4;
    --radius: 14px;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Inter', system-ui, sans-serif;
}
.theme-azzurra { --accent: #1b6ea8; --accent-soft: #e3eef8; }
.theme-rossa { --accent: #b8452f; --accent-soft: #f8e7e2; }
.theme-villa { --accent: #0f6b83; --accent-soft: #e2f0f4; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

h1, h2, h3, .brand { font-family: var(--serif); font-weight: 600; line-height: 1.15; }

/* Intestazione */
.topbar { position: sticky; top: 0; z-index: 20; background: rgb(255 253 249 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.brand { font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand small { font: 500 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--accent-soft); }
.nav__azzurra::before, .nav__rossa::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.nav__azzurra::before { background: #1b6ea8; }
.nav__rossa::before { background: #b8452f; }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang a { padding: 3px 10px; border-radius: 999px; text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--muted); }
.lang a.is-on { background: var(--ink); color: #fff; }

/* Hero */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; color: #fff;
    background: linear-gradient(180deg, rgb(0 0 0 / .1), rgb(10 25 30 / .78)), var(--img) center / cover no-repeat, #2a3a40; }
.hero--short { min-height: 56vh; }
.hero__in { padding: 0 0 56px; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.8rem); margin: .2em 0 .25em; max-width: 18ch; }
.hero .lead { font-size: 1.2rem; max-width: 52ch; margin: 0 0 1.2em; opacity: .95; }
.eyebrow { font: 600 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; margin: 0; opacity: .9; }

/* Pulsanti */
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; border: 2px solid var(--accent); }
.btn:hover { filter: brightness(1.08); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); }

/* Home */
.block { padding: 64px 0; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-top: 5px solid var(--accent); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgb(0 0 0 / .45); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__body { padding: 20px 22px 24px; }
.card h3 { margin: 0 0 .15em; font-size: 1.6rem; }
.card__sub { margin: 0 0 .6em; color: var(--muted); }
.facts-inline { font-size: .9rem; color: var(--muted); margin: 0 0 .8em; }
.more { color: var(--accent); font-weight: 600; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.rounded { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Scheda */
.facts { list-style: none; margin: -32px 0 0; padding: 0; position: relative; display: flex; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 30px -22px rgb(0 0 0 / .5); }
.facts li { padding: 16px 24px; display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
.facts b { font: 600 1.5rem var(--serif); color: var(--ink); }
.facts__cta { margin-left: auto; justify-content: center; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding: 56px 0; }
.prose section { margin-bottom: 2.2em; }
.prose h2 { font-size: 1.6rem; margin: 0 0 .5em; color: var(--accent); }
.prose p { margin: 0 0 1em; max-width: 68ch; }
.side { display: flex; flex-direction: column; gap: 20px; align-self: start; position: sticky; top: 84px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel h2 { font-size: 1.15rem; margin: 0 0 .7em; }
.amenities { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amenities li { background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: .88rem; }
.mini { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 8px 0; font-weight: 600; }
.mini img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }
.mini small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }

/* Galleria */
.gallery-sec { padding: 8px 0 72px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 500 .88rem var(--sans); cursor: pointer; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.gallery a[hidden] { display: none; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lightbox::backdrop { background: rgb(8 14 18 / .92); }
.lightbox img { position: absolute; inset: 0; margin: auto; max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox button { position: absolute; z-index: 1; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 2rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; }
.lb-next { right: 16px; top: 50%; }

/* Piè di pagina */
.foot { background: #17262c; color: #e8eef0; padding: 56px 0; margin-top: 24px; }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.foot h2 { margin: 0 0 .4em; font-size: 1.8rem; }
.foot .muted { color: #9fb0b6; }
.foot a:not(.btn) { color: #fff; }

@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; gap: 24px; }
    .side { position: static; }
    .split, .foot__in { grid-template-columns: 1fr; }
    .facts li { padding: 12px 16px; }
    .facts__cta { width: 100%; margin: 0; padding-top: 4px; }
    .nav { order: 3; margin-left: 0; width: 100%; }
    .lang { margin-left: auto; }
    .hero { min-height: 70vh; }
}

/* Richiesta di prenotazione */
.nav__cta { background: var(--accent); color: #fff !important; }
.nav__cta:hover { filter: brightness(1.08); background: var(--accent) !important; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .7); }
.foot .btn--ghost-light { margin-left: 6px; }
.book { padding: 48px 0 72px; max-width: 820px; }
.book h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .3em; }
.book h2 { font-size: 1.3rem; margin: 0 0 .8em; }
.book .panel { margin: 20px 0; }
.fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.fields label { font: 600 .85rem var(--sans); color: #3d4b51; }
.fields input, .fields select, .fields textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: 400 1rem var(--sans); background: #fff; color: var(--ink); }
.fields input:focus, .fields select:focus, .fields textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.f-wide { grid-column: 1 / -1; }
.f-full { grid-column: 1 / -1; }
.contact .fields { grid-template-columns: 1fr 1fr; }
.msg { border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.msg p { margin: 0; }
.msg--err { background: #fbe9e7; color: #8f2118; }
.ok { color: #1f7a4d; font-weight: 600; margin: 0 0 .6em; }
.quote { width: 100%; border-collapse: collapse; margin: .4em 0; }
.quote td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.quote .r { text-align: right; white-space: nowrap; }
.quote .tot td { font-weight: 700; font-size: 1.1rem; border-bottom: 0; padding-top: 12px; }
.small { font-size: .88rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: .92rem; }
.consent input { margin-top: 4px; }
.consent small { display: block; color: var(--muted); }
.lead-ink { font-size: 1.15rem; }
@media (max-width: 640px) { .fields, .contact .fields { grid-template-columns: 1fr 1fr; } }

/* Informativa */
.legal h2 { margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal p, .legal li { max-width: 68ch; }

/* Calendario delle disponibilità (pubblico) */
.pubcal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pubcal__head h2 { margin: 0; }
.pubcal__nav { display: flex; gap: 14px; align-items: center; }
.pubcal__nav a { text-decoration: none; font-size: 1.3rem; padding: 0 6px; }
.pubcal__scroll { overflow-x: auto; margin: 10px 0; }
.pubcal__table { border-collapse: collapse; min-width: 760px; width: 100%; }
.pubcal__table th, .pubcal__table td { border: 1px solid var(--line); text-align: center; padding: 0; }
.pubcal__table thead th { font-size: .72rem; padding: 3px 0; font-weight: 500; }
.pubcal__table thead th small { display: block; color: var(--muted); font-weight: 400; }
.pubcal__table .we { background: #f3efe6; }
.pubcal__name { text-align: left !important; padding: 6px 10px !important; white-space: nowrap; font: 600 .85rem var(--sans); background: var(--paper); position: sticky; left: 0; }
.pubcal__name small { display: block; font-weight: 400; color: var(--muted); }
.pc { height: 34px; min-width: 22px; position: relative; }
.pc a { position: absolute; inset: 0; }
.pc.is-free { background: #e7f4ec; }
.pc.is-free:hover { background: #bfe3cc; }
.pc.is-busy { background: #d86a5c; background-image: repeating-linear-gradient(45deg, rgb(255 255 255 / .35) 0 3px, transparent 3px 6px); }
.pc.is-closed { background: #e9e5db; }
.pubcal__legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; margin: 8px 0 4px; }
.pubcal__legend i { display: inline-block; width: 16px; height: 16px; min-width: 0; height: 16px; border: 1px solid var(--line); border-radius: 3px; vertical-align: -3px; margin-right: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Canale di contatto */
.canale { border: 0; padding: 0; margin: 0; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.canale legend { font: 600 .85rem var(--sans); color: #3d4b51; padding: 0; margin-bottom: 4px; width: 100%; }
.canale label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.canale input, .check input { width: auto; margin: 0; }
.fields label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }

/* Contatti e WhatsApp (come nel CRM delle barche) */
.btn--wa { background: #25d366; border-color: #25d366; color: #0b3d1e; }
.btn--wa:hover { background: #1ebe5a; border-color: #1ebe5a; filter: none; }
.cta .contatti { display: grid; gap: 4px; margin: .6em 0 1em; }
.cta .contatti .nome { font-weight: 600; }
.cta .contatti a { word-break: break-word; }
.azioni-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.condividi { display: inline-block; margin-top: 14px; font-size: .9rem; }

/* Schede: «In breve» e blocchi apribili */
.breve { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 1.6em; }
.breve h2 { margin: 0 0 .4em; font-size: 1.15rem; color: var(--ink); }
.punti { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.punti li { position: relative; padding-left: 1.4em; }
.punti li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary h2 { margin: 0; font-size: 1.35rem; color: var(--accent); }
.acc summary::after { content: ''; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.acc[open] summary::after { transform: rotate(-135deg); }
.acc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acc__corpo { padding-bottom: 6px; }
.acc__corpo p { margin: 0 0 1em; }
@media (min-width: 861px) { .acc summary { cursor: default; } .acc summary::after { display: none; } }
