/* ==========================================================================
   APJ — Grafica del 28/10/2026 (restyle leggero)
   Foglio caricato per ULTIMO (mu-plugin apj-grafica-20261028.php). Si toglie
   rinominando il file PHP: il resto del sito torna com'era.

   REGOLE DI ANDREA, SEMPRE VALIDE
   · testo solo nero #0A1A26 su bianco pieno, o bianco #FFFFFF su fondo scuro
     pieno del marchio; contrasto almeno 7:1; mai testo colorato, mai testo
     scuro su grigio. I link si distinguono con sottolineatura o grassetto.
   · il COLORE entra solo come fondo pieno, bordo, filo, fascia, dettaglio.

   TAVOLOZZA (HEX)
   #0A1A26 notte (marchio)        bianco su notte 17,7:1
   #0E4A6E ghiacciaio profondo    bianco su fondo  9,5:1   (NUOVO, fasce)
   #0F4C3A abete                  bianco su fondo  9,9:1   (NUOVO, fasce)
   #E0653C alpenglow (marchio)    solo fili, bordi, fasce
   #F2B544 sole sulla neve        solo fili, bordi, fasce  (NUOVO)
   #2FB5A8 lago alpino            solo fili, bordi, fasce  (NUOVO)
   #8FB9D1 ghiaccio (marchio)     solo fili, bordi
   ========================================================================== */

html[data-marchio="alpine"] body.spj-marchio-alpine{
  --apj-notte:#0A1A26; --apj-glac:#0E4A6E; --apj-abete:#0F4C3A;
  --apj-alp:#E0653C; --apj-sole:#F2B544; --apj-lago:#2FB5A8; --apj-ghi:#8FB9D1;
  --apj-r:14px; --apj-r-s:10px;
  --apj-ombra:0 1px 2px rgba(10,26,38,.06),0 8px 24px rgba(10,26,38,.09);
  --apj-ombra-h:0 2px 4px rgba(10,26,38,.08),0 16px 36px rgba(10,26,38,.16);
}

/* ---- 0. La pagina intera: la home e l'empty leg non usano il modello a
        tutta pagina e il tema le stringe a 700 px ---------------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .entry-content.is-layout-constrained > *{max-width:none!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .entry-content.has-global-padding{padding-left:0!important;padding-right:0!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .wp-block-post-content{margin-block-start:0!important}

/* ---- 1. Ritmo delle sezioni ----------------------------------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec{position:relative}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec > .spj-wrap{max-width:var(--spj-wrap,1240px);margin-left:auto;margin-right:auto}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:not(.spj-dark):not(.spj-feature):not(.spj-grid-bg):nth-of-type(even){background:#FFFFFF!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sh{margin-bottom:8px}

/* occhiello con filo colorato davanti */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-eyebrow{display:inline-flex;align-items:center;gap:12px}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-eyebrow::before{content:"";display:inline-block;width:32px;height:4px;border-radius:4px;background:var(--apj-alp)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-dark .spj-eyebrow::before,
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-feature .spj-eyebrow::before{background:var(--apj-sole)}

/* ---- 2. Schede coerenti: angoli, ombra, filo colorato, hover --------- */
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.spj-card,.spj-card-b,.spj-panel,.spj-pcard,.spj-why,.spj-leg,.apjm-liv-c,.spj-lg-card){
  border-radius:var(--apj-r)!important;box-shadow:var(--apj-ombra)!important;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.spj-card,.spj-card-b,.spj-panel,.spj-pcard,.spj-why,.apjm-liv-c){
  border-top:4px solid var(--apj-glac)!important;
}
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.spj-g3,.spj-g4,.spj-g2) > :nth-child(3n+2):is(.spj-card,.spj-card-b,.spj-panel,.spj-pcard,.spj-why,.apjm-liv-c){border-top-color:var(--apj-alp)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.spj-g3,.spj-g4,.spj-g2) > :nth-child(3n):is(.spj-card,.spj-card-b,.spj-panel,.spj-pcard,.spj-why,.apjm-liv-c){border-top-color:var(--apj-lago)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.spj-g3,.spj-g4,.spj-g2) > :nth-child(4n):is(.spj-card,.spj-card-b,.spj-panel,.spj-pcard,.spj-why,.apjm-liv-c){border-top-color:var(--apj-sole)!important}
@media (hover:hover){
  html[data-marchio="alpine"] body.spj-marchio-alpine :is(.spj-card,.spj-card-b,.spj-panel,.spj-pcard,.spj-why,.spj-dcard,.apjm-liv-c):hover{transform:translateY(-3px);box-shadow:var(--apj-ombra-h)!important}
}

/* ---- 3. Foto: angoli arrotondati, cornice sottile -------------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-img{border-radius:var(--apj-r)!important;overflow:hidden;box-shadow:var(--apj-ombra)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-img img{border-radius:0!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-dcard{border-radius:var(--apj-r)!important;overflow:hidden;box-shadow:var(--apj-ombra)!important}

/* ---- 4. Pulsanti ----------------------------------------------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-btn{border-radius:var(--apj-r-s)!important;transition:transform .15s ease,box-shadow .15s ease}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-btn:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(10,26,38,.22)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-btn:focus-visible{outline:3px solid var(--apj-sole);outline-offset:3px}

/* ---- 5. Fasce di colore pieno (testo bianco) ------------------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec.spj-dark:nth-of-type(odd){background:var(--apj-glac)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec.spj-dark:nth-of-type(even){background:var(--apj-abete)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec.spj-dark :is(h1,h2,h3,h4,p,li,span,b,strong,em,label,small){color:#FFFFFF!important;-webkit-text-fill-color:#FFFFFF!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec.spj-dark a:not(.spj-btn){color:#FFFFFF!important;text-decoration:underline!important}

/* fascia dei numeri: un filo di colore diverso per ogni cella */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-nums{border-radius:var(--apj-r);overflow:hidden;box-shadow:var(--apj-ombra)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-nums > div{border-top:5px solid var(--apj-alp)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-nums > div:nth-child(2){border-top-color:var(--apj-sole)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-nums > div:nth-child(3){border-top-color:var(--apj-lago)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-nums > div:nth-child(4){border-top-color:var(--apj-ghi)}

/* ---- 6. Intestazione e piede: una fascia di colori pieni ------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-hd{border-bottom:0!important;box-shadow:0 2px 12px rgba(10,26,38,.10)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-hd::after{content:"";position:absolute;left:0;right:0;bottom:-4px;height:4px;
  background:linear-gradient(90deg,var(--apj-glac) 0 25%,var(--apj-lago) 25% 50%,var(--apj-sole) 50% 75%,var(--apj-alp) 75% 100%)}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-ft{border-top:6px solid var(--apj-alp)!important}

/* ---- 7. Il configuratore dell'apertura ------------------------------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-quick{border-radius:var(--apj-r)!important;border-top:5px solid var(--apj-sole)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-quick input,
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-quick select{border-radius:var(--apj-r-s)!important}

/* ---- 8. Tabelle ------------------------------------------------------ */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-tw{border-radius:var(--apj-r);overflow:hidden;box-shadow:var(--apj-ombra);border-top:4px solid var(--apj-glac)}

/* ---- 9. Griglie con respiro (prima le schede si toccavano) ----------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-g3{gap:24px!important;background:transparent!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-g4{gap:20px!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:not(.spj-dark):not(.spj-feature) .spj-why{background:#FFFFFF!important;padding:24px 22px!important;border:1px solid #CBDBE7}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:not(.spj-dark):not(.spj-feature) .spj-g3 > *{background:#FFFFFF}

/* ---- 10. Apertura della home: pannello con la copertina del marchio -- */
@media (min-width:1280px){
  html[data-marchio="alpine"] body.spj-marchio-alpine .spj-hero{background:#FFFFFF}
  html[data-marchio="alpine"] body.spj-marchio-alpine .spj-hero::before{
    content:"";position:absolute;top:36px;bottom:36px;right:max(40px,calc((100vw - 1240px)/2 + 20px));width:min(30%,400px);
    background:var(--apj-notte) url("/wp-content/plugins/alpine-private-jet/assets/foto/h_img_feat.jpg") center/cover no-repeat;
    border-radius:var(--apj-r);border-left:8px solid var(--apj-sole);box-shadow:var(--apj-ombra-h);z-index:0}
  html[data-marchio="alpine"] body.spj-marchio-alpine .spj-hero-in > *{max-width:min(700px,100%)}
  html[data-marchio="alpine"] body.spj-marchio-alpine .spj-hero-in{z-index:1}
}

/* ==========================================================================
   11. LEGGIBILITA' — correzioni trovate misurando il contrasto di ogni testo
   (prima: testo bianco su schede chiare e testo ghiaccio/grigio su bianco).
   Dentro le fasce scure le schede chiare diventano BIANCHE PIENE con testo
   #0A1A26 (17,7:1); fuori dalle fasce, i testi colorati tornano #0A1A26.
   ========================================================================== */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:is(.spj-dark,.spj-feature) :is(.spj-steps > div,.spj-tier,.spj-panel,.apjm-strip,.spj-cat){
  background:#FFFFFF!important;border:1px solid #FFFFFF!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:is(.spj-dark,.spj-feature) :is(.spj-steps > div,.spj-tier,.spj-panel,.apjm-strip,.spj-cat) :is(h1,h2,h3,h4,p,li,span,b,strong,em,small,div,label,i,s,td,th,summary){
  color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;opacity:1!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:is(.spj-dark,.spj-feature) :is(.spj-steps > div,.spj-tier,.spj-panel,.apjm-strip,.spj-cat) a:not(.spj-btn){
  color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;text-decoration:underline!important;font-weight:700}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:is(.spj-dark,.spj-feature) .apjm-strip button{
  background:#FFFFFF!important;color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;border:2px solid #0A1A26!important;font-weight:700}
/* i numeri dei passi, nelle schede bianche: il filo colorato resta, il testo no */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-steps > div{border-top:5px solid var(--apj-sole)!important;border-radius:var(--apj-r)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-steps > div:nth-child(2n){border-top-color:var(--apj-lago)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-steps > div:nth-child(3n){border-top-color:var(--apj-alp)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-steps > div > b{background:var(--apj-notte)!important;color:#FFFFFF!important;-webkit-text-fill-color:#FFFFFF!important}

/* testi che erano colorati (ghiaccio, grigio-azzurro, rosso) su fondo chiaro */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-sec:not(.spj-dark):not(.spj-feature) :is(dt,dd,.spj-lg-nota,.spj-toc i,.spj-toc h4,.spj-cat .n,.spj-why .n,.spj-tier .n,.apjm-pc,.spj-doc i,.spj-doc h4){
  color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;opacity:1!important}
html[data-marchio="alpine"] body.spj-marchio-alpine dt{font-weight:700}
html[data-marchio="alpine"] body.spj-marchio-alpine .apjm-pc{font-weight:700}

/* ---- pagina booking: etichette, schede bagaglio, interruttori ---------- */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-scope-booking :is(label,.lbl,s,.dm,.nm,.spj-disc,.spj-disc b,.spj-libero,.spj-libero b,.spj-libero span,.spj-bagmsg,.spj-bag,.spj-blk-h span,.spj-leg-row label){
  color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;opacity:1!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-scope-booking :is(.spj-bag,.spj-disc,.spj-libero){background:#FFFFFF!important;border:1px solid #CBDBE7!important;border-radius:var(--apj-r)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-scope-booking :is(.spj-tabs2,.spj-chips2) button:not(.on){background:#FFFFFF!important;color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;border:2px solid #0A1A26!important;border-radius:var(--apj-r-s)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-scope-booking :is(.spj-tabs2,.spj-chips2) button.on{background:#0A1A26!important;color:#FFFFFF!important;-webkit-text-fill-color:#FFFFFF!important;border:2px solid var(--apj-sole)!important;font-weight:700;border-radius:var(--apj-r-s)!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-scope-booking .spj-swap{background:#FFFFFF!important;color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;border:2px solid #0A1A26!important}

/* ---- contatti: anteprima della chat, testi chiari su fondo scuro ------- */
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.wa-form,.wa-chat,.wa-ant) :is(span,p,b,div,label){-webkit-text-fill-color:#FFFFFF!important}
html[data-marchio="alpine"] body.spj-marchio-alpine :is(.wa-form,.wa-chat,.wa-ant) :is(span,p,b){color:#FFFFFF!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .wa-form a.wa-vai{background:var(--apj-abete)!important;color:#FFFFFF!important;border:2px solid #FFFFFF!important}
html[data-marchio="alpine"] body.spj-marchio-alpine .wa-form a.wa-vai *{color:#FFFFFF!important;-webkit-text-fill-color:#FFFFFF!important}

/* ---- pulsanti: bianco su marrone-alpenglow #8E3516 (8,1:1), mai testo scuro ---- */
html[data-marchio="alpine"] body.spj-marchio-alpine :is(a,button).spj-btn:not(.ghost){
  color:#FFFFFF!important;-webkit-text-fill-color:#FFFFFF!important;opacity:1!important}

/* codici e note nelle tabelle: niente trasparenza sul testo */
html[data-marchio="alpine"] body.spj-marchio-alpine table :is(span,td,th,b,i,small){opacity:1!important}
/* booking: paragrafi guida in nero pieno */
html[data-marchio="alpine"] body.spj-marchio-alpine .spj-scope-booking :is(p,.spj-blk-h){color:#0A1A26!important;-webkit-text-fill-color:#0A1A26!important;opacity:1!important}
/* contatti: il pulsante «spento» resta leggibile */
html[data-marchio="alpine"] body.spj-marchio-alpine .wa-form a.wa-vai,html[data-marchio="alpine"] body.spj-marchio-alpine .wa-form a.wa-vai *{opacity:1!important}
