/**
 * Renrot Processteg
 *
 * Defaults mirror the design tokens on renrot.se (cream / border / ink / taupe /
 * brand). Every value below is overridable from Elementor's Style tab.
 */

.renrot-steps {
  --renrot-cream: #f5f2ea;
  --renrot-surface: #f8f6f2;
  --renrot-border: #d9d4ca;

  --renrot-ink: #1c1a17;
  --renrot-taupe: #56524d;
  --renrot-brand: #baa878;
  --renrot-brand-dark: #8a7550;

  --renrot-icon-box: 48px;
  --renrot-connector-color: var(--renrot-border);
  --renrot-connector-width: 2px;

  --renrot-reveal-duration: 800ms;
  --renrot-reveal-stagger: 100ms;
  --renrot-reveal-distance: 24px;
}

/* ----------------------------------------------------------- Animation */

/**
 * Scroll reveal. Items start hidden only once JS has confirmed it can run
 * (the .is-observed flag), so the content stays visible without JavaScript.
 */
.renrot-steps--reveal.is-observed .renrot-steps__item {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity var(--renrot-reveal-duration) ease-out,
    transform var(--renrot-reveal-duration) ease-out;
  transition-delay: calc(var(--renrot-index, 0) * var(--renrot-reveal-stagger));
}

.renrot-reveal-fade-up.is-observed .renrot-steps__item {
  transform: translateY(var(--renrot-reveal-distance));
}

.renrot-reveal-zoom.is-observed .renrot-steps__item {
  transform: scale(0.94);
}

.renrot-steps--reveal.is-observed .renrot-steps__item.is-revealed {
  opacity: 1;
  transform: none;
}

/* Fade the panel in when switching tabs. */
.renrot-tabfade-yes .renrot-steps__panel:not([hidden]) {
  animation: renrot-fade-in 300ms ease-out both;
}

@keyframes renrot-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Hover effects. */
.renrot-hover-lift .renrot-steps__item,
.renrot-hover-grow .renrot-steps__item {
  transition:
    transform 300ms ease,
    box-shadow 300ms ease,
    opacity var(--renrot-reveal-duration) ease-out;
}

.renrot-hover-lift .renrot-steps__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -16px rgba(35, 29, 26, 0.18);
}

.renrot-hover-grow .renrot-steps__item:hover {
  transform: scale(1.02);
}

.renrot-steps__icon {
  transition:
    transform 300ms ease,
    background-color 300ms ease;
}

.renrot-iconhover-pop .renrot-steps__item:hover .renrot-steps__icon {
  transform: scale(1.1);
}

.renrot-iconhover-rotate .renrot-steps__item:hover .renrot-steps__icon {
  transform: rotate(-8deg) scale(1.05);
}

/**
 * A hovered item must not be pushed back down by the reveal transform, so the
 * hover transform only applies once the item has finished revealing.
 */
.renrot-steps--reveal.is-observed .renrot-steps__item:not(.is-revealed):hover {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .renrot-steps--reveal.is-observed .renrot-steps__item,
  .renrot-steps--reveal.is-observed .renrot-steps__item.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .renrot-steps__item:hover,
  .renrot-steps__item:hover .renrot-steps__icon,
  .renrot-tabfade-yes .renrot-steps__panel:not([hidden]) {
    transform: none;
    animation: none;
  }
}

/* ---------------------------------------------------------------- Tabs */

.renrot-steps__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 40px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  background-color: var(--renrot-surface);
  border: 1px solid var(--renrot-border);
  border-radius: 999px;
}

.renrot-steps__tab {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--renrot-taupe);
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.renrot-steps__tab:hover {
  color: var(--renrot-ink);
}

.renrot-steps__tab[aria-selected="true"] {
  background-color: var(--renrot-ink);
  color: var(--renrot-cream);
}

.renrot-steps__tab:focus-visible {
  outline: 2px solid var(--renrot-brand-dark);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- List */

.renrot-steps__panel[hidden] {
  display: none;
}

.renrot-steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

/*
 * The process page uses a continuous, unboxed timeline. These deliberately
 * scoped !important declarations protect that layout from broad theme rules
 * targeting ol, li, p and headings without affecting the cards layout.
 */
.renrot-steps--timeline .renrot-steps__list {
  position: relative !important;
  display: grid !important;
  gap: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.renrot-connector-yes.renrot-steps--timeline .renrot-steps__list::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background-color: var(--renrot-connector-color) !important;
}

.renrot-steps--timeline .renrot-steps__item {
  position: relative !important;
  display: block !important;
  min-height: var(--renrot-icon-box);
  margin: 0 !important;
  padding: 0 0 0 64px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.renrot-steps--timeline .renrot-steps__icon {
  position: absolute !important;
  z-index: 1;
  top: 0;
  left: 0;
  width: 44px !important;
  height: 44px !important;
  border: 1px solid var(--renrot-border) !important;
  border-radius: 999px !important;
  background-color: var(--renrot-cream) !important;
  box-shadow: 0 4px 12px -6px rgba(35, 29, 26, 0.22) !important;
  color: var(--renrot-brand-dark) !important;
}

.renrot-steps--timeline .renrot-steps__body {
  min-width: 0;
}

.renrot-steps--cards .renrot-steps__list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.renrot-steps__item {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--renrot-border);
  border-radius: 16px;
}

.renrot-steps--cards .renrot-steps__item {
  flex-direction: column;
}

.renrot-steps__body {
  flex: 1;
  min-width: 0;
}

/* Editor-only hint shown for a tab that no step is assigned to. */
.renrot-steps__empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--renrot-border);
  border-radius: 12px;
  background-color: var(--renrot-surface);
  color: var(--renrot-taupe);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- Icon */

.renrot-steps__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--renrot-icon-box);
  height: var(--renrot-icon-box);
  border-radius: 50%;
  background-color: var(--renrot-cream);
  color: var(--renrot-brand-dark);
  font-size: 20px;
  line-height: 1;
}

.renrot-steps__icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* ------------------------------------------------------------- Eyebrow */

.renrot-steps__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.renrot-steps--timeline .renrot-steps__eyebrow {
  gap: 12px !important;
  margin: 0 0 8px !important;
}

.renrot-steps__number {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--renrot-brand-dark);
}

.renrot-steps--timeline .renrot-steps__number {
  color: var(--renrot-taupe) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.28em !important;
}

.renrot-steps__meta {
  font-size: 12px;
  line-height: 1.4;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: var(--renrot-cream);
  color: var(--renrot-taupe);
}

.renrot-steps--timeline .renrot-steps__meta {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--renrot-brand-dark) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
}

.renrot-steps--timeline .renrot-steps__meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

/* ------------------------------------------------------ Title and text */

.renrot-steps__title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--renrot-ink);
}

.renrot-steps--timeline .renrot-steps__title {
  margin: 0 0 8px !important;
  color: var(--renrot-ink) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.renrot-steps__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--renrot-taupe);
}

.renrot-steps--timeline .renrot-steps__text {
  margin: 0 !important;
  color: var(--renrot-taupe) !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

/* --------------------------------------------------------- Small screens */

@media (max-width: 767px) {
  .renrot-steps__tabs {
    width: 100%;
    justify-content: stretch;
  }

  .renrot-steps__tab {
    flex: 1 1 auto;
    padding: 10px 12px;
    font-size: 14px;
  }

  .renrot-steps__item {
    padding: 20px;
    gap: 16px;
  }

  .renrot-steps--timeline .renrot-steps__item {
    padding: 0 0 0 64px !important;
  }
}

@media (min-width: 768px) {
  .renrot-steps--timeline .renrot-steps__list {
    gap: 40px !important;
  }

  .renrot-connector-yes.renrot-steps--timeline .renrot-steps__list::before {
    left: 23px;
  }

  .renrot-steps--timeline .renrot-steps__item {
    padding-left: 80px !important;
  }

  .renrot-steps--timeline .renrot-steps__icon {
    width: 48px !important;
    height: 48px !important;
  }

  .renrot-steps--timeline .renrot-steps__title {
    font-size: 24px !important;
  }

  .renrot-steps--timeline .renrot-steps__text {
    font-size: 18px !important;
  }
}
