/*
 * Nuova home (2026-11-10, anteprima V6 approvata dall'agenzia). Tutto sotto .hm, si carica solo sulla home
 * (functions.php). Intestazione e footer sono quelli di sempre e non si toccano.
 * Misure: telefono dai 320px, tablet, computer e schermi grandi (container fino a 1560px sopra i 2200px).
 * Pulsanti: testo scuro sull'ambra (il bianco sull'ambra ha contrasto 2,5:1, sotto il minimo AA).
 */
.hm {
  /* stessa larghezza dell'intestazione e del footer (--mm-max del tema: 1312 / 1560 / 1900 / 2200 con lo schermo) */
  --hm-max: var(--mm-max, 1312px);
  --hm-gut: clamp(20px, 4vw, 32px);
  --hm-sec: clamp(64px, 8.5vw, 120px);
  --hm-ink: #14161A;
  --hm-soft: #5C6168;
  --hm-line: rgba(20, 22, 26, .12);
  --hm-amber: #ED8B00;
  --hm-amber-d: #9A5600;
  --hm-dark: #17191D;
  --hm-alt: #F3EFE7;
  --hm-fast: #2E9E5A;
  --hm-emo: #3B6FB5;
  font-family: var(--mm-font-body, 'Roboto', system-ui, -apple-system, sans-serif);
  color: var(--hm-ink);
  line-height: 1.6;
  overflow-x: clip;
}
.hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
/* azzeramenti a specificita' zero (:where): cosi' i margini e i colori delle classi .hm-* vincono sempre */
:where(.hm) :is(h1, h2, h3) { font-family: var(--mm-font-display, 'Montserrat', system-ui, sans-serif); margin: 0; letter-spacing: -.025em; text-wrap: balance; }
:where(.hm) p { margin: 0; }
:where(.hm) a { color: inherit; text-decoration: none; }
:where(.hm) img { display: block; max-width: 100%; }
:where(.hm) ul { list-style: none; margin: 0; padding: 0; }
.hm a:focus-visible, .hm button:focus-visible, .hm input:focus-visible { outline: 3px solid var(--hm-amber); outline-offset: 3px; }
.hm-wrap { width: 100%; max-width: var(--hm-max); margin: 0 auto; padding-left: var(--hm-gut); padding-right: var(--hm-gut); }
.hm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hm-ar { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---- pulsanti e link ---- */
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 12px;
  background: var(--hm-amber); color: var(--hm-ink); border: 2px solid var(--hm-amber);
  font-family: var(--mm-font-body, 'Roboto', sans-serif); font-size: 16px; font-weight: 700; line-height: 1.2;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.hm-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(237, 139, 0, .35); }
.hm-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.hm-btn-ghost:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.hm-link { display: inline-block; font-weight: 700; color: var(--hm-amber-d); border-bottom: 2px solid var(--hm-amber); padding: 13px 0 3px; white-space: nowrap; }
.hm-arr {
  width: 44px; height: 44px; border-radius: 50%; background: var(--hm-amber); color: var(--hm-ink);
  display: inline-grid; place-items: center; flex: none; font-size: 18px; transition: transform .25s;
}
a:hover > .hm-arr, a:hover .hm-arr { transform: rotate(45deg) scale(1.06); }

/* ---- titoli di sezione ---- */
.hm-sec { padding-block: var(--hm-sec); }
.hm-alt { background: var(--hm-alt); }
.hm h2 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.07; font-weight: 800; }
.hm-kick { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font: 700 12px/1.2 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--hm-amber-d); }
.hm-kick::before { content: ""; width: 30px; height: 2px; background: var(--hm-amber); flex: none; }
.hm-sub { color: var(--hm-soft); font-size: 17px; max-width: 520px; margin-top: 16px; }
.hm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 42px; }

/* ---- hero ---- */
.hm-hero { position: relative; display: flex; align-items: center; overflow: hidden; background: #111; color: #fff; min-height: clamp(560px, calc(100svh - var(--mm-header-h, 76px) - 24px), 800px); }
.hm-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; transform: scale(1.04); animation: hm-zoom 22s ease-in-out infinite alternate; }
.hm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 8, 8, .88) 0%, rgba(8, 8, 8, .55) 42%, rgba(8, 8, 8, .05) 80%), linear-gradient(0deg, rgba(8, 8, 8, .5), transparent 35%); }
.hm-hero-in { position: relative; z-index: 2; padding-block: 72px; }
.hm-hero h1 { font-size: clamp(42px, 8vw, 92px); line-height: 1; font-weight: 800; max-width: 12.5em; }
.hm-hero h1 em { display: block; font-style: normal; color: var(--hm-amber); }
.hm-hero-p { font-size: clamp(17px, 2vw, 20px); max-width: 540px; margin: 22px 0 28px; color: #ece7dc; }
.hm-search { display: flex; gap: 8px; max-width: 640px; padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.hm-search input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 0; outline: 0; background: transparent; color: var(--hm-ink); font: 16px var(--mm-font-body, 'Roboto', sans-serif); }
.hm-search input:focus-visible { outline: 0; }
.hm-search:focus-within { box-shadow: 0 0 0 3px var(--hm-amber), 0 20px 50px rgba(0, 0, 0, .35); }
.hm-hero-row { display: flex; margin-top: 16px; }
.hm-hero-note { margin-top: 16px; color: #d6d0c2; font-size: 14px; }
@keyframes hm-zoom { to { transform: scale(1.12); } }

/* ---- itinerari ---- */
.hm-its { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.hm-its-1 { grid-template-columns: minmax(0, 760px); justify-content: center; }
.hm-it { display: block; min-width: 0; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 2px 0 var(--hm-line), 0 18px 40px rgba(20, 22, 26, .07); transition: transform .35s, box-shadow .35s; }
.hm-it:hover { transform: translateY(-6px); box-shadow: 0 2px 0 var(--hm-line), 0 28px 56px rgba(20, 22, 26, .14); }
.hm-it-ph { position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: linear-gradient(135deg, #e9dfc9, #d9c9a6); }
.hm-it-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.hm-it:hover .hm-it-ph img { transform: scale(1.06); }
.hm-tag { position: absolute; z-index: 2; left: 16px; top: 16px; max-width: calc(100% - 32px); padding: 5px 10px; border-radius: 6px; background: rgba(0, 0, 0, .62); color: #fff; font: 600 12px/1.3 var(--mm-font-body, 'Roboto', sans-serif); letter-spacing: .05em; text-transform: uppercase; backdrop-filter: blur(4px); }
.hm-it-bd { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
.hm-it-tx { flex: 1; min-width: 0; }
.hm-it-lab { display: block; font: 600 12px/1.3 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: .14em; text-transform: uppercase; color: var(--hm-soft); }
.hm-it-t { display: block; margin: 4px 0 8px; font: 700 clamp(20px, 2.2vw, 25px)/1.2 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.hm-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--hm-soft); font-size: 14.5px; }
.hm-meta b { color: var(--hm-ink); }

/* ---- planner ---- */
.hm-ptop { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: end; margin-bottom: 56px; }
.hm-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; margin-bottom: 34px; }
.hm-feat li { min-width: 0; }
.hm-feat svg { width: 26px; height: 26px; margin-bottom: 8px; fill: none; stroke: var(--hm-amber); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-feat b { display: block; font: 700 16px/1.3 var(--mm-font-display, 'Montserrat', sans-serif); }
.hm-feat span { display: block; margin-top: 2px; color: var(--hm-soft); font-size: 14.5px; line-height: 1.45; }
.hm-fine { max-width: 420px; margin-top: 14px; color: var(--hm-soft); font-size: 14px; }
.hm-shots { position: relative; max-width: 1120px; margin: 0 auto 34px; }
.hm-shot-main img { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--hm-line); box-shadow: 0 30px 70px rgba(20, 22, 26, .22); background: #e5e2d8; }
.hm-shot-over { position: absolute; right: -26px; bottom: 34px; width: 170px; height: auto; border-radius: 26px; border: 7px solid #14161A; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); background: #fff; }
.hm-cap { max-width: 760px; margin: 18px 4px 0; color: var(--hm-soft); font-size: 14px; }
.hm-c-fast { color: var(--hm-fast); }
.hm-c-emo { color: var(--hm-emo); }

/* ---- fascia dei vantaggi (solo per chi non e' iscritto) ---- */
.hm-ben-sec { padding-block: 56px var(--hm-sec); }
.hm-ben { display: grid; grid-template-columns: 1.1fr 1.3fr auto; gap: 28px 36px; align-items: center; padding: 34px 38px; background: #FFF6E6; border: 1px solid #F3D9A8; border-radius: 26px; }
.hm-ben h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
.hm-ben-h p { margin-top: 8px; color: #5a4a2c; font-size: 16px; }
.hm-ben-l { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; font-size: 15px; font-weight: 500; }
.hm-ben-l li { display: flex; align-items: center; gap: 10px; line-height: 1.3; min-width: 0; }
.hm-ben-l svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--hm-amber-d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-ben-a { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* ---- community ---- */
.hm-com { display: grid; grid-template-columns: 1.08fr 1fr; overflow: hidden; border-radius: 28px; background: var(--hm-dark); color: #fff; box-shadow: 0 30px 70px rgba(20, 22, 26, .25); }
.hm-com-ph { position: relative; min-height: 440px; }
.hm-com-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 22% center; }
.hm-com-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, rgba(23, 25, 29, .55)); }
.hm-com-tx { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 64px); min-width: 0; }
.hm-com .hm-kick { color: var(--hm-amber); }
.hm-com-tx > p:not(.hm-kick) { margin: 18px 0 30px; color: #cfcabd; font-size: 17px; }
.hm-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hm-data { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 30px; }
.hm-data-1 { grid-template-columns: minmax(0, 560px); justify-content: center; }
.hm-box { min-width: 0; padding: 24px 26px; border: 1px solid var(--hm-line); border-radius: 20px; background: #fff; }
.hm-box h3 { margin-bottom: 6px; font-size: 17px; letter-spacing: -.01em; }
.hm-row-i { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--hm-line); font-size: 15px; }
.hm-row-i > span { min-width: 0; }
.hm-row-i b { display: block; overflow-wrap: anywhere; }
.hm-row-i small { color: var(--hm-soft); font-size: 13.5px; }
.hm-row-i > small { white-space: nowrap; }
.hm-row-i:hover b { color: var(--hm-amber-d); }
.hm-box .hm-link { margin-top: 8px; }

/* ---- territori ---- */
.hm-terr { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.hm-lst { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.hm-lst a { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 18px 2px; border-bottom: 1px solid var(--hm-line); transition: padding .25s; }
.hm-lst a:hover { padding-left: 10px; }
.hm-lst-n { flex: 1; min-width: 0; font: 700 18px/1.25 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.hm-lst small { color: var(--hm-soft); font-size: 14px; white-space: nowrap; }
.hm-lst .hm-ar { font-size: 18px; color: var(--hm-ink); }

/* ---- magazine ---- */
.hm-mag { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.hm-mag-1 { grid-template-columns: minmax(0, 760px); justify-content: center; }
.hm-mcard { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 440px; padding: 22px; overflow: hidden; border-radius: 24px; color: #fff; background: #2a2620; box-shadow: 0 24px 54px rgba(20, 22, 26, .16); transition: transform .35s; }
.hm-mcard:hover { transform: translateY(-5px); }
.hm-mcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-mcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 8, 8, .82), rgba(8, 8, 8, .05) 60%); }
.hm-iss, .hm-mc-b { position: relative; z-index: 2; }
.hm-iss { align-self: flex-start; padding: 6px 12px; border-radius: 6px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); font: 700 12px/1.3 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: .16em; }
.hm-mc-tag { display: block; margin-bottom: 8px; color: var(--hm-amber); font: 700 12px/1.3 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: .14em; }
.hm-mc-t { display: block; font: 800 clamp(24px, 3vw, 34px)/1.12 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.hm-mrow { display: flex; align-items: center; gap: 14px; padding: 22px 2px; border-bottom: 1px solid var(--hm-line); transition: padding .25s; }
.hm-mrows > .hm-mrow:first-child { border-top: 1px solid var(--hm-line); }
.hm-mrow:hover { padding-left: 10px; }
.hm-mrow-t { flex: 1; min-width: 0; font: 600 20px/1.3 var(--mm-font-display, 'Montserrat', sans-serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.hm-ebook { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 18px 20px; border-radius: 18px; background: #FFF6E6; border: 1px solid #F3D9A8; }
.hm-eb-t { flex: 1; min-width: 0; }
.hm-eb-t b { display: block; font: 700 15.5px/1.3 var(--mm-font-display, 'Montserrat', sans-serif); }
.hm-eb-t small { display: block; color: var(--hm-soft); font-size: 14px; }

/* ---- chiusura ---- */
.hm-close { position: relative; overflow: hidden; padding-block: clamp(80px, 11vw, 140px); text-align: center; color: #fff; background: #111; }
.hm-close-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-close::after { content: ""; position: absolute; inset: 0; background: rgba(8, 8, 8, .78); }
.hm-close .hm-wrap { position: relative; z-index: 2; }
.hm-close h2 { max-width: 780px; margin: 0 auto 16px; }
.hm-close p { margin: 0 0 30px; color: #d6d0c2; font-size: 18px; }

/* ---- comparsa allo scorrimento: solo con JavaScript e senza "movimento ridotto"; senza JS tutto e' visibile ---- */
.hm-js .hm-rv { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.hm-js .hm-rv.in { opacity: 1; transform: none; }

@media print { .hm-js .hm-rv { opacity: 1; transform: none; } }

/* ---- schermi grandi ---- */
@media (min-width: 2200px) { .hm { font-size: 18px; } .hm-hero { min-height: 860px; } .hm-sub, .hm-com-tx > p:not(.hm-kick) { font-size: 19px; } }

/* ---- tablet e sotto ---- */
@media (max-width: 1180px) {
  .hm-ben { grid-template-columns: 1fr 1fr; }
  .hm-ben-h { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
  .hm-ptop, .hm-terr { grid-template-columns: 1fr; gap: 32px; }
  .hm-ptop { margin-bottom: 36px; }
  .hm-shots { max-width: 560px; }
  .hm .hm-shot-over { display: none; }
  .hm-com { grid-template-columns: 1fr; }
  .hm-com-ph { min-height: 300px; }
  .hm-mag { grid-template-columns: 1fr; gap: 28px; }
  .hm-mcard { min-height: 380px; }
}
/* ---- telefono ---- */
@media (max-width: 767px) {
  .hm-hero-in { padding-block: 56px 48px; }
  .hm-hero { align-items: flex-end; }
  .hm-hero::after { background: linear-gradient(0deg, rgba(8, 8, 8, .9) 0%, rgba(8, 8, 8, .45) 55%, rgba(8, 8, 8, .25)); }
  .hm-hero-img { object-position: 68% center; }
  .hm-search { flex-direction: column; padding: 10px; }
  .hm-search .hm-btn { width: 100%; }
  .hm-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
  .hm-its, .hm-data, .hm-lst { grid-template-columns: 1fr; }
  .hm-it-bd { padding: 18px 18px; }
  .hm-feat { gap: 22px 18px; }
  .hm-shots { max-width: 330px; }
  .hm-shot-main img { border: 7px solid #14161A; border-radius: 30px; }
  .hm-cap { text-align: center; }
  .hm-ben { grid-template-columns: 1fr; padding: 26px 22px; }
  .hm-ben-l { grid-template-columns: 1fr; }
  .hm-ben-a .hm-btn { width: 100%; }
  .hm-row .hm-btn { flex: 1 1 100%; }
  .hm-close .hm-btn { width: 100%; }
  .hm-mrow-t { font-size: 18px; }
}
@media (max-width: 400px) {
  .hm-feat { grid-template-columns: 1fr; }
}
/* telefoni piccoli (320-380px, anche bassi come 568px): la prima schermata deve far vedere ricerca e Planner prima della barra in basso */
@media (max-width: 380px) {
  .hm-hero { min-height: 0; }
  .hm-hero-in { padding-block: 36px 32px; }
  .hm-hero h1 { font-size: 38px; }
  .hm-hero-p { margin: 14px 0 18px; font-size: 16px; }
  .hm-hero-row { margin-top: 12px; }
  .hm-hero-note { margin-top: 10px; }
}
@media (max-width: 380px) and (max-height: 620px) {
  .hm-hero-in { padding-block: 24px 20px; }
  .hm-hero h1 { font-size: 34px; }
  .hm-hero-p { margin: 10px 0 14px; }
  .hm-search { padding: 8px; }
  .hm-search input, .hm-search .hm-btn { min-height: 46px; }
  .hm-hero-row .hm-btn { min-height: 46px; }
}
/* telefono in orizzontale: la prima schermata non deve riempire tutta l'altezza */
@media (max-height: 480px) and (orientation: landscape) {
  .hm-hero { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hm *, .hm *::before, .hm *::after { animation: none !important; transition: none !important; }
  .hm-hero-img { transform: none; }
}
