.ap-page {
  --ap-red: #e31b17;
  --ap-red-dark: #a91423;
  --ap-orange: #f06a24;
  --ap-ink: #161514;
  --ap-muted: #6c6865;
  --ap-line: #e8e4e1;
  --ap-soft: #f7f5f3;
  --ap-white: #fff;
  --ap-radius: 28px;
  --ap-shadow: 0 24px 60px rgba(51, 29, 17, .12);
  background: var(--ap-white);
  color: var(--ap-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow: hidden;
}

.ap-page, .ap-page * { box-sizing: border-box; }

/* Integrazione con JA Nova/T4: libera l'intera larghezza solo per l'articolo Aircash. */
body.item-151 .com-content-article > .article-aside,
body.item-151 .com-content-article > .page-header,
body.item-151 .com-content-article .box-content > .content-left {
  display: none !important;
}

body.item-151 .com-content-article .box-content {
  padding-top: 0 !important;
}

body.item-151 .com-content-article .box-content > .content-right {
  width: 100% !important;
  max-width: none !important;
  flex: 0 0 100% !important;
}
.ap-page img { max-width: 100%; display: block; }
.ap-shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.ap-kicker { margin: 0 0 12px; color: var(--ap-red); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.ap-page h1, .ap-page h2, .ap-page h3, .ap-page p { text-wrap: pretty; }
.ap-page h1 { margin: 0; font-size: clamp(2.7rem, 6.4vw, 5.7rem); line-height: .95; letter-spacing: -.065em; }
.ap-page h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.03; letter-spacing: -.045em; }
.ap-page h3 { margin: 0; font-size: 1.4rem; line-height: 1.12; letter-spacing: -.025em; }

.ap-hero { position: relative; overflow: hidden; padding: 34px 0 92px; background: radial-gradient(circle at 78% 20%, #fff2eb 0, transparent 36%), linear-gradient(135deg, #fff 0%, #faf7f4 100%); }
.ap-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -260px; bottom: -330px; border: 88px solid rgba(227,27,23,.05); border-radius: 50%; }
.ap-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(40px, 7vw, 100px); }
.ap-brand-row { min-height: 70px; display: flex; align-items: center; gap: 20px; margin-bottom: 68px; color: #b6afaa; font-size: 1.5rem; font-weight: 300; }
.ap-logo { width: auto; object-fit: contain; }
.ap-logo--allinpay { height: 55px; }
.ap-logo--aircash { height: 38px; }
.ap-lead { max-width: 650px; margin: 28px 0 0; color: var(--ap-muted); font-size: clamp(1.05rem, 1.8vw, 1.32rem); line-height: 1.65; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.ap-button { display: inline-flex; justify-content: center; align-items: center; min-height: 54px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; color: var(--ap-ink); font-weight: 750; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.ap-button:hover { transform: translateY(-2px); }
.ap-button--primary { background: var(--ap-red); color: #fff; box-shadow: 0 14px 30px rgba(227,27,23,.2); }
.ap-button--ghost { border-color: var(--ap-line); background: rgba(255,255,255,.7); }
.ap-note { display: flex; gap: 9px; align-items: center; margin: 24px 0 0; color: var(--ap-muted); font-size: .9rem; }
.ap-note span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #dff5e6; color: #16853b; font-weight: 900; }
.ap-hero__visual { position: relative; display: grid; place-items: center; min-height: 650px; }
.ap-kiosk-frame { width: min(420px, 82%); padding: 12px; border: 9px solid #181818; border-radius: 44px; background: #181818; box-shadow: 0 40px 70px rgba(32,20,14,.2); transform: rotate(2deg); overflow: hidden; }
.ap-kiosk-frame img { width: 100%; border-radius: 22px; transform: scale(1.04); transform-origin: center; }
.ap-float-card { display: none !important; }
.ap-float-card__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--ap-red); color: #fff; font-size: 1.15rem; font-weight: 900; }

.ap-overview { padding: 100px 0; }
.ap-overview h2 { max-width: 660px; }
.ap-overview__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 48px; }
.ap-summary-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; min-height: 250px; padding: 38px; border: 1px solid var(--ap-line); border-radius: var(--ap-radius); background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.ap-summary-card:hover { transform: translateY(-4px); box-shadow: var(--ap-shadow); }
.ap-summary-card__number { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 17px; background: #fff0ed; color: var(--ap-red); font-weight: 900; }
.ap-summary-card p { color: var(--ap-muted); line-height: 1.65; }
.ap-summary-card a { display: inline-flex; gap: 9px; align-items: center; margin-top: 14px; color: var(--ap-red-dark); font-weight: 800; text-decoration: none; }

.ap-tutorial { padding: 100px 0; background: #171514; color: #fff; }
.ap-section-heading { display: grid; grid-template-columns: 1fr .65fr; gap: 40px; align-items: end; }
.ap-tutorial .ap-section-heading h2 { color: #fff !important; font-weight: 750; opacity: 1; text-shadow: 0 2px 18px rgba(0,0,0,.18); }
.ap-section-heading > p { margin: 0; color: #d8d2ce; line-height: 1.7; }
.ap-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 46px 0 24px; padding: 8px; border-radius: 20px; background: #292624; }
.ap-tab { display: flex; gap: 13px; align-items: center; min-height: 62px; padding: 0 22px; border: 0; border-radius: 14px; background: transparent; color: #bdb7b2; font: inherit; font-weight: 750; cursor: pointer; }
.ap-tab span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #5e5651; border-radius: 50%; font-size: .82rem; }
.ap-tab.is-active { background: #fff; color: var(--ap-ink); }
.ap-tab.is-active span { border-color: var(--ap-red); background: var(--ap-red); color: #fff; }
.ap-panel { border-radius: 30px; background: #fff; color: var(--ap-ink); overflow: hidden; }
.ap-stepper { display: grid; grid-template-columns: .82fr 1.18fr; min-height: 680px; }
.ap-stepper > * { min-width: 0; }
.ap-stepper__media { position: relative; display: grid; place-items: center; padding: 66px 42px 42px; overflow: hidden; background: linear-gradient(145deg, #f8eeea, #fff6f0); }
.ap-stepper__media::before { content: ""; position: absolute; width: 440px; height: 440px; border: 78px solid rgba(227,27,23,.06); border-radius: 50%; }
.ap-progress-label { position: absolute; top: 30px; left: 32px; z-index: 2; color: var(--ap-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; }
.ap-progress-label strong { color: var(--ap-red); }
.ap-phone { position: relative; z-index: 1; display: grid; place-items: center; width: min(285px, 86%); aspect-ratio: .52; padding: 9px; border: 9px solid #24211f; border-radius: 42px; background: #24211f; box-shadow: 0 32px 50px rgba(73,34,18,.24); overflow: hidden; }
.ap-phone img { width: 100%; height: 100%; border-radius: 27px; background: #fff; object-fit: contain; }
.ap-phone img[src$="step-07.jpg"],
.ap-phone img[src$="step-09.jpg"] { object-fit: cover; }
.ap-stepper__content { display: flex; flex-direction: column; padding: 44px 48px 36px; }
.ap-step-list { counter-reset: ap-tutorial-step; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0 0 52px; padding: 0; list-style: none; }
.ap-step-list--compact { grid-template-columns: repeat(3, 1fr); }
.ap-step-list li { position: relative; counter-increment: ap-tutorial-step; }
.ap-step-list li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 17px); right: calc(-50% + 17px); height: 2px; background: var(--ap-line); }
.ap-step-list li.is-active:not(:last-child)::after, .ap-step-list li.is-done:not(:last-child)::after { background: #f3b7b4; }
.ap-step-list button { position: relative; z-index: 1; width: 100%; padding: 0; border: 0; background: transparent; color: #9a938e; font: inherit; font-size: 0; cursor: pointer; }
.ap-step-list button::before { content: counter(ap-tutorial-step); display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 10px; border: 2px solid var(--ap-line); border-radius: 50%; background: #fff; color: #9a938e; font-size: .7rem; line-height: 1; font-weight: 900; }
.ap-step-list button span { display: none !important; }
.ap-step-list button strong { display: block; font-size: .7rem; line-height: 1.5; font-weight: 700; }
.ap-step-list li.is-active button { color: var(--ap-ink); }
.ap-step-list li.is-active button::before, .ap-step-list li.is-done button::before { border-color: var(--ap-red); background: var(--ap-red); color: #fff; }
.ap-step-copy { max-width: 620px; }
.ap-step-copy__eyebrow { margin: 0 0 10px; color: var(--ap-red); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.ap-step-copy h3 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
.ap-step-copy p, .ap-step-copy li { color: var(--ap-muted); line-height: 1.65; }
.ap-step-copy ul { padding-left: 20px; }
.ap-step-copy li + li { margin-top: 7px; }
.ap-tip { margin-top: 22px; padding: 16px 18px; border-left: 3px solid var(--ap-orange); border-radius: 0 12px 12px 0; background: var(--ap-soft); }
.ap-stepper__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 32px; }
.ap-nav-button { min-height: 48px; padding: 0 18px; border: 1px solid var(--ap-line); border-radius: 999px; background: #fff; color: var(--ap-ink); font: inherit; font-weight: 750; cursor: pointer; }
.ap-nav-button:disabled { opacity: .35; cursor: default; }
.ap-nav-button--next { border-color: var(--ap-red); background: var(--ap-red); color: #fff; }

.ap-help { padding: 100px 0; }
.ap-help__box { display: grid; grid-template-columns: .75fr 1.25fr; gap: 60px; padding: 55px; border-radius: 32px; background: var(--ap-soft); }
.ap-help__items { display: grid; gap: 13px; }
.ap-help__items p { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; margin: 0; padding: 20px; border-radius: 16px; background: #fff; color: var(--ap-muted); line-height: 1.5; }
.ap-help__items span { color: var(--ap-red); font-size: .78rem; font-weight: 900; }

.ap-button:focus-visible, .ap-tab:focus-visible, .ap-step-list button:focus-visible, .ap-nav-button:focus-visible, .ap-summary-card a:focus-visible { outline: 3px solid #ffb248; outline-offset: 3px; }

@media (max-width: 900px) {
  .ap-hero__grid, .ap-help__box { grid-template-columns: 1fr; }
  .ap-stepper { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .ap-stepper__media, .ap-stepper__content { width: 100%; min-width: 0; }
  .ap-brand-row { margin-bottom: 48px; }
  .ap-hero__visual { min-height: 600px; }
  .ap-stepper__media { min-height: 650px; }
  .ap-help__box { gap: 34px; }
}

@media (max-width: 680px) {
  .ap-shell { width: min(100% - 24px, 1160px); }
  .ap-hero { padding-top: 20px; }
  .ap-brand-row { gap: 13px; }
  .ap-logo--allinpay { height: 42px; }
  .ap-logo--aircash { height: 27px; }
  .ap-overview__grid, .ap-section-heading, .ap-tabs { grid-template-columns: 1fr; }
  .ap-summary-card { grid-template-columns: 1fr; padding: 27px; }
  .ap-tab { justify-content: flex-start; }
  .ap-panel { width: 100%; overflow: hidden; border-radius: 22px; }
  .ap-stepper { min-height: 0; overflow: hidden; }
  .ap-stepper__content { width: 100%; min-width: 0; padding: 30px 18px 24px; }
  .ap-step-list, .ap-step-list--compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 4px; width: 100%; overflow: visible; padding: 0; margin-bottom: 34px; }
  .ap-step-list li { min-width: 0; width: auto; }
  .ap-step-list li::after { display: none; }
  .ap-step-list button strong { font-size: .64rem; line-height: 1.3; }
  .ap-step-list button::before { width: 32px; height: 32px; margin-bottom: 7px; }
  .ap-stepper__media { width: 100%; min-width: 0; min-height: 0; padding: 58px 16px 28px; }
  .ap-phone { width: min(230px, 74vw); }
  .ap-progress-label { top: 22px; left: 20px; }
  .ap-step-copy h3 { font-size: clamp(1.75rem, 9vw, 2.25rem); }
  .ap-step-copy p, .ap-step-copy li { font-size: .98rem; }
  .ap-stepper__nav { gap: 8px; }
  .ap-nav-button { flex: 1; padding-inline: 12px; }
  .ap-help__box { padding: 30px 20px; }
  .ap-float-card { left: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-page, .ap-page *, .ap-page *::before, .ap-page *::after { transition: none !important; }
}
