/* ==========================================================================
   about-project-stages
   Shared, unified tabs/accordion component.
   Include on any page that uses `data-about-stage-tabs` markup:
   <link rel="stylesheet" href="{% static 'css/_about-project-stages.css' %}"
         media="print" onload="this.media='all'">
   Behaviour lives in js/about-project-stages.js
   ========================================================================== */

.about-project-stages {
  padding: 80px 0;
  background: #fff;
}

.about-project-stages__title {
  margin: 0 auto var(--spacing-24);
  max-width: 860px;
  text-align: center;
}

.about-project-stages__title span {
  color: var(--color-brand-terracotta);
}

.about-project-stages__intro {
  max-width: 860px;
  margin: 0 auto var(--spacing-32);
  color: var(--secondary-text);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.5;
  text-align: center;
}

.about-project-stages__intro a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.about-project-stages__intro a:hover {
  color: var(--color-brand-teal-300);
  text-decoration-color: var(--color-brand-teal-300);
}

.about-project-stages__layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.about-project-stages__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.about-project-stages__tab {
  position: relative;
  margin: 0;
  padding: 14px 14px 14px 18px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: var(--font-display);
  font-weight: var(--font-weight-600);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: var(--ls-h3);
  color: var(--color-brand-navy-300);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.about-project-stages__tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.about-project-stages__tab:hover {
  color: var(--color-brand-navy-300);
  background: rgba(0, 0, 0, 0.05);
}

.about-project-stages__tab.is-active {
  color: var(--color-brand-navy);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.about-project-stages__tab.is-active::before {
  background: var(--color-brand-teal);
}

.about-project-stages__tab:focus-visible {
  outline: 2px solid var(--color-brand-teal);
  outline-offset: 2px;
}

.about-project-stages__card {
  background: var(--color-brand-mist-200);
  border-radius: 8px;
  padding: clamp(24px, 3vw, 36px);
  min-height: 280px;
}

.about-project-stages__panel {
  display: none;
}

.about-project-stages__panel.is-active {
  display: block;
}

.about-project-stages__mobile-panel {
  display: none;
}

.about-project-stages__panel-title {
  margin: 0 0 var(--spacing-16);
  font-family: var(--font-display);
  font-weight: var(--font-weight-600);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: var(--ls-h3);
  color: #212120;
}

.about-project-stages__lead {
  margin: 0 0 var(--spacing-24);
  font-family: var(--font-body);
  font-weight: var(--font-weight-500);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: var(--ls-h3);
  color: rgba(33, 33, 32, 0.7);
}

.about-project-stages__lead a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.about-project-stages__lead a:hover {
  color: var(--color-brand-teal-300);
  text-decoration-color: var(--color-brand-teal-300);
}

.about-project-stages__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: var(--spacing-24);
}

.about-project-stages__list li {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-body);
  font-weight: var(--font-weight-600);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0;
  color: #1B1B1A;
}

.about-project-stages__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-brand-terracotta-300);
}

.about-project-stages__list li a {
  color: var(--color-brand-teal);
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.about-project-stages__list li a:hover {
  color: var(--color-brand-teal-300);
  text-decoration-color: var(--color-brand-teal-300);
}

.about-project-stages__more {
  margin: var(--spacing-24) 0 0;
}

.about-project-stages__more a {
  font-size: 16px;
  font-weight: var(--font-weight-600);
  color: var(--color-brand-teal);
  text-decoration: none;
}

.about-project-stages__more a:hover {
  color: var(--color-brand-teal-300);
  text-decoration-color: var(--color-brand-teal-300);
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .about-project-stages__layout {
    grid-template-columns: 1fr;
  }

  .about-project-stages__nav {
    flex-direction: column;
    flex-wrap: nowrap;
    padding-left: 0;
    border-left: none;
    border-bottom: none;
    padding-bottom: var(--spacing-16);
    gap: 0;
    overflow: visible;
  }

  .about-project-stages__tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    border-radius: 8px;
    padding: var(--spacing-16);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    white-space: normal;
    font-size: 16px;
    font-weight: var(--font-weight-500);
    transition: color 0.25s ease;
  }

  .about-project-stages__tab:hover {
    background: #fff;
  }

  .about-project-stages__tab::before {
    display: none;
  }

  .about-project-stages__tab::after {
    content: "›";
    font-size: 20px;
    line-height: 1;
    color: var(--primary-text);
    transition: transform 0.3s ease, color 0.3s ease;
    transform: rotate(90deg);
    flex-shrink: 0;
  }

  .about-project-stages__tab.is-active {
    box-shadow: none;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--color-brand-navy);
    font-size: 16px;
  }

  .about-project-stages__tab.is-active::after {
    transform: rotate(-90deg);
  }

  .about-project-stages__card {
    display: none;
  }

  .about-project-stages__mobile-panel {
    display: block;
    margin: 0 0 8px;
    border-radius: 8px;
    background: #fff;
    border: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .about-project-stages__mobile-panel.is-open {
    margin-top: 8px;
    max-height: 800px;
    border: 1px solid rgba(0, 0, 0, 0.08);
  }

  .about-project-stages__mobile-panel-inner {
    padding: 16px;
  }

  .about-project-stages__mobile-panel .about-project-stages__panel-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: var(--font-weight-500);
  }

  .about-project-stages__mobile-panel .about-project-stages__lead {
    margin: 0 0 14px;
    font-size: 15px;
  }

  .about-project-stages__mobile-panel .about-project-stages__list li {
    font-size: 16px;
    font-weight: var(--font-weight-500);
  }

  .about-project-stages__mobile-panel .about-project-stages__more {
    margin-top: 16px;
  }
}
