/* =======================================
   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;
  }
}
/* =======================================
   COMPAT PATCH: Timeline v2 markup support
   Targets buy-process.html structure:
   .timeline-wrap / .timeline-grid / .timeline-steps / .timeline-card
   (Does NOT break the older .process-timeline styles above)
   ======================================= */

.timeline-wrap {
  position: relative;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
}

.timeline-rail {
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: rgba(207, 177, 142, 0.45);
  opacity: 0.9;
}

.timeline-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 0;
}

/* Style whatever the JS renders as “step buttons” */
.timeline-steps button,
.timeline-steps [role="button"],
.timeline-steps a {
  appearance: none;
  width: 100%;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(250, 250, 250, 0.85);
  padding: 0.85rem 0.95rem 0.85rem 0.95rem;
  cursor: pointer;

  font-family: "Oswald", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--treg-charcoal);

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

.timeline-steps button:hover,
.timeline-steps [role="button"]:hover,
.timeline-steps a:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.10);
  background: #fff;
}

/* Active state (covers common classnames + aria state patterns) */
.timeline-steps .is-active,
.timeline-steps [aria-selected="true"],
.timeline-steps [aria-current="true"] {
  border-color: rgba(207, 177, 142, 0.95) !important;
  box-shadow: 0 18px 40px rgba(207, 177, 142, 0.20) !important;
  background: rgba(207, 177, 142, 0.10) !important;
}

/* Keyboard focus */
.timeline-steps button:focus-visible,
.timeline-steps [role="button"]:focus-visible,
.timeline-steps a:focus-visible {
  outline: 3px solid rgba(207, 177, 142, 0.75);
  outline-offset: 3px;
}

/* Card (v2) – match your brand panel look */
.timeline-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.timeline-card-inner {
  padding: 1.25rem 1.35rem;
  min-height: 280px;
}

.timeline-card-kicker {
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--treg-slate);
  margin-bottom: 0.4rem;
}

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

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

.timeline-card-points {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--treg-slate);
  line-height: 1.6;
}

.timeline-card-meta {
  margin-top: 0.9rem;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--treg-slate);
}

/* Actions row under timeline */
.timeline-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Responsive */
@media (max-width: 980px) {
  .timeline-rail {
    display: none;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
  }

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