/* Nexus 0.8.0 – componenti dei siti predefiniti (classi nx-x-*): prezzi, schede con immagine, orari, prima/dopo,
   righe dati, citazioni, domande, striscia che scorre, modulo di richiesta, prime sezioni speciali.
   Neutri di proposito: il carattere arriva dal foglio dello stile scelto (assets/css/looks/<stile>.css). */

/* ---------- Griglie ---------- */
.nx-x-cards4 { flex-wrap: wrap !important; }
.nx-x-cards4 > .wp-block-column { flex: 1 1 calc(25% - 1.25rem) !important; min-width: 13rem; }
.nx-x-grid3 { flex-wrap: wrap !important; }
.nx-x-grid3 > .wp-block-column { flex: 1 1 calc(33.333% - 1.25rem) !important; min-width: 15rem; }
.nx-x-split-top { align-items: flex-start !important; }
.nx-x-aside { gap: clamp(2rem, 5vw, 5rem) !important; }
@media (min-width: 782px) { .nx-x-aside > .wp-block-column:first-child { flex: 0 0 30% !important; } }
@media (min-width: 782px) { .nx-x-sticky { position: sticky; top: calc(var(--nx-hb-h, 76px) + 2rem); align-self: flex-start; } }
.nx-x-aside .nx-x-grid3 > .wp-block-column { flex-basis: calc(50% - 1.25rem) !important; }
.nx-sec--ink { background: var(--nx-ink); color: var(--nx-paper); }
.nx-sec--ink .nx-stat__label, .nx-sec--ink .nx-note { color: color-mix(in oklab, var(--nx-paper) 70%, transparent); }

/* Codici brevi WooCommerce con columns="3" dentro le sezioni: rispettano il numero di colonne su schermi larghi */
@media (min-width: 1101px) { .nx-blocks .woocommerce.columns-3 ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Numeri in fila: due per riga sul telefono invece di una colonna lunga */
@media (max-width: 781px) {
  .nx-blocks .wp-block-columns.nx-x-stats-line { flex-wrap: wrap !important; gap: 1.4rem 1rem !important; }
  .nx-blocks .wp-block-columns.nx-x-stats-line > .wp-block-column { flex-basis: calc(50% - .5rem) !important; }
  .nx-blocks .wp-block-columns.nx-x-week > .wp-block-column { flex-basis: calc(50% - .3rem) !important; }
}

/* ---------- Testi ---------- */
.nx-x-lede { font: 400 clamp(1.5rem, 1rem + 1.8vw, 2.4rem)/1.3 var(--nx-font-display); max-width: 30ch; margin-inline: auto; text-wrap: balance; }
.nx-x-sign { color: var(--nx-muted); font-size: .95rem; margin-top: 1rem; }
.nx-x-check { position: relative; padding-left: 1.7rem; margin: 0 0 .55rem; }
.nx-x-check::before { content: ""; position: absolute; left: 0; top: .42em; width: .95rem; height: .55rem; border: solid var(--nx-primary); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
:where(.nx-dark) .nx-x-check::before, .nx-sec--ink .nx-x-check::before { border-color: var(--nx-accent); }
.nx-x-badges { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0; }
.nx-x-badges span { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border: 1px solid var(--nx-line); border-radius: 999px; font-size: .92rem; font-weight: 600; background: var(--nx-surface); }
.nx-x-badges span::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--nx-accent); }
.nx-blocks .nx-x-strip.nx-sec { padding-block: 1.6rem; border-bottom: 1px solid var(--nx-line); }

/* ---------- Prezzi ---------- */
.nx-x-prices { gap: 1.25rem !important; align-items: stretch !important; margin-top: 1rem; }
.nx-x-price { position: relative; display: flex; flex-direction: column; padding: 2rem 1.8rem; background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: var(--nx-radius); }
.nx-x-price .wp-block-buttons { margin-top: auto !important; padding-top: 1.2rem; }
.nx-x-price .wp-block-button, .nx-x-price .wp-block-button__link { width: 100%; text-align: center; }
.nx-x-price__name { font-size: 1.2rem; margin-bottom: .6rem; }
.nx-x-price__amount { font: 700 clamp(2rem, 1.5rem + 1.5vw, 2.7rem)/1 var(--nx-font-display); letter-spacing: -.02em; margin-bottom: 1.2rem; }
.nx-x-price__amount span { font: 500 .95rem/1 var(--nx-font-text); color: var(--nx-muted); letter-spacing: 0; }
.nx-x-price__note { color: var(--nx-muted); font-size: .9rem; }
.nx-x-price__flag { position: absolute; top: -.85rem; left: 1.8rem; margin: 0; padding: .3rem .8rem; border-radius: 999px; background: var(--nx-accent); color: var(--nx-on-accent); font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
.nx-x-price.is-featured { border-color: var(--nx-primary); box-shadow: 0 30px 60px -36px color-mix(in oklab, var(--nx-primary) 70%, transparent); }
.nx-x-prices--single > .wp-block-column { flex-basis: 100% !important; }

/* ---------- Schede con immagine, persone ---------- */
.nx-x-tiles { gap: 1.5rem !important; }
.nx-x-tile { display: flex; flex-direction: column; }
.nx-x-tile .wp-block-image { margin: 0 0 1.1rem; }
.nx-x-tile img, .nx-x-person img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: var(--nx-radius); }
.nx-x-tile__kicker { font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nx-primary); margin-bottom: .35rem; }
:where(.nx-dark) .nx-x-tile__kicker { color: var(--nx-accent); }
.nx-x-tile__title { font-size: 1.35rem; margin-bottom: .45rem; }
.nx-x-tile__text { color: var(--nx-muted); }
.nx-x-spec { font-size: .9rem; line-height: 1.9; border-top: 1px solid var(--nx-line); padding-top: .7rem; }
.nx-x-tile__price { font: 700 1.25rem/1.2 var(--nx-font-display); margin: .2rem 0 .3rem; }
.nx-x-tile .wp-block-buttons { margin-top: auto !important; padding-top: .8rem; }
.nx-x-team { gap: 1.5rem !important; }
.nx-x-person .wp-block-image { margin: 0 0 1rem; }
.nx-x-person img { aspect-ratio: 4 / 5; }
.nx-x-person__name { font-size: 1.3rem; margin-bottom: .2rem; }
.nx-x-person__role { color: var(--nx-primary); font-weight: 600; font-size: .92rem; margin-bottom: .5rem; }
:where(.nx-dark) .nx-x-person__role { color: var(--nx-accent); }
.nx-x-person__bio { color: var(--nx-muted); font-size: .95rem; }

/* ---------- Righe dati (tratte, orari, passi) ---------- */
.nx-x-rows { margin: 1.2rem 0; }
.nx-x-row.wp-block-columns { flex-wrap: nowrap !important; gap: 1.2rem !important; align-items: baseline !important; padding: 1rem 0; margin: 0 !important; border-bottom: 1px solid var(--nx-line); }
.nx-x-row > .wp-block-column.nx-x-row__text { flex: 1 1 0 !important; }
.nx-x-row > .wp-block-column.nx-x-row__value-col { flex: 0 0 auto !important; }
.nx-x-row h3 { font-size: 1.08rem; margin-bottom: .2rem; }
.nx-x-row p { margin: 0; color: var(--nx-muted); font-size: .95rem; }
.nx-x-row__value { font: 700 1.2rem/1 var(--nx-font-display); color: var(--nx-primary) !important; white-space: nowrap; }
:where(.nx-dark) .nx-x-row__value { color: var(--nx-accent) !important; }

/* ---------- Orari della settimana ---------- */
.nx-x-week { gap: .6rem !important; flex-wrap: wrap !important; }
.nx-x-week > .wp-block-column { flex: 1 1 8rem !important; }
.nx-x-day { padding: 1rem; border: 1px solid var(--nx-line); border-radius: var(--nx-radius); background: var(--nx-surface); }
.nx-x-day__name { font-size: 1.05rem; padding-bottom: .5rem; margin-bottom: .6rem; border-bottom: 2px solid var(--nx-primary); }
.nx-x-slot { margin: 0 0 .45rem; font-size: .92rem; }

/* ---------- Prima e dopo ---------- */
.nx-x-ba { max-width: 1040px !important; margin-inline: auto !important; }
.nx-x-ba__pair { gap: .8rem !important; margin-bottom: 1.2rem; }
.nx-x-ba__col { position: relative; }
.nx-x-ba .wp-block-image { margin: 0; }
.nx-x-ba img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: var(--nx-radius); }
.nx-x-ba__tag { position: absolute; left: 1rem; top: 1rem; margin: 0; padding: .3rem .8rem; background: var(--nx-ink); color: var(--nx-paper); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nx-x-ba__tag--after { background: var(--nx-accent); color: var(--nx-on-accent); }
.nx-x-ba__title { font-size: 1.4rem; text-align: center; }
.nx-x-ba__text { color: var(--nx-muted); text-align: center; max-width: 40em; margin-inline: auto; }

/* ---------- Citazione ---------- */
.nx-x-quote { max-width: 860px !important; margin-inline: auto !important; text-align: center; }
.nx-x-quote__text { font: 400 clamp(1.35rem, 1rem + 1.3vw, 2rem)/1.35 var(--nx-font-display); text-wrap: balance; }
.nx-x-quote__who { color: var(--nx-muted); font-size: .92rem; margin-top: 1rem; }

/* ---------- Domande frequenti (blocco Dettagli) ---------- */
.nx-x-faq { border-bottom: 1px solid var(--nx-line); padding: 1.1rem 0; max-width: 860px; }
.nx-x-faq summary { cursor: pointer; font: 650 1.1rem/1.35 var(--nx-font-display); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.nx-x-faq summary::-webkit-details-marker { display: none; }
.nx-x-faq summary::after { content: "+"; font: 400 1.5rem/1 var(--nx-font-text); color: var(--nx-primary); transition: transform .2s; }
.nx-x-faq[open] summary::after { transform: rotate(45deg); }
.nx-x-faq p { margin: .7rem 0 0; color: var(--nx-muted); }

/* ---------- Striscia che scorre ---------- */
.nx-x-ticker { overflow: hidden; padding: 1.1rem 0 !important; background: var(--nx-primary); color: var(--nx-on-primary); }
.nx-x-ticker > * { max-width: none !important; }
.nx-x-ticker__line { display: flex; width: max-content; margin: 0; animation: nx-x-ticker 38s linear infinite; font: 700 1.15rem/1 var(--nx-font-display); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.nx-x-ticker__line span { display: inline-flex; align-items: center; }
.nx-x-ticker__line span::after { content: "✦"; margin-inline: 1.6rem; opacity: .7; font-size: .8em; }
@keyframes nx-x-ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .nx-x-ticker__line { animation: none; } }

/* ---------- Modulo di richiesta ---------- */
.nx-x-request__cols { gap: clamp(2rem, 5vw, 5rem) !important; align-items: flex-start !important; }
.nx-x-request__aside { flex: 1 1 40% !important; }
.nx-x-request__form { flex: 1 1 55% !important; }
.nx-x-facts { margin-top: 1.5rem; }
.nx-x-fact__title { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--nx-primary); margin: 1.4rem 0 .35rem; }
:where(.nx-dark) .nx-x-fact__title { color: var(--nx-accent); }
.nx-x-fact__text { margin: 0; }
.nx-x-form { display: grid; gap: 1rem; padding: clamp(1.4rem, 3vw, 2.4rem); background: var(--nx-surface); color: var(--nx-fg); border: 1px solid var(--nx-line); border-radius: calc(var(--nx-radius) * 1.1); box-shadow: 0 34px 70px -46px rgb(10 12 30 / .45); scroll-margin-top: 7rem; }
.nx-x-form__title { font: 700 1.35rem/1.2 var(--nx-font-display); margin: 0; }
.nx-x-form__intro { margin: 0; color: var(--nx-muted); }
.nx-x-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.nx-x-field { display: grid; gap: .35rem; margin: 0; }
.nx-x-field label { font-size: .88rem; font-weight: 600; }
.nx-x-field label i { color: var(--nx-primary); font-style: normal; }
.nx-x-field input, .nx-x-field select, .nx-x-field textarea { width: 100%; min-height: 3rem; padding: .75rem .9rem; border: 1.5px solid var(--nx-line); border-radius: calc(var(--nx-radius) * .5); background: var(--nx-bg); color: var(--nx-fg); font: inherit; }
.nx-x-field textarea { min-height: 7rem; resize: vertical; }
.nx-x-field input:focus, .nx-x-field select:focus, .nx-x-field textarea:focus { outline: none; border-color: var(--nx-primary); box-shadow: 0 0 0 4px color-mix(in oklab, var(--nx-primary) 18%, transparent); }
.nx-x-consent { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--nx-muted); }
.nx-x-consent label { display: flex; gap: .6rem; align-items: flex-start; }
.nx-x-consent input { margin-top: .2em; width: 1.1rem; height: 1.1rem; accent-color: var(--nx-primary); flex: none; }
.nx-x-form__send { justify-self: start; min-width: 13rem; border: 0; cursor: pointer; padding: .95rem 1.6rem; background: var(--nx-primary); color: var(--nx-on-primary); font: 700 1rem/1 var(--nx-font-text); border-radius: var(--nx-btn-radius, 999px); }
.nx-x-form__send:hover { filter: brightness(1.08); }
.nx-x-hp { position: absolute !important; left: -9999px; }
.nx-x-alert { padding: .9rem 1rem; border-radius: calc(var(--nx-radius) * .5); font-weight: 600; }
.nx-x-alert--ok { background: color-mix(in oklab, #1f9d55 14%, var(--nx-surface)); color: #146c3b; }
.nx-x-alert--err { background: color-mix(in oklab, #d64545 12%, var(--nx-surface)); color: #a11d1d; }
:where(.nx-dark) .nx-x-alert--ok { color: #8fe0b2; }
:where(.nx-dark) .nx-x-alert--err { color: #ffb0b0; }

/* ---------- Galleria fotografica ---------- */
.nx-x-gallery { gap: 1.2rem !important; }
.nx-x-gallery .wp-block-image { margin: 0; }
.nx-x-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.nx-x-photo--tall img { aspect-ratio: 4 / 5; }
.nx-x-caption { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--nx-muted); margin: .6rem 0 1.6rem; }

/* ---------- Prima sezione a tutto schermo (immagine di sfondo) ---------- */
.nx-hero.nx-x-hero-cover { position: relative; isolation: isolate; color: #fff; min-height: min(92vh, 860px); display: flex; align-items: center; }
.nx-hero.nx-x-hero-cover > .wp-block-columns { width: 100%; }
.nx-x-hero-cover .nx-hero__media { position: absolute !important; inset: 0; z-index: -2; margin: 0 !important; flex: none !important; }
.nx-x-hero-cover .nx-hero__media .wp-block-image, .nx-x-hero-cover .nx-hero__img { height: 100%; margin: 0; }
.nx-x-hero-cover .nx-hero__img img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; box-shadow: none; }
.nx-x-hero-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 0 0 / .72), rgb(0 0 0 / .35) 55%, rgb(0 0 0 / .05)); }
.nx-x-hero-cover .nx-hero__copy { flex: 0 1 46rem !important; }
.nx-x-hero-cover .nx-hero__lead { color: rgb(255 255 255 / .86); }
.nx-x-hero-cover .nx-kicker { color: #fff; }
.nx-x-hero-cover .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
body:has(.nx-hb--transparent) .nx-blocks > .nx-x-hero-cover:first-child { padding-top: calc(var(--nx-hb-h, 76px) + 4rem); }
@media (max-width: 781px) {
  .nx-hero.nx-x-hero-cover { min-height: 0; padding-block: 7rem 4rem; }
  .nx-x-hero-cover::after { background: linear-gradient(180deg, rgb(0 0 0 / .45), rgb(0 0 0 / .75)); }
}
