/* =======================================
   SHARED: PROCESS TIMELINE (Buy / Rent / Sell)
   process-timeline.css
   - Timeline (circles + centered line)
   - Clickable steps update the description panel
   - Locked panel prevents layout jumping
   ======================================= */

/* =======================================
   Shared helpers
   ======================================= */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.service-timeline {
  padding: 2.4rem 0 1.6rem;
}

.timeline-head {
  max-width: 880px;
}

/* =======================================
   TIMELINE GRAPHIC
   ======================================= */

.process-timeline {
  /* ===== knobs ===== */
  --circle: 86px;          /* circle size */
  --title-h: 32px;         /* reserved title height */
  --title-gap: 12px;       /* gap between title and circle */
  --line-thickness: 4px;   /* timeline thickness */
  --line-nudge: 14px;      /* drop the line a touch if needed */

  position: relative;
  margin-top: 1.25rem;
  padding: 1.1rem 0 0.6rem;

  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

/* Timeline line — centered through the middle of circles */
.process-line {
  position: absolute;
  left: 6%;
  right: 6%;
  height: var(--line-thickness);
  border-radius: 999px;

  top: calc(var(--title-h) + var(--title-gap) + (var(--circle) / 2) + var(--line-nudge));
  transform: translateY(-50%);

  /* Light -> dark */
  background-image: linear-gradient(
    90deg,
    #f4eee6 0%,
    #e7ddcf 20%,
    #d8c7b3 40%,
    #cfb18e 60%,
    #c9b8a4 80%,
    #373a3a 100%
  );

  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1; /* above the line */
}

/* Titles above each icon (fixed height keeps everything aligned) */
.process-step-title {
  height: var(--title-h);
  display: grid;
  place-items: center;
  margin-bottom: var(--title-gap);

  font-family: "Oswald", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--treg-slate);
  line-height: 1.15;
}

/* =======================================
   STEP BUTTONS
   ======================================= */

.process-step-btn {
  appearance: none;
  width: var(--circle);
  height: var(--circle);
  border-radius: 999px;

  border: 1px solid rgba(0, 0, 0, 0.10);
  background: var(--step-color, rgba(207, 177, 142, 0.12));

  display: grid;
  place-items: center;
  margin: 0 auto;

  cursor: pointer;
  position: relative;
  z-index: 2;

  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* Force SVG icons to inherit from the button (currentColor) */
.process-timeline .process-step-btn {
  color: var(--treg-charcoal) !important;
}

.process-timeline .process-step-btn svg {
  color: inherit !important;
}

.process-timeline .process-step-btn svg * {
  stroke: currentColor !important;
}

/* Allow intentional filled dots (like the key icon) */
.process-timeline .process-step-btn svg [fill="currentColor"] {
  fill: currentColor !important;
}

.process-step-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.10);
}

/* Active state */
.process-step-btn.is-active {
  border-color: rgba(207, 177, 142, 0.95) !important;
  box-shadow: 0 22px 46px rgba(207, 177, 142, 0.22) !important;
  transform: translateY(-1px);
}

/* Keyboard focus (only shows when tabbing) */
.process-step-btn:focus-visible {
  outline: 3px solid rgba(207, 177, 142, 0.75);
  outline-offset: 4px;
  box-shadow: 0 22px 46px rgba(207, 177, 142, 0.22);
}

/* Avoid default focus ring for mouse clicks */
.process-step-btn:focus {
  outline: none;
}

/* SVG icon sizing */
.process-icon {
  width: 34px;
  height: 34px;
  display: block;
}

/* If a step ever goes very dark, flip icon to white automatically */
.process-step-btn[style*="#373a3a"],
.process-step-btn[style*="#1e180d"] {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.22);
}

/* Bullets */
.process-bullets {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;

  color: var(--treg-slate);
  font-size: 0.9rem;
  line-height: 1.55;
}

.process-bullets li {
  margin: 0.28rem 0;
}

/* =======================================
   DESCRIPTION PANEL (BOXED + LOCKED)
   ======================================= */

.timeline-panel {
  margin-top: 1.25rem;
  max-width: 980px;

  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 1.25rem 1.35rem;

  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);

  min-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
}

.timeline-panel::before {
  content: "";
  display: block;
  height: 1px;
  background: rgba(207, 177, 142, 0.35);
  margin-bottom: 1rem;
}

.timeline-title {
  font-family: "League Spartan", system-ui, sans-serif;
  font-size: 1.45rem;
  margin: 0 0 0.5rem;
}

.timeline-body p {
  margin: 0.65rem 0;
  line-height: 1.7;
  color: var(--treg-slate);
}

.timeline-body a {
  color: var(--treg-charcoal);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* =======================================
   Reduced motion
   ======================================= */

@media (prefers-reduced-motion: reduce) {
  .process-step-btn {
    transition: none;
  }
}

/* =======================================
   Responsive
   ======================================= */

@media (max-width: 980px) {
  .process-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 1rem;

    --circle: 78px;
    --title-h: 28px;
    --title-gap: 10px;
    --line-thickness: 4px;
    --line-nudge: 0px;
  }

  .process-line {
    display: none;
  }

  .timeline-panel {
    min-height: 320px;
    padding: 1.1rem 1.1rem;
  }

  .process-icon {
    width: 30px;
    height: 30px;
  }

  .process-bullets {
    font-size: 0.88rem;
  }
}
