/* ==========================================================
   Winways Chemtech – Legal pages (Privacy, Terms) + 404
   Loaded after style.css
   ========================================================== */

/* ---------- Legal layout ---------- */
.legal { background: #fff; padding-block: 72px; }
.legal-row { display: flex; gap: 56px; align-items: flex-start; }
.legal-aside { flex: 0 0 300px; width: 300px; }
.legal-main { flex: 1 1 0; min-width: 0; }

/* TOC card */
.legal-toc {
  background: var(--ww-bg-soft);
  border-radius: 16px;
  padding: 24px;
}
.toc-label {
  font-weight: 600;
  font-size: 12px;
  line-height: normal;
  color: var(--ww-muted);
  margin: 0 0 14px;
}
.toc-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 600;
  font-size: 12px;
  color: var(--ww-muted);
  letter-spacing: .02em;
}
.toc-toggle i { font-size: 14px; color: var(--ww-navy); transition: transform .25s ease; }
.toc-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

.toc-nav { display: flex; flex-direction: column; gap: 14px; }
.toc-nav .toc-link {
  display: block;
  font-weight: 400;
  font-size: 14px;
  line-height: normal;
  color: #3a4864;
  text-decoration: none;
  transition: color .2s ease;
}
.toc-nav .toc-link:hover { color: var(--ww-cyan); }
.toc-nav .toc-link.active { color: var(--ww-cyan); font-weight: 600; }
.toc-cross {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
  line-height: normal;
  color: var(--ww-navy);
  text-decoration: none;
  white-space: nowrap;
}
.toc-cross:hover { color: var(--ww-cyan); }

@media (min-width: 992px) {
  .legal-aside { align-self: stretch; } /* full column height so the TOC can stick */
  .legal-toc { position: sticky; top: calc(var(--ww-header-h) + 24px); }
}

/* Content */
.legal-content,
.legal-section { display: flex; flex-direction: column; gap: 22px; }
.legal-section { scroll-margin-top: calc(var(--ww-header-h) + 24px); }
.legal-title {
  font-weight: 700;
  font-size: 42px;
  line-height: normal;
  color: var(--ww-navy);
  margin: 0;
}
.legal-updated {
  font-weight: 500;
  font-size: 14px;
  line-height: normal;
  color: #8a97ad;
  margin: 0;
}
.legal-note {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 500;
  font-size: 14px;
  line-height: normal;
  color: #9a3412;
  margin: 0;
}
.legal-intro {
  font-size: 17px;
  line-height: 1.7;
  color: #3a4864;
  margin: 0;
}
.legal-h2 {
  font-weight: 700;
  font-size: 24px;
  line-height: normal;
  color: var(--ww-ink);
  margin: 0;
}
.legal-section p {
  font-size: 16px;
  line-height: 1.7;
  color: #4a5a75;
  margin: 0;
}
.legal-section a { color: var(--ww-cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal-section a:hover { color: var(--ww-navy); }
.legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-list li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: #4a5a75;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .7em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ww-cyan);
}
.legal-contact {
  background: var(--ww-bg-soft);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-contact h3 {
  font-weight: 700;
  font-size: 18px;
  line-height: normal;
  color: var(--ww-navy);
  margin: 0;
}
.legal-contact p {
  font-size: 15px;
  line-height: normal;
  color: #4a5a75;
  margin: 0;
}
.legal-contact a { color: inherit; text-decoration: none; }
.legal-contact a:hover { color: var(--ww-cyan); }

@media (max-width: 991.98px) {
  .legal { padding-block: 48px 64px; }
  .legal-row { flex-direction: column; gap: 32px; }
  .legal-aside { flex: none; width: 100%; }
  .legal-toc { padding: 18px 20px; }
  .toc-nav { padding-top: 16px; }
}
@media (max-width: 575.98px) {
  .legal { padding-block: 36px 48px; }
  .legal-title { font-size: 32px; }
  .legal-h2 { font-size: 21px; }
  .legal-intro { font-size: 16px; }
  .legal-section p { font-size: 15px; }
  .legal-content, .legal-section { gap: 16px; }
  .legal-contact { padding: 20px; }
  .legal-contact p { line-height: 1.6; }
}

/* ---------- 404 ---------- */
.not-found {
  background: #fff;
  padding-block: 96px;
  text-align: center;
}
.nf-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.nf-code {
  font-weight: 700;
  font-size: 180px;
  line-height: .9;
  margin: 0;
  background: linear-gradient(90deg, var(--ww-navy), var(--ww-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.nf-title {
  font-weight: 700;
  font-size: 36px;
  line-height: normal;
  color: var(--ww-ink);
  margin: 0;
}
.nf-lead {
  font-size: 17px;
  line-height: normal;
  color: var(--ww-muted);
  max-width: 560px;
  margin: 0;
}
.nf-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #d5deea;
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nf-search:focus-within {
  border-color: var(--ww-cyan);
  box-shadow: 0 0 0 3px rgba(26, 156, 197, .15);
}
.nf-search img { flex-shrink: 0; }
.nf-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  line-height: normal;
  color: var(--ww-ink);
}
.nf-search input::placeholder { color: #9aa5b8; opacity: 1; }

.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.nf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  line-height: normal;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.nf-btn--primary { background: var(--ww-navy); color: #fff; border: 1px solid var(--ww-navy); }
.nf-btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(35, 62, 129, .3); filter: brightness(1.08); }
.nf-btn--outline { background: #fff; color: var(--ww-navy); border: 1px solid #d5deea; }
.nf-btn--outline:hover { color: var(--ww-navy); border-color: var(--ww-navy); transform: translateY(-2px); }

.nf-popular-label {
  font-weight: 600;
  font-size: 12px;
  line-height: normal;
  color: #8a97ad;
  margin: 0;
}
.nf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 20px;
  background: #eef6fb;
  font-weight: 500;
  font-size: 14px;
  line-height: normal;
  color: var(--ww-navy);
  text-decoration: none;
  transition: background .2s ease;
}
.nf-chip img { transition: transform .2s ease; }
.nf-chip:hover { background: #dcedf8; color: var(--ww-navy); }
.nf-chip:hover img { transform: translateX(3px); }

@media (max-width: 991.98px) {
  .not-found { padding-block: 72px; }
  .nf-code { font-size: 150px; }
}
@media (max-width: 575.98px) {
  .not-found { padding-block: 56px; }
  .nf-inner { gap: 18px; }
  .nf-code { font-size: 112px; }
  .nf-title { font-size: 28px; }
  .nf-lead { font-size: 16px; }
  .nf-actions { width: 100%; }
  .nf-btn { flex: 1 1 0; justify-content: center; padding-inline: 16px; }
}
