/* ===== LEGAL PAGE STYLES ===== */

/* ── Sub-header: override main header to scroll away, remove its border ── */
.legal-page header {
  position: relative !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* ── Legal sub-header (always sticky) ── */
.legal-subnav {
  position: sticky;
  top: 0;
  z-index: 9997;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid #c5c5c5;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
  overflow: visible;
}


.legal-subnav__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-subnav__title {
  font-family: Figtree, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

/* ── Desktop: direct links (hidden on mobile) ── */
.legal-subnav__links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.legal-subnav__link {
  font-family: Figtree, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #515154;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-subnav__link:hover {
  color: #1d1d1f;
}

/* ── Mobile: dropdown trigger (hidden on desktop) ── */
.legal-subnav__trigger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #1d1d1f;
  padding: 4px;
  flex-shrink: 0;
}

.legal-subnav__trigger svg {
  display: block;
  transition: transform 0.25s ease;
}

.legal-subnav__trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ── Legal subnav dropdown panel (mobile only) ── */
.legal-subnav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px) saturate(120%);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  border-top: 1px solid rgba(197, 197, 197, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
}

.legal-subnav-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Custom page overlay (replaces shared backdrop for legal pages) ── */
.legal-page-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 52px; /* fallback; JS overrides dynamically */
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 9996;
  pointer-events: none;
}

.legal-page-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.legal-subnav-panel__inner {
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legal-subnav-panel .ymg-sticky-header-dropdown__item {
  padding: 18px 18px;
}

@media (max-width: 768px) {
  .legal-subnav__links {
    display: none;
  }
  .legal-subnav__trigger {
    display: flex;
  }
}

/* ── Page intro ── */
.legal-intro {
  max-width: 680px;
  margin: 72px auto 56px;
  padding: 0 24px;
  text-align: center;
}

.legal-intro__title {
  font-family: Figtree, sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.legal-intro__subtitle {
  font-family: Figtree, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #6e6e73;
  line-height: 1.6;
  margin: 0;
}

/* ── Document cards grid ── */
.legal-cards {
  max-width: 980px;
  margin: 0 auto 96px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.legal-card {
  padding: 44px 44px 40px;
  display: flex;
  flex-direction: column;
}

.legal-card__icon {
  font-size: 2.4rem;
  color: #1d1d1f;
  margin-bottom: 22px;
}

.legal-card__title {
  font-family: Figtree, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.legal-card__desc {
  font-family: Figtree, sans-serif;
  font-size: 0.95rem;
  color: #424245;
  line-height: 1.65;
  margin: 0 0 22px;
  flex: 1;
}

.legal-card__link {
  font-family: Figtree, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0066cc;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}

.legal-card__link:hover {
  color: #0077ed;
}

.legal-card__link i {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.legal-card__link:hover i {
  transform: translateX(2px);
}

@media (max-width: 600px) {
  .legal-intro__title {
    font-size: 2rem;
  }

  .legal-cards {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .legal-card {
    padding: 32px 28px 28px;
  }
}

/* ── Separator between intro and policy content ── */
.legal-intro-separator {
  max-width: 720px;
  margin: 0 auto 40px;
  height: 1px;
  background-color: #e5e5ea;
}

/* ── Policy document content ── */
.legal-policy {
  max-width: 720px;
  margin: 0 auto 96px;
  padding: 0 24px;
}

.legal-policy__meta {
  font-family: Figtree, sans-serif;
  font-size: 0.85rem;
  color: #6e6e73;
  margin-bottom: 48px;
}

.legal-policy__section {
  margin-bottom: 40px;
}

.legal-policy__heading {
  font-family: Figtree, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.legal-policy__text {
  font-family: Figtree, sans-serif;
  font-size: 0.95rem;
  color: #424245;
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-policy__list {
  font-family: Figtree, sans-serif;
  font-size: 0.95rem;
  color: #424245;
  line-height: 1.7;
  padding-left: 20px;
  margin: 0 0 12px;
}

.legal-policy__list li {
  margin-bottom: 4px;
}

.legal-subnav__link--active {
  color: #1d1d1f;
  font-weight: 600;
}

@media (max-width: 600px) {
  .legal-policy {
    padding: 0 20px;
  }
}
