/*
  Azin Pash Tehran - History Page Styles
*/

:root {
  --az-primary-dark: #121212;
  --az-dim-gray-30: #cccccc95;
  --az-gap-center: 130px;
  --az-step-top-space: 74px;
  --az-year-gap: 14px;
}

.az-base-container {
  max-width: 1200px;
}

.az-process-wrapper {
  width: 100%;
  position: relative;
}

.az-step {
  position: relative;
}

/* ===== Year label beside center dot ===== */

.az-year-label {
  position: absolute;
  top: 2px;
  right: 50%;
  white-space: nowrap;
  font-size: 14px;
  z-index: 2;
}

/* odd = سمت راست خط */
.az-step:nth-child(odd) .az-year-label {
  transform: translateX(calc(110% + var(--az-year-gap)));
}

/* even = سمت چپ خط */
.az-step:nth-child(even) .az-year-label {
  transform: translateX(calc(-10% - var(--az-year-gap)));
}

.az-paragraph-large {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.az-paragraph-large li {
  margin-bottom: 0.8rem;
  color: var(--text-ccc);
}

.az-process-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.az-process-img--mobile {
  display: none;
}

/* number badge */

.az-find-number-wrapper {
  background-color: var(--az-accent);
  border-radius: 50px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   Desktop (>=992): RTL + zigzag
   ========================= */

@media (min-width: 992px) {
  /* center line */

  .az-process-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;

    right: 50%;
    transform: translateX(50%);

    width: 2px;
    background: var(--az-dim-gray-30);
    z-index: 0;
  }

  .az-step {
    padding-top: var(--az-step-top-space);
  }

  /* convert each step row to grid */

  .az-step.row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    column-gap: var(--az-gap-center);
  }

  .az-step.row > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
  }

  /* spacing */

  .az-left,
  .az-right {
    padding-bottom: 80px;
  }

  @media (min-width: 1280px) {
    .az-left,
    .az-right {
      padding-bottom: 120px;
    }
  }

  /* default placement */

  .az-left {
    grid-column: 1;
    padding-left: 0;
  }

  .az-right {
    grid-column: 2;
    padding-right: 0;
  }

  /* even swap */

  .az-step:nth-child(even) .az-left {
    grid-column: 2;
    padding-right: 0;
  }

  .az-step:nth-child(even) .az-right {
    grid-column: 1;
    padding-left: 0;
  }

  /* center dot */

  .az-find-number-wrapper {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
    z-index: 2;
  }

  /* hide mobile image */

  .az-process-img--mobile {
    display: none;
  }
}

/* =========================
   Mobile (<992): stacked
   ========================= */

@media (max-width: 991.98px) {
  .az-process {
    padding-inline: 12px;
  }

  .az-section-title {
    font-size: 24px;
    line-height: 1.6;
  }

  .az-section-sub {
    font-size: 14px;
    line-height: 1.9;
  }

  .az-process-wrapper::before {
    display: none;
  }

  .az-left,
  .az-right {
    padding-bottom: 56px;
    padding-left: 0;
    padding-right: 0;
  }

  /* hide desktop image */

  .az-left > .az-process-img {
    display: none;
  }

  /* show mobile image */

  .az-process-img--mobile {
    display: block;
  }

  .az-process-img {
    height: 220px;
    border-radius: 12px;
  }

  /* remove center dot */

  .az-find-number-wrapper {
    display: none;
  }

  /* fix year label */

  .az-year-label {
    position: static;
    display: inline-block;
    transform: none !important;
    margin-top: 12px;
    font-size: 13px;
  }

  /* chips */

  .az-history-chips {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .az-history-chips::-webkit-scrollbar {
    display: none;
  }

  .az-chip {
    flex: 0 0 auto;
    font-size: 13px;
    padding: 7px 12px;
  }

  /* typography */

  .az-right h4 {
    font-size: 20px;
    line-height: 1.7;
  }

  .az-right p,
  .az-paragraph-large {
    font-size: 15px;
    line-height: 2;
  }

  .az-paragraph-large {
    padding-right: 18px;
  }

  /* disable reveal animation glitch on mobile */

  .az-step {
    opacity: 1;
    transform: none;
  }
}

/* ===== Scroll Reveal Animation ===== */

.az-step {
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.az-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* image animation */

.az-step .az-process-img {
  transform: scale(0.96);
  transition: transform 1000ms ease;
}

.az-step.is-visible .az-process-img {
  transform: scale(1);
}

/* ===== History helpers ===== */

.az-history-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  height: 100%;
}

.az-history-card__label {
  font-size: 13px;
  opacity: 0.8;
  color: #cfcfcf;
}

.az-history-card__value {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-top: 6px;
}

.az-history-card__meta {
  font-size: 13px;
  margin-top: 6px;
}

/* chips */

.az-history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.az-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8e8e8;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
  white-space: nowrap;
}

.az-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.az-chip.is-active {
  border-color: var(--az-accent);
  color: #fff;
}
