/* Policy pages (privacy-policy.php, terms-conditions.php):
   table of contents on the left, calmer heading sizes */

/* ---------- Page title ---------- */
.policy-hero h1 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.policy-hero p {
  font-size: 16px;
}

.policy-wrap {
  padding: 48px 0 56px;
}

/* ---------- Layout ---------- */
.policy-layout {
  max-width: 1140px;
}

.policy-layout.has-toc {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* ---------- Table of contents ---------- */
.policy-toc {
  position: sticky;
  top: 86px; /* below the sticky header */
  max-height: calc(100vh - 106px);
  overflow-y: auto;
  padding: 20px 18px;
  border: 1px solid #dfe8cf;
  border-top: 4px solid #7EAE13;
  border-radius: 14px;
  background: #f7faef;
}

.policy-toc-title {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #202a32;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
  cursor: default;
}

.policy-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.policy-toc-list li {
  margin: 0;
  counter-increment: toc;
}

.policy-toc-list a {
  display: flex;
  gap: 8px;
  padding: 7px 10px;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  color: #5f6972;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.policy-toc-list a::before {
  content: counter(toc) ".";
  flex: 0 0 22px;
  color: #9aa49d;
  font-weight: 600;
}

.policy-toc-list a:hover {
  background: #edf4dc;
  color: #202a32;
}

.policy-toc-list a.active {
  border-left-color: #7EAE13;
  background: #e8f1d2;
  color: #44610a;
  font-weight: 700;
}

.policy-toc-list a.active::before {
  color: #6a9410;
}

/* ---------- Sections ---------- */
.policy-section {
  padding: 0 0 30px;
  margin-bottom: 30px;
  scroll-margin-top: 86px;
}

.policy-section h2 {
  margin-bottom: 14px;
  padding-bottom: 12px;
  font-size: clamp(20px, 2vw, 24px);
}

.policy-section h2::after {
  width: 44px;
  height: 3px;
  background: #7EAE13;
}

.policy-section h3 {
  margin: 22px 0 8px;
  font-size: 16px;
}

.policy-section p,
.policy-section li {
  font-size: 15.5px;
}

/* ---------- Tablet / phone: contents box on top, opens on tap ---------- */
@media (max-width: 991px) {
  .policy-layout.has-toc {
    display: block;
  }

  .policy-toc {
    position: static;
    max-height: none;
    margin-bottom: 32px;
    padding: 14px 16px;
  }

  .policy-toc-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    cursor: pointer;
  }

  .policy-toc-title::after {
    content: "+";
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
  }

  .policy-toc.open .policy-toc-title::after {
    content: "\2212";
  }

  .policy-toc-list {
    display: none;
    margin-top: 10px;
  }

  .policy-toc.open .policy-toc-list {
    display: block;
  }
}
