/* Font self-hosted (subset latin): niente richieste a Google prima del consenso cookie */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/poppins-latin-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/poppins-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/poppins-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Merriweather';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/merriweather-latin-var.woff2') format('woff2');
}

:root {
    /* Mirabello Estate design system — see DESIGN.md */
    --color-primary: #4478B7;
    --color-primary-80: #6F95C8;
    --color-primary-60: #8AA9D4;
    --color-primary-40: #AFC1E2;
    --color-primary-20: #D6E0F0;
    --color-secondary: #FFFFFF;
    --color-tertiary: #212121;
    --color-neutral: #F5F7FA;
    --color-surface: #FFFFFF;
    --color-on-surface: #212121;
    --color-error: #C84C4C;
    --overlay-dark: #00000099;
    --overlay-light: #FFFFFF33;

    --font-display: "Poppins", system-ui, sans-serif;
    --font-body: "Merriweather", Georgia, serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --space-xs: 10px;
    --space-sm: 20px;
    --space-md: 40px;
    --space-lg: 80px;
    --space-xl: 152px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-on-surface);
    background: var(--color-surface);
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- Brand watermark ---------- */
/* Firma visiva ricorrente del sito principale: il logo-divider (tono su tono)
   sovrapposto alle sezioni chiave (hero, banner, footer). */

.watermark {
    position: absolute;
    top: 50%;
    right: -6vw;
    transform: translateY(-50%);
    width: min(50vw, 560px);
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.hero--photo .watermark,
.trust-banner .watermark { display: none; }

/* ---------- Site logo ---------- */

.site-logo {
    position: relative;
    display: block;
    width: clamp(140px, 28vw, 200px);
    height: auto;
    margin: 0 auto;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    min-height: 48vh;
    background: var(--color-primary);
    color: var(--color-surface);
    padding: var(--space-lg) var(--space-sm);
    text-align: center;
    overflow: hidden;
}

.hero--confirmation {
    min-height: 100vh;
}

.hero--photo {
    background-image:
        linear-gradient(180deg, rgba(68, 120, 183, 0.55) 0%, rgba(68, 120, 183, 0.7) 100%),
        url('img/hero-bg.webp');
    background-size: cover;
    background-position: center;
}

.hero__inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.hero__eyebrow {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary-20);
    margin: 0;
}

.hero__lead {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 30px;
    color: var(--color-surface);
    margin: 0;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.9rem, 5vw + 1rem, 3rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
    text-wrap: balance;
}

.hero p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 28px;
    color: var(--color-surface);
    margin: 0;
}

.hero__actions {
    position: relative;
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xs);
}

/* ---------- Trust banner ---------- */

.trust-banner {
    position: relative;
    background-color: var(--color-primary);
    background-image:
        linear-gradient(180deg, rgba(68, 120, 183, 0.72) 0%, rgba(68, 120, 183, 0.82) 100%),
        url('img/trust-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-surface);
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
    overflow: hidden;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
    .trust-banner { background-attachment: scroll; }
}

.trust-banner p {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 32px;
    text-wrap: balance;
}

.trust-banner strong { font-weight: 700; }

.trust-banner__lead {
    font-size: 21px;
    line-height: 34px;
}

.trust-banner__stats {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
    max-width: 720px;
    margin: var(--space-md) auto 0;
}

.trust-banner__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.trust-banner__stat dt {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(38px, 5vw, 52px);
    margin: 0;
}

.trust-banner__stat dd {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--color-primary-20);
    margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.btn:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
    .btn:hover { transform: none; }
}

.btn-primary {
    background: var(--color-surface);
    color: var(--color-on-surface);
}

.btn-primary:hover { background: var(--color-primary-20); }

.btn-secondary {
    background: transparent;
    color: var(--color-surface);
    border-color: var(--color-surface);
}

.btn-secondary:hover { background: var(--overlay-light); }

.btn-on-surface {
    background: var(--color-primary);
    color: var(--color-surface);
}

.hero .btn-on-surface { border-color: var(--color-surface); }

.btn-on-surface:hover { background: #35618f; }

.btn-block {
    display: flex;
    width: 100%;
}

/* ---------- Listings ---------- */

.listings {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-sm);
    max-width: 1080px;
    margin: 0 auto;
}

@media (min-width: 720px) {
    .listings { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .listings { grid-template-columns: repeat(3, 1fr); }
}

/* Con 2 o 4 annunci la griglia resta a 2 colonne anche su desktop (evita una card orfana).
   Larghezza un po' ridotta perché le card non diventino troppo grandi. */
@media (min-width: 1024px) {
    .listings.listings--two-col { grid-template-columns: repeat(2, 1fr); max-width: 920px; }
}

.listings h2 {
    grid-column: 1 / -1;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    text-align: center;
    margin: 0 0 var(--space-md);
}

.apartment-card {
    background: var(--color-surface);
    color: var(--color-on-surface);
    border: 1px solid var(--color-primary-20);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Lo slider è in posizione assoluta: così le foto verticali non influenzano l'altezza
   del box e il rapporto 4:3 è identico in Chrome e Safari. */
.apartment-card__image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-primary-60); }

.apartment-card__slider {
    position: absolute;
    inset: 0;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.apartment-card__slider::-webkit-scrollbar { display: none; }

.apartment-card__slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    background: none;
}

.apartment-card__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Annuncio senza foto: la planimetria fa da immagine, mostrata intera su fondo chiaro. */
.apartment-card__slide--plan { background: var(--color-neutral); }
.apartment-card__slide--plan img { object-fit: contain; padding: var(--space-sm); }

.apartment-card__badge--soon { background: var(--color-primary); }

.apartment-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: linear-gradient(160deg, var(--color-primary-20), var(--color-neutral));
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
}

.apartment-card__placeholder svg { width: 40px; height: 40px; }

.apartment-card__badge {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    background: var(--overlay-dark);
    color: var(--color-surface);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    z-index: 1;
}

.apartment-card__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--overlay-dark);
    color: var(--color-surface);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.apartment-card__image:hover .apartment-card__arrow,
.apartment-card__image:focus-within .apartment-card__arrow { opacity: 1; }

.apartment-card__arrow--prev { left: 8px; }
.apartment-card__arrow--next { right: 8px; }

.apartment-card__dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 1;
}

.apartment-card__dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--overlay-light);
    border: 1px solid var(--overlay-dark);
}

.apartment-card__dot.is-active { background: var(--color-surface); }

.apartment-card__body { padding: 16px; display: flex; flex-direction: column; gap: var(--space-xs); flex: 1; }

.apartment-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    line-height: 26px;
    margin: 0;
}

.apartment-card__zone {
    font-family: var(--font-body);
    font-size: 14px;
    color: #6b7280;
    margin: 6px 0 0;
}

.apartment-card__description {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 22px;
    color: #444;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apartment-card__readmore {
    align-self: flex-start;
    margin: 2px 0 var(--space-xs);
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
}

.apartment-card__plan {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--overlay-dark);
    color: var(--color-surface);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    cursor: zoom-in;
}

.apartment-card__plan svg { width: 16px; height: 16px; }

.apartment-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.apartment-card__specs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.apartment-card__specs li {
    background: var(--color-primary-20);
    color: var(--color-on-surface);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.apartment-card__specs li.apartment-card__feature {
    background: transparent;
    border: 1px solid var(--color-primary-40);
    color: var(--color-primary);
    padding: 5px 11px;
}

/* Stesso aspetto delle etichette di base (mq, locali...), per far risaltare la caratteristica tra quelle con il bordo. */
.apartment-card__specs li.apartment-card__feature--highlight {
    background: var(--color-primary-20);
    border-color: var(--color-primary-20);
    color: var(--color-on-surface);
}

.apartment-card__specs li.apartment-card__energy {
    background: var(--color-surface);
    border: 1px solid var(--color-primary-40);
    padding: 5px 11px;
}

.apartment-card__price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    margin: 0;
}

.apartment-card__price-mark {
    font-size: 12px;
    font-weight: 500;
    margin-left: 1px;
}

.listings__note {
    grid-column: 1 / -1;
    font-family: var(--font-body);
    font-size: 11px;
    color: #6b7280;
    margin: 0;
}

.apartment-card__cta {
    align-self: flex-start;
}

.listings__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-md) var(--space-sm);
    color: #555;
    font-size: 16px;
    line-height: 28px;
    max-width: 60ch;
    margin: 0 auto;
}

/* ---------- Come funziona ---------- */

.how-it-works {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-sm);
    text-align: center;
}

.how-it-works h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    margin: 0 0 var(--space-md);
}

.how-it-works__steps {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: 0;
    margin: 0;
}

@media (min-width: 720px) {
    .how-it-works__steps { grid-template-columns: repeat(3, 1fr); }
}

.how-it-works__icon-wrap {
    position: relative;
    display: inline-block;
    margin: 0 auto var(--space-xs);
}

.how-it-works__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--color-primary-20);
    color: var(--color-primary);
}

.how-it-works__icon svg { width: 30px; height: 30px; }

.how-it-works__number {
    position: absolute;
    top: -6px;
    left: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--color-surface);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    border: 2px solid var(--color-surface);
}

.how-it-works__step h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    margin: 0 0 6px;
}

.how-it-works__step p {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 24px;
    color: #555;
    margin: 0;
    max-width: 32ch;
    margin-inline: auto;
}

/* ---------- Location ---------- */

.location {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-sm);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    align-items: start;
}

@media (min-width: 720px) {
    .location { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}

.location__gallery {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 8px;
    aspect-ratio: 4 / 4.4;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.location__gallery-item {
    position: relative;
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    background: var(--color-primary-20);
    overflow: hidden;
}

.location__gallery-item--a { grid-column: 1; grid-row: 1 / 4; }
.location__gallery-item--b { grid-column: 2; grid-row: 1 / 3; }
.location__gallery-item--c { grid-column: 3; grid-row: 1 / 2; }
.location__gallery-item--d { grid-column: 3; grid-row: 2 / 4; }
.location__gallery-item--e { grid-column: 2; grid-row: 3 / 4; }

.location__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.location__gallery-item:hover img,
.location__gallery-item:focus-visible img { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
    .location__gallery-item img { transition: none; }
    .location__gallery-item:hover img { transform: none; }
}

.location__gallery-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 24, 30, 0.45);
    color: var(--color-surface);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

.location__tabs {
    display: flex;
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-primary-20);
    margin: 0 0 var(--space-sm);
}

.location__tab {
    padding: 0 0 10px;
    border: none;
    background: none;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.location__tab.is-active {
    color: var(--color-on-surface);
    border-bottom-color: var(--color-primary);
}

.location__panel[hidden] { display: none; }

.location__content h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    margin: 0 0 var(--space-sm);
}

.location__intro {
    margin: 0 0 var(--space-sm);
    color: var(--color-on-surface-muted, inherit);
}

.location__points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.location__points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 26px;
    color: #444;
}

.js-enabled .location__points li {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-enabled .location__points.is-visible li {
    opacity: 1;
    transform: translateY(0);
}

.location__points li:nth-child(1) { transition-delay: 0.05s; }
.location__points li:nth-child(2) { transition-delay: 0.15s; }
.location__points li:nth-child(3) { transition-delay: 0.25s; }
.location__points li:nth-child(4) { transition-delay: 0.35s; }
.location__points li:nth-child(5) { transition-delay: 0.45s; }
.location__points li:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
    .js-enabled .location__points li {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Reveal generico (card, step, FAQ) ---------- */

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.how-it-works__steps .reveal:nth-child(1) { transition-delay: 0.05s; }
.how-it-works__steps .reveal:nth-child(2) { transition-delay: 0.15s; }
.how-it-works__steps .reveal:nth-child(3) { transition-delay: 0.25s; }

.listings .reveal:nth-child(2) { transition-delay: 0.05s; }
.listings .reveal:nth-child(3) { transition-delay: 0.1s; }
.listings .reveal:nth-child(4) { transition-delay: 0.15s; }
.listings .reveal:nth-child(5) { transition-delay: 0.2s; }

.faq .reveal:nth-child(2) { transition-delay: 0.05s; }
.faq .reveal:nth-child(3) { transition-delay: 0.1s; }
.faq .reveal:nth-child(4) { transition-delay: 0.15s; }
.faq .reveal:nth-child(5) { transition-delay: 0.2s; }
.faq .reveal:nth-child(6) { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.location__point-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-primary-20);
    color: var(--color-primary);
    margin-top: 2px;
}

.location__point-icon svg { width: 18px; height: 18px; }

.location__points strong { color: var(--color-on-surface); }

/* ---------- FAQ ---------- */

.faq {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-sm);
}

.faq h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    text-align: center;
    margin: 0 0 var(--space-md);
}

.faq__item {
    border-bottom: 1px solid var(--color-primary-20);
    padding: var(--space-xs) 0;
}

.faq__item summary {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
    content: "+";
    font-size: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.faq__item[open] summary::after { content: "\2212"; }

.faq__item p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 24px;
    color: #444;
    margin: 6px 0 var(--space-xs);
}

.faq__item a { color: var(--color-primary); }

/* ---------- Lightbox (galleria location + card immobili) ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(20, 24, 30, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.lightbox[hidden] { display: none; }

.lightbox__image {
    max-width: min(90vw, 1100px);
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    background: transparent;
    border: none;
    color: var(--color-surface);
    cursor: pointer;
    line-height: 1;
}

.lightbox__close {
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: 32px;
}

.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    padding: var(--space-xs);
}

.lightbox__prev { left: var(--space-xs); }
.lightbox__next { right: var(--space-xs); }

/* ---------- Modal testo completo annuncio ---------- */

.text-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(20, 24, 30, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm);
}

.text-modal[hidden] { display: none; }

.text-modal__panel {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    max-width: 640px;
    max-height: 85vh;
    width: 100%;
    padding: var(--space-md);
    overflow-y: auto;
}

.text-modal__close {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-sm);
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-on-surface);
}

.text-modal__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    margin: 0 var(--space-md) var(--space-sm) 0;
}

.text-modal__body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 28px;
    color: #444;
}

.text-modal__body p { margin: 0 0 var(--space-sm); }
.text-modal__body p:last-child { margin-bottom: 0; }

.text-modal__subtitle {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    color: var(--color-on-surface);
    margin: var(--space-md) 0 var(--space-xs);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-primary-20);
}

.text-modal__specs {
    margin-bottom: var(--space-sm);
}

.text-modal__body .text-modal__price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    color: var(--color-on-surface);
    margin: 0;
}

.text-modal__price span {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 12px;
    color: #6b7280;
    margin-left: 6px;
}

/* ---------- Contact ---------- */

.contact {
    background-color: #FFF6EA;
    padding: var(--space-lg) 0;
}

.contact__inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.contact h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    text-align: center;
    text-wrap: balance;
    margin: 0 0 var(--space-xs);
}

.contact__alt {
    text-align: center;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 22px;
    color: #444;
    margin: 40px 0px 0px 0px;
}

.contact__alt a { color: var(--color-primary); white-space: nowrap; }

.form-reassurance {
    text-align: center;
    font-family: var(--font-body);
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.form-required-note {
    text-align: center;
    font-family: var(--font-body);
    font-size: 13px;
    color: #666;
    margin: 0 0 var(--space-md);
}

#lead-form { display: flex; flex-direction: column; gap: var(--space-sm); }

#lead-form label {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

#lead-form input[type="text"],
#lead-form input[type="email"],
#lead-form input[type="tel"],
#lead-form textarea {
    width: 100%;
    padding: 10px 20px;
    border: 1px solid #D8DEE6;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 16px;
    background: var(--color-surface);
    color: var(--color-on-surface);
}

#lead-form textarea {
    border-radius: var(--radius-lg);
    min-height: 96px;
    resize: vertical;
}

#lead-form input:focus,
#lead-form textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.apartment-interest {
    border: 1px solid #D8DEE6;
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.apartment-interest legend {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 500;
    padding: 0 4px;
}

.apartment-interest__option {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body) !important;
    font-weight: 400 !important;
    font-size: 15px;
    margin-bottom: 0 !important;
}

.apartment-interest__hint {
    font-family: var(--font-body);
    font-size: 13px;
    color: #666;
    margin: 0;
}

.apartment-interest__hint--error { color: var(--color-error); font-weight: 700; }

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 20px;
    color: #444;
}

.privacy-check a { color: var(--color-primary); }

/* ---------- Static pages ---------- */

.legal {
    max-width: 640px;
    margin: var(--space-lg) auto;
    padding: 0 var(--space-sm);
}

.legal h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 35px;
}

.legal p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 28px;
    color: #444;
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    background: var(--color-primary);
    color: var(--color-surface);
    padding: var(--space-lg) var(--space-sm);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 24px;
    overflow: hidden;
}

.site-footer a { color: var(--color-surface); }

.site-footer__grid {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: var(--space-md);
    text-align: center;
}

@media (min-width: 720px) {
    .site-footer__grid {
        grid-template-columns: 1.3fr 1fr auto;
        text-align: left;
    }
}

.footer-logo {
    height: 44px;
    width: auto;
    margin: 0 auto var(--space-md);
}

@media (min-width: 720px) {
    .footer-logo { margin: 0 0 var(--space-md); }
}

.site-footer__legal { margin: 0; color: var(--color-surface); }

.site-footer__col h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 var(--space-xs);
}

.site-footer__col p { margin: 0 0 var(--space-xs); }

.site-footer__hours { color: var(--color-surface); font-size: 13px; }

.site-footer__col--legal {
    display: flex;
    flex-direction: row;
    gap: var(--space-sm);
    justify-content: center;
    align-items: flex-start;
}

.site-footer__col--legal a { display: block; }

@media (min-width: 720px) {
    .site-footer__col--legal {
        flex-direction: column;
        justify-content: flex-start;
        gap: 6px;
    }
}

.site-footer__col--legal a { text-decoration: underline; }

/* ---------- Back to top ---------- */

.back-to-top {
    position: fixed;
    /* Sopra il pulsante WhatsApp (52px), centrato sulla stessa verticale. */
    right: calc(var(--space-sm) + 2px);
    bottom: calc(var(--space-sm) + 52px + 12px);
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--color-primary);
    color: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top[hidden] { display: none; }

.back-to-top:hover { background: #35618f; }

.back-to-top svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: none; }
}

/* Pulsante WhatsApp fisso in basso a destra, sotto il "torna su" (in basso a sinistra c'è il pulsante delle preferenze cookie di Iubenda). */
.whatsapp-float {
    position: fixed;
    right: var(--space-sm);
    bottom: var(--space-sm);
    z-index: 50;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: #25D366;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.whatsapp-float:hover { background: #1EBE5A; transform: scale(1.05); }

.whatsapp-float:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }

.whatsapp-float svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float { transition: none; }
}
