/* ===== Hero Background ===== */
.hero-terms {
  background:
    linear-gradient(135deg, rgba(9, 31, 44, 0.92) 0%, rgba(12, 53, 71, 0.88) 50%, rgba(19, 75, 99, 0.82) 100%),
    url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?w=1600&auto=format&fit=crop') center/cover no-repeat;
}

/* ===== Hero Trust Strip ===== */
.hero-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-top: 32px;
  padding-top: 24px;
  max-width: 800px;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #E2E8F0;
  font-size: 0.95rem;
  font-weight: 500;
}
.hero-trust-item i {
  color: #4ADE80;
  font-size: 1.1rem;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .hero-trust-strip { gap: 14px; margin-top: 24px; padding-top: 18px; }
  .hero-trust-item { font-size: 0.9rem; flex: 1 1 100%; }
}

/* ===== Document Header Strip ===== */
.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #0C3547 0%, #134B63 100%);
  color: #fff;
  border-radius: 12px;
  margin-bottom: 36px;
  box-shadow: 0 6px 24px rgba(12, 53, 71, 0.15);
  position: relative;
  overflow: hidden;
}
.doc-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background:
    repeating-linear-gradient(45deg, transparent 0, transparent 12px, rgba(255,255,255,0.02) 12px, rgba(255,255,255,0.02) 13px);
  pointer-events: none;
}
.doc-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}
.doc-stamp {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: rgba(214, 48, 49, 0.15);
  border: 2px solid var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6b6b;
  font-size: 1.3rem;
  transform: rotate(-4deg);
}
.doc-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}
.doc-sub {
  font-size: 0.82rem;
  color: #A8BBC7;
  letter-spacing: 0.3px;
}
.doc-header-right {
  display: flex;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.doc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}
.doc-meta-label {
  font-size: 0.68rem;
  color: #8A9BA8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.doc-meta-value {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .doc-header { flex-direction: column; align-items: flex-start; padding: 20px; }
  .doc-header-right { width: 100%; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px dashed rgba(255,255,255,0.15); }
  .doc-meta { text-align: left; }
}

/* ===== Legal Layout: Sidebar TOC + Content ===== */
.legal-wrap {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 50px;
  align-items: start;
}

/* ===== Table of Contents Sidebar ===== */
.legal-toc {
  position: sticky;
  top: 100px;
}
.toc-inner {
  background: #fff;
  border: 1px solid #E8EEF2;
  border-radius: 12px;
  padding: 24px 22px;
  box-shadow: 0 2px 14px rgba(12, 53, 71, 0.05);
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #E8EEF2;
  font-weight: 700;
}
.toc-title i {
  color: var(--accent);
}

.toc-list-numbered {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  counter-reset: toc-counter;
}
.toc-list-numbered li {
  counter-increment: toc-counter;
  margin: 0;
}
.toc-list-numbered a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  color: #4A5A66;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1.4;
}
.toc-list-numbered a::before {
  content: counter(toc-counter, decimal-leading-zero);
  flex-shrink: 0;
  color: #B0BEC6;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding-top: 2px;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}
.toc-list-numbered a:hover {
  color: var(--primary-dark);
  background: #F4F8FA;
}
.toc-list-numbered a:hover::before {
  color: var(--accent);
}

.toc-cta {
  padding-top: 18px;
  border-top: 1px dashed #D8E0E6;
  text-align: center;
}
.toc-cta p {
  font-size: 0.88rem;
  color: #4A5A66;
  margin: 0 0 10px;
}
.toc-cta .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.9rem;
}

/* ===== Legal Content ===== */
.legal-content {
  max-width: 100%;
  min-width: 0;
}

.legal-intro {
  padding: 24px 28px;
  background: #FAFBFC;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 40px;
}
.legal-intro p {
  color: #3A4A56;
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 12px;
}
.legal-intro p:last-child { margin-bottom: 0; }
.legal-intro a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.legal-intro a:hover { text-decoration: underline; }

.legal-section {
  margin-bottom: 44px;
  scroll-margin-top: 100px;
  position: relative;
}

.legal-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #E8EEF2;
  font-weight: 700;
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.legal-section h2::before {
  content: attr(data-num);
  display: none;
}
.legal-section[data-num] h2::before {
  content: attr(data-num) '.';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Pull the data-num from the section, not the h2 */
.legal-section[data-num="1"] h2::before { content: '01.'; }
.legal-section[data-num="2"] h2::before { content: '02.'; }
.legal-section[data-num="3"] h2::before { content: '03.'; }
.legal-section[data-num="4"] h2::before { content: '04.'; }
.legal-section[data-num="5"] h2::before { content: '05.'; }
.legal-section[data-num="6"] h2::before { content: '06.'; }
.legal-section[data-num="7"] h2::before { content: '07.'; }
.legal-section[data-num="8"] h2::before { content: '08.'; }
.legal-section[data-num="9"] h2::before { content: '09.'; }
.legal-section[data-num="10"] h2::before { content: '10.'; }
.legal-section[data-num="11"] h2::before { content: '11.'; }
.legal-section[data-num="12"] h2::before { content: '12.'; }
.legal-section[data-num="13"] h2::before { content: '13.'; }
.legal-section[data-num="14"] h2::before { content: '14.'; }

.legal-section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}

.legal-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.08rem;
  color: var(--primary);
  margin: 26px 0 10px;
  font-weight: 700;
  padding-left: 14px;
  border-left: 3px solid var(--blue-accent);
}

.legal-section p {
  color: #3A4A56;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 14px;
}

.legal-section a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.legal-section a:hover { text-decoration: underline; }

.legal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.legal-list li {
  position: relative;
  padding: 6px 0 6px 26px;
  color: #3A4A56;
  font-size: 0.98rem;
  line-height: 1.65;
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--blue-accent);
  border-radius: 50%;
}

/* ===== Callout Box ===== */
.legal-callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #FFF8E6 0%, #FEF3C7 100%);
  border-left: 4px solid #D68910;
  border-radius: 8px;
  margin: 20px 0;
}
.legal-callout i {
  color: #D68910;
  font-size: 1.4rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.legal-callout div {
  color: #4A3A1A;
  font-size: 0.98rem;
  line-height: 1.65;
}
.legal-callout strong {
  color: var(--primary-dark);
  display: block;
  margin-bottom: 4px;
  font-family: 'Poppins', sans-serif;
}

/* ===== Contact Card at End ===== */
.legal-contact-card {
  background: linear-gradient(135deg, #FAFBFC 0%, #F2F6F9 100%);
  border: 1px solid #DCE4EA;
  border-radius: 12px;
  padding: 26px 28px;
  margin-top: 18px;
}
.legal-contact-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #DCE4EA;
  margin-bottom: 16px;
}
.legal-contact-head i {
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.legal-contact-head h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin: 0;
  font-weight: 700;
  padding: 0;
  border: none;
}
.legal-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  color: #3A4A56;
  font-size: 0.98rem;
  line-height: 1.6;
}
.legal-contact-row i {
  color: var(--blue-accent);
  width: 20px;
  padding-top: 4px;
  flex-shrink: 0;
}
.legal-contact-row a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.legal-contact-row a:hover { text-decoration: underline; }

/* ===== Document Footer ===== */
.doc-footer {
  margin-top: 50px;
  text-align: center;
}
.doc-footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #D8E0E6 50%, transparent 100%);
  margin-bottom: 16px;
}
.doc-footer p {
  font-size: 0.82rem;
  color: #8A9BA8;
  letter-spacing: 0.5px;
  margin: 0;
  font-style: italic;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .legal-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .legal-toc {
    position: static;
  }
  .toc-inner {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .legal-section h2 {
    font-size: 1.3rem;
    flex-wrap: wrap;
    gap: 10px;
  }
  .legal-section[data-num] h2::before {
    min-width: 36px;
    height: 28px;
    font-size: 0.82rem;
  }
  .legal-section h3 { font-size: 1rem; padding-left: 12px; }
  .legal-section p, .legal-list li { font-size: 0.95rem; }
  .legal-intro { padding: 20px; }
  .legal-intro p { font-size: 0.98rem; }
  .legal-callout { flex-direction: column; gap: 10px; padding: 18px; }
  .legal-contact-card { padding: 20px; }
}