/* Ana sayfa — Nasıl Çalışır mobil kaydırma hub */

@media (max-width: 900px) {
  body[data-page="home"] #nasil-calisir.how-hub {
    padding: 1.35rem 0 1.5rem;
    background:
      radial-gradient(ellipse 80% 55% at 0% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
      radial-gradient(ellipse 70% 50% at 100% 100%, rgba(22, 163, 74, 0.07) 0%, transparent 50%),
      var(--color-surface, #fff) !important;
    overflow: hidden;
  }

  body[data-page="home"] .how-hub__head {
    text-align: center;
    margin-bottom: 0.85rem;
  }

  body[data-page="home"] .how-hub__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #4338ca;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body[data-page="home"] .how-hub__header {
    text-align: center;
    margin-bottom: 0.6rem;
  }

  body[data-page="home"] .how-hub__header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
  }

  body[data-page="home"] .how-hub__header p {
    margin: 0 auto;
    max-width: 22rem;
    font-size: 0.86rem;
    color: var(--color-text-muted, #64748b);
  }

  body[data-page="home"] .how-scroll-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-top: 0.1rem;
  }

  body[data-page="home"] .how-scroll-track__fill {
    display: block;
    height: 100%;
    width: 25%;
    min-width: 25%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6366f1, #16a34a);
    transition: width 0.15s ease-out;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
  }

  body[data-page="home"] .how-strip {
    position: relative;
    margin: 0 calc(-1 * max(1rem, env(safe-area-inset-left, 0px)));
    padding: 0.2rem max(1rem, env(safe-area-inset-left, 0px)) 0;
  }

  body[data-page="home"] .how-strip::before,
  body[data-page="home"] .how-strip::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0.3rem;
    width: 1.75rem;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.2s;
  }

  body[data-page="home"] .how-strip::before {
    left: max(1rem, env(safe-area-inset-left, 0px));
    background: linear-gradient(90deg, var(--color-surface, #fff), transparent);
    opacity: 0;
  }

  body[data-page="home"] .how-strip::after {
    right: max(1rem, env(safe-area-inset-right, 0px));
    background: linear-gradient(270deg, var(--color-surface, #fff), transparent);
  }

  body[data-page="home"] .how-strip.is-scrolled::before {
    opacity: 1;
  }

  body[data-page="home"] .how-strip.is-end::after {
    opacity: 0;
  }

  /* Yatay kaydırmalı adımlar */
  body[data-page="home"] .steps.steps--hub {
    display: flex !important;
    grid-template-columns: unset !important;
    flex-wrap: nowrap;
    gap: 0.65rem !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.15rem 0.35rem 0.5rem;
    width: 100%;
  }

  body[data-page="home"] .steps.steps--hub::-webkit-scrollbar {
    display: none;
  }

  body[data-page="home"] .step.step--hub {
    --step-accent: #6366f1;
    flex: 0 0 min(82vw, 300px);
    scroll-snap-align: start;
    text-align: center;
    padding: 1.1rem 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--step-accent) 20%, #e2e8f0);
    background: linear-gradient(
      160deg,
      var(--color-surface, #fff) 0%,
      color-mix(in srgb, var(--step-accent) 5%, #fff) 100%
    );
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.04),
      0 8px 24px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
    animation: how-step-in 0.45s ease both;
    animation-delay: calc(var(--step-i, 0) * 60ms);
  }

  @keyframes how-step-in {
    from {
      opacity: 0;
      transform: translateX(16px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  body[data-page="home"] .step.step--hub::before {
    content: "";
    position: absolute;
    top: -25%;
    right: -15%;
    width: 55%;
    height: 55%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--step-accent) 18%, transparent) 0%, transparent 70%);
    pointer-events: none;
  }

  body[data-page="home"] .step--hub .step__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
  }

  body[data-page="home"] .step--hub .step__icon-wrap {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    background: linear-gradient(
      145deg,
      color-mix(in srgb, var(--step-accent) 14%, #fff),
      color-mix(in srgb, var(--step-accent) 6%, #f8fafc)
    );
    color: var(--step-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  body[data-page="home"] .step--hub .step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--step-accent) 12%, transparent);
    color: var(--step-accent);
    border: 1px solid color-mix(in srgb, var(--step-accent) 18%, transparent);
  }

  body[data-page="home"] .step--hub .step__number::before {
    content: "Adım " attr(data-step);
    font-weight: 800;
    white-space: nowrap;
  }

  body[data-page="home"] .step--hub h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--color-text);
  }

  body[data-page="home"] .step--hub p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--color-text-muted, #64748b);
    text-align: center;
  }

  body[data-page="home"] #nasil-calisir .section__footer-link {
    margin-top: 1rem;
    text-align: center;
  }

  body[data-page="home"] #nasil-calisir .section__footer-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--color-surface-muted, #f1f5f9);
    border: 1px solid var(--color-border, #e2e8f0);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  }
}

@media (min-width: 901px) {
  body[data-page="home"] .how-hub__chip,
  body[data-page="home"] .how-scroll-track {
    display: none;
  }

  body[data-page="home"] .step--hub .step__icon-wrap {
    display: none;
  }

  body[data-page="home"] .step--hub .step__top {
    display: block;
    margin-bottom: 1rem;
  }

  body[data-page="home"] .step--hub .step__number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 0;
    padding: 0;
    border-radius: 50%;
    font-size: 1.25rem;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: none;
    white-space: nowrap;
  }

  body[data-page="home"] .step--hub .step__number::before {
    content: attr(data-step);
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1;
  }
}
