/**
 * Insurance "How to buy" steps — Colonnade pages
 * Visual language: .op-el-steps / .op-el-card + comparison header
 * Scoped under .op-ins-howto
 * Content constrained to theme .container (1330px + 15px gutters)
 */

.op-ins-howto {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  isolation: isolate;
  background: transparent;
  border-radius: 0;
  padding: 64px 0 56px;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* No top accent bar, no decorative wash */
.op-ins-howto::before,
.op-ins-howto::after {
  content: none;
  display: none;
}

.op-ins-howto__inner {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.op-ins-howto__header {
  max-width: 820px;
  margin: 0 auto 40px;
  text-align: center;
  padding: 0 4px;
}

.op-ins-howto__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  padding: 7px 16px;
  border-radius: 999px;
  background: #eaf4ff;
  border: none;
  color: #0b4fa8;
  font-family: Gilroy, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Gradient H2 — same as homepage / op-comparison__title-accent */
.op-ins-howto__title {
  margin: 0 0 14px;
  font-family: Gilroy, sans-serif;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-align: center;
  background: -o-linear-gradient(358.09deg, #092b96 0%, #086cdc 100%);
  background: linear-gradient(91.91deg, #092b96 0%, #086cdc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Mobile-only line break before "in ONE PLUS" */
.op-ins-howto__title-br {
  display: none;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .op-ins-howto__title {
    color: var(--op-ins-navy);
    -webkit-text-fill-color: var(--op-ins-navy);
    background: none;
  }
}

.op-ins-howto__intro {
  margin: 0 auto;
  max-width: 46rem;
  color: var(--op-ins-subtitle);
  font-family: Gilroy, sans-serif;
  font-size: clamp(15px, 1.35vw, 17px);
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
}

.op-ins-howto__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: op-ins-step;
}

/* Step card — match .op-el-steps__item / .op-el-card */
.op-ins-howto__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  height: 100%;
  padding: 22px 16px 20px;
  border-radius: 20px;
  background: var(--op-ins-card);
  border: var(--op-ins-card-border);
  box-shadow: 0 12px 30px rgba(9, 43, 150, 0.04);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

@media (hover: hover) and (pointer: fine) {
  .op-ins-howto__step:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(9, 43, 150, 0.1);
    border-color: rgba(35, 128, 235, 0.28);
  }

  .op-ins-howto__step:hover .op-ins-howto__icon {
    transform: scale(1.05);
  }
}

/* Avoid sticky hover / jump on iPhone after tap */
@media (hover: none), (pointer: coarse) {
  .op-ins-howto__step:hover,
  .op-ins-howto__step:active {
    transform: none;
    box-shadow: 0 12px 30px rgba(9, 43, 150, 0.04);
  }

  .op-ins-howto__step:hover .op-ins-howto__icon,
  .op-ins-howto__step:active .op-ins-howto__icon {
    transform: none;
  }
}

.op-ins-howto__step-num {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--op-ins-grad);
  color: #fff;
  font-family: Gilroy, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  -webkit-text-fill-color: #fff;
}

.op-ins-howto__step-label {
  display: none;
}

.op-ins-howto__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 4px 0 14px;
  color: var(--op-ins-blue2, #086cdc);
  background: var(--op-ins-soft, #eef5ff);
  border: 1px solid rgba(35, 128, 235, 0.16);
  border-radius: 16px;
  transition: transform 0.28s ease;
}

.op-ins-howto__icon svg {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  shape-rendering: geometricPrecision;
}

.op-ins-howto__step-title {
  margin: 0 0 8px;
  color: var(--op-ins-ink);
  font-family: Gilroy, sans-serif;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1.3;
  padding: 0 4px;
}

.op-ins-howto__step-desc {
  margin: 0;
  color: var(--op-ins-muted);
  font-family: Gilroy, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.op-ins-howto__text-link {
  color: var(--op-ins-blue2, #086cdc);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.op-ins-howto__text-link:hover,
.op-ins-howto__text-link:focus-visible {
  color: var(--op-ins-navy, #092b96);
  outline: none;
}

@media (max-width: 1100px) {
  .op-ins-howto {
    padding: 52px 0 48px;
  }

  .op-ins-howto__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .op-ins-howto__header {
    margin-bottom: 32px;
  }
}

@media (max-width: 767px) {
  .op-ins-howto {
    padding: 44px 0 36px;
  }

  .op-ins-howto__header {
    margin-bottom: 28px;
  }

  .op-ins-howto__title {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.2;
  }

  .op-ins-howto__title-br {
    display: block;
  }

  .op-ins-howto__intro {
    font-size: 15px;
  }

  .op-ins-howto__steps {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: none;
    margin-inline: 0;
  }

  .op-ins-howto__step {
    padding: 18px 12px 16px;
    border-radius: var(--op-ins-radius-sm);
  }

  .op-ins-howto__step-num {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 8px;
    top: 10px;
    right: 10px;
  }

  .op-ins-howto__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin: 2px 0 10px;
  }

  .op-ins-howto__icon svg {
    width: 26px;
    height: 26px;
  }

  .op-ins-howto__step-title {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .op-ins-howto__step-desc {
    max-width: none;
    font-size: 13px;
    line-height: 1.45;
  }

  .op-ins-howto__text-link {
    text-underline-offset: 1.5px;
  }
}

@media (max-width: 390px) {
  .op-ins-howto__eyebrow {
    padding: 6px 12px;
    font-size: 10px;
  }

  .op-ins-howto__title {
    font-size: 22px;
  }

  .op-ins-howto__steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .op-ins-howto__step {
    padding: 16px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .op-ins-howto__step,
  .op-ins-howto__icon {
    transition: none;
  }
}
