/* Evin 4 · i pezzi delle PAGINE INTERNE (step 6-bis, 15/11). Stesso kit della home (versione 13): apertura «da cinema»
 * con la foto del kit, poi la pagina chiara (crema e bianco), schede bianche, verde bosco e oro solo come accento.
 * Si carica dopo style.css. Pezzi: .apertura · .blocco · .blocco-testa · .schede · .scheda · .schede-foto · .fascia ·
 * .passi · .spunte-elenco · .pillole · .tabella · .chiusura. Il movimento: assets/js/pagine.js. */

/* ── Apertura: la foto del kit a tutto schermo (78vh), titolo a sinistra, la camera entra allo scroll ── */
.apertura { position: relative; min-height: 78vh; min-height: 78svh; display: flex; align-items: flex-end; overflow: hidden;
  background: var(--verde-notte); color: #fff; isolation: isolate; }
.apertura-foto { position: absolute; inset: 0; z-index: -2; }
.apertura-foto img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fuoco, 70% 50%);
  transform: scale(calc(1.04 + var(--avanza, 0) * .08)) translateY(calc(var(--avanza, 0) * 3%)); transform-origin: var(--fuoco, 70% 50%);
  will-change: transform; animation: apertura-entra 1.4s var(--curva) both; }
@keyframes apertura-entra { from { transform: scale(1.12); opacity: .4; } }
.apertura::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8,18,16,.74) 0%, rgba(8,18,16,.55) 30%, rgba(8,18,16,.12) 58%, rgba(8,18,16,0) 72%),
              linear-gradient(0deg, rgba(8,18,16,.55) 0%, rgba(8,18,16,0) 40%),
              linear-gradient(180deg, rgba(8,18,16,.45) 0%, rgba(8,18,16,0) 22%); }
.apertura-testo { width: 100%; max-width: 1200px; margin: 0 auto; padding: calc(var(--testata) + 60px) max(24px, env(safe-area-inset-right, 0px)) clamp(56px, 9vh, 96px) max(24px, env(safe-area-inset-left, 0px)); }
.apertura-testo > * { max-width: 600px; }
.briciole { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: rgba(255,255,255,.7); margin-bottom: 18px; list-style: none; }
.briciole a { color: rgba(255,255,255,.85); text-decoration: none; }
.briciole li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.apertura h1 { color: #fff; font-size: clamp(34px, 4.1vw, 60px); line-height: 1.03; letter-spacing: -.025em; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.apertura h1 em { font-style: normal; color: var(--oro); }
.apertura-sotto { margin-top: 18px; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.5; color: rgba(255,255,255,.88); max-width: 520px; }
.apertura .btn { margin-top: 28px; }
.apertura .linea-oro { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1;
  background: linear-gradient(90deg, rgba(212,159,93,0), #F0C88C 30%, #FFE2B0 50%, #F0C88C 70%, rgba(212,159,93,0));
  box-shadow: 0 0 18px rgba(240,190,120,.8); transform: scaleX(0); transform-origin: left; animation: linea-corre 1.6s var(--curva) .5s forwards; }
@keyframes linea-corre { to { transform: scaleX(1); } }
/* l'entrata: titolo, righe, pulsante, scaglionati */
html.js .apertura-testo > * { animation: sale .8s var(--curva) both; }
html.js .apertura-testo > :nth-child(2) { animation-delay: .1s; }
html.js .apertura-testo > :nth-child(3) { animation-delay: .2s; }
html.js .apertura-testo > :nth-child(4) { animation-delay: .3s; }
@keyframes sale { from { opacity: 0; transform: translateY(22px); } }

/* ── Blocchi chiari ── */
.blocco { position: relative; padding: clamp(64px, 8vw, 110px) 0; }
.blocco + .blocco { padding-top: 0; }
.blocco-bianco { background: #fff; }
.blocco-bianco + .blocco, .blocco + .blocco-bianco { padding-top: clamp(64px, 8vw, 110px); }
.blocco-testa { max-width: 760px; margin-bottom: clamp(30px, 4vw, 48px); }
.blocco-testa.al-centro { margin-left: auto; margin-right: auto; text-align: center; }
.blocco-testa h2 { font-size: clamp(27px, 2.7vw, 40px); }
.blocco-testa p { margin-top: 14px; font-size: 18px; color: #4A4F47; }
.occhiello { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--oro); }

/* schede bianche con icona */
.schede { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.scheda { position: relative; background: #fff; border-radius: 22px; padding: 28px 26px 26px; box-shadow: 0 1px 0 rgba(30,87,76,.06), 0 18px 40px -26px rgba(20,36,31,.28);
  transition: transform .25s var(--curva), box-shadow .25s var(--curva); }
.blocco-bianco .scheda { background: var(--crema); box-shadow: none; border: 1px solid var(--crema-scura); }
.scheda-icona { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #EEF3F0; margin-bottom: 18px; }
.scheda-icona img { width: 30px; height: 30px; object-fit: contain; }
.scheda-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-bottom: 16px;
  font-weight: 700; font-size: 14px; background: var(--oro); color: #1B140A; box-shadow: 0 0 0 6px rgba(212,159,93,.16); }
.scheda h3 { font-size: 20px; }
.scheda p { margin-top: 8px; font-size: 16px; color: #4A4F47; }
.scheda .link-freccia { margin-top: 16px; }
@media (hover: hover) and (pointer: fine) { .scheda:hover { transform: translateY(-6px); box-shadow: 0 1px 0 rgba(30,87,76,.06), 0 26px 50px -24px rgba(20,36,31,.35); } }

/* schede con foto (prodotti, collegamenti) */
.schede-foto { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.scheda-foto-p { display: block; position: relative; background: #fff; border-radius: 22px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 1px 0 rgba(30,87,76,.06), 0 18px 40px -26px rgba(20,36,31,.28); transition: transform .25s var(--curva), box-shadow .25s var(--curva); }
.scheda-foto-p figure { aspect-ratio: 1 / 1; overflow: hidden; background: #F3EEE6; }
.scheda-foto-p figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--curva); }
.scheda-foto-p.contiene figure img { object-fit: contain; padding: 18px; }
.scheda-foto-p div { padding: 18px 20px 20px; }
.scheda-foto-p h3 { font-size: 19px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.scheda-foto-p h3::after { content: "→"; color: var(--oro); transition: transform .25s var(--curva); }
.scheda-foto-p p { margin-top: 6px; font-size: 15px; color: #4A4F47; }
@media (hover: hover) and (pointer: fine) {
  .scheda-foto-p:hover { transform: translateY(-6px); box-shadow: 0 1px 0 rgba(30,87,76,.06), 0 26px 50px -24px rgba(20,36,31,.35); }
  .scheda-foto-p:hover figure img { transform: scale(1.05); }
  .scheda-foto-p:hover h3::after { transform: translateX(4px); }
}

/* fascia: foto da una parte, testo dall'altra */
.fascia { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.fascia-inversa .fascia-foto { order: 2; }
.fascia-foto { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 3; background: #E8E1D6;
  box-shadow: 0 30px 60px -34px rgba(20,36,31,.45); }
.fascia-foto img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.06 - var(--vista, 0) * .06)); transition: transform .1s linear; }
.fascia-foto.contiene { background: linear-gradient(160deg, #fff, #F1EBE1); }
.fascia-foto.contiene img { object-fit: contain; padding: 8%; }
.fascia-testo h2 { font-size: clamp(27px, 2.6vw, 38px); }
.fascia-testo > p { margin-top: 14px; font-size: 18px; color: #4A4F47; }
.fascia-testo .btn, .fascia-testo .link-freccia { margin-top: 24px; }
.fascia-testo .link-freccia { display: inline-flex; }

/* elenco con la spunta d'oro */
.spunte-elenco { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.spunte-elenco li { position: relative; padding-left: 34px; font-size: 17px; }
.spunte-elenco li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* passi numerati con la linea d'oro che si riempie (pagine.js: --t) */
.passi { list-style: none; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: passo; }
.passi::before { content: ""; position: absolute; left: 20px; right: 20px; top: 20px; height: 2px; background: #E2DDD4; }
.passi::after { content: ""; position: absolute; left: 20px; right: 20px; top: 20px; height: 2px; background: var(--oro);
  box-shadow: 0 0 8px rgba(212,159,93,.6); transform: scaleX(var(--t, 0)); transform-origin: left; }
.passi li { position: relative; z-index: 1; counter-increment: passo; }
.passi li::before { content: "0" counter(passo); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-size: 14px; font-weight: 700; background: #fff; border: 1.5px solid #E2DDD4; color: #7A766E; margin-bottom: 18px;
  transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s; }
.passi li.acceso::before { background: var(--oro); border-color: #F2D7AF; color: #1B140A; box-shadow: 0 0 0 6px rgba(212,159,93,.18); }
.passi h3 { font-size: 19px; }
.passi p { margin-top: 6px; font-size: 16px; color: #4A4F47; }

/* pillole (viscosità, servizi) */
.pillole { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.pillole li, .pillole button { padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--crema-scura); font-size: 15px; font-weight: 600; }

/* tabella semplice (specifiche) */
.tabella-scorri { overflow-x: auto; border-radius: 20px; background: #fff; box-shadow: 0 1px 0 rgba(30,87,76,.06), 0 18px 40px -26px rgba(20,36,31,.28); }
.tabella { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.tabella th, .tabella td { text-align: left; padding: 14px 18px; border-bottom: 1px solid #EFE9E0; vertical-align: top; }
.tabella th { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #6B675F; background: #FBF8F3; }
.tabella tr:last-child td { border-bottom: 0; }
.tabella td:first-child { font-weight: 700; color: #14241F; white-space: nowrap; }

/* la scheda del contatto */
.contatto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contatto .scheda a:not(.btn) { color: var(--verde); font-weight: 650; }
.mappa-riquadro { border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -34px rgba(20,36,31,.45); }

/* ── Chiusura: la fascia verde bosco con la linea d'oro e il pulsante WhatsApp ── */
.chiusura { position: relative; overflow: hidden; background: var(--verde-notte); color: #fff; padding: clamp(64px, 8vw, 100px) 0; isolation: isolate; }
.chiusura::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 120% at 85% 50%, rgba(36,104,91,.55), rgba(10,55,45,0) 70%); }
.chiusura::after { content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: 2px; z-index: -1; opacity: .5;
  background: linear-gradient(90deg, rgba(212,159,93,0), #F0C88C 50%, rgba(212,159,93,0)); box-shadow: 0 0 16px rgba(240,190,120,.6);
  transform: translateY(70px) rotate(-4deg); }
.chiusura .contenitore { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.chiusura h2 { color: #fff; font-size: clamp(27px, 2.7vw, 40px); max-width: 640px; }
.chiusura p { margin-top: 12px; color: rgba(255,255,255,.8); font-size: 17px; max-width: 560px; }
.chiusura .btn { flex: none; }

/* testo a tutta larghezza, letto */
.testo-lungo { max-width: 760px; }
.testo-lungo p + p { margin-top: 14px; }
.testo-lungo p { font-size: 18px; color: #3F443D; }
.nota { margin-top: 18px; font-size: 14px; color: #77736B; }

@media (max-width: 860px) {
  .apertura { min-height: 86svh; }
  .apertura::before { background: linear-gradient(0deg, rgba(8,18,16,.9) 0%, rgba(8,18,16,.62) 38%, rgba(8,18,16,.1) 66%, rgba(8,18,16,0) 78%),
                                  linear-gradient(180deg, rgba(8,18,16,.5) 0%, rgba(8,18,16,0) 20%); }
  .apertura-foto img { object-position: var(--fuoco-tel, var(--fuoco, 70% 50%)); }
  .apertura-testo { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .apertura h1 { font-size: 34px; }
  .apertura .btn { white-space: normal; }
  .fascia { grid-template-columns: 1fr; gap: 26px; }
  .fascia-inversa .fascia-foto { order: 0; }
  .passi { grid-template-columns: 1fr; gap: 26px; padding-left: 58px; }
  .passi::before, .passi::after { left: 19px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .passi::after { transform: scaleY(var(--t, 0)); transform-origin: top; }
  .passi li::before { position: absolute; left: -58px; top: -6px; margin: 0; }
  .schede-foto { grid-template-columns: 1fr 1fr; gap: 12px; }
  .scheda-foto-p div { padding: 12px 14px 14px; }
  .scheda-foto-p h3 { font-size: 16px; }
  .scheda-foto-p p { font-size: 13.5px; }
  .chiusura .contenitore { flex-direction: column; align-items: flex-start; }
  .chiusura .btn { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .apertura-foto img, html.js .apertura-testo > *, .apertura .linea-oro { animation: none; transform: none; }
  .apertura .linea-oro { transform: scaleX(1); }
}

/* 3 Step, 17/11/2026: con la scheda del GPL le schede della pagina Carburanti sono 5: al telefono l'ultima al centro */
@media (max-width: 700px) { .schede-foto li:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; } }
@media (min-width: 1101px) { .schede-foto:has(> li:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
