/* =========================================
   ALL 4 ONE LOCAL — PROCESS SECTION
   Complete replacement for WP-Coder CSS
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800;900&display=swap");


/* SECTION */

#a4p-process {
  --a4p-accent: #8500df;
  --a4p-bright: #a629ff;
  --a4p-ink: #17101f;
  --a4p-muted: #514959;
  --a4p-bg: #f7f5f9;
  --a4p-tooltip-bg: #241331;

  width: 100%;
  padding: 80px 24px 90px;
  margin: 0;
  background: var(--a4p-bg);
  color: var(--a4p-ink);
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
  isolation: isolate;
}

#a4p-process *,
#a4p-process *::before,
#a4p-process *::after {
  box-sizing: border-box;
}

#a4p-process .a4p-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}


/* OPTIONAL SECTION HEADING */

#a4p-process .a4p-head {
  margin: 0 0 48px;
  text-align: center;
}

#a4p-process .a4p-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 1px solid var(--a4p-bright);
  border-radius: 30px;
  background: #ffffff;
  color: var(--a4p-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

#a4p-process .a4p-tag::before {
  content: "✦";
  color: var(--a4p-accent);
}

#a4p-process h2 {
  margin: 17px 0 0;
  color: var(--a4p-ink);
  font-family: "Roboto", sans-serif;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.3px;
}

#a4p-process h2 span {
  color: var(--a4p-accent);
}


/* PROCESS ROWS */

#a4p-process .a4p-list {
  display: block;
  padding: 0;
  margin: 0;
  list-style: none;
}

#a4p-process .a4p-row {
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(220px, 320px)
    minmax(0, 1fr);
  align-items: center;
  column-gap: 40px;
  min-width: 0;
  padding: 24px 0 70px;
  margin: 0;
  list-style: none;
}

#a4p-process .a4p-row:last-child {
  padding-bottom: 0;
}


/* NUMBERS AND TITLES */

#a4p-process .a4p-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  text-align: right;
}

#a4p-process .a4p-number {
  display: block;
  margin: 0 0 17px;
  color: var(--a4p-ink);
  font-family: "Roboto", sans-serif;
  font-size: clamp(76px, 9.4vw, 132px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -7px;
}

#a4p-process h3 {
  margin: 0;
  color: var(--a4p-accent);
  font-family: "Roboto", sans-serif;
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
}

#a4p-process .a4p-row:nth-child(even) .a4p-title {
  grid-column: 3;
  text-align: left;
}


/* CIRCULAR IMAGE / VIDEO
   Transparent ring by default.
   Space remains reserved to prevent layout movement.
*/

#a4p-process .a4p-photo {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 7px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transition:
    background-color 280ms ease,
    box-shadow 280ms ease;
}

#a4p-process .a4p-photo img,
#a4p-process .a4p-photo video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: #e7dced;
  box-shadow: none;
  transform: none;
}


/* CONNECTING ARROWS */

#a4p-process .a4p-photo::after {
  content: "";
  position: absolute;
  top: calc(100% + 13px);
  left: calc(50% - 1px);
  width: 2px;
  height: 35px;
  background: var(--a4p-bright);
  pointer-events: none;
}

#a4p-process .a4p-photo::before {
  content: "";
  position: absolute;
  top: calc(100% + 44px);
  left: calc(50% - 6px);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--a4p-bright);
  pointer-events: none;
}

#a4p-process .a4p-row:last-child .a4p-photo::before,
#a4p-process .a4p-row:last-child .a4p-photo::after {
  display: none;
}


/* DESCRIPTION */

#a4p-process .a4p-copy {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  text-align: left;
}

#a4p-process .a4p-copy p {
  margin: 16px 0 0;
  padding: 0;
  color: var(--a4p-muted);
  font-family: "Roboto", sans-serif;
  font-size: clamp(17px, 1.65vw, 20px);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: normal;
}

#a4p-process .a4p-row:nth-child(even) .a4p-copy {
  grid-column: 1;
  text-align: right;
}


/* TOOL ICONS
   Hidden visually until the row is hovered or focused.
   Their space remains reserved, keeping paragraphs still.
   Buttons remain keyboard-accessible.
*/

#a4p-process .a4p-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

#a4p-process .a4p-row:nth-child(even) .a4p-tools {
  justify-content: flex-end;
}

#a4p-process .a4p-tool {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 4px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--a4p-accent);
  box-shadow: none;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: normal;
  text-decoration: none;
  text-transform: none;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

#a4p-process .a4p-tool img {
  display: block;
  width: 36px;
  height: 36px;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
  filter: none;
  opacity: 1;
  pointer-events: none;
}

#a4p-process .a4p-tool svg {
  display: block;
  width: 36px;
  height: 36px;
  pointer-events: none;
}

#a4p-process .a4p-tool[aria-expanded="true"] {
  background: #eadbf8;
  transform: translateY(-2px);
}

#a4p-process .a4p-tool:focus-visible {
  outline: 2px solid var(--a4p-accent);
  outline-offset: 4px;
}

#a4p-process .a4p-tool:active {
  transform: translateY(0);
}


/* TOOL-NAME LABELS */

#a4p-process .a4p-tip {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 10px);
  left: 50%;
  width: max-content;
  max-width: 190px;
  padding: 7px 10px;
  border-radius: 5px;
  background: var(--a4p-tooltip-bg);
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

/* Hover bridge between icon and label */
#a4p-process .a4p-tip::before {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 12px;
}

#a4p-process .a4p-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - 4px);
  border: 4px solid transparent;
  border-top-color: var(--a4p-tooltip-bg);
}

#a4p-process .a4p-tool:not(.a4p-dismissed):focus-visible .a4p-tip,
#a4p-process .a4p-tool[aria-expanded="true"] .a4p-tip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}


/* KEYBOARD ACCESS
   Focusing a tool reveals that entire step's icons and ring.
*/

#a4p-process .a4p-row:focus-within .a4p-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#a4p-process .a4p-row:focus-within .a4p-photo {
  background: var(--a4p-bright);
  box-shadow: 0 0 34px rgb(133 0 223 / 18%);
}


/* DESKTOP HOVER
   Hover anywhere over a step to reveal its icons and ring.
*/

@media (hover: hover) and (pointer: fine) {
  #a4p-process .a4p-row:hover .a4p-tools {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  #a4p-process .a4p-row:hover .a4p-photo {
    background: var(--a4p-bright);
    box-shadow: 0 0 34px rgb(133 0 223 / 18%);
  }

  #a4p-process .a4p-tool:hover {
    background: #eadbf8;
    transform: translateY(-2px);
  }

  #a4p-process .a4p-tool:not(.a4p-dismissed):hover .a4p-tip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}


/* TABLET LAYOUT */

@media (min-width: 768px) and (max-width: 1024px) {
  #a4p-process {
    padding: 65px 24px 75px;
  }

  #a4p-process .a4p-row {
    grid-template-columns:
      minmax(0, 1fr)
      240px
      minmax(0, 1fr);
    column-gap: 24px;
  }

  #a4p-process .a4p-number {
    font-size: 90px;
    letter-spacing: -5px;
  }

  #a4p-process h3 {
    font-size: 40px;
    letter-spacing: -1.5px;
  }

  #a4p-process .a4p-copy p {
    font-size: 16px;
  }

  #a4p-process .a4p-tools {
    gap: 4px;
  }
}


/* MOBILE LAYOUT */

@media (max-width: 767px) {
  #a4p-process {
    padding: 55px 22px 60px;
  }

  #a4p-process .a4p-head {
    margin-bottom: 35px;
  }

  #a4p-process .a4p-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 23px;
    padding: 16px 0 66px;
  }

  #a4p-process .a4p-row:last-child {
    padding-bottom: 0;
  }

  #a4p-process .a4p-title,
  #a4p-process .a4p-row:nth-child(even) .a4p-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 15px;
    width: 100%;
    text-align: center;
  }

  #a4p-process .a4p-number {
    margin: 0;
    font-size: 54px;
    line-height: 1;
    letter-spacing: -3px;
  }

  #a4p-process h3 {
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -1.5px;
  }

  #a4p-process .a4p-photo {
    flex: none;
    width: min(100%, 285px);
  }

  #a4p-process .a4p-photo::before,
  #a4p-process .a4p-photo::after {
    display: none;
  }

  #a4p-process .a4p-copy,
  #a4p-process .a4p-row:nth-child(even) .a4p-copy {
    width: 100%;
    max-width: 390px;
    text-align: center;
  }

  #a4p-process .a4p-copy p {
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.65;
  }

  #a4p-process .a4p-tools,
  #a4p-process .a4p-row:nth-child(even) .a4p-tools {
    justify-content: center;
    gap: 10px;
  }

  #a4p-process .a4p-row:not(:last-child)::after {
    content: "↓";
    position: absolute;
    bottom: 13px;
    left: 50%;
    color: var(--a4p-accent);
    font-size: 28px;
    line-height: 1;
    transform: translateX(-50%);
    pointer-events: none;
  }
}


/* SMALL PHONES */

@media (max-width: 359px) {
  #a4p-process {
    padding-right: 18px;
    padding-left: 18px;
  }

  #a4p-process .a4p-title,
  #a4p-process .a4p-row:nth-child(even) .a4p-title {
    gap: 12px;
  }

  #a4p-process .a4p-number {
    font-size: 46px;
  }

  #a4p-process h3 {
    font-size: 32px;
  }

  #a4p-process .a4p-tools,
  #a4p-process .a4p-row:nth-child(even) .a4p-tools {
    gap: 8px;
  }
}


/* TOUCH DEVICES
   No hover is available, so keep tools accessible.
   Tapping a tool uses your existing JS to show its name.
*/

@media (hover: none), (pointer: coarse) {
  #a4p-process .a4p-tools {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  #a4p-process .a4p-photo {
    background: var(--a4p-bright);
    box-shadow: 0 0 24px rgb(133 0 223 / 12%);
  }
}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  #a4p-process *,
  #a4p-process *::before,
  #a4p-process *::after {
    animation: none !important;
    transition: none !important;
  }

  #a4p-process .a4p-tools {
    transform: none;
  }
}
/* REFERENCE INTERACTIONS — original ALL4ONE palette retained */
#a4p-process .a4p-row { isolation: isolate; }
#a4p-process .a4p-row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at center, rgb(133 0 223 / 12%), transparent 60%);
  opacity: 0; pointer-events: none; transition: opacity .5s ease;
}
#a4p-process .a4p-row.a4p-active::before { opacity: 1; }
#a4p-process .a4p-title, #a4p-process .a4p-copy {
  position: relative;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .5s ease;
}
#a4p-process .a4p-copy { opacity: .8; }
#a4p-process .a4p-row.a4p-active .a4p-title { transform: translateX(15px); }
#a4p-process .a4p-row.a4p-active .a4p-copy { transform: translateX(-15px); opacity: 1; }
#a4p-process .a4p-row:nth-child(even).a4p-active .a4p-title { transform: translateX(-15px); }
#a4p-process .a4p-row:nth-child(even).a4p-active .a4p-copy { transform: translateX(15px); }
#a4p-process .a4p-title::after {
  content: ""; position: absolute; bottom: -15px; left: 0;
  width: 0; height: 4px; background: var(--a4p-accent);
  transition: width .5s ease; pointer-events: none;
}
#a4p-process .a4p-row:nth-child(even) .a4p-title::after { left: auto; right: 0; }
#a4p-process .a4p-row.a4p-active .a4p-title::after { width: 120px; }

/* Animate the media, keeping the arrow independent of its scale. */
#a4p-process .a4p-photo,
#a4p-process .a4p-row:hover .a4p-photo,
#a4p-process .a4p-row:focus-within .a4p-photo {
  appearance: none; -webkit-appearance: none; display: block;
  background: transparent; box-shadow: none; cursor: pointer;
  overflow: visible; color: inherit; line-height: 0;
}
#a4p-process .a4p-photo video {
  transition: box-shadow .5s ease, transform .5s cubic-bezier(.22,1,.36,1);
}
#a4p-process .a4p-row.a4p-active .a4p-photo video {
  transform: scale(1.03);
  box-shadow: 0 0 0 8px var(--a4p-bright), 0 0 50px rgb(133 0 223 / 25%);
}
#a4p-process .a4p-photo:focus-visible { outline: 2px solid var(--a4p-accent); outline-offset: 14px; }
#a4p-process .a4p-photo::before, #a4p-process .a4p-photo::after {
  opacity: 0; transform: translateY(-15px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1);
}
#a4p-process .a4p-row.a4p-active .a4p-photo::before,
#a4p-process .a4p-row.a4p-active .a4p-photo::after { opacity: 1; transform: translateY(0); }

/* Each icon has its own delay; the paragraph keeps its reserved position. */
#a4p-process .a4p-tools,
#a4p-process .a4p-row:hover .a4p-tools,
#a4p-process .a4p-row:focus-within .a4p-tools {
  opacity: 1; transform: none; transition: none; pointer-events: none;
}
#a4p-process .a4p-tool {
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s ease, transform .4s ease;
  transition-delay: 0s;
}
#a4p-process .a4p-row.a4p-active .a4p-tool {
  opacity: 1; transform: translateY(0); pointer-events: auto;
  transition-delay: calc(var(--a4p-tool-index, 0) * .1s);
}
#a4p-process .a4p-tool:hover, #a4p-process .a4p-tool[aria-expanded="true"] {
  background: transparent; transform: translateY(0);
}
/* The reference shows a plain label. Dark ink keeps it legible on this light theme. */
#a4p-process .a4p-tip {
  color: var(--a4p-ink); background: transparent; padding: 0;
  bottom: calc(100% + 10px); line-height: 1.3;
  transform: translate(-50%, 5px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
#a4p-process .a4p-tip::after { display: none; }
@media (max-width: 767px) {
  #a4p-process .a4p-row.a4p-active .a4p-title,
  #a4p-process .a4p-row.a4p-active .a4p-copy,
  #a4p-process .a4p-row:nth-child(even).a4p-active .a4p-title,
  #a4p-process .a4p-row:nth-child(even).a4p-active .a4p-copy { transform: none; }
  #a4p-process .a4p-title::after,
  #a4p-process .a4p-row:nth-child(even) .a4p-title::after {
    left: 50%; right: auto; transform: translateX(-50%);
  }
  #a4p-process .a4p-row:not(:last-child)::after {
    opacity: 0; transform: translate(-50%, -15px);
    transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1);
  }
  #a4p-process .a4p-row.a4p-active:not(:last-child)::after {
    opacity: 1; transform: translate(-50%, 0);
  }
}
@media (hover: none), (pointer: coarse) {
  #a4p-process .a4p-tool { opacity: 1; transform: none; pointer-events: auto; }
  #a4p-process .a4p-copy { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #a4p-process .a4p-row.a4p-active .a4p-title,
  #a4p-process .a4p-row.a4p-active .a4p-copy,
  #a4p-process .a4p-row.a4p-active .a4p-photo video,
  #a4p-process .a4p-row:nth-child(even).a4p-active .a4p-title,
  #a4p-process .a4p-row:nth-child(even).a4p-active .a4p-copy { transform: none; }
}

/* STICKY FULL-COVER SLIDES — only this process section is affected.
   Set header offset to your fixed header height, or 0px without a fixed header. */
#a4p-process.a4p-scroll-stack {
  --a4p-header-offset: 100px;
  --a4p-admin-offset: 0px;
  --a4p-sticky-top: calc(var(--a4p-header-offset) + var(--a4p-admin-offset));
  --a4p-panel-height: calc(100svh - var(--a4p-sticky-top));
  position: relative;
  isolation: isolate;
  overflow: visible;
  padding-bottom: 0;
}
#a4p-process.a4p-scroll-stack .a4p-inner,
#a4p-process.a4p-scroll-stack .a4p-list {
  overflow: visible;
  transform: none;
}
#a4p-process.a4p-scroll-stack .a4p-list {
  position: relative;
  display: block;
  isolation: isolate;
  margin: 0;
  padding: 0;
}
#a4p-process.a4p-scroll-stack .a4p-row {
  position: sticky;
  top: var(--a4p-sticky-top);
  z-index: var(--a4p-layer, 1);
/*   min-height: var(--a4p-panel-height); */
  height: auto;
  padding: 60px 20px;
  margin: 0;
  background: var(--a4p-bg);
  border-radius: 0;
  box-shadow: 0 -14px 28px -24px rgb(23 16 31 / 22%);
  overflow: visible;
}
#a4p-process.a4p-scroll-stack .a4p-row:nth-child(1) { --a4p-layer: 1; box-shadow: none; }
#a4p-process.a4p-scroll-stack .a4p-row:nth-child(2) { --a4p-layer: 2; }
#a4p-process.a4p-scroll-stack .a4p-row:nth-child(3) { --a4p-layer: 3; }
#a4p-process.a4p-scroll-stack .a4p-row:nth-child(4) { --a4p-layer: 4; }
/* On short viewports, use normal flow so tall content is never trapped. */
#a4p-process.a4p-scroll-stack.a4p-stack-static .a4p-row {
  position: relative;
  top: auto;
  min-height: 0;
}
@media (max-width: 1024px) and (min-width: 768px) {
  #a4p-process.a4p-scroll-stack .a4p-row { padding: 50px 12px; }
}
@media (max-width: 767px) {
  #a4p-process.a4p-scroll-stack { --a4p-header-offset: 72px; }
  #a4p-process.a4p-scroll-stack .a4p-row {
    justify-content: center;
    gap: 24px;
    padding: 32px 6px 48px;
  }
  #a4p-process.a4p-scroll-stack .a4p-photo { width: min(100%, 210px); }
  #a4p-process.a4p-scroll-stack .a4p-copy p { font-size: 16px; line-height: 1.55; }
}
/* Keyboard users and reduced-motion users retain ordinary document navigation. */
@media (prefers-reduced-motion: reduce) {
  #a4p-process.a4p-scroll-stack .a4p-row { position: relative; top: auto; min-height: 0; }
}
@supports not (height: 100svh) {
  #a4p-process.a4p-scroll-stack { --a4p-panel-height: calc(100vh - var(--a4p-sticky-top)); }
}
