/* =====================================================================
   SpaziBenessere.it — Home 2026 design system
   Self-contained, scoped under .page-home so it never leaks into the
   rest of the (legacy) style.css. Mobile-first, WCAG-AA, reduced-motion
   aware, dark-mode ready. Palette + tokens defined locally.
   ===================================================================== */

.page-home {
    /* ── Palette ── */
    --h-primary: #1d8f7a;
    --h-primary-600: #198170;
    --h-primary-700: #146b5c;
    --h-primary-800: #0f5044;
    --h-primary-tint: #e8f3f0;
    --h-primary-glow: rgba(29, 143, 122, 0.18);

    --h-secondary: #f5f8f7;
    --h-accent: #e7b980;
    --h-accent-700: #c9954e;
    --h-accent-ink: #855616; /* gold scuro: testo/icone leggibili su sfondi chiari (AA) */
    --h-accent-tint: #fbf1e2;

    --h-ink: #1e293b;
    --h-neutral: #64748b;
    --h-neutral-300: #94a3b8;
    --h-line: #e7eeec;
    --h-line-strong: #d9e3e0;
    --h-surface: #ffffff;
    --h-bg: #ffffff;
    --h-star: #f5a623;

    /* ── Radius ── */
    --h-r-sm: 12px;
    --h-r: 16px;
    --h-r-lg: 20px;
    --h-r-xl: 24px;
    --h-r-pill: 999px;

    /* ── Shadows (soft) ── */
    --h-shadow-xs: 0 1px 2px rgba(15, 80, 68, 0.05);
    --h-shadow-sm: 0 4px 14px rgba(16, 47, 41, 0.06);
    --h-shadow-md: 0 14px 40px rgba(16, 47, 41, 0.10);
    --h-shadow-lg: 0 28px 70px rgba(16, 47, 41, 0.14);
    --h-shadow-primary: 0 14px 30px rgba(29, 143, 122, 0.28);

    /* ── Type ── */
    --h-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --h-font-display: "Plus Jakarta Sans", "Manrope", var(--h-font);

    /* ── Layout ── */
    --h-container: 1180px;
    --h-gutter: clamp(1.1rem, 4vw, 2rem);
    --h-ease: cubic-bezier(0.22, 1, 0.36, 1);

    background: var(--h-bg);
    color: var(--h-ink);
    font-family: var(--h-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Override legacy fluid main spacing for the new layout */
.page-home .main-content--fluid { padding: 0; }

.page-home ::selection { background: var(--h-primary-glow); }

/* ── Shared layout helpers (home only) ── */
.hx-container {
    width: min(var(--h-container), 100% - (var(--h-gutter) * 2));
    margin-inline: auto;
}
.hx-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.hx-section--tight { padding: clamp(2.2rem, 5vw, 3.2rem) 0; }
.hx-section--mint { background: var(--h-secondary); }

.hx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--h-font);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--h-primary-700);
    margin: 0 0 0.85rem;
}
.hx-eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: var(--h-accent);
}
.hx-eyebrow--center { justify-content: center; }

.hx-head { max-width: 42rem; }
.hx-head--center { max-width: 46rem; margin-inline: auto; text-align: center; }
.hx-title {
    font-family: var(--h-font-display);
    font-weight: 800;
    font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.65rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.7rem;
    color: var(--h-ink);
}
.hx-lead {
    font-size: clamp(1rem, 0.96rem + 0.3vw, 1.13rem);
    line-height: 1.6;
    color: var(--h-neutral);
    margin: 0;
}

/* ── Buttons ── */
.hx-btn {
    --_bg: var(--h-primary);
    --_fg: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-family: var(--h-font);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1;
    padding: 0.95rem 1.5rem;
    border-radius: var(--h-r-pill);
    border: 1px solid transparent;
    background: var(--_bg);
    color: var(--_fg);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s var(--h-ease), box-shadow 0.25s var(--h-ease),
        background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.hx-btn svg { width: 1.1em; height: 1.1em; }
.hx-btn--primary { box-shadow: var(--h-shadow-primary); }
.hx-btn--primary:hover { background: var(--h-primary-700); transform: translateY(-2px); box-shadow: 0 18px 38px rgba(29, 143, 122, 0.34); }
.hx-btn--ghost {
    background: var(--h-surface);
    color: var(--h-ink);
    border-color: var(--h-line-strong);
    box-shadow: var(--h-shadow-xs);
}
.hx-btn--ghost:hover { border-color: var(--h-primary); color: var(--h-primary-700); transform: translateY(-2px); }
.hx-btn--light { background: #fff; color: var(--h-primary-800); }
.hx-btn--light:hover { transform: translateY(-2px); box-shadow: var(--h-shadow-md); }
.hx-btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.hx-btn--outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.hx-btn--lg { padding: 1.05rem 1.8rem; font-size: 1.03rem; }
.hx-btn:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 3px; }

.hx-textlink {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--h-primary-700);
    text-decoration: none;
}
.hx-textlink svg { width: 1.05em; height: 1.05em; transition: transform 0.2s ease; }
.hx-textlink:hover svg { transform: translateX(3px); }

/* =========================================================
   Header (scoped refinement so the chrome matches the home)
   ========================================================= */
.page-home .site-header {
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.page-home .site-header.is-scrolled {
    border-bottom-color: var(--h-line);
    box-shadow: var(--h-shadow-sm);
}
.page-home .header-inner { padding-block: 0.85rem; }
.page-home .nav { font-family: var(--h-font); }
.page-home .nav a { color: var(--h-ink); font-weight: 500; }
.page-home .nav a:hover { color: var(--h-primary-700); }
.page-home .nav .btn,
.page-home .nav .btn-sm {
    background: var(--h-primary);
    border-radius: var(--h-r-pill);
    border: none;
    color: #fff;
    box-shadow: var(--h-shadow-primary);
}
.page-home .nav .btn:hover { background: var(--h-primary-700); }

/* =========================================================
   HERO
   ========================================================= */
.hx-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
    background:
        radial-gradient(1200px 600px at 85% -10%, var(--h-primary-tint), transparent 60%),
        radial-gradient(900px 500px at 0% 110%, var(--h-accent-tint), transparent 55%),
        var(--h-surface);
}
.hx-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2.2rem, 5vw, 4rem);
    align-items: center;
}
@media (min-width: 960px) {
    .hx-hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hx-hero__rating {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.9rem 0.45rem 0.55rem;
    background: var(--h-surface);
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-pill);
    box-shadow: var(--h-shadow-xs);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--h-ink);
    margin-bottom: 1.4rem;
}
.hx-stars { display: inline-flex; color: var(--h-star); }
.hx-stars svg { width: 0.95rem; height: 0.95rem; fill: currentColor; stroke: none; }
.hx-hero__rating span { color: var(--h-neutral); font-weight: 500; }

.hx-hero__title {
    font-family: var(--h-font-display);
    font-weight: 800;
    font-size: clamp(2.1rem, 1.1rem + 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 1.1rem;
    color: var(--h-ink);
}
.hx-hero__title em { font-style: normal; color: var(--h-primary); }
.hx-hero__sub {
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.22rem);
    line-height: 1.6;
    color: var(--h-neutral);
    max-width: 34rem;
    margin: 0 0 1.8rem;
}
.hx-hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; }

.hx-hero__trust {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0.6rem 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (min-width: 560px) { .hx-hero__trust { grid-template-columns: repeat(4, auto); } }
.hx-hero__trust li { display: flex; flex-direction: column; }
.hx-hero__trust b {
    font-family: var(--h-font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--h-ink);
    line-height: 1;
}
.hx-hero__trust span { font-size: 0.8rem; color: var(--h-neutral); margin-top: 0.2rem; }

/* ── Hero visual: realistic platform mockup ── */
.hx-mock {
    position: relative;
    border-radius: var(--h-r-xl);
    background: linear-gradient(160deg, #ffffff, var(--h-secondary));
    border: 1px solid var(--h-line);
    box-shadow: var(--h-shadow-lg);
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}
@media (min-width: 520px) { .hx-mock { grid-template-columns: 1.15fr 1fr; } }

.hx-mock__card {
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r);
    box-shadow: var(--h-shadow-xs);
    overflow: hidden;
}
.hx-mock__space { display: flex; flex-direction: column; }
.hx-mock__photo {
    height: 116px;
    background:
        linear-gradient(135deg, rgba(29, 143, 122, 0.85), rgba(15, 80, 68, 0.92)),
        var(--h-primary);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0.7rem;
}
.hx-mock__photo--photo { background-size: cover; background-position: center; }
.hx-mock__pill {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--h-primary-800);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: var(--h-r-pill);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.hx-mock__pill svg { width: 0.8rem; height: 0.8rem; }
.hx-mock__fav {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    place-items: center;
    color: var(--h-primary-700);
}
.hx-mock__fav svg { width: 1rem; height: 1rem; }
.hx-mock__body { padding: 0.7rem 0.8rem 0.85rem; }
.hx-mock__name { font-weight: 700; font-size: 0.92rem; margin: 0 0 0.15rem; color: var(--h-ink); }
.hx-mock__meta { font-size: 0.76rem; color: var(--h-neutral); margin: 0 0 0.55rem; display: flex; align-items: center; gap: 0.25rem; }
.hx-mock__meta svg { width: 0.85rem; height: 0.85rem; }
.hx-mock__price { font-family: var(--h-font-display); font-weight: 800; color: var(--h-ink); font-size: 1rem; }
.hx-mock__price small { font-weight: 500; color: var(--h-neutral); font-size: 0.7rem; }

.hx-mock__col { display: grid; gap: 0.9rem; }
.hx-mock__panel { padding: 0.8rem; }
.hx-mock__phead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.hx-mock__phead b { font-size: 0.82rem; color: var(--h-ink); }
.hx-mock__phead span { font-size: 0.72rem; color: var(--h-neutral); }

.hx-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.2rem; }
.hx-cal i {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    font-size: 0.6rem;
    font-style: normal;
    color: var(--h-neutral);
    border-radius: 6px;
}
.hx-cal i.is-on { background: var(--h-primary-tint); color: var(--h-primary-800); font-weight: 700; }
.hx-cal i.is-sel { background: var(--h-primary); color: #fff; font-weight: 700; }
.hx-cal i.is-mut { color: var(--h-neutral-300); }

.hx-mock__avail { display: grid; gap: 0.4rem; }
.hx-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: var(--h-secondary);
    color: var(--h-ink);
}
.hx-slot--on { background: var(--h-primary-tint); color: var(--h-primary-800); font-weight: 600; }
.hx-slot em { font-style: normal; color: var(--h-primary-700); display: inline-flex; align-items: center; gap: 0.2rem; }
.hx-slot em svg { width: 0.8rem; height: 0.8rem; }

.hx-mock__map { position: relative; height: 110px; padding: 0; }
.hx-mock__map-canvas {
    position: absolute;
    inset: 0;
    border-radius: var(--h-r);
    background:
        linear-gradient(0deg, rgba(255,255,255,0.4), rgba(255,255,255,0)),
        repeating-linear-gradient(0deg, var(--h-secondary) 0 18px, #eef3f1 18px 19px),
        repeating-linear-gradient(90deg, var(--h-secondary) 0 22px, #eef3f1 22px 23px);
    overflow: hidden;
}
.hx-mock__marker {
    position: absolute;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50% 50% 50% 0;
    background: var(--h-primary);
    transform: rotate(-45deg);
    box-shadow: 0 4px 10px var(--h-primary-glow);
}
.hx-mock__marker--a { top: 30%; left: 28%; }
.hx-mock__marker--b { top: 55%; left: 62%; background: var(--h-accent); }
.hx-mock__marker--c { top: 70%; left: 38%; }

.hx-float {
    position: absolute;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r);
    box-shadow: var(--h-shadow-md);
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--h-ink);
}
.hx-float svg { width: 1.1rem; height: 1.1rem; color: var(--h-primary); }
.hx-float--booked { right: -0.4rem; bottom: 1.4rem; }
.hx-float__ico { background: var(--h-primary-tint); width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; }
.hx-float small { display: block; font-weight: 500; color: var(--h-neutral); font-size: 0.7rem; }
@media (max-width: 519px) { .hx-float--booked { display: none; } }

/* =========================================================
   SEARCH BAR (Airbnb-style)
   ========================================================= */
.hx-searchwrap { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.hx-search {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-xl);
    box-shadow: var(--h-shadow-md);
    padding: 0.5rem;
}
@media (min-width: 760px) {
    .hx-search {
        grid-template-columns: 1.4fr 1.2fr 1fr 1fr 1fr auto;
        align-items: center;
        border-radius: var(--h-r-pill);
        padding: 0.45rem 0.45rem 0.45rem 0.4rem;
    }
}
.hx-field {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.9rem;
    border-radius: var(--h-r-lg);
    transition: background 0.2s ease;
    min-width: 0;
}
@media (min-width: 760px) {
    .hx-field { border-radius: var(--h-r-pill); }
    .hx-field + .hx-field::before {
        content: "";
        position: absolute;
        left: 0; top: 50%;
        transform: translateY(-50%);
        height: 56%;
        width: 1px;
        background: var(--h-line);
    }
}
.hx-field:focus-within { background: var(--h-secondary); }
.hx-field:focus-within::before,
.hx-field:hover::before { opacity: 0; }
.hx-field label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--h-ink);
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.hx-field label svg { width: 0.85rem; height: 0.85rem; color: var(--h-primary); }
.hx-field input,
.hx-field select {
    border: none;
    background: transparent;
    font-family: var(--h-font);
    font-size: 0.92rem;
    color: var(--h-ink);
    padding: 0;
    width: 100%;
    appearance: none;
    cursor: pointer;
}
.hx-field input { cursor: text; }
.hx-field input::placeholder { color: var(--h-neutral-300); }
.hx-field input:focus,
.hx-field select:focus { outline: none; }
.hx-search__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--h-primary);
    color: #fff;
    border: none;
    border-radius: var(--h-r-pill);
    padding: 0.95rem 1.5rem;
    font-family: var(--h-font);
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
    box-shadow: var(--h-shadow-primary);
    transition: background 0.2s ease, transform 0.2s var(--h-ease);
}
.hx-search__submit:hover { background: var(--h-primary-700); transform: translateY(-1px); }
.hx-search__submit svg { width: 1.15rem; height: 1.15rem; }
@media (max-width: 759px) { .hx-search__submit { margin-top: 0.3rem; } }
.hx-search__submit:focus-visible,
.hx-field input:focus-visible,
.hx-field select:focus-visible { outline: 3px solid var(--h-primary); outline-offset: 2px; }

.hx-search__hint {
    margin: 0.9rem 0 0;
    font-size: 0.85rem;
    color: var(--h-neutral);
    text-align: center;
}
.hx-search__hint a { color: var(--h-primary-700); font-weight: 600; text-decoration: none; }

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.hx-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 720px) { .hx-steps { grid-template-columns: repeat(3, 1fr); } }
.hx-step {
    position: relative;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-xl);
    padding: 1.8rem 1.6rem;
    box-shadow: var(--h-shadow-xs);
    transition: transform 0.3s var(--h-ease), box-shadow 0.3s var(--h-ease), border-color 0.3s ease;
}
.hx-step:hover { transform: translateY(-6px); box-shadow: var(--h-shadow-md); border-color: var(--h-primary-tint); }
.hx-step__num {
    position: absolute;
    top: 1.4rem;
    right: 1.5rem;
    font-family: var(--h-font-display);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--h-line-strong);
}
.hx-step__ico {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: var(--h-r);
    display: grid;
    place-items: center;
    background: var(--h-primary-tint);
    color: var(--h-primary-700);
    margin-bottom: 1.1rem;
}
.hx-step__ico svg { width: 1.5rem; height: 1.5rem; }
.hx-step:nth-child(2) .hx-step__ico { background: var(--h-accent-tint); color: var(--h-accent-ink); }
.hx-step__title { font-family: var(--h-font-display); font-weight: 700; font-size: 1.18rem; margin: 0 0 0.4rem; color: var(--h-ink); }
.hx-step__text { font-size: 0.95rem; line-height: 1.55; color: var(--h-neutral); margin: 0; }

/* =========================================================
   CATEGORIES GRID
   ========================================================= */
.hx-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.7rem, 2vw, 1.1rem);
    margin-top: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 760px) { .hx-cats { grid-template-columns: repeat(3, 1fr); } }
.hx-cat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 168px;
    padding: 1.1rem;
    border-radius: var(--h-r-lg);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    isolation: isolate;
    background: linear-gradient(160deg, var(--h-primary-600), var(--h-primary-800));
    box-shadow: var(--h-shadow-sm);
    transition: transform 0.35s var(--h-ease), box-shadow 0.35s var(--h-ease);
}
.hx-cat::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 90% at 80% 0%, rgba(255, 255, 255, 0.16), transparent 60%);
    transition: opacity 0.35s ease;
}
.hx-cat:nth-child(3n+2) { background: linear-gradient(160deg, #2a9d8f, #146b5c); }
/* Variante sand: testo scuro (ink) per contrasto AA su sfondo caldo chiaro */
.hx-cat:nth-child(3n) { background: linear-gradient(160deg, #f0cd97, #e7b980); color: var(--h-ink); }
.hx-cat:nth-child(3n) .hx-cat__ico { background: rgba(30, 41, 59, 0.12); }
.hx-cat:nth-child(3n)::after { background: radial-gradient(120% 90% at 80% 0%, rgba(255, 255, 255, 0.35), transparent 60%); }
.hx-cat:hover { transform: translateY(-6px) scale(1.012); box-shadow: var(--h-shadow-md); }
.hx-cat:hover .hx-cat__ico { transform: translateY(-4px) rotate(-6deg); }
.hx-cat:hover .hx-cat__go { transform: translateX(4px); opacity: 1; }
.hx-cat__ico {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    transition: transform 0.35s var(--h-ease);
}
.hx-cat__ico svg { width: 1.4rem; height: 1.4rem; }
.hx-cat__name { font-family: var(--h-font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.2; }
.hx-cat__n { font-size: 0.82rem; opacity: 0.85; margin-top: 0.2rem; }
.hx-cat__go {
    position: absolute;
    top: 1.2rem;
    right: 1.1rem;
    opacity: 0.7;
    transition: transform 0.3s var(--h-ease), opacity 0.3s ease;
}
.hx-cat__go svg { width: 1.2rem; height: 1.2rem; }

/* =========================================================
   FEATURED SPACES (Airbnb-style cards)
   ========================================================= */
.hx-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.hx-spaces {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.1rem, 2.5vw, 1.6rem);
    margin-top: clamp(2rem, 4vw, 2.8rem);
}
@media (min-width: 600px) { .hx-spaces { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .hx-spaces { grid-template-columns: repeat(3, 1fr); } }
.hx-space {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--h-shadow-xs);
    transition: transform 0.3s var(--h-ease), box-shadow 0.3s var(--h-ease);
}
.hx-space:hover { transform: translateY(-6px); box-shadow: var(--h-shadow-md); }
.hx-space:hover .hx-space__img i { transform: scale(1.06); }
.hx-space__img {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--h-primary-tint);
}
.hx-space__img i {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s var(--h-ease);
}
.hx-space__img--ph { display: grid; place-items: center; color: var(--h-primary); background: linear-gradient(160deg, var(--h-primary-tint), #dcefe7); }
.hx-space__img--ph svg { width: 2.2rem; height: 2.2rem; opacity: 0.6; }
.hx-space__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    color: var(--h-primary-800);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.32rem 0.6rem;
    border-radius: var(--h-r-pill);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: var(--h-shadow-xs);
}
.hx-space__badge svg { width: 0.85rem; height: 0.85rem; }
.hx-space__fav {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--h-ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s var(--h-ease), color 0.2s ease;
}
.hx-space__fav:hover { transform: scale(1.12); color: var(--h-primary); }
.hx-space__fav svg { width: 1.1rem; height: 1.1rem; }
.hx-space__verified {
    position: absolute;
    bottom: 0.7rem;
    left: 0.75rem;
    background: rgba(15, 80, 68, 0.92);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: var(--h-r-pill);
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}
.hx-space__verified svg { width: 0.85rem; height: 0.85rem; }
.hx-space__body { padding: 0.95rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.hx-space__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.hx-space__name { font-family: var(--h-font-display); font-weight: 700; font-size: 1.05rem; margin: 0; color: var(--h-ink); line-height: 1.25; }
.hx-space__rate { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.85rem; font-weight: 600; color: var(--h-ink); white-space: nowrap; }
.hx-space__rate svg { width: 0.95rem; height: 0.95rem; color: var(--h-primary); fill: none; stroke: currentColor; }
.hx-space__rate { color: var(--h-primary-700); }
.hx-space__meta { font-size: 0.85rem; color: var(--h-neutral); display: flex; align-items: center; gap: 0.3rem; margin: 0; }
.hx-space__meta svg { width: 0.95rem; height: 0.95rem; }
.hx-space__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.1rem 0 0.2rem; }
.hx-tag {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--h-primary-800);
    background: var(--h-secondary);
    border: 1px solid var(--h-line);
    padding: 0.22rem 0.55rem;
    border-radius: var(--h-r-pill);
}
.hx-space__foot {
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid var(--h-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hx-space__price { font-family: var(--h-font-display); font-weight: 800; font-size: 1.15rem; color: var(--h-ink); }
.hx-space__price small { font-weight: 500; font-size: 0.78rem; color: var(--h-neutral); }
.hx-space__cta { font-size: 0.85rem; font-weight: 700; color: var(--h-primary-700); display: inline-flex; align-items: center; gap: 0.3rem; }
.hx-space__cta svg { width: 1rem; height: 1rem; transition: transform 0.2s ease; }
.hx-space:hover .hx-space__cta svg { transform: translateX(3px); }

.hx-empty {
    grid-column: 1 / -1;
    text-align: center;
    background: var(--h-secondary);
    border: 1px dashed var(--h-line-strong);
    border-radius: var(--h-r-xl);
    padding: 2.5rem 1.5rem;
}
.hx-empty p { margin: 0 0 1.2rem; color: var(--h-neutral); }

/* =========================================================
   ADVANTAGES (split)
   ========================================================= */
.hx-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 820px) { .hx-split { grid-template-columns: repeat(2, 1fr); } }
.hx-panel {
    border-radius: var(--h-r-xl);
    padding: clamp(1.6rem, 3vw, 2.4rem);
    border: 1px solid var(--h-line);
    background: #fff;
    box-shadow: var(--h-shadow-xs);
}
.hx-panel--pro { background: linear-gradient(165deg, #ffffff, var(--h-primary-tint)); }
.hx-panel--host { background: linear-gradient(165deg, #ffffff, var(--h-accent-tint)); }
.hx-panel__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    border-radius: var(--h-r-pill);
    background: #fff;
    color: var(--h-primary-700);
    box-shadow: var(--h-shadow-xs);
    margin-bottom: 1.1rem;
}
.hx-panel--host .hx-panel__tag { color: var(--h-accent-ink); }
.hx-panel__tag svg { width: 1rem; height: 1rem; }
.hx-panel__title { font-family: var(--h-font-display); font-weight: 800; font-size: 1.45rem; margin: 0 0 1.2rem; color: var(--h-ink); }
.hx-checklist { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 0.75rem; }
.hx-checklist li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.97rem; color: var(--h-ink); line-height: 1.45; }
.hx-checklist svg { flex: none; width: 1.35rem; height: 1.35rem; color: #fff; background: var(--h-primary); border-radius: 50%; padding: 0.25rem; }
.hx-panel--host .hx-checklist svg { background: var(--h-accent-ink); }

/* =========================================================
   MAP SECTION
   ========================================================= */
.hx-mapsec { position: relative; }
.hx-maplayout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: clamp(1.8rem, 4vw, 2.6rem);
}
@media (min-width: 900px) { .hx-maplayout { grid-template-columns: 320px 1fr; align-items: start; } }
.hx-mapside { display: grid; gap: 0.8rem; align-content: start; }
.hx-mapside__card {
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-lg);
    padding: 1rem 1.1rem;
    box-shadow: var(--h-shadow-xs);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: transform 0.25s var(--h-ease), box-shadow 0.25s var(--h-ease), border-color 0.25s ease;
}
.hx-mapside__card:hover { transform: translateX(4px); box-shadow: var(--h-shadow-sm); border-color: var(--h-primary-tint); }
.hx-mapside__ico { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--h-primary-tint); color: var(--h-primary-700); display: grid; place-items: center; }
.hx-mapside__ico svg { width: 1.2rem; height: 1.2rem; }
.hx-mapside__t { font-weight: 700; font-size: 0.95rem; color: var(--h-ink); margin: 0; }
.hx-mapside__s { font-size: 0.82rem; color: var(--h-neutral); margin: 0.1rem 0 0; }
.hx-mapside__n { margin-left: auto; font-family: var(--h-font-display); font-weight: 800; color: var(--h-primary-700); }
.page-home .home-map,
.hx-map {
    height: clamp(320px, 50vh, 460px);
    border-radius: var(--h-r-xl);
    overflow: hidden;
    border: 1px solid var(--h-line);
    box-shadow: var(--h-shadow-sm);
    background: var(--h-secondary);
}
.hx-map-empty { margin-top: 1rem; color: var(--h-neutral); font-size: 0.9rem; }

/* =========================================================
   TESTIMONIALS (carousel)
   ========================================================= */
.hx-quotes { margin-top: clamp(2rem, 4vw, 3rem); }
.hx-quotes__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 1.2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.6rem;
    scrollbar-width: thin;
}
@media (min-width: 980px) {
    .hx-quotes__track { grid-auto-columns: minmax(0, 1fr); grid-template-columns: repeat(3, 1fr); overflow: visible; }
}
.hx-quote {
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-xl);
    padding: 1.6rem;
    box-shadow: var(--h-shadow-xs);
    display: flex;
    flex-direction: column;
}
.hx-quote__stars { color: var(--h-star); display: inline-flex; gap: 0.1rem; margin-bottom: 0.8rem; }
.hx-quote__stars svg { width: 1rem; height: 1rem; fill: currentColor; stroke: none; }
.hx-quote__text { font-size: 1rem; line-height: 1.6; color: var(--h-ink); margin: 0 0 1.4rem; flex: 1; }
.hx-quote__who { display: flex; align-items: center; gap: 0.75rem; }
.hx-quote__av {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--h-font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(160deg, var(--h-primary), var(--h-primary-800));
}
.hx-quote:nth-child(2) .hx-quote__av { background: linear-gradient(160deg, #f0cd97, var(--h-accent)); color: var(--h-accent-ink); }
.hx-quote__name { font-weight: 700; font-size: 0.92rem; color: var(--h-ink); }
.hx-quote__role { font-size: 0.8rem; color: var(--h-neutral); }

/* =========================================================
   STATS
   ========================================================= */
.hx-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
@media (min-width: 760px) { .hx-stats { grid-template-columns: repeat(4, 1fr); } }
.hx-stat {
    text-align: center;
    background: #fff;
    border: 1px solid var(--h-line);
    border-radius: var(--h-r-lg);
    padding: 1.6rem 1rem;
    box-shadow: var(--h-shadow-xs);
}
.hx-stat__n {
    font-family: var(--h-font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem);
    color: var(--h-primary-700);
    line-height: 1;
    letter-spacing: -0.02em;
}
.hx-stat__l { display: block; margin-top: 0.5rem; font-size: 0.9rem; color: var(--h-neutral); }

/* =========================================================
   FINAL CTA
   ========================================================= */
.hx-cta { padding: clamp(3rem, 6vw, 5rem) 0; }
.hx-cta__inner {
    position: relative;
    overflow: hidden;
    border-radius: var(--h-r-xl);
    padding: clamp(2.4rem, 5vw, 4rem);
    text-align: center;
    color: #fff;
    background:
        radial-gradient(800px 400px at 20% -20%, rgba(231, 185, 128, 0.35), transparent 60%),
        linear-gradient(150deg, var(--h-primary-700), var(--h-primary-800));
    box-shadow: var(--h-shadow-lg);
}
.hx-cta__title {
    font-family: var(--h-font-display);
    font-weight: 800;
    font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 auto 0.8rem;
    max-width: 22ch;
}
.hx-cta__lead { font-size: 1.08rem; line-height: 1.6; color: rgba(255, 255, 255, 0.88); margin: 0 auto 1.8rem; max-width: 44ch; }
.hx-cta__btns { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

/* =========================================================
   FOOTER refinement (home only)
   ========================================================= */
.page-home .site-footer { background: var(--h-ink); }

/* =========================================================
   Reveal animation (works with site.js [data-reveal])
   ========================================================= */
.page-home [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--h-ease), transform 0.7s var(--h-ease);
    will-change: opacity, transform;
}
.page-home [data-reveal="right"] { transform: translateX(28px); }
.page-home [data-reveal="zoom"] { transform: scale(0.96); }
.page-home [data-reveal].is-revealed { opacity: 1; transform: none; }
.page-home [data-reveal-stagger] > [data-reveal] { transition-delay: calc(var(--i, 0) * 70ms); }

/* Skeleton loading */
.hx-skeleton {
    background: linear-gradient(90deg, var(--h-secondary) 25%, #eef3f1 37%, var(--h-secondary) 63%);
    background-size: 400% 100%;
    animation: hx-shimmer 1.4s ease infinite;
    border-radius: var(--h-r);
}
@keyframes hx-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
    .page-home *,
    .page-home *::before,
    .page-home *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .page-home [data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================
   Tema chiaro forzato sulla home (a prescindere dal tema OS):
   garantisce il contrasto previsto dal design ed evita che il
   dark-mode di sistema renda illeggibile il testo sulle card bianche.
   ========================================================= */
.page-home {
    color-scheme: light;
}
