/*
 * AMH BLOCKS CSS — Animah v21.2
 * File unico: base strutturale + tutti i blocchi + nav
 * Caricato una sola volta. Niente dipendenze tra file.
 */

/* ══════════════════════════════════════════════════════════════
   1. RESET SCOPED + STRUTTURA BASE
══════════════════════════════════════════════════════════════ */

.amh-page *, .amh-page *::before, .amh-page *::after,
.amh-block *, .amh-block *::before, .amh-block *::after,
.amh-header *, .amh-header *::before, .amh-header *::after {
    box-sizing: border-box;
}

.amh-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}
.amh-main    { flex: 1 1 auto; width: 100%; }
.amh-main-fw { flex: 1 1 auto; width: 100%; max-width: 100%; padding: 0; }

.amh-container {
    width: 100%;
    max-width: var(--a-bp-max, 1440px);
    margin-left: auto;
    margin-right: auto;
    padding-left:  clamp(16px, 3vw, 48px);
    padding-right: clamp(16px, 3vw, 48px);
}
.amh-container-fw { width: 100%; max-width: 100%; padding: 0; }

.amh-content    { width: 100%; padding-top: clamp(32px,5vw,80px); padding-bottom: clamp(32px,5vw,80px); }
.amh-content-fw { width: 100%; }

.amh-canvas .amh-main,
.amh-canvas .amh-main-fw { padding: 0; margin: 0; }
.amh-canvas-content { width: 100%; }
.amh-canvas-fw      { width: 100%; max-width: 100%; }

.amh-fullwidth { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

.amh-fullscreen .amh-container,
.amh-fw .amh-container { max-width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }
/* Eccezione: il footer gestisce sempre il proprio container a larghezza fissa */
.amh-footer .amh-container,
.amh-fullscreen .amh-footer .amh-container,
.amh-fw .amh-footer .amh-container {
    max-width: var(--a-bp-max, 1440px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left:  clamp(16px, 3vw, 48px) !important;
    padding-right: clamp(16px, 3vw, 48px) !important;
}
.amh-fullscreen .amh-main,
.amh-fw .amh-main { width: 100%; }

.amh-section { width: 100%; padding-top: clamp(32px,5vw,80px); padding-bottom: clamp(32px,5vw,80px); }

/* Colonne */
.amh-cols { display: flex; flex-wrap: wrap; gap: clamp(16px,2vw,32px); }
.amh-col  { flex: 1 1 0; min-width: 0; }

/* Card base */
.amh-card             { display: flex; flex-direction: column; }
.amh-card-img         { width: 100%; height: auto; display: block; }
.amh-card-body        { flex: 1 1 auto; display: flex; flex-direction: column; }
.amh-card-footer      { margin-top: auto; }

/* Loop/archive */
.amh-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: clamp(16px,2vw,32px);
}

/* Header/Footer struttura */
.amh-header, .amh-footer { width: 100%; }
.amh-header-fw, .amh-footer-fw { width: 100%; max-width: 100%; }
.amh-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: clamp(12px,2vw,24px);
    padding-bottom: clamp(12px,2vw,24px);
}

/* Pagination */
.amh-pagination { margin-top: clamp(32px,4vw,64px); display: flex; justify-content: center; gap: 8px; }


/* ══════════════════════════════════════════════════════════════
   2. PULSANTI BASE
   Il padding è configurabile via variabile CSS --amh-btn-px / --amh-btn-py
   impostata inline dal render PHP quando l'utente modifica il padding.
══════════════════════════════════════════════════════════════ */

.amh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--amh-btn-py, 0.7em) var(--amh-btn-px, 1.8em);
    border-radius: var(--amh-btn-radius, 4px);
    text-decoration: none;
    font-weight: 700;
    font-size: var(--amh-btn-size, 1rem);
    letter-spacing: 0.03em;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity 0.2s, transform 0.2s;
    line-height: 1.3;
}
.amh-btn:hover { opacity: 0.82; transform: translateY(-2px); }

/* Varianti stile — i colori vengono sempre da inline style PHP */
.amh-btn--solid   { /* bg e color da inline style */ }
.amh-btn--outline { background: transparent !important; }
.amh-btn--ghost   { background: rgba(255,255,255,.12) !important; border-color: rgba(255,255,255,.3) !important; color: #fff !important; backdrop-filter: blur(6px); }


/* ══════════════════════════════════════════════════════════════
   3. BLOCCO: HERO
══════════════════════════════════════════════════════════════ */

.amh-block--hero .amh-hero { overflow: hidden; }
.amh-hero-inner {
    padding-top: clamp(48px,8vw,120px);
    padding-bottom: clamp(48px,8vw,120px);
}

/* Blocco testo (titolo+sottotitolo+testo+pulsanti): un unico contenitore
   con larghezza massima e posizione impostabili dal pannello (content_max_width,
   content_valign, e align per l'orizzontale). Titolo/sottotitolo/testo dentro
   non hanno più una loro max-width indipendente: evita lo sfalsamento quando
   l'hero è allineato a sinistra o destra. */
.amh-hero-content-box { width: 100%; }

.amh-hero-title {
    font-size: clamp(2rem,6vw,5rem);
    line-height: 1.1;
    margin: 0 0 0.4em;
    font-weight: 700;
    color: inherit;
}
.amh-hero-subtitle {
    font-size: clamp(1rem,2vw,1.4rem);
    opacity: 0.85;
    margin: 0 0 2em;
    color: inherit;
}

/* Testo ricco (WYSIWYG) */
.amh-hero-text { font-size: clamp(0.95rem,1.6vw,1.15rem); line-height: 1.7; opacity: 0.9; margin: 0 0 2em; color: inherit; }
.amh-hero-text p { margin: 0 0 0.8em; }
.amh-hero-text p:last-child { margin-bottom: 0; }
.amh-hero-text a { color: inherit; text-decoration: underline; }
.amh-hero-text ul, .amh-hero-text ol { margin: 0 0 1em; padding-left: 1.4em; }

/* Riga pulsanti — più pulsanti affiancati, vanno a capo se non c'è spazio */
.amh-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}


/* ══════════════════════════════════════════════════════════════
   4. BLOCCO: HERO 3D
══════════════════════════════════════════════════════════════ */

.amh-block--hero-3d .amh-hero3d { overflow: hidden; width: 100%; }
.amh-hero3d-inner {
    padding-top:    clamp(56px,10vw,140px);
    padding-bottom: clamp(56px,10vw,140px);
    max-width: 860px;
}
.amh-hero3d[style*="flex-start"] .amh-hero3d-inner,
.amh-hero3d[style*="flex-end"]   .amh-hero3d-inner { max-width: 680px; }

.amh-hero3d-title {
    font-size: clamp(2.2rem,6vw,5.5rem);
    line-height: 1.08;
    margin: 0 0 0.4em;
    font-weight: 700;
    color: inherit;
    text-shadow: 0 2px 40px rgba(0,0,0,0.4);
}
.amh-hero3d-subtitle {
    font-size: clamp(1rem,2vw,1.35rem);
    line-height: 1.6;
    opacity: 0.8;
    margin: 0 0 2em;
    max-width: 580px;
    color: inherit;
}
.amh-hero3d[style*="center"] .amh-hero3d-subtitle { margin-left: auto; margin-right: auto; }

@media (max-width: 480px) { .amh-hero3d-inner { padding-left: 24px; padding-right: 24px; } }


/* ══════════════════════════════════════════════════════════════
   5. BLOCCO: SLIDER
══════════════════════════════════════════════════════════════ */

.amh-block--slider { overflow: hidden; }

.amh-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    cursor: grab;
    user-select: none;
}
.amh-slider:active { cursor: grabbing; }

.amh-slider-track { position: relative; width: 100%; height: 100%; }

.amh-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    overflow: hidden;
    display: flex;
}
.amh-slide.active { opacity: 1; z-index: 2; }

.amh-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}
.amh-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.amh-slide-content {
    padding: clamp(24px,5vw,80px);
    z-index: 5;
    pointer-events: none;
    max-width: 100%;
}
.amh-slide-title    { font-weight: 700; line-height: 1.1; margin: 0 0 14px; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.amh-slide-subtitle { margin: 0 0 28px; max-width: 560px; line-height: 1.6; }

.amh-slide-cta {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    pointer-events: all;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
    align-self: flex-start;
    border: 2px solid transparent;
}
.amh-slide-cta:hover { opacity: .85; transform: translateY(-2px); }

/* Frecce */
.amh-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.15);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    backdrop-filter: blur(6px);
    line-height: 1;
    color: inherit;
}
.amh-slider-arrow:hover { background: rgba(0,0,0,.7); }
.amh-slider-prev { left: 16px; }
.amh-slider-next { right: 16px; }

.amh-slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 20; }
.amh-slider-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    cursor: pointer;
    border: none;
    transition: background .2s, transform .2s;
    padding: 0;
}
.amh-slider-dot.active { transform: scale(1.3); }

.amh-slider-thumbs { position: absolute; bottom: 0; left: 0; right: 0; display: flex; z-index: 20; height: 72px; background: rgba(0,0,0,.5); }
.amh-slider-thumb { flex: 1; overflow: hidden; cursor: pointer; opacity: .5; transition: opacity .2s; border-right: 1px solid rgba(255,255,255,.1); }
.amh-slider-thumb.active { opacity: 1; }
.amh-slider-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.amh-slider-progress { position: absolute; bottom: 0; left: 0; height: 3px; width: 0%; z-index: 21; transition: width .1s linear; }
.amh-slider-canvas   { pointer-events: none; }
.amh-slider-empty    { padding: 40px; text-align: center; background: #111; color: #666; font-size: 14px; }
.amh-slider-empty a  { color: #a855f7; }

@media (max-width: 768px) {
    .amh-slider-arrow  { width: 36px; height: 36px; font-size: 18px; }
    .amh-slider-thumbs { height: 52px; }
}


/* ══════════════════════════════════════════════════════════════
   6. BLOCCO: CARDS GRID
══════════════════════════════════════════════════════════════ */

.amh-block--cards-grid .amh-container {
    padding-top: clamp(40px,6vw,96px);
    padding-bottom: clamp(40px,6vw,96px);
}
.amh-cg-header { text-align: center; margin-bottom: clamp(32px,4vw,64px); }
.amh-cg-title    { font-size: clamp(1.5rem,3vw,2.8rem); font-weight: 700; margin: 0 0 0.4em; color: inherit; }
.amh-cg-subtitle { font-size: clamp(0.95rem,1.5vw,1.1rem); opacity: 0.7; margin: 0; color: inherit; }

.amh-cg-grid { display: grid !important; gap: clamp(16px,2vw,32px); }
.amh-block--cards-grid .amh-cg-cols-1 { grid-template-columns: 1fr !important; }
.amh-block--cards-grid .amh-cg-cols-2 { grid-template-columns: repeat(2,1fr) !important; }
.amh-block--cards-grid .amh-cg-cols-3 { grid-template-columns: repeat(3,1fr) !important; }
.amh-block--cards-grid .amh-cg-cols-4 { grid-template-columns: repeat(4,1fr) !important; }

.amh-cg-card { padding: clamp(24px,3vw,40px); border-radius: 8px; display: flex; flex-direction: column; gap: 12px; }
.amh-cg-style-bordered .amh-cg-card { border: 1px solid rgba(0,0,0,0.1); }
.amh-cg-style-minimal  .amh-cg-card { background: transparent !important; padding-left: 0; padding-right: 0; }
.amh-cg-icon         { line-height: 1; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.amh-cg-icon svg     { display: block; }
.amh-cg-icon-left .amh-cg-icon svg,
.amh-cg-icon-right .amh-cg-icon svg { vertical-align: top; }
.amh-cg-card-title   { font-size: clamp(1rem,1.5vw,1.3rem); font-weight: 700; margin: 0; color: inherit; }
.amh-cg-card-text    { font-size: clamp(0.875rem,1.2vw,1rem); line-height: 1.7; opacity: 0.8; margin: 0; color: inherit; flex: 1; }
.amh-cg-card-link    { font-size: 0.875rem; font-weight: 700; text-decoration: none; margin-top: auto; display: inline-block; transition: opacity .2s; }
.amh-cg-card-link:hover { opacity: 0.7; }

/* Body (titolo/testo/link) — colonna interna, per layout icona affiancata */
.amh-cg-body { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }

/* Layout icona — SOTTO */
.amh-cg-icon-bottom .amh-cg-card { flex-direction: column; }
.amh-cg-icon-bottom .amh-cg-icon { order: 2; margin-top: auto; }
.amh-cg-icon-bottom .amh-cg-body { order: 1; }

/* Layout icona — SINISTRA (icona | testo affiancati sulla stessa riga) */
.amh-cg-icon-left .amh-cg-card { flex-direction: row; align-items: flex-start; flex-wrap: nowrap; }
.amh-cg-icon-left .amh-cg-icon { order: 1; flex: 0 0 auto; align-items: flex-start; }
.amh-cg-icon-left .amh-cg-body { order: 2; flex: 1 1 auto; min-width: 0; }

/* Layout icona — DESTRA (testo | icona affiancati sulla stessa riga) */
.amh-cg-icon-right .amh-cg-card { flex-direction: row; align-items: flex-start; flex-wrap: nowrap; }
.amh-cg-icon-right .amh-cg-icon { order: 2; flex: 0 0 auto; align-items: flex-start; }
.amh-cg-icon-right .amh-cg-body { order: 1; flex: 1 1 auto; min-width: 0; }

/* Immagine (se presente) a tutta larghezza sopra, in layout affiancato.
   Usa width:100% + order:0; la card resta nowrap perché l'immagine è
   raramente combinata con l'icona nello stesso blocco. */
.amh-cg-icon-left  .amh-cg-card:has(.amh-cg-card-img),
.amh-cg-icon-right .amh-cg-card:has(.amh-cg-card-img) { flex-wrap: wrap; }
.amh-cg-icon-left .amh-cg-card-img,
.amh-cg-icon-right .amh-cg-card-img { flex: 0 0 100%; width: 100%; order: 0; }

/* Effetti hover card */
.amh-cg-hover-lift .amh-cg-card,
.amh-cg-hover-accent .amh-cg-card,
.amh-cg-hover-zoom .amh-cg-card { transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; will-change: transform; }
.amh-cg-hover-lift .amh-cg-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.amh-cg-hover-accent .amh-cg-card { border: 1px solid rgba(0,0,0,.1); box-shadow: 0 0 0 0 var(--amh-cg-accent,#38bdf8); }
.amh-cg-hover-accent .amh-cg-card:hover { border-color: var(--amh-cg-accent,#38bdf8); box-shadow: 0 0 0 1px var(--amh-cg-accent,#38bdf8); }
.amh-cg-hover-zoom .amh-cg-card:hover { transform: scale(1.03); }
.amh-cg-hover-icon .amh-cg-icon { transition: transform .3s cubic-bezier(.34,1.56,.64,1); transform-origin: center; }
.amh-cg-hover-icon .amh-cg-card:hover .amh-cg-icon { transform: scale(1.15) rotate(-6deg); }

@media (max-width: 1024px) { .amh-block--cards-grid .amh-cg-cols-4 { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 768px)  {
    .amh-block--cards-grid .amh-cg-cols-3, .amh-block--cards-grid .amh-cg-cols-4 { grid-template-columns: repeat(2,1fr) !important; }
    .amh-cg-icon-left .amh-cg-card, .amh-cg-icon-right .amh-cg-card { flex-direction: column; align-items: stretch; }
    .amh-cg-icon-left .amh-cg-icon, .amh-cg-icon-right .amh-cg-icon { order: 1; }
    .amh-cg-icon-left .amh-cg-body, .amh-cg-icon-right .amh-cg-body { order: 2; }
}
@media (max-width: 480px)  { .amh-block--cards-grid .amh-cg-cols-2, .amh-block--cards-grid .amh-cg-cols-3, .amh-block--cards-grid .amh-cg-cols-4 { grid-template-columns: 1fr !important; } }


/* ══════════════════════════════════════════════════════════════
   6b. BLOCCO: CONTENT GRID
   ══════════════════════════════════════════════════════════════ */
.amh-block--content-grid .amh-container {
    padding-top: clamp(40px, 6vw, 96px);
    padding-bottom: clamp(40px, 6vw, 96px);
}

.amh-content-grid {
    display: grid !important;
    gap: var(--amh-cg-gap, 24px);
}
.amh-content-grid-cols-1 { grid-template-columns: 1fr !important; }
.amh-content-grid-cols-2 { grid-template-columns: repeat(2,1fr) !important; }
.amh-content-grid-cols-3 { grid-template-columns: repeat(3,1fr) !important; }
.amh-content-grid-cols-4 { grid-template-columns: repeat(4,1fr) !important; }
.amh-content-grid-cols-5 { grid-template-columns: repeat(5,1fr) !important; }
.amh-content-grid-cols-6 { grid-template-columns: repeat(6,1fr) !important; }

@media (max-width: 1024px) {
    .amh-content-grid-cols-5, .amh-content-grid-cols-6 { grid-template-columns: repeat(3,1fr) !important; }
    .amh-content-grid-cols-4 { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 768px) {
    .amh-content-grid-cols-3, .amh-content-grid-cols-4,
    .amh-content-grid-cols-5, .amh-content-grid-cols-6 { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 480px) {
    .amh-content-grid-cols-2, .amh-content-grid-cols-3, .amh-content-grid-cols-4,
    .amh-content-grid-cols-5, .amh-content-grid-cols-6 { grid-template-columns: 1fr !important; }
}

.amh-cg-cell {
    border-radius: var(--amh-cg-radius, 10px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.amh-cg-cell--testo .amh-cg-cell-title { font-size: 1.1rem; font-weight: 700; margin: 0; color: inherit; }
.amh-cg-cell--testo .amh-cg-cell-text { font-size: .95rem; line-height: 1.6; opacity: .85; color: inherit; }
.amh-cg-cell--testo .amh-cg-cell-text p:last-child { margin-bottom: 0; }
.amh-cg-cell--testo .amh-cg-cell-text h1,
.amh-cg-cell--testo .amh-cg-cell-text h2,
.amh-cg-cell--testo .amh-cg-cell-text h3,
.amh-cg-cell--testo .amh-cg-cell-text h4 { font-size: 1.05em; font-weight: 700; margin: 0 0 .4em; color: inherit; opacity: 1; }
.amh-cg-cell--testo .amh-cg-cell-text ul,
.amh-cg-cell--testo .amh-cg-cell-text ol { margin: 0 0 1em; padding-left: 1.2em; }
.amh-cg-cell--testo .amh-cg-cell-text strong { font-weight: 700; opacity: 1; }
.amh-cg-cell--testo .amh-cg-cell-text a { color: inherit; text-decoration: underline; }

.amh-cg-cell-image-wrap { display: block; overflow: hidden; border-radius: inherit; }
.amh-cg-cell-image { width: 100%; height: auto; display: block; border-radius: inherit; transition: transform .4s ease; }
.amh-cg-cell-image-wrap:hover .amh-cg-cell-image { transform: scale(1.03); }
.amh-cg-cell-caption { font-size: .85rem; opacity: .7; margin: 0; color: inherit; }

.amh-cg-cell-video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: inherit; overflow: hidden; background: #000; }
.amh-cg-cell-video-wrap iframe,
.amh-cg-cell-video-wrap video { width: 100%; height: 100%; border: 0; display: block; }
.amh-cg-video-fallback {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
    color: #fff; text-decoration: none; font-weight: 600; background: rgba(0,0,0,.55);
}

.amh-cg-cell-pdf {
    display: flex; flex-direction: column; gap: 12px;
    border-radius: inherit; border: 1px solid rgba(0,0,0,.1); overflow: hidden;
    text-decoration: none; color: inherit; transition: border-color .25s ease, box-shadow .25s ease;
}
.amh-cg-cell-pdf:hover { border-color: rgba(0,0,0,.25); box-shadow: 0 6px 20px rgba(0,0,0,.08); }

.amh-cg-pdf-thumb {
    position: relative; display: block; width: 100%;
    aspect-ratio: 210 / 297; /* proporzione A4 verticale, coerente con la maggior parte delle schede tecniche */
    background: #f2f2f2; overflow: hidden;
}
.amh-cg-pdf-cover {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.amh-cg-pdf-fallback {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.amh-cg-pdf-icon { font-size: 2.6rem; line-height: 1; opacity: .35; }

.amh-cg-pdf-text { display: flex; flex-direction: column; gap: 2px; padding: 0 16px 16px; }
.amh-cg-pdf-title { font-size: .95rem; font-weight: 700; }
.amh-cg-pdf-label { font-size: .82rem; opacity: .7; text-decoration: underline; }

/* Shortcode di plugin esterni: non conosciamo il loro markup, quindi
   costringiamo tutto (iframe/img/embed/canvas/oggetti a larghezza fissa)
   a stare dentro la cella invece di sforare la griglia. */
.amh-cg-cell-shortcode { width: 100%; overflow: hidden; }
.amh-cg-cell-shortcode img,
.amh-cg-cell-shortcode iframe,
.amh-cg-cell-shortcode embed,
.amh-cg-cell-shortcode canvas,
.amh-cg-cell-shortcode object { max-width: 100% !important; height: auto; }


/* ══════════════════════════════════════════════════════════════
   7. BLOCCO: CTA BAND
══════════════════════════════════════════════════════════════ */

.amh-block--cta .amh-container { padding-top: clamp(48px,7vw,100px); padding-bottom: clamp(48px,7vw,100px); }
.amh-cta-inner { max-width: 720px; }
.amh-block--cta [style*="center"] .amh-cta-inner { margin-left: auto; margin-right: auto; }
.amh-block--cta [style*="right"]  .amh-cta-inner { margin-left: auto; }
.amh-cta-title { font-size: clamp(1.75rem,4vw,3.2rem); font-weight: 700; line-height: 1.1; margin: 0 0 0.5em; color: inherit; }
.amh-cta-text  { font-size: clamp(1rem,1.5vw,1.2rem); opacity: 0.85; margin: 0 0 2em; line-height: 1.6; color: inherit; }
.amh-cta-btns  { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.amh-block--cta [style*="center"] .amh-cta-btns { justify-content: center; }
.amh-block--cta [style*="right"]  .amh-cta-btns { justify-content: flex-end; }

@media (max-width: 480px) { .amh-cta-btns { flex-direction: column; align-items: stretch; } .amh-cta-btns .amh-btn { text-align: center; } }


/* ══════════════════════════════════════════════════════════════
   8. BLOCCO: TEXT + IMAGE  v3.0
══════════════════════════════════════════════════════════════ */

/* ── Tipografia condivisa ── */
.amh-ti-title { font-size: clamp(1.5rem,3vw,2.8rem); line-height: 1.15; margin: 0 0 0.6em; font-weight: 700; color: inherit; }
.amh-ti-body  { font-size: clamp(0.95rem,1.5vw,1.1rem); line-height: 1.75; opacity: 0.85; color: inherit; margin-bottom: 1.5em; }
.amh-ti-body p { margin: 0 0 1em; }
.amh-ti-body p:last-child { margin-bottom: 0; }
.amh-ti-img   { width: 100%; overflow: hidden; border-radius: 4px; }
.amh-ti-img img,
.amh-ti-col-img > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--amh-ti-fx-duration, 500ms) ease, filter var(--amh-ti-fx-duration, 500ms) ease, opacity .4s ease; }

/* ── CTA base ── */
.amh-ti-cta {
    display: inline-block;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--amh-btn-radius, 4px);
    padding: var(--amh-btn-py, 0.65em) var(--amh-btn-px, 1.8em);
    transition: opacity .2s, background .25s, color .25s, box-shadow .25s;
    position: relative;
    overflow: hidden;
    z-index: 0;
}
/* Hover opacity solo se non ha effetti fx */
.amh-ti-cta:not(.amh-btn-fx):hover { opacity: 0.82; }

/* ── Effetti pulsante ── */
.amh-btn-fx--fill-left  { overflow: hidden; }
.amh-btn-fx--fill-left::before  { content:''; position:absolute; inset:0; background:rgba(255,255,255,.18); transform:translateX(-101%); transition:transform .3s ease; z-index:-1; }
.amh-btn-fx--fill-left:hover::before  { transform:translateX(0); }
.amh-btn-fx--fill-up    { overflow: hidden; }
.amh-btn-fx--fill-up::before    { content:''; position:absolute; inset:0; background:rgba(255,255,255,.18); transform:translateY(101%);  transition:transform .3s ease; z-index:-1; }
.amh-btn-fx--fill-up:hover::before    { transform:translateY(0); }
.amh-btn-fx--underline  { overflow: visible; }
.amh-btn-fx--underline::after   { content:''; position:absolute; bottom:4px; left:var(--amh-btn-px,1.8em); right:var(--amh-btn-px,1.8em); height:2px; background:currentColor; transform:scaleX(0); transform-origin:left; transition:transform .3s ease; }
.amh-btn-fx--underline:hover::after   { transform:scaleX(1); }
.amh-btn-fx--glow:hover { box-shadow: 0 0 18px 4px rgba(255,255,255,.25), 0 0 6px 2px currentColor; }

/* ── Effetti immagine CSS ── */
.amh-ti-img-fx { cursor: pointer; overflow: hidden; }

/* ── Effetti CSS con custom properties controllabili dal pannello ── */

/* Zoom */
.amh-ti-img-fx--zoom:hover img { transform: var(--amh-ti-fx-zoom, scale(1.07)); }
.amh-ti-img-fx--zoom-out img   { transform: var(--amh-ti-fx-zoom, scale(1.07)); }
.amh-ti-img-fx--zoom-out:hover img { transform: scale(1); }

/* Grayscale */
.amh-ti-img-fx--grayscale img       { filter: grayscale(1); }
.amh-ti-img-fx--grayscale:hover img { filter: grayscale(0); }

/* Brightness */
.amh-ti-img-fx--brightness img       { filter: var(--amh-ti-fx-brightness, brightness(.6)); }
.amh-ti-img-fx--brightness:hover img { filter: brightness(1); }

/* Blur */
.amh-ti-img-fx--blur img       { filter: var(--amh-ti-fx-blur, blur(6px)); }
.amh-ti-img-fx--blur:hover img { filter: blur(0); }

/* Overlay base */
.amh-ti-img-fx { position: relative; }
.amh-ti-img-fx::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--amh-ti-fx-duration, 500ms) ease, transform var(--amh-ti-fx-duration, 500ms) ease;
    z-index: 2;
}
.amh-ti-img-fx--overlay-dark::after  { background: rgba(0,0,0,.45); }
.amh-ti-img-fx--overlay-dark:hover::after { opacity: var(--amh-ti-fx-overlay-opacity, .6); }

.amh-ti-img-fx--overlay-color::after { background: var(--amh-ti-fx-overlay-color, #7c3aed); mix-blend-mode: multiply; }
.amh-ti-img-fx--overlay-color:hover::after { opacity: var(--amh-ti-fx-overlay-opacity, .6); }

.amh-ti-img-fx--overlay-slide::after { background: rgba(0,0,0,.5); transform: translateY(100%); opacity: 1; }
.amh-ti-img-fx--overlay-slide:hover::after { transform: translateY(0); }

/* Pan — usa custom property per intensità */
.amh-ti-img-fx--pan-left img       { transform: translateX(calc(var(--amh-ti-fx-pan, 0.04) * 100%)); }
.amh-ti-img-fx--pan-left:hover img { transform: translateX(calc(var(--amh-ti-fx-pan, 0.04) * -100%)); }

.amh-ti-img-fx--pan-right img       { transform: translateX(calc(var(--amh-ti-fx-pan, 0.04) * -100%)); }
.amh-ti-img-fx--pan-right:hover img { transform: translateX(calc(var(--amh-ti-fx-pan, 0.04) * 100%)); }

.amh-ti-img-fx--pan-up img       { transform: translateY(calc(var(--amh-ti-fx-pan, 0.04) * 100%)); }
.amh-ti-img-fx--pan-up:hover img { transform: translateY(calc(var(--amh-ti-fx-pan, 0.04) * -100%)); }

.amh-ti-img-fx--pan-down img       { transform: translateY(calc(var(--amh-ti-fx-pan, 0.04) * -100%)); }
.amh-ti-img-fx--pan-down:hover img { transform: translateY(calc(var(--amh-ti-fx-pan, 0.04) * 100%)); }

.amh-ti-img-fx--pan-down .amh-ti-img img,
.amh-ti-img-fx--pan-down > img { transform: translateY(-4%); }
.amh-ti-img-fx--pan-down:hover .amh-ti-img img,
.amh-ti-img-fx--pan-down:hover > img { transform: translateY(4%); }

/* Tilt 3D */
.amh-ti-img-fx--tilt .amh-ti-img { perspective: 800px; transform-style: preserve-3d; }
.amh-ti-img-fx--tilt:hover .amh-ti-img img { transform: rotateY(6deg) rotateX(-3deg) scale(1.03); }
.amh-ti-img-fx--tilt:hover > img { transform: rotateY(6deg) rotateX(-3deg) scale(1.03); }

/* ── SINGOLO: Flex affiancato (right / left) ── */
.amh-ti-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding-top: clamp(40px,6vw,96px);
    padding-bottom: clamp(40px,6vw,96px);
}
.amh-ti-left  { flex-direction: row; }
.amh-ti-right { flex-direction: row; }
.amh-ti-left  .amh-ti-img-wrap { order: -1; }
.amh-ti-right .amh-ti-img-wrap { order:  1; }
.amh-ti-text, .amh-ti-img-wrap { flex: 1 1 300px; min-width: 0; }

/* ── SINGOLO: Stacked (top / bottom) ── */
.amh-ti-top, .amh-ti-bottom { flex-direction: column; align-items: stretch; }
.amh-ti-top .amh-ti-img-wrap,
.amh-ti-bottom .amh-ti-img-wrap { flex: none; width: 100%; }
.amh-ti-top .amh-ti-text,
.amh-ti-bottom .amh-ti-text { flex: none; width: 100%; }

/* ── SINGOLO: Half 50% (righthalf / lefthalf) ── */
.amh-block--text-image:has(.amh-ti-half) { padding-top: 0 !important; padding-bottom: 0 !important; }
.amh-ti-half { display: flex !important; flex-direction: row !important; align-items: stretch; min-height: 60vh; width: 100%; overflow: hidden; }
.amh-ti-half .amh-ti-img-wrap { flex: 0 0 50%; overflow: hidden; display: flex; }
.amh-ti-half .amh-ti-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; flex-shrink: 0; }
.amh-ti-half-text { flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center; padding: clamp(16px,3vw,40px) clamp(24px,4vw,56px); box-sizing: border-box; }

/* ── MULTI-COLONNA ── */
.amh-ti-multi {
    display: grid;
    grid-template-columns: repeat(var(--amh-ti-cols, 3), 1fr);
}

/* Colonna: layout top/bottom (verticale) */
.amh-ti-col { display: flex; flex-direction: column; min-width: 0; }
.amh-ti-col--top  { flex-direction: column; }
.amh-ti-col--bottom { flex-direction: column; }

/* Colonna: layout left/right (orizzontale) */
.amh-ti-col--left,
.amh-ti-col--right { flex-direction: row; align-items: flex-start; gap: 20px; }
.amh-ti-col--left .amh-ti-col-img  { order: -1; flex: 0 0 45%; }
.amh-ti-col--right .amh-ti-col-img { order:  1; flex: 0 0 45%; }
.amh-ti-col--left .amh-ti-col-text,
.amh-ti-col--right .amh-ti-col-text { flex: 1 1 0; min-width: 0; }

/* Colonna: layout half 50% secco */
.amh-ti-col--halfleft,
.amh-ti-col--halfright { flex-direction: row; align-items: stretch; min-height: 40vh; }
.amh-ti-col--halfleft .amh-ti-col-img  { order: -1; flex: 0 0 50%; overflow: hidden; }
.amh-ti-col--halfright .amh-ti-col-img { order:  1; flex: 0 0 50%; overflow: hidden; }
.amh-ti-col--halfleft .amh-ti-col-img img,
.amh-ti-col--halfright .amh-ti-col-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amh-ti-col--halfleft .amh-ti-col-text,
.amh-ti-col--halfright .amh-ti-col-text { flex: 0 0 50%; display: flex; flex-direction: column; justify-content: center; padding: clamp(16px,3vw,40px); box-sizing: border-box; min-width: 0; }

.amh-ti-col-img { width: 100%; position: relative; overflow: hidden; }
.amh-ti-col-text { padding-top: 1em; }
.amh-ti-col--bottom .amh-ti-col-text { padding-top: 0; padding-bottom: 1em; }
.amh-ti-col--left .amh-ti-col-text,
.amh-ti-col--right .amh-ti-col-text { padding-top: 0; }

/* Breakpoint collasso colonne */
@media (max-width: 768px) {
    .amh-ti-col--v768   { flex-direction: column !important; }
    .amh-ti-col--v768   .amh-ti-col-img { order: -1 !important; flex: none !important; width: 100%; }
    .amh-ti-col--vr768  { flex-direction: column !important; }
    .amh-ti-col--vr768  .amh-ti-col-img { order:  1 !important; flex: none !important; width: 100%; }
}
@media (max-width: 480px) {
    .amh-ti-col--v480   { flex-direction: column !important; }
    .amh-ti-col--v480   .amh-ti-col-img { order: -1 !important; flex: none !important; width: 100%; }
    .amh-ti-col--vr480  { flex-direction: column !important; }
    .amh-ti-col--vr480  .amh-ti-col-img { order:  1 !important; flex: none !important; width: 100%; }
}

/* ── Mobile singolo ── */
@media (max-width: 768px) {
    .amh-ti-wrap { flex-direction: column !important; gap: 32px !important; }
    .amh-ti-half { flex-direction: column !important; min-height: unset; }
    .amh-ti-half .amh-ti-img-wrap { flex: none; width: 100%; height: 56vw; min-height: 220px; }
    .amh-ti-half-text { flex: none; width: 100%; padding: 28px 20px; }
}


/* ══════════════════════════════════════════════════════════════
   9. BLOCCO: PARALLAX PRO
══════════════════════════════════════════════════════════════ */

.amh-block--parallax-pro { overflow: hidden; }
.amh-parallax-pro { width: 100%; }
.amh-pp-content   { width: 100%; }
.amh-pp-cta:hover { opacity: 0.85; transform: translateY(-2px); }
.amh-pp-word { white-space: nowrap; }
.amh-pp-char { display: inline-block; }
.amh-parallax-pro video::-webkit-media-controls { display: none !important; }

@media (max-width: 640px) {
    .amh-pp-content { padding-left: 24px; padding-right: 24px; }
    .amh-pp-ctas    { flex-direction: column; align-items: stretch; }
    .amh-pp-cta     { text-align: center; }
}


/* ══════════════════════════════════════════════════════════════
   10. BLOCCO: GALLERY
══════════════════════════════════════════════════════════════ */

.amh-block--gallery .amh-container { padding-top: clamp(40px,5vw,80px); padding-bottom: clamp(40px,5vw,80px); }
.amh-gallery-title { font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; margin: 0 0 clamp(24px,3vw,48px); color: inherit; }
.amh-gallery-grid  { display: grid !important; }
.amh-block--gallery .amh-gallery-cols-2 { grid-template-columns: repeat(2,1fr) !important; }
.amh-block--gallery .amh-gallery-cols-3 { grid-template-columns: repeat(3,1fr) !important; }
.amh-block--gallery .amh-gallery-cols-4 { grid-template-columns: repeat(4,1fr) !important; }
.amh-block--gallery .amh-gallery-cols-5 { grid-template-columns: repeat(5,1fr) !important; }
.amh-gallery-item { overflow: hidden; }
.amh-gallery-item a { display: block; }
.amh-gallery-img-wrap { position: relative; overflow: hidden; background: #111; }
.amh-gallery-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease, opacity .4s ease; }
.amh-gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent,rgba(0,0,0,.7)); color: #fff; font-size: 13px; padding: 24px 12px 10px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.amh-gallery-item:hover .amh-gallery-caption { opacity: 1; transform: translateY(0); }
.amh-gallery-hover-zoom .amh-gallery-item:hover img   { transform: scale(1.06); }
.amh-gallery-hover-fade .amh-gallery-item:hover img   { opacity: 0.8; }
.amh-gallery-hover-slide-up .amh-gallery-item:hover img { transform: translateY(-4px) scale(1.03); }
.amh-gallery-empty   { padding: 40px; text-align: center; background: #f5f5f5; color: #999; font-size: 14px; }
.amh-gallery-empty a { color: #a855f7; }

@media (max-width: 1024px) { .amh-block--gallery .amh-gallery-cols-5, .amh-block--gallery .amh-gallery-cols-4 { grid-template-columns: repeat(3,1fr) !important; } }
@media (max-width: 768px)  { .amh-block--gallery .amh-gallery-cols-3, .amh-block--gallery .amh-gallery-cols-4, .amh-block--gallery .amh-gallery-cols-5 { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 480px)  { .amh-block--gallery .amh-gallery-cols-2, .amh-block--gallery .amh-gallery-cols-3, .amh-block--gallery .amh-gallery-cols-4, .amh-block--gallery .amh-gallery-cols-5 { grid-template-columns: 1fr !important; } }


/* ══════════════════════════════════════════════════════════════
   11. BLOCCO: TEAM
══════════════════════════════════════════════════════════════ */

.amh-block--team .amh-container { padding-top: clamp(40px,5vw,80px); padding-bottom: clamp(40px,5vw,80px); }
.amh-team-header   { text-align: center; margin-bottom: clamp(24px,3vw,48px); }
.amh-team-title    { font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; margin: 0 0 0.4em; color: inherit; }
.amh-team-subtitle { font-size: 1rem; opacity: 0.7; margin: 0; color: inherit; }
.amh-team-grid     { display: grid !important; gap: clamp(16px,2vw,28px); }
.amh-block--team .amh-team-cols-2 { grid-template-columns: repeat(2,1fr) !important; }
.amh-block--team .amh-team-cols-3 { grid-template-columns: repeat(3,1fr) !important; }
.amh-block--team .amh-team-cols-4 { grid-template-columns: repeat(4,1fr) !important; }
.amh-block--team .amh-team-cols-5 { grid-template-columns: repeat(5,1fr) !important; }
.amh-team-card { border-radius: 10px; overflow: hidden; text-align: center; }
.amh-team-style-card    .amh-team-card { box-shadow: 0 2px 16px rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.06); }
.amh-team-style-minimal .amh-team-card,
.amh-team-style-circle  .amh-team-card { background: transparent !important; }
.amh-team-photo-wrap { overflow: hidden; }
.amh-team-style-card    .amh-team-photo-wrap,
.amh-team-style-minimal .amh-team-photo-wrap { aspect-ratio: 1/1; }
.amh-team-style-circle  .amh-team-photo-wrap { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 16px; }
.amh-team-photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.amh-team-card:hover .amh-team-photo { transform: scale(1.05); }
.amh-team-style-circle .amh-team-photo { border-radius: 50%; }
.amh-team-info { padding: 16px; }
.amh-team-style-card .amh-team-info { padding: 20px; }
.amh-team-name   { font-size: 1rem; font-weight: 700; margin: 0 0 4px; color: inherit; }
.amh-team-role   { font-size: 0.85rem; opacity: 0.6; margin: 0 0 8px; color: inherit; }
.amh-team-social { font-size: 0.8rem; text-decoration: none; opacity: 0.5; color: inherit; transition: opacity .2s; }
.amh-team-social:hover { opacity: 1; }

@media (max-width: 1024px) { .amh-block--team .amh-team-cols-5 { grid-template-columns: repeat(3,1fr) !important; } }
@media (max-width: 768px)  { .amh-block--team .amh-team-cols-4, .amh-block--team .amh-team-cols-5 { grid-template-columns: repeat(2,1fr) !important; } .amh-block--team .amh-team-cols-3 { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 480px)  { .amh-block--team .amh-team-cols-2, .amh-block--team .amh-team-cols-3, .amh-block--team .amh-team-cols-4, .amh-block--team .amh-team-cols-5 { grid-template-columns: repeat(2,1fr) !important; } }


/* ══════════════════════════════════════════════════════════════
   12. BLOCCO: TESTIMONIAL
══════════════════════════════════════════════════════════════ */

.amh-block--testimonial .amh-container { padding-top: clamp(40px,5vw,80px); padding-bottom: clamp(40px,5vw,80px); }
.amh-tst-title { font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; text-align: center; margin: 0 0 clamp(24px,3vw,48px); color: inherit; }
.amh-tst-grid  { display: grid !important; gap: clamp(16px,2vw,32px); }
.amh-block--testimonial .amh-tst-cols-1 { grid-template-columns: 1fr !important; max-width: 640px; margin: 0 auto; }
.amh-block--testimonial .amh-tst-cols-2 { grid-template-columns: repeat(2,1fr) !important; }
.amh-block--testimonial .amh-tst-cols-3 { grid-template-columns: repeat(3,1fr) !important; }
.amh-block--testimonial .amh-tst-cols-4 { grid-template-columns: repeat(4,1fr) !important; }
.amh-tst-card { padding: clamp(20px,3vw,36px); border-radius: 10px; display: flex; flex-direction: column; gap: 16px; }
.amh-tst-style-card    .amh-tst-card { box-shadow: 0 2px 16px rgba(0,0,0,.06); border: 1px solid rgba(0,0,0,.06); }
.amh-tst-style-minimal .amh-tst-card { background: transparent !important; padding-left: 0; padding-right: 0; border-top: 2px solid rgba(0,0,0,.08); }
.amh-tst-style-quote   .amh-tst-card { border: 1px solid rgba(0,0,0,.08); position: relative; }
.amh-tst-quote-mark { font-size: 3rem; line-height: 1; opacity: 0.3; }
.amh-tst-text  { font-size: clamp(0.875rem,1.3vw,1rem); line-height: 1.75; opacity: 0.8; margin: 0; color: inherit; flex: 1; }
.amh-tst-stars { font-size: 1rem; letter-spacing: 2px; }
.amh-tst-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.amh-tst-photo  { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.amh-tst-name   { display: block; font-size: 0.9rem; font-weight: 700; color: inherit; }
.amh-tst-role   { display: block; font-size: 0.8rem; opacity: 0.55; color: inherit; }

@media (max-width: 768px) { .amh-block--testimonial .amh-tst-cols-3, .amh-block--testimonial .amh-tst-cols-4 { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 480px) { .amh-block--testimonial .amh-tst-cols-2, .amh-block--testimonial .amh-tst-cols-3, .amh-block--testimonial .amh-tst-cols-4 { grid-template-columns: 1fr !important; } }


/* ══════════════════════════════════════════════════════════════
   13. BLOCCO: FAQ
══════════════════════════════════════════════════════════════ */

.amh-block--faq .amh-container { padding-top: clamp(40px,5vw,80px); padding-bottom: clamp(40px,5vw,80px); }
.amh-faq-title { font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; margin: 0 0 clamp(24px,3vw,48px); color: inherit; }
.amh-faq       { max-width: 800px; }
.amh-faq-item  { border-bottom: 1px solid rgba(0,0,0,.1); }
.amh-faq--lines    .amh-faq-item:first-child { border-top: 1px solid rgba(0,0,0,.1); }
.amh-faq--bordered .amh-faq-item { border: 1px solid rgba(0,0,0,.1); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.amh-faq--filled   .amh-faq-item { background: rgba(0,0,0,.03); border-radius: 8px; margin-bottom: 8px; border: none; overflow: hidden; }
.amh-faq-q {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; background: none; border: none; cursor: pointer;
    color: inherit; font-size: clamp(0.95rem,1.5vw,1.05rem); font-weight: 600;
    text-align: left; gap: 16px; transition: color .2s;
}
.amh-faq--bordered .amh-faq-q,
.amh-faq--filled   .amh-faq-q { padding: 20px; }
.amh-faq-icon { width: 20px; height: 20px; flex-shrink: 0; transition: transform .3s ease; opacity: 0.5; }
.amh-faq-item.open .amh-faq-icon { transform: rotate(180deg); opacity: 1; }
.amh-faq-a { overflow: hidden; }
.amh-faq-a-inner { padding-bottom: 20px; font-size: clamp(0.875rem,1.3vw,1rem); line-height: 1.75; opacity: 0.75; color: inherit; }
.amh-faq--bordered .amh-faq-a-inner,
.amh-faq--filled   .amh-faq-a-inner { padding: 0 20px 20px; }


/* ══════════════════════════════════════════════════════════════
   14. BLOCCO: FORM
══════════════════════════════════════════════════════════════ */

.amh-block--form .amh-container { padding-top: clamp(40px,5vw,80px); padding-bottom: clamp(40px,5vw,80px); }
.amh-form-header   { margin-bottom: clamp(24px,3vw,48px); }
.amh-form-title    { font-size: clamp(1.5rem,3vw,2.5rem); font-weight: 700; margin: 0 0 0.4em; color: inherit; }
.amh-form-subtitle { font-size: clamp(0.95rem,1.5vw,1.1rem); opacity: 0.75; margin: 0; color: inherit; }


/* ══════════════════════════════════════════════════════════════
   15. BLOCCO: RICH TEXT
══════════════════════════════════════════════════════════════ */

.amh-block--rich-text .amh-rich-text { width: 100%; margin-left: auto; margin-right: auto; line-height: 1.75; }
.amh-rich-text h1,.amh-rich-text h2,.amh-rich-text h3,.amh-rich-text h4,.amh-rich-text h5,.amh-rich-text h6 { margin-top: 1.4em; margin-bottom: 0.5em; line-height: 1.2; font-weight: 700; }
.amh-rich-text h1 { font-size: clamp(1.8rem,4vw,2.8rem); }
.amh-rich-text h2 { font-size: clamp(1.5rem,3vw,2.2rem); }
.amh-rich-text h3 { font-size: clamp(1.2rem,2.5vw,1.7rem); }
.amh-rich-text h4 { font-size: clamp(1.1rem,2vw,1.4rem); }
.amh-rich-text p  { margin-bottom: 1.2em; }
.amh-rich-text a  { color: inherit; text-decoration: underline; text-underline-offset: 3px; opacity: 0.8; transition: opacity .2s; }
.amh-rich-text a:hover { opacity: 1; }
.amh-rich-text ul,.amh-rich-text ol { margin: 0 0 1.2em 1.5em; padding: 0; }
.amh-rich-text li { margin-bottom: 0.4em; }
.amh-rich-text blockquote { border-left: 4px solid currentColor; margin: 1.5em 0; padding: 0.8em 1.2em; opacity: 0.8; font-style: italic; }
.amh-rich-text table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; font-size: 0.95em; }
.amh-rich-text th,.amh-rich-text td { border: 1px solid rgba(0,0,0,0.12); padding: 10px 14px; text-align: left; }
.amh-rich-text th { font-weight: 700; background: rgba(0,0,0,0.04); }
.amh-rich-text code { font-family: monospace; font-size: 0.88em; background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px; }
.amh-rich-text pre { background: rgba(0,0,0,0.06); border-radius: 8px; padding: 16px 20px; overflow-x: auto; margin-bottom: 1.5em; }
.amh-rich-text pre code { background: none; padding: 0; }
.amh-rich-text img { max-width: 100%; height: auto; border-radius: 6px; margin: 1em 0; }
.amh-rich-text hr  { border: none; border-top: 1px solid rgba(0,0,0,0.12); margin: 2em 0; }


/* ══════════════════════════════════════════════════════════════
   16. BLOCCO: IMAGE FX
══════════════════════════════════════════════════════════════ */

.amh-block--image-fx .amh-container { padding-top: clamp(24px,4vw,64px); padding-bottom: clamp(24px,4vw,64px); }
.amh-ifx-wrap  { width: 100%; position: relative; }
.amh-ifx-hint  { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 11px; color: #444; pointer-events: none; }
.amh-ifx-empty { padding: 40px; text-align: center; background: #111; color: #555; font-size: 13px; border-radius: 8px; }


/* ══════════════════════════════════════════════════════════════
   17. BLOCCO: SPACER
══════════════════════════════════════════════════════════════ */

.amh-spacer { position: relative; width: 100%; }


/* ══════════════════════════════════════════════════════════════
   18. NAV — FX MENU (fluid.glass)
   Tutti gli stili sono già scoped con #id nel PHP inline.
   Qui solo le classi condivise tra tutti i menu.
══════════════════════════════════════════════════════════════ */

.amh-header-canvas { position: relative; z-index: 200; }

/* Walker nav — classi generate da AMH_Walker */
.amh-nav-link    { text-decoration: none; color: inherit; }
.amh-nav-item    { list-style: none; }
.amh-fxm-nav-list { list-style: none; margin: 0; padding: 0; }


/* ══════════════════════════════════════════════════════════════
   19. RESPONSIVE GLOBALE
══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .amh-posts-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%,280px),1fr)); }
}
@media (max-width: 768px) {
    .amh-cols { flex-direction: column; }
    .amh-col  { flex: 0 0 100%; }
    .amh-posts-grid { grid-template-columns: 1fr; }
    .amh-content { padding-top: clamp(24px,6vw,48px); padding-bottom: clamp(24px,6vw,48px); }
    .amh-header-inner { flex-wrap: wrap; gap: 12px; }
}


/* ══════════════════════════════════════════════════════════════
   20. SISTEMA HEADER FIXED — padding-top body automatico
══════════════════════════════════════════════════════════════ */

/* Header con colore: il contenuto parte sotto l'header */
body.amh-has-fixed-header:not(.amh-header-transparent) {
    padding-top: var(--amh-header-h, 0px);
}

/* Header trasparente: il contenuto va a filo (es. slider hero) */
body.amh-header-transparent {
    padding-top: 0 !important;
}

/* Classi strutturali base → vedi amh-base.css */

/* ── Gallery — griglia a N colonne (var, non più span-su-12) ──────────────
   Prima ogni tile occupava "span N" su una base fissa a 12 colonne: con N=5
   non tornava un numero intero di tile per riga (12÷5=2,4) e il layout si
   rompeva. Ora la griglia usa direttamente N come numero di colonne reali,
   stesso approccio già in uso in Gallery Lazy e Content Grid — funziona con
   qualunque valore da 1 a 12. */
.amh-gallery-grid { grid-template-columns: repeat(var(--amh-gal-cols-d, 4), 1fr) !important; }

@media (max-width: 1024px) {
  .amh-gallery-grid { grid-template-columns: repeat(var(--amh-gal-cols-t, 2), 1fr) !important; }
}

@media (max-width: 768px) {
  .amh-gallery-grid { grid-template-columns: repeat(var(--amh-gal-cols-m, 1), 1fr) !important; }
}

/* ── Gallery — testi visibili solo su hover ─────────────────────────────── */
.amh-gallery-text-hover .amh-gallery-texts {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.amh-gallery-text-hover .amh-gallery-card:hover .amh-gallery-texts {
  opacity: 1;
  transform: translateY(0);
}
.amh-gallery-text-hover .amh-gallery-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.amh-gallery-text-hover .amh-gallery-card:hover .amh-gallery-overlay {
  opacity: 1 !important;
}

/* ══════════════════════════════════════════════════════════════
   BLOCCO: VIDEO
══════════════════════════════════════════════════════════════ */

/* ── Player wrapper ── */
.amh-video-player {
    position: relative;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}
.amh-video-embed--iframe,
.amh-video-embed--local {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    border: 0;
    object-fit: cover;
    z-index: 2;
}

/* ── Poster ── */
.amh-video-poster {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform .5s ease, filter .4s ease;
}
.amh-video-overlay {
    position: absolute;
    inset: 0;
    transition: opacity .3s ease;
}

/* ── Poster FX ── */
.amh-video-poster-fx--zoom:hover .amh-video-poster { transform: scale(1.05); }
.amh-video-poster-fx--grayscale .amh-video-poster  { filter: grayscale(1); }
.amh-video-poster-fx--grayscale:hover .amh-video-poster { filter: grayscale(0); }
.amh-video-poster-fx--brightness .amh-video-poster { filter: brightness(.6); }
.amh-video-poster-fx--brightness:hover .amh-video-poster { filter: brightness(1); }
.amh-video-poster-fx--blur .amh-video-poster       { filter: blur(6px); }
.amh-video-poster-fx--blur:hover .amh-video-poster { filter: blur(0); }

/* ── Play button ── */
.amh-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    transition: transform .2s ease, opacity .2s ease;
}
.amh-video-play:hover { transform: translate(-50%, -50%) scale(1.08); }

.amh-video-play svg {
    width: var(--amh-play-size, 72px);
    height: var(--amh-play-size, 72px);
}

/* Circle */
.amh-video-play--circle svg,
.amh-video-play--pulse svg {
    background: var(--amh-play-bg, #fff);
    opacity: var(--amh-play-opacity, .9);
    border-radius: 50%;
    padding: 22%;
}

/* Rounded */
.amh-video-play--rounded svg {
    background: var(--amh-play-bg, #fff);
    opacity: var(--amh-play-opacity, .9);
    border-radius: 16px;
    padding: 20%;
}

/* Flat */
.amh-video-play--flat svg {
    background: var(--amh-play-bg, #fff);
    opacity: var(--amh-play-opacity, .9);
    border-radius: 4px;
    padding: 18%;
}

/* Outline */
.amh-video-play--outline svg {
    border: 3px solid var(--amh-play-bg, #fff);
    border-radius: 50%;
    padding: 20%;
    opacity: var(--amh-play-opacity, .9);
}

/* Pulse */
@keyframes amh-play-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
    70%  { box-shadow: 0 0 0 20px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.amh-play-pulse svg {
    animation: amh-play-pulse 2s infinite;
    border-radius: 50%;
}

/* Badge label */
.amh-play-label {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    white-space: nowrap;
}

/* ── Layout video+testo ── */
.amh-video-with-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding-top: clamp(40px,6vw,96px);
    padding-bottom: clamp(40px,6vw,96px);
}
.amh-video-with-text--right { flex-direction: row; }
.amh-video-with-text--left  { flex-direction: row; }
.amh-video-with-text--left .amh-video-col { order: 1; }
.amh-video-with-text--left .amh-video-text { order: -1; }
.amh-video-col  { flex: 1 1 300px; min-width: 0; }
.amh-video-text { flex: 1 1 280px; min-width: 0; }

/* ── Testo ── */
.amh-video-title {
    font-size: clamp(1.5rem,3vw,2.8rem);
    line-height: 1.15;
    margin: 0 0 0.6em;
    font-weight: 700;
    color: inherit;
}
.amh-video-body {
    font-size: clamp(0.95rem,1.5vw,1.1rem);
    line-height: 1.75;
    opacity: 0.85;
    color: inherit;
    margin-bottom: 1.5em;
}
.amh-video-body p { margin: 0 0 1em; }
.amh-video-body p:last-child { margin-bottom: 0; }
.amh-video-cta {
    display: inline-block;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 4px;
    padding: .65em 1.8em;
    transition: opacity .2s;
    position: relative;
    overflow: hidden;
}
.amh-video-cta:hover { opacity: .82; }

/* ── Layout solo video / lightbox ── */
.amh-video-single,
.amh-video-lightbox-wrap {
    padding-top: clamp(40px,6vw,96px);
    padding-bottom: clamp(40px,6vw,96px);
}

/* ── Lightbox ── */
#amh-video-lightbox {
    cursor: pointer;
}
#amh-video-lightbox .amh-lb-inner {
    cursor: default;
}
.amh-lb-close {
    font-size: 32px;
    line-height: 1;
    opacity: .8;
    transition: opacity .2s;
}
.amh-lb-close:hover { opacity: 1; }

/* ── Mobile ── */
@media (max-width: 768px) {
    .amh-video-with-text {
        flex-direction: column !important;
        gap: 32px !important;
    }
    .amh-video-col,
    .amh-video-text { flex: none; width: 100%; }
}

/* ── Video griglia multi ── */
.amh-video-grid {
    display: grid;
    grid-template-columns: repeat(var(--amhvg-cols, 3), 1fr);
    align-items: start;
    padding-top: clamp(32px,5vw,80px);
    padding-bottom: clamp(32px,5vw,80px);
}
.amh-video-grid-item { min-width: 0; }
.amh-video-grid-text { padding-top: 12px; }
.amh-video-grid-text .amh-video-title {
    font-size: clamp(1rem,1.8vw,1.4rem);
    margin: 0 0 0.4em;
    font-weight: 700;
}
.amh-video-grid-text .amh-video-body {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 0.8em;
}


/* ===== AMH Gallery Lazy ===== */
/* AMH Gallery Lazy */
.amh-gll-wrap { width: 100%; }

.amh-gll-head { margin: 0 0 18px; }
.amh-gll-title { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.amh-gll-descr { margin: 0 0 10px; opacity: .85; }
.amh-gll-headlink {
  display: inline-block; text-decoration: none; font-weight: 600;
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}

.amh-gll-grid {
  display: grid;
  grid-template-columns: repeat(var(--amh-gll-cols-d, 4), 1fr);
  gap: var(--amh-gll-gap, 12px);
}

.amh-gll-tile {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--amh-gll-radius, 8px);
  background: #f0f2f4;
}
.amh-gll-link { display: block; width: 100%; height: 100%; }

.amh-gll-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: var(--amh-gll-ratio, 1 / 1);
  transition: transform .4s ease;
}
.amh-gll-tile:hover .amh-gll-img { transform: scale(1.04); }

.amh-gll-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 10px; font-size: 13px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  opacity: 0; transition: opacity .3s ease;
}
.amh-gll-tile:hover .amh-gll-cap { opacity: 1; }

.amh-gll-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 18px auto 0;
  padding: 11px 22px;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: filter .2s ease, transform .1s ease;
}
.amh-gll-toggle:hover { filter: brightness(1.08); }
.amh-gll-toggle:active { transform: translateY(1px); }
.amh-gll-toggle-count { opacity: .8; font-weight: 400; }

/* il pulsante è centrato sotto la griglia */
.amh-gll-wrap > .amh-gll-toggle,
.amh-gll-extra-slot + .amh-gll-toggle { display: flex; }
.amh-gll-wrap { text-align: initial; }
.amh-gll-toggle { margin-left: auto; margin-right: auto; }

@media (max-width: 1024px) {
  .amh-gll-grid { grid-template-columns: repeat(var(--amh-gll-cols-t, 3), 1fr); }
}
@media (max-width: 768px) {
  .amh-gll-grid { grid-template-columns: repeat(var(--amh-gll-cols-m, 2), 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   18. BLOCCO: BENTO GRID
   Griglia asimmetrica 12 colonne, riquadri con colonne/righe libere.
   Riusa .amh-cg-header/.amh-cg-title/.amh-cg-subtitle per l'intestazione.
══════════════════════════════════════════════════════════════ */

.amh-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: var(--amh-bento-row-h, 80px);
    gap: var(--amh-bento-gap, 16px);
}

.amh-bento-item {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Riquadro immagine */
.amh-bento-item--image {
    background-color: rgba(0,0,0,0.04);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Velo overlay (colore + opacità, transizione su hover) ──────────────────
   Elemento reale (non pseudo-elemento) così non entra in conflitto con gli
   effetti ::before/::after (duotone/shine) qui sotto. */
.amh-bento-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--amh-bento-ov, transparent);
    transition: background .35s ease;
    pointer-events: none;
}
.amh-bento-item--image:hover .amh-bento-overlay {
    background: var(--amh-bento-ov-hover, var(--amh-bento-ov, transparent));
}

.amh-bento-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px clamp(14px,2vw,22px);
    background: linear-gradient(to top, rgba(0,0,0,.68), rgba(0,0,0,0) 70%);
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.8rem,1.1vw,1rem);
    line-height: 1.3;
    letter-spacing: 0.02em;
    z-index: 2;
}

/* ── Effetti estetici per singola immagine (scelta per riquadro) ────────────
   Ogni effetto è opt-in tramite la classe amh-bento-fx-*; non si sommano
   automaticamente, così restano puliti e prevedibili singolarmente. */

/* Zoom leggero — anima background-size, non il box (niente strappi ai bordi
   della griglia come farebbe uno scale() sull'intero riquadro) */
.amh-bento-fx-zoom {
    background-size: 108% !important;
    transition: background-size .6s ease;
}
.amh-bento-fx-zoom:hover { background-size: 124% !important; }

/* Da bianco/nero a colore */
.amh-bento-fx-grayscale {
    filter: grayscale(100%);
    transition: filter .5s ease;
}
.amh-bento-fx-grayscale:hover { filter: grayscale(0%); }

/* Da sfocato a nitido */
.amh-bento-fx-blur-focus {
    filter: blur(6px);
    transform: scale(1.06); /* nasconde i bordi sfocati che uscirebbero dal riquadro */
    transition: filter .5s ease, transform .5s ease;
}
.amh-bento-fx-blur-focus:hover {
    filter: blur(0px);
    transform: scale(1);
}

/* Riflesso di luce — una striscia diagonale che attraversa l'immagine all'hover */
.amh-bento-fx-shine { position: relative; }
.amh-bento-fx-shine::after {
    content: '';
    position: absolute;
    inset: -20% -60%;
    z-index: 1;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%);
    transform: translateX(-60%);
    transition: transform .8s ease;
    pointer-events: none;
}
.amh-bento-fx-shine:hover::after { transform: translateX(60%); }

/* Duotone — velo colorato con mix-blend-mode, sparisce su hover.
   Usa lo stesso colore impostato per il velo overlay (--amh-bento-duotone). */
.amh-bento-fx-duotone::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--amh-bento-duotone, #1e3a5f);
    mix-blend-mode: color;
    opacity: .85;
    transition: opacity .4s ease;
    pointer-events: none;
}
.amh-bento-fx-duotone:hover::before { opacity: 0; }

/* Riquadro card (testo/icone) */
.amh-bento-item--card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: clamp(18px,2.4vw,28px);
}
.amh-bento-icon { font-size: 1.6rem; line-height: 1; }
.amh-bento-card-title {
    font-size: clamp(0.95rem,1.3vw,1.15rem);
    font-weight: 700;
    margin: 0;
    color: inherit;
}
.amh-bento-card-text {
    font-size: clamp(0.8rem,1vw,0.9rem);
    line-height: 1.6;
    opacity: 0.9;
    margin: 0;
    color: inherit;
}

/* Badge lettera (A, B, C...) */
.amh-bento-badge {
    position: absolute;
    top: 12px; left: 12px;
    width: 26px; height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ── Responsive: sotto 768px i riquadri diventano a colonna singola,
   niente più span di colonne/righe (troppo fragile su schermi stretti) ── */
@media (max-width: 768px) {
    .amh-bento-grid {
        display: flex;
        flex-direction: column;
        grid-auto-rows: unset;
    }
    .amh-bento-item {
        grid-column: unset !important;
        grid-row: unset !important;
        min-height: 200px;
    }
    .amh-bento-item--card { min-height: auto; padding: 22px; }
}

/* ══════════════════════════════════════════════════════════════
   19. BLOCCO: CATEGORY HERO — due modalità: affiancato / fascia+descrizione
══════════════════════════════════════════════════════════════ */

/* Contenitore comune */
.amh-ch { width: 100%; }

/* ── Fascia immagine (comune alle due modalità) ── */
.amh-ch-media {
    position: relative;
    display: flex;
    overflow: hidden;
    background-color: rgba(0,0,0,.05);
    background-repeat: no-repeat;
}
.amh-ch-overlay { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Box titolo + breadcrumb sovrapposti sull'immagine */
.amh-ch-titlebox {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    padding: clamp(24px, 4vw, 64px);
}
.amh-ch-titleinner { max-width: 720px; }
.amh-ch-title {
    margin: 0;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.amh-ch-breadcrumb {
    margin-top: clamp(10px, 1.4vw, 18px);
    font-size: 0.85rem;
    opacity: 0.92;
}
.amh-ch-breadcrumb .amh-bc { color: inherit; }
.amh-ch-breadcrumb a { color: inherit; text-decoration: none; opacity: 0.78; transition: opacity .2s ease; }
.amh-ch-breadcrumb a:hover { opacity: 1; }
.amh-ch-breadcrumb .amh-bc-sep { margin: 0 5px; opacity: 0.5; }

/* Descrizione (comune) */
.amh-ch-desc { font-size: clamp(0.95rem, 1.3vw, 1.15rem); line-height: 1.75; }
.amh-ch-desc p { margin: 0 0 1em; }
.amh-ch-desc p:last-child { margin-bottom: 0; }
.amh-ch-desc a { color: inherit; text-decoration: underline; }
.amh-ch-desc ul, .amh-ch-desc ol { margin: 0 0 1em; padding-left: 1.4em; }

/* ── MODALITÀ A: AFFIANCATO ── */
.amh-ch--side { display: flex; flex-direction: var(--amh-ch-dir, row); align-items: stretch; overflow: hidden; }
.amh-ch--side .amh-ch-media { flex-shrink: 0; align-items: center; }
.amh-ch-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.amh-ch-side-inner { padding: clamp(28px, 4vw, 64px); width: 100%; }

/* ── MODALITÀ B: FASCIA + DESCRIZIONE SOTTO ── */
.amh-ch--banner .amh-ch-media--full { width: 100%; }
.amh-ch-media-container { position: relative; z-index: 1; width: 100%; }
/* in banner il titlebox non ha il suo padding esterno: lo dà il container */
.amh-ch--banner .amh-ch-titlebox { padding-left: 0; padding-right: 0; }
.amh-ch-descband { padding: clamp(32px, 5vw, 72px) 0; }
.amh-ch-descband .amh-ch-desc { max-width: var(--amh-ch-desc-maxw, 900px); }
.amh-ch-descband[style*="center"] .amh-ch-desc { margin-left: auto; margin-right: auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .amh-ch--side { flex-direction: column !important; }
    .amh-ch--side .amh-ch-media { flex-basis: auto !important; min-height: 300px !important; }
    .amh-ch-side { flex-basis: auto !important; }
    .amh-ch-title { font-size: clamp(1.8rem, 8vw, 2.6rem) !important; }
}
/* ══════════════════════════════════════════════════════════════
   20. BLOCCO: PRODUCT GRID — Preset eleganti + hover raffinati
══════════════════════════════════════════════════════════════ */

.amh-pg { width: 100%; }

.amh-pg-grid {
    display: grid;
    grid-template-columns: repeat(var(--amh-pg-cols, 3), 1fr);
    gap: var(--amh-pg-gap, 24px);
}

/* ── Card base ─────────────────────────────────────────────── */
.amh-pg-card {
    position: relative;
    border-radius: var(--amh-pg-radius, 8px);
    background: transparent;
    transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .55s cubic-bezier(.22,1,.36,1);
}
.amh-pg-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Media */
.amh-pg-card-media {
    position: relative;
    aspect-ratio: var(--amh-pg-aspect, 3 / 4);
    overflow: hidden;
    border-radius: var(--amh-pg-radius, 8px);
    background: rgba(0,0,0,.04);
}
.amh-pg-card-img {
    width: 100%;
    height: 100%;
    object-fit: var(--amh-pg-fit, cover);
    display: block;
    transition: transform 1.1s cubic-bezier(.22,1,.36,1), filter .6s ease;
}

/* Body */
.amh-pg-card-body {
    padding: 18px 4px 0;
    position: relative;
}
.amh-pg-card-body--above { padding: 0 4px 16px; }
.amh-pg-card-title {
    font-size: clamp(0.95rem, 1.15vw, 1.15rem);
    font-weight: 600;
    margin: 0;
    color: var(--amh-pg-text, #1a1a1a);
    line-height: 1.35;
    letter-spacing: 0.015em;
    transition: color .4s ease, transform .55s cubic-bezier(.22,1,.36,1);
}
.amh-pg-card-excerpt {
    font-size: 0.85rem; line-height: 1.6; opacity: .7; margin-top: 8px;
}
.amh-pg-card-price {
    margin-top: 10px; font-weight: 700; color: var(--amh-pg-accent, #1e3a5f);
}

/* Linea accento sotto il titolo (disegnata su hover) */
.amh-pg-card-underline {
    display: block;
    height: 1.5px;
    width: 0;
    margin-top: 12px;
    background: var(--amh-pg-accent, #1e3a5f);
    transition: width .5s cubic-bezier(.22,1,.36,1);
}

/* Cornice sottile (appare su hover) */
.amh-pg-card-frame {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255,255,255,.85);
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1);
    pointer-events: none;
    z-index: 2;
}

/* Overlay titolo su immagine */
.amh-pg-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0) 60%);
    z-index: 1;
}
.amh-pg-card-overlay .amh-pg-card-title { color: #fff; }
.amh-pg-card-overlay--reveal-only { background: none; justify-content: flex-end; }

/* Rivelazione dettagli (nascosta, emerge su hover) */
.amh-pg-card-reveal {
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.5;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height .5s ease, opacity .5s ease, margin-top .5s ease;
}

/* Titolo verticale a lato */
.amh-pg-title-side .amh-pg-card-link {
    display: flex;
    align-items: stretch;
    gap: 14px;
}
.amh-pg-title-side .amh-pg-card-media { flex: 1; }
.amh-pg-card-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 4px 0;
}
.amh-pg-card-title--vertical {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-orientation: mixed;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Tag etichette */
.amh-pg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.amh-pg-card-overlay .amh-pg-tags { margin-bottom: 8px; }
.amh-pg-tag {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; line-height: 1; padding: 5px 9px;
}
.amh-pg-tags--pill .amh-pg-tag { background: var(--amh-pg-tag-bg,#1e3a5f); color: var(--amh-pg-tag-color,#fff); border-radius: 999px; }
.amh-pg-tags--flat .amh-pg-tag { background: var(--amh-pg-tag-bg,#1e3a5f); color: var(--amh-pg-tag-color,#fff); border-radius: 3px; }
.amh-pg-tags--outline .amh-pg-tag { background: transparent; color: var(--amh-pg-tag-bg,#1e3a5f); border: 1px solid var(--amh-pg-tag-bg,#1e3a5f); border-radius: 3px; }
.amh-pg-card-overlay .amh-pg-tags--outline .amh-pg-tag { color: #fff; border-color: rgba(255,255,255,.6); }

/* ══════════════════════════════════════════════════════════════
   EFFETTI HOVER (applicati via .amh-pg-hover-* sul contenitore grid)
══════════════════════════════════════════════════════════════ */

/* lift-line: card si solleva + linea accento si disegna */
.amh-pg-hover-lift-line .amh-pg-card:hover {
    transform: translateY(-8px);
}
.amh-pg-hover-lift-line .amh-pg-card:hover .amh-pg-card-underline { width: 48px; }
.amh-pg-hover-lift-line .amh-pg-card:hover .amh-pg-card-title { color: var(--amh-pg-accent, #1e3a5f); }

/* zoom-slide: immagine zoom lento + titolo overlay scivola su */
.amh-pg-hover-zoom-slide .amh-pg-card:hover .amh-pg-card-img { transform: scale(1.08); }
.amh-pg-hover-zoom-slide .amh-pg-card-overlay .amh-pg-card-title,
.amh-pg-hover-zoom-slide .amh-pg-card-overlay .amh-pg-tags {
    transform: translateY(8px);
    transition: transform .55s cubic-bezier(.22,1,.36,1);
}
.amh-pg-hover-zoom-slide .amh-pg-card:hover .amh-pg-card-overlay .amh-pg-card-title,
.amh-pg-hover-zoom-slide .amh-pg-card:hover .amh-pg-card-overlay .amh-pg-tags {
    transform: translateY(0);
}

/* frame: cornice sottile appare */
.amh-pg-hover-frame .amh-pg-card:hover .amh-pg-card-frame {
    opacity: 1;
    transform: scale(1);
}
.amh-pg-hover-frame .amh-pg-card:hover .amh-pg-card-img { transform: scale(1.04); }

/* reveal: dettagli emergono sull'immagine */
.amh-pg-hover-reveal .amh-pg-card:hover .amh-pg-card-reveal {
    max-height: 120px;
    opacity: 1;
    margin-top: 8px;
}
.amh-pg-hover-reveal .amh-pg-card:hover .amh-pg-card-img { transform: scale(1.05); filter: brightness(.92); }

/* ══════════════════════════════════════════════════════════════
   PRESET COORDINATI (impostano tipografia/spazio; l'hover resta scelto a parte)
══════════════════════════════════════════════════════════════ */

/* Editorial — arioso, titolo raffinato */
.amh-pg-preset-editorial .amh-pg-card-title { font-weight: 400; letter-spacing: 0.04em; }
.amh-pg-preset-editorial .amh-pg-card-body { padding-top: 22px; }
.amh-pg-preset-editorial .amh-pg-card-media { border-radius: 2px; }

/* Gallery — foto protagonista, testo bianco su overlay */
.amh-pg-preset-gallery .amh-pg-card-title { font-weight: 600; letter-spacing: 0.02em; }
.amh-pg-preset-gallery .amh-pg-card-media { border-radius: var(--amh-pg-radius, 8px); }

/* Minimal — pulito, maiuscoletto centrato */
.amh-pg-preset-minimal .amh-pg-card-body { text-align: center; }
.amh-pg-preset-minimal .amh-pg-card-title {
    text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; font-weight: 700;
}
.amh-pg-preset-minimal .amh-pg-card-underline { margin-left: auto; margin-right: auto; }
.amh-pg-preset-minimal .amh-pg-tags { justify-content: center; }

/* Frame — strutturato, elegante */
.amh-pg-preset-frame .amh-pg-card-title { font-weight: 600; letter-spacing: 0.03em; }
.amh-pg-preset-frame .amh-pg-card-body { padding-top: 16px; }

/* ── Paginazione (invariata, con easing coerente) ── */
.amh-pg-pagination { display: flex; justify-content: center; margin-top: clamp(28px,3vw,48px); }
.amh-pg-loadmore {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 34px;
    background: transparent;
    color: var(--amh-pg-accent, #1e3a5f);
    border: 1px solid var(--amh-pg-accent, #1e3a5f);
    border-radius: 2px;
    font-weight: 600; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer;
    transition: background .35s ease, color .35s ease;
}
.amh-pg-loadmore:hover { background: var(--amh-pg-accent, #1e3a5f); color: #fff; }
.amh-pg-loadmore:disabled { cursor: default; opacity: .6; }
.amh-pg-spinner {
    width: 15px; height: 15px;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: amh-pg-spin .7s linear infinite;
}
@keyframes amh-pg-spin { to { transform: rotate(360deg); } }

.amh-pg-pages { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.amh-pg-page-btn {
    min-width: 40px; height: 40px; padding: 0 10px;
    background: transparent; border: 1px solid rgba(0,0,0,.12); border-radius: 2px;
    font-weight: 600; cursor: pointer; transition: all .25s ease; color: var(--amh-pg-text,#1a1a1a);
}
.amh-pg-page-btn:hover { border-color: var(--amh-pg-accent,#1e3a5f); }
.amh-pg-page-btn.is-active { background: var(--amh-pg-accent,#1e3a5f); border-color: var(--amh-pg-accent,#1e3a5f); color: #fff; }
.amh-pg-pages.is-loading { opacity: .5; pointer-events: none; }

.amh-pg-empty { text-align: center; padding: clamp(40px,6vw,80px); font-size: 1.05rem; opacity: .7; }

/* Sezioni per tag */
.amh-pg-section { margin-bottom: clamp(48px, 5vw, 80px); }
.amh-pg-section:last-child { margin-bottom: 0; }
.amh-pg-section-title {
    font-size: clamp(1.2rem, 2vw, 1.8rem); font-weight: 400;
    letter-spacing: 0.06em; text-transform: uppercase;
    margin: 0 0 clamp(20px, 2.5vw, 32px); padding-bottom: 14px;
    border-bottom: 1px solid var(--amh-pg-accent, #1e3a5f);
    color: var(--amh-pg-accent, #1e3a5f); display: inline-block;
}
/* Quando segue una descrizione, il titolo si stacca meno dal testo introduttivo */
.amh-pg-section-title:has(+ .amh-pg-section-desc) { margin-bottom: 14px; }
.amh-pg-section-desc {
    max-width: 720px;
    margin: 0 0 clamp(22px, 2.8vw, 36px);
    font-size: clamp(0.92rem, 1.2vw, 1.05rem);
    line-height: 1.7;
    opacity: 0.85;
}
.amh-pg-section-desc p { margin: 0 0 0.8em; }
.amh-pg-section-desc p:last-child { margin-bottom: 0; }
.amh-pg-section-desc a { color: var(--amh-pg-accent, #1e3a5f); text-decoration: underline; }
.amh-pg-section .amh-pg-pagination { margin-top: clamp(20px,2.5vw,32px); }

/* Responsive */
@media (max-width: 1024px) {
    .amh-pg-grid { grid-template-columns: repeat(min(var(--amh-pg-cols,3), 3), 1fr); }
}
@media (max-width: 768px) {
    .amh-pg-grid { grid-template-columns: repeat(2, 1fr); }
    .amh-pg-title-side .amh-pg-card-link { gap: 10px; }
}
@media (max-width: 480px) {
    .amh-pg-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   IMPERA WOO — Product Editorial (canvas-fw)
   Da APPENDERE ad amh-blocks.css (mai in style.css per-blocco: sono inerti).
   Palette glass/steel coerente con futureglassblock.
   ========================================================================== */

.imw-product,
.imw-product *{box-sizing:border-box;}
.imw-product{
    --imw-ink:#1a2733;
    --imw-ink-soft:#5a6b78;
    --imw-line:rgba(26,39,51,.14);
    --imw-line-soft:rgba(26,39,51,.08);
    --imw-steel:#3d5a73;
    --imw-steel-deep:#2b4257;
    --imw-glass:#8fa9bd;
    --imw-bg:#eef2f5;
    --imw-dark:#1e2c38;
    --imw-dark-2:#26374a;
    --imw-cta:#3a566d;
    --imw-cta-hover:#2b4257;
    color:var(--imw-ink);
    background:var(--imw-bg);
}

/* ---------- HERO ---------- */
.imw-hero{
    display:grid;
    grid-template-columns:var(--imw-txt-col,44%) var(--imw-img-col,56%);
    height:var(--imw-hero-h,90vh);
    min-height:var(--imw-hero-h-min,0);
    position:relative;
}
.imw-hero::before{
    content:"";position:absolute;left:0;top:0;width:var(--imw-txt-col,44%);height:100%;
    background:
        linear-gradient(var(--imw-line-soft) 1px,transparent 1px) 0 0/100% 60px,
        radial-gradient(circle at 12% 20%,rgba(143,169,189,.12),transparent 55%);
    pointer-events:none;
}
.imw-info{
    padding:clamp(32px,4vw,56px) clamp(28px,3.5vw,48px) clamp(32px,4vw,56px) clamp(28px,6vw,96px);
    /* compensazione header trasparente: 0 se off */
    padding-top:calc(clamp(32px,4vw,56px) + var(--imw-comp-txt,0px));
    display:flex;flex-direction:column;position:relative;z-index:2;
    /* Se la fascia ha altezza fissa e il testo è lungo, scrolla dentro la
       colonna invece di sforare. Su altezza auto non ha effetto. */
    overflow-y:auto;
}
.imw-eyebrow{
    font-size:11px;letter-spacing:.22em;text-transform:uppercase;
    color:var(--imw-steel);font-weight:600;margin-bottom:22px;
}
/* ---------- BREADCRUMB ---------- */
.imw-breadcrumb{
    font-size:12px;color:var(--imw-ink-soft);margin-bottom:18px;
    letter-spacing:.02em;line-height:1.5;
}
.imw-breadcrumb a{
    color:var(--imw-steel);text-decoration:none;
    border-bottom:1px solid transparent;transition:border-color .2s;
}
.imw-breadcrumb a:hover{border-color:var(--imw-steel);}
.imw-breadcrumb .imw-bc-sep{color:var(--imw-glass);margin:0 2px;}
.imw-title{
    font-size:clamp(28px,3.4vw,42px);line-height:1.12;font-weight:600;
    letter-spacing:-.01em;color:var(--imw-ink);margin:0 0 20px;max-width:14ch;
}
.imw-price{
    font-size:22px;font-weight:500;color:var(--imw-steel-deep);margin-bottom:26px;
}
.imw-desc{
    font-size:14.5px;color:var(--imw-ink-soft);max-width:46ch;margin-bottom:24px;line-height:1.6;
}
.imw-specs{
    font-size:12.5px;color:var(--imw-ink-soft);
    padding:16px 0;border-top:1px solid var(--imw-line);
    border-bottom:1px solid var(--imw-line);max-width:46ch;margin-bottom:22px;
}
.imw-spec-row{display:flex;gap:10px;padding:3px 0;}
.imw-spec-label{font-weight:600;color:var(--imw-ink);min-width:130px;flex-shrink:0;}
.imw-spec-value{color:var(--imw-ink-soft);}
.imw-tech-link{
    display:inline-flex;align-items:center;gap:7px;
    font-size:13px;color:var(--imw-steel);margin-bottom:30px;
    border-bottom:1px solid transparent;transition:border-color .2s;width:max-content;
    text-decoration:none;
}
.imw-tech-link:hover{border-color:var(--imw-steel);}
.imw-tech-link svg{width:12px;height:12px;}

.imw-cta-row{display:flex;align-items:center;gap:22px;flex-wrap:wrap;margin-top:auto;}
.imw-cta,
.imw-product .single_add_to_cart_button{
    display:inline-block;background:var(--imw-cta);color:#fff!important;
    font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;
    padding:16px 32px;border:none;border-radius:2px;cursor:pointer;text-decoration:none;
    transition:background .25s,transform .15s;
}
.imw-cta:hover,
.imw-product .single_add_to_cart_button:hover{background:var(--imw-cta-hover)!important;}
.imw-cta:active{transform:translateY(1px);}

.imw-thumbs{display:flex;gap:9px;}
.imw-thumb{
    width:44px;height:44px;border:1px solid var(--imw-line);border-radius:2px;
    background:#dfe7ed;cursor:pointer;padding:0;overflow:hidden;
    transition:border-color .2s,transform .2s;
}
.imw-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.imw-thumb:hover,.imw-thumb.is-active{border-color:var(--imw-steel);transform:translateY(-2px);}

/* ---------- VISUAL (full-bleed) ---------- */
.imw-visual{
    position:relative;overflow:hidden;
    background:var(--imw-hero-bg,linear-gradient(120deg,#7c93a6,#9fb4c4 45%,#c3d1db));
    display:flex;align-items:center;justify-content:center;
    /* compensazione header sull'immagine: 0 se off (immagine edge-to-edge) */
    padding-top:var(--imw-comp-img,0px);
}
.imw-visual .imw-main-img,
.imw-visual img{
    width:var(--imw-img-w,100%);
    height:var(--imw-img-h,100%);
    object-fit:var(--imw-img-fit,cover);
    object-position:var(--imw-img-pos,50% 50%);
    display:block;
}
.imw-visual::before{
    content:"";position:absolute;left:0;top:0;bottom:0;width:120px;
    background:linear-gradient(90deg,var(--imw-bg),transparent);z-index:2;pointer-events:none;
}
.imw-visual-placeholder{width:100%;height:100%;min-height:420px;}

/* ---------- RELATED ---------- */
.imw-related{background:var(--imw-rel-bg,var(--imw-dark));color:var(--imw-rel-text,#dfe7ed);padding:40px 96px 46px;}
.imw-related-inner{display:grid;grid-template-columns:1fr auto;gap:40px;align-items:start;}
.imw-related-head{
    grid-column:1/-1;font-size:11px;letter-spacing:.22em;text-transform:uppercase;
    color:var(--imw-glass);font-weight:600;margin-bottom:4px;
}
.imw-rel-grid{display:grid;grid-template-columns:repeat(var(--imw-rel-cols,4),1fr);gap:18px;}
.imw-rel-card{
    background:var(--imw-rel-card,var(--imw-dark-2));border:1px solid rgba(143,169,189,.14);
    border-radius:2px;overflow:hidden;transition:transform .25s,border-color .25s;
}
.imw-rel-card:hover{transform:translateY(-4px);border-color:rgba(143,169,189,.4);}
.imw-rel-img{display:block;height:110px;overflow:hidden;background:#3a5063;}
.imw-rel-img img{width:100%;height:100%;object-fit:cover;display:block;}
.imw-rel-body{padding:14px 14px 16px;}
.imw-rel-name{font-size:12.5px;font-weight:600;color:var(--imw-rel-text,#eaf1f6);line-height:1.35;margin-bottom:5px;}
.imw-rel-price{font-size:12px;color:var(--imw-glass);margin-bottom:12px;}
.imw-rel-btn{
    display:block;text-align:center;font-size:10.5px;letter-spacing:.14em;
    text-transform:uppercase;font-weight:600;color:#cdd9e2;text-decoration:none;
    border:1px solid rgba(143,169,189,.3);border-radius:2px;padding:9px;
    transition:background .2s,color .2s,border-color .2s;
}
.imw-rel-btn:hover{background:var(--imw-steel);color:#fff;border-color:var(--imw-steel);}

.imw-certs{display:flex;flex-direction:column;gap:12px;align-items:flex-end;padding-top:26px;min-width:170px;}
.imw-certs-label{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--imw-glass);}
.imw-certs-row{display:flex;gap:14px;flex-wrap:wrap;justify-content:flex-end;opacity:.8;}
.imw-cert{
    min-width:34px;padding:6px 8px;display:grid;place-items:center;
    border:1px solid rgba(143,169,189,.35);border-radius:2px;
    font-size:9px;font-weight:700;letter-spacing:.05em;color:var(--imw-glass);
}

/* ---------- RESPONSIVE ---------- */
@media(max-width:1100px){
    .imw-info{padding:44px 40px;}
    .imw-related{padding:36px 40px;}
    .imw-related-inner{grid-template-columns:1fr;}
    .imw-certs{align-items:flex-start;padding-top:8px;}
    .imw-certs-row{justify-content:flex-start;opacity:.9;}
}
@media(max-width:860px){
    .imw-hero{grid-template-columns:1fr;min-height:0;}
    .imw-hero::before{width:100%;height:auto;}
    .imw-visual{height:340px;order:-1;}
    .imw-visual::before{display:none;}
    .imw-info{margin-top:0;}
    .imw-cta-row{margin-top:24px;}
    .imw-rel-grid{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:520px){
    .imw-info{padding:32px 22px;}
    .imw-related{padding:30px 22px;}
}
@media(prefers-reduced-motion:reduce){.imw-product *{transition:none!important;}}

/* ==========================================================================
   IMPERA WOO — Category Hero (archivio catalogo)
   ========================================================================== */
.imw-ch { width: 100%; }

/* ── Fascia immagine (comune alle due modalità) ── */
.imw-ch-media {
    position: relative;
    display: flex;
    overflow: hidden;
    background-color: rgba(0,0,0,.05);
    background-repeat: no-repeat;
}
.imw-ch-overlay { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* Box titolo + breadcrumb sovrapposti sull'immagine */
.imw-ch-titlebox {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    padding: clamp(24px, 4vw, 64px);
}
.imw-ch-titleinner { max-width: 720px; }
.imw-ch-title {
    margin: 0;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.imw-ch-lead {
    margin: clamp(10px, 1.6vw, 18px) 0 0;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    font-weight: 400;
    line-height: 1.5;
    max-width: 46ch;
    opacity: 0.92;
    text-shadow: 0 1px 12px rgba(0,0,0,.25);
}
.imw-ch-breadcrumb {
    margin-top: clamp(10px, 1.4vw, 18px);
    font-size: 0.85rem;
    opacity: 0.92;
}
.imw-ch-breadcrumb .imw-bc { color: inherit; }
.imw-ch-breadcrumb a { color: inherit; text-decoration: none; opacity: 0.78; transition: opacity .2s ease; }
.imw-ch-breadcrumb a:hover { opacity: 1; }
.imw-ch-breadcrumb .imw-bc-sep { margin: 0 5px; opacity: 0.5; }

/* Descrizione (comune) */
.imw-ch-desc { font-size: clamp(0.95rem, 1.3vw, 1.15rem); line-height: 1.75; }
.imw-ch-desc p { margin: 0 0 1em; }
.imw-ch-desc p:last-child { margin-bottom: 0; }
.imw-ch-desc a { color: inherit; text-decoration: underline; }
.imw-ch-desc ul, .imw-ch-desc ol { margin: 0 0 1em; padding-left: 1.4em; }

/* ── MODALITÀ A: AFFIANCATO ── */
.imw-ch--side { display: flex; flex-direction: var(--imw-ch-dir, row); align-items: stretch; overflow: hidden; }
.imw-ch--side .imw-ch-media { flex-shrink: 0; align-items: center; }
.imw-ch-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.imw-ch-side-inner { padding: clamp(28px, 4vw, 64px); width: 100%; }

/* ── MODALITÀ B: FASCIA + DESCRIZIONE SOTTO ── */
.imw-ch--banner .imw-ch-media--full { width: 100%; }
.imw-ch-media-container { position: relative; z-index: 1; width: 100%; }
/* in banner il titlebox non ha il suo padding esterno: lo dà il container */
.imw-ch--banner .imw-ch-titlebox { padding-left: 0; padding-right: 0; }
.imw-ch-descband { padding: clamp(32px, 5vw, 72px) 0; }
.imw-ch-descband .imw-ch-desc { max-width: var(--imw-ch-desc-maxw, 900px); }
.imw-ch-descband[style*="center"] .imw-ch-desc { margin-left: auto; margin-right: auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .imw-ch--side { flex-direction: column !important; }
    .imw-ch--side .imw-ch-media { flex-basis: auto !important; min-height: 300px !important; }
    .imw-ch-side { flex-basis: auto !important; }
    .imw-ch-title { font-size: clamp(1.8rem, 8vw, 2.6rem) !important; }
}
/* ══════════════════════════════════════════════════════════════

/* Container centrato per la modalità banner */
.imw-ch-container{max-width:1280px;margin:0 auto;padding:0 clamp(20px,4vw,48px);width:100%;}
.imw-ch-descband{padding:clamp(28px,4vw,56px) 0;}
.imw-ch-side{display:flex;flex-direction:column;justify-content:center;padding:clamp(28px,4vw,56px);}

/* ==========================================================================
   IMPERA WOO — Container, boxed/fullwidth (eredita --a-bp-max del sito)
   ========================================================================== */
.imw-container{
    width:100%;
    max-width:var(--a-bp-max,1440px);
    margin-left:auto;margin-right:auto;
    padding-left:clamp(16px,3vw,48px);
    padding-right:clamp(16px,3vw,48px);
}

/* Category Hero: content boxed (titolo dentro container) vs fw (padding clamp) */
.imw-ch--content-boxed .imw-ch-media .imw-ch-container{
    max-width:var(--a-bp-max,1440px);margin:0 auto;
    padding-left:clamp(16px,3vw,48px);padding-right:clamp(16px,3vw,48px);width:100%;
}
.imw-ch--content-fw .imw-ch-media .imw-ch-container{
    max-width:none;width:100%;
    padding-left:clamp(16px,6vw,96px);padding-right:clamp(16px,6vw,96px);
}
/* Banda descrizione: larghezza indipendente dal contenuto della fascia */
.imw-ch--descband-boxed .imw-ch-container{
    max-width:var(--a-bp-max,1440px);margin:0 auto;
    padding-left:clamp(16px,3vw,48px);padding-right:clamp(16px,3vw,48px);width:100%;
}
.imw-ch--descband-fw .imw-ch-container{
    max-width:none;width:100%;
    padding-left:clamp(16px,6vw,96px);padding-right:clamp(16px,6vw,96px);
}
/* descrizione: se centrata, si centra davvero */
.imw-ch-descband[style*="center"] .imw-ch-desc{margin-left:auto;margin-right:auto;}
/* banda descrizione sotto la griglia: respiro verticale */
.imw-ch-descband--below{padding-top:clamp(32px,5vw,64px);padding-bottom:clamp(32px,5vw,64px);}

/* ==========================================================================
   IMPERA WOO — Product Grid
   ========================================================================== */
.imw-pg-wrap.imw-pg-boxed .imw-pg{
    max-width:var(--a-bp-max,1440px);margin:0 auto;
    padding-left:clamp(16px,3vw,48px);padding-right:clamp(16px,3vw,48px);
}
.imw-pg-wrap.imw-pg-fw .imw-pg{
    max-width:none;
    padding-left:clamp(16px,6vw,96px);padding-right:clamp(16px,6vw,96px);
}
.imw-pg{padding-top:clamp(32px,5vw,72px);padding-bottom:clamp(32px,5vw,72px);}

.imw-pg-grid{
    display:grid;
    grid-template-columns:repeat(var(--imw-pg-cols,3),1fr);
    gap:var(--imw-pg-gap,24px);
}
.imw-pg-section{margin-bottom:clamp(40px,6vw,88px);}
.imw-pg-section-title{
    font-size:clamp(1.3rem,2.4vw,1.8rem);font-weight:600;color:var(--imw-ink,#1a2733);
    margin:0 0 clamp(10px,1.5vw,16px);padding-bottom:12px;
    border-bottom:1px solid var(--imw-line,rgba(26,39,51,.14));
}
.imw-pg-section-desc{
    font-size:14px;line-height:1.6;color:var(--imw-ink-soft,#5a6b78);
    max-width:70ch;margin:0 0 clamp(20px,2.5vw,32px);
}

/* Card */
.imw-pg-card{
    position:relative;
    background:var(--imw-pg-card-bg,transparent);
    padding:var(--imw-pg-card-pad,0);
    border-radius:var(--imw-pg-radius,8px);
    transition:transform .4s cubic-bezier(.2,.7,.2,1),box-shadow .4s,background .3s;
}
.imw-pg-card-link{display:block;text-decoration:none;color:inherit;}
.imw-pg-card-media{
    position:relative;overflow:hidden;border-radius:var(--imw-pg-radius,8px);
    aspect-ratio:var(--imw-pg-aspect,3 / 4);background:#dfe7ed;
}
.imw-pg-card-img{
    width:100%;height:100%;object-fit:var(--imw-pg-fit,cover);
    display:block;transition:transform .6s cubic-bezier(.2,.7,.2,1),filter .4s;
}
.imw-pg-card-frame{
    position:absolute;inset:10px;border:1px solid rgba(255,255,255,.25);
    pointer-events:none;opacity:0;transition:opacity .35s,inset .35s;z-index:2;
}
.imw-pg-card-overlay{
    position:absolute;left:0;right:0;bottom:0;padding:18px;z-index:1;
    background:linear-gradient(to top,rgba(30,44,56,.85),transparent);
    color:#fff;opacity:0;transform:translateY(10px);transition:opacity .35s,transform .35s;
}
.imw-pg-card-reveal{font-size:12.5px;line-height:1.5;}
.imw-pg-card-body{padding:14px 2px 4px;position:relative;}
.imw-pg-card-title{
    font-size:15px;font-weight:600;color:var(--imw-ink,#1a2733);
    margin:6px 0 4px;line-height:1.3;
}
.imw-pg-card-underline{
    display:block;width:0;height:2px;background:var(--imw-steel,#3d5a73);
    transition:width .35s;margin-bottom:6px;
}
.imw-pg-card-price{font-size:14px;color:var(--imw-steel-deep,#2b4257);font-weight:500;}

/* Se la card ha sfondo/padding, il body respira dentro */
.imw-pg-card[style*="card-pad"] .imw-pg-card-body,
.imw-pg-grid[style] .imw-pg-card .imw-pg-card-body{padding-left:0;padding-right:0;}

/* Tags */
.imw-pg-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:4px;}
.imw-pg-tag{
    font-size:10px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;
    padding:3px 9px;border-radius:2px;
    background:var(--imw-steel-deep,#2b4257);color:#fff;
}
.imw-pg-tags--outline .imw-pg-tag{background:transparent;border:1px solid var(--imw-steel,#3d5a73);color:var(--imw-steel,#3d5a73);}
.imw-pg-tags--flat .imw-pg-tag{background:var(--imw-panel,#e3e9ee);color:var(--imw-ink,#1a2733);}

/* Hover effetti */
/* zoom: immagine si ingrandisce */
.imw-pg-hover-zoom .imw-pg-card:hover .imw-pg-card-img{transform:scale(1.06);}
/* lift-line: card si solleva + underline titolo */
.imw-pg-hover-lift-line .imw-pg-card:hover{transform:translateY(-6px);}
.imw-pg-hover-lift-line .imw-pg-card:hover .imw-pg-card-underline{width:44px;}
/* frame: cornice interna appare */
.imw-pg-hover-frame .imw-pg-card:hover .imw-pg-card-frame{opacity:1;inset:14px;}
.imw-pg-hover-frame .imw-pg-card:hover .imw-pg-card-img{transform:scale(1.04);}
/* reveal: overlay con estratto sale */
.imw-pg-hover-reveal .imw-pg-card:hover .imw-pg-card-overlay{opacity:1;transform:translateY(0);}
.imw-pg-hover-reveal .imw-pg-card:hover .imw-pg-card-img{transform:scale(1.05);filter:brightness(.85);}
/* tilt: leggera inclinazione 3d + ombra */
.imw-pg-hover-tilt .imw-pg-card{transition:transform .35s ease,box-shadow .35s ease;transform-style:preserve-3d;}
.imw-pg-hover-tilt .imw-pg-card:hover{transform:perspective(900px) rotateX(3deg) translateY(-5px);box-shadow:0 24px 48px rgba(30,44,56,.22);}
.imw-pg-hover-tilt .imw-pg-card:hover .imw-pg-card-img{transform:scale(1.05);}
/* underline sempre attivo su hover per lift-line già gestito; comune: overlay reveal se presente */
.imw-pg-card:hover .imw-pg-card-underline{width:44px;}

/* Paginazione */
.imw-pg-pagination{display:flex;justify-content:center;margin-top:clamp(28px,4vw,52px);}
.imw-pg-loadmore{
    background:var(--imw-cta,#3a566d);color:#fff;border:none;cursor:pointer;
    font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;
    padding:14px 34px;border-radius:2px;display:inline-flex;align-items:center;gap:10px;
    transition:background .25s;
}
.imw-pg-loadmore:hover{background:var(--imw-cta-hover,#2b4257);}
.imw-pg-loadmore:disabled{cursor:default;}
.imw-pg-spinner{
    width:14px;height:14px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;
    border-radius:50%;animation:imw-spin .7s linear infinite;
}
@keyframes imw-spin{to{transform:rotate(360deg);}}
.imw-pg-pages{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;}
.imw-pg-page-btn{
    min-width:38px;height:38px;border:1px solid var(--imw-line,rgba(26,39,51,.14));
    background:#fff;color:var(--imw-ink,#1a2733);border-radius:4px;cursor:pointer;
    font-size:13px;transition:all .2s;
}
.imw-pg-page-btn.is-active{background:var(--imw-steel,#3d5a73);color:#fff;border-color:var(--imw-steel,#3d5a73);}
.imw-pg-empty{padding:clamp(40px,6vw,80px);text-align:center;color:var(--imw-ink-soft,#5a6b78);}

/* ==========================================================================
   IMPERA WOO — Fascia Shortcode (ex Fascia Video)
   ========================================================================== */
.imw-gallery-band{padding:clamp(32px,5vw,72px) 0;}
.imw-gallery-band-inner{
    width:100%;max-width:var(--a-bp-max,1440px);margin:0 auto;
    padding-left:clamp(16px,3vw,48px);padding-right:clamp(16px,3vw,48px);
}
.imw-gallery-band-title{
    font-size:clamp(1.3rem,2.4vw,1.8rem);font-weight:600;text-align:center;
    color:var(--imw-ink,#1a2733);margin:0 0 clamp(16px,2.5vw,28px);
}
.imw-gallery-band-content{width:100%;}
/* Sicurezza responsive generica: qualunque markup produca lo shortcode
   (iframe/img/embed/canvas) resta dentro i limiti della fascia. */
.imw-gallery-band-content img,
.imw-gallery-band-content iframe,
.imw-gallery-band-content embed,
.imw-gallery-band-content canvas,
.imw-gallery-band-content object{max-width:100%;height:auto;}

/* Responsive griglia */
@media(max-width:1024px){
    .imw-pg-grid{grid-template-columns:repeat(min(var(--imw-pg-cols,3),3),1fr);}
}
@media(max-width:768px){
    .imw-pg-grid{grid-template-columns:repeat(2,1fr);}
    .imw-ch--side{flex-direction:column !important;}
    .imw-ch--side .imw-ch-media,.imw-ch--side .imw-ch-side{flex-basis:auto !important;width:100%;}
}
@media(max-width:480px){
    .imw-pg-grid{grid-template-columns:1fr;}
}

/* ==========================================================================
   AMH BLOCK — Category Column
   Da APPENDERE ad amh-blocks.css (mai in un style.css per-blocco: inerte).
   ========================================================================== */
.amh-cc{
    background:var(--amh-cc-bg,#1e2c38);
    min-height:var(--amh-cc-minh,auto);
    padding:var(--amh-cc-pad,40px);
    border-radius:var(--amh-cc-radius,8px);
    display:flex;flex-direction:column;
    height:100%;
    box-sizing:border-box;
}
.amh-cc-title{
    margin:0 0 20px;
    font-size:clamp(1.1rem,1.6vw,1.4rem);
    font-weight:700;
    letter-spacing:.02em;
    text-transform:uppercase;
    color:var(--amh-cc-title-color,#ffffff);
}

.amh-cc-body{
    display:flex;
    align-items:stretch;
    gap:20px;
    flex:1;
}

.amh-cc-media{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
    border-radius:calc(var(--amh-cc-radius,8px) - 2px);
    background:rgba(255,255,255,.04);
}
/* Se non c'è lista accanto (nessun item), l'immagine può avere un rapporto fisso */
.amh-cc-body:has(.amh-cc-media:only-child) .amh-cc-media{aspect-ratio:var(--amh-cc-ratio,4 / 3);}
.amh-cc-img{width:100%;height:100%;display:block;}

.amh-cc-list{
    list-style:none;margin:0;padding:0;
    display:flex;flex-direction:column;
    flex:0 0 var(--amh-cc-list-w,32%);
    justify-content:space-between;
}
.amh-cc-list--full{flex:1 1 100%;}

.amh-cc-list--divided .amh-cc-item{
    border-bottom:1px solid color-mix(in srgb, var(--amh-cc-div-color,#3d5a73) calc(var(--amh-cc-div-op,.3) * 100%), transparent);
}
.amh-cc-list--divided .amh-cc-item:last-child{border-bottom:none;}

.amh-cc-item{padding:14px 0;flex:1;display:flex;}
.amh-cc-item-link{
    display:flex;width:100%;
    text-decoration:none;color:inherit;
    transition:transform .25s,opacity .25s;
}
.amh-cc-item-link:hover{transform:translateX(2px);opacity:.85;}

/* Disposizione: icona sopra, etichetta sotto (default, come nel riferimento) */
.amh-cc-list--stacked .amh-cc-item-link{
    flex-direction:column;align-items:center;justify-content:center;
    text-align:center;gap:10px;
}
/* Disposizione alternativa: icona e etichetta affiancate */
.amh-cc-list--inline .amh-cc-item-link{
    flex-direction:row;align-items:center;gap:14px;
}

.amh-cc-item-icon{
    flex-shrink:0;
    display:inline-flex;align-items:center;justify-content:center;
    width:28px;height:28px;
    color:var(--amh-cc-item-color,#e2e8f0);
}
.amh-cc-item-icon svg{width:100%;height:100%;fill:currentColor;}

.amh-cc-item-label{
    font-size:12.5px;font-weight:500;
    color:var(--amh-cc-item-color,#e2e8f0);
    line-height:1.35;
}
.amh-cc-list--stacked .amh-cc-item-label{font-size:11.5px;letter-spacing:.02em;}

/* Fallback color-mix per browser che non lo supportano: opacità via bordo semplice */
@supports not (border-color: color-mix(in srgb, red 50%, transparent)){
    .amh-cc-list--divided .amh-cc-item{border-bottom-color:rgba(255,255,255,.15);}
}

@media(max-width:768px){
    .amh-cc{padding:28px;}
    .amh-cc-body{flex-direction:column;}
    .amh-cc-list{flex:1 1 auto;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;gap:4px 20px;}
    .amh-cc-list--stacked .amh-cc-item-link{flex-direction:row;text-align:left;}
    .amh-cc-item{flex:0 0 auto;padding:8px 0;border-bottom:none !important;}
}
