/* ================================================================
   UNIPORT MARKET — legal.css
   Privacy Policy & Terms of Service pages
   ================================================================ */

/* ── Hero ── */
.legal-hero {
  background: linear-gradient(135deg, #080D1A 0%, #101625 50%, #0d1a30 100%);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(27,79,255,.2), transparent 65%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.legal-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}
.legal-hero-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #1B4FFF, #00C4AA);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.7rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 28px rgba(27,79,255,.4);
}
.legal-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(27,79,255,.15);
  border: 1px solid rgba(27,79,255,.3);
  border-radius: 99px;
  padding: .28rem .9rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #82a8ff;
  margin-bottom: .85rem;
}
.legal-hero-title {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: .85rem;
  line-height: 1.1;
}
.legal-hero-sub {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.legal-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: rgba(255,255,255,.4);
}
.legal-meta span {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.legal-meta i { font-size: .82rem; }

/* ── Page layout ── */
.legal-page {
  background: #F7F9FF;
  padding: 3rem 0 5rem;
}
.legal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 991px) {
  .legal-container { grid-template-columns: 1fr; }
}

/* ── Sidebar ── */
.legal-sidebar { position: sticky; top: 88px; }
.legal-toc {
  background: #fff;
  border: 1.5px solid #E2E8F8;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(27,79,255,.06);
}
.legal-toc-title {
  font-family: 'Clash Display', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9CA3AF;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.legal-toc-nav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  margin-bottom: 1.25rem;
}
.toc-link {
  display: block;
  padding: .45rem .75rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: #6B7280;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, padding-left .2s ease;
  border-left: 2px solid transparent;
}
.toc-link:hover {
  color: #1B4FFF;
  background: #EEF3FF;
}
.toc-link.active {
  color: #1B4FFF;
  background: #EEF3FF;
  border-left-color: #1B4FFF;
  padding-left: 1rem;
}
.legal-info-card {
  background: rgba(27,79,255,.05);
  border: 1px solid rgba(27,79,255,.15);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.legal-info-icon {
  width: 32px; height: 32px;
  background: rgba(27,79,255,.12);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #1B4FFF;
  font-size: .9rem;
}
.legal-info-card p {
  font-size: .78rem;
  color: #6B7280;
  line-height: 1.55;
  margin: 0;
}
.legal-info-card strong { color: #374151; }

@media (max-width: 991px) {
  .legal-sidebar { display: none; }
}

/* ── Main content ── */
.legal-content {
  background: #fff;
  border: 1.5px solid #E2E8F8;
  border-radius: 24px;
  padding: 2.5rem 2.5rem;
  box-shadow: 0 2px 16px rgba(27,79,255,.06);
}
@media (max-width: 767px) {
  .legal-content { padding: 1.5rem 1.25rem; border-radius: 16px; }
}

/* Effective notice */
.legal-effective-notice {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: rgba(27,79,255,.06);
  border: 1.5px solid rgba(27,79,255,.15);
  border-radius: 10px;
  padding: .85rem 1.1rem;
  font-size: .84rem;
  color: #374151;
  margin-bottom: 2rem;
}
.legal-effective-notice i { color: #1B4FFF; font-size: 1rem; flex-shrink: 0; }
.legal-effective-notice strong { color: #1B4FFF; }

/* ── Section ── */
.legal-section { padding: 0.25rem 0; }
.legal-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.legal-section-num {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #1B4FFF, #0A34D4);
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Clash Display', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(27,79,255,.3);
}
.legal-section-title {
  font-family: 'Clash Display', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #080D1A;
  letter-spacing: .03em;
  margin: 0;
}
.legal-section p {
  font-size: .92rem;
  color: #374151;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-link {
  color: #1B4FFF;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}
.legal-link:hover { color: #0A34D4; text-decoration: underline; }

/* ── Divider ── */
.legal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #E2E8F8 20%, #E2E8F8 80%, transparent);
  margin: 2.5rem 0;
}

/* ── Highlight boxes ── */
.legal-highlight {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .875rem;
  line-height: 1.65;
}
.legal-highlight i { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.legal-highlight div { color: #374151; }
.legal-highlight strong { color: #111827; }

.legal-highlight.info    { background: rgba(27,79,255,.06);  border: 1.5px solid rgba(27,79,255,.15);  color: #1B4FFF; }
.legal-highlight.success { background: rgba(0,196,170,.07);  border: 1.5px solid rgba(0,196,170,.2);   color: #0a7a6b; }
.legal-highlight.warning { background: rgba(255,184,0,.07);  border: 1.5px solid rgba(255,184,0,.25);  color: #92620a; }
.legal-highlight.danger  { background: rgba(229,62,62,.07);  border: 1.5px solid rgba(229,62,62,.2);   color: #c53030; }
.legal-highlight.info  i { color: #1B4FFF; }
.legal-highlight.success i { color: #00C4AA; }
.legal-highlight.warning i { color: #FFB800; }
.legal-highlight.danger  i { color: #e53e3e; }

/* ── Lists ── */
.legal-list {
  list-style: none;
  padding: 0; margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.legal-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9rem;
  color: #374151;
  line-height: 1.6;
}
.legal-list li i {
  color: #1B4FFF;
  font-size: .85rem;
  flex-shrink: 0;
  margin-top: .2rem;
}
.legal-list li strong { color: #111827; }

/* ── Info cards grid (section 2) ── */
.legal-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (max-width: 580px) { .legal-cards-grid { grid-template-columns: 1fr; } }
.legal-card {
  background: #F7F9FF;
  border: 1.5px solid #E2E8F8;
  border-radius: 14px;
  padding: 1.1rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.legal-card:hover { border-color: #1B4FFF; box-shadow: 0 4px 16px rgba(27,79,255,.1); transform: translateY(-2px); }
.legal-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  margin-bottom: .7rem;
}
.legal-card-icon.blue   { background: rgba(27,79,255,.1);   color: #1B4FFF; }
.legal-card-icon.teal   { background: rgba(0,196,170,.1);   color: #00C4AA; }
.legal-card-icon.orange { background: rgba(255,92,43,.1);   color: #FF5C2B; }
.legal-card-icon.purple { background: rgba(124,58,237,.1);  color: #7c3aed; }
.legal-card-title { font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 800; color: #111827; margin-bottom: .35rem; }
.legal-card-desc  { font-size: .78rem; color: #6B7280; line-height: 1.6; }

/* ── Table ── */
.legal-table-wrap { overflow-x: auto; border-radius: 12px; border: 1.5px solid #E2E8F8; margin: 1.25rem 0; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.legal-table thead { background: #F7F9FF; }
.legal-table th {
  padding: .85rem 1rem;
  text-align: left;
  font-family: 'Clash Display', sans-serif;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6B7280;
  border-bottom: 1.5px solid #E2E8F8;
}
.legal-table td {
  padding: .8rem 1rem;
  color: #374151;
  border-bottom: 1px solid #F0F3FA;
  vertical-align: middle;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:hover td { background: #F7F9FF; }
.legal-table .text-success { color: #00C4AA !important; }
.legal-table .text-danger  { color: #e53e3e !important; }
.legal-table .text-muted   { color: #9CA3AF !important; }

/* ── Rights grid (section 10) ── */
.legal-rights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (max-width: 767px) { .legal-rights-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .legal-rights-grid { grid-template-columns: 1fr; } }
.legal-right-item {
  background: #F7F9FF;
  border: 1.5px solid #E2E8F8;
  border-radius: 14px;
  padding: 1.1rem;
  text-align: center;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.legal-right-item:hover { border-color: #1B4FFF; box-shadow: 0 4px 14px rgba(27,79,255,.1); transform: translateY(-2px); }
.legal-right-icon {
  width: 44px; height: 44px;
  background: rgba(27,79,255,.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #1B4FFF; font-size: 1rem;
  margin: 0 auto .65rem;
}
.legal-right-title { font-family: 'Clash Display', sans-serif; font-size: .85rem; font-weight: 800; color: #111827; margin-bottom: .3rem; }
.legal-right-desc  { font-size: .76rem; color: #6B7280; line-height: 1.55; }

/* ── Contact cards ── */
.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (max-width: 767px) { .legal-contact-grid { grid-template-columns: 1fr; } }
.legal-contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  background: #F7F9FF;
  border: 1.5px solid #E2E8F8;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.legal-contact-card:hover { border-color: #1B4FFF; box-shadow: 0 4px 16px rgba(27,79,255,.1); transform: translateY(-3px); }
.legal-contact-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: .25rem;
}
.legal-contact-icon.blue   { background: rgba(27,79,255,.1);  color: #1B4FFF; }
.legal-contact-icon.teal   { background: rgba(0,196,170,.1);  color: #00C4AA; }
.legal-contact-icon.orange { background: rgba(255,92,43,.1);  color: #FF5C2B; }
.legal-contact-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #9CA3AF; }
.legal-contact-val   { font-size: .82rem; font-weight: 700; color: #374151; }

/* ── Rule blocks (ToS section 4) ── */
.legal-rule-block {
  background: rgba(0,196,170,.04);
  border: 1.5px solid rgba(0,196,170,.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.legal-rule-title {
  font-family: 'Clash Display', sans-serif;
  font-size: .9rem;
  font-weight: 800;
  color: #00C4AA;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Safety grid (ToS section 6) ── */
.legal-safety-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
@media (max-width: 580px) { .legal-safety-grid { grid-template-columns: 1fr; } }
.legal-safety-card {
  background: #F7F9FF;
  border: 1.5px solid #E2E8F8;
  border-radius: 14px;
  padding: 1.25rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.legal-safety-card:hover { border-color: #FF5C2B; box-shadow: 0 4px 14px rgba(255,92,43,.1); }
.legal-safety-icon {
  width: 42px; height: 42px;
  background: rgba(255,92,43,.1);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #FF5C2B; font-size: 1rem;
  margin-bottom: .75rem;
}
.legal-safety-title { font-family: 'Clash Display', sans-serif; font-size: .88rem; font-weight: 800; color: #111827; margin-bottom: .4rem; }
.legal-safety-desc  { font-size: .79rem; color: #6B7280; line-height: 1.6; }

/* ── Bottom link row ── */
.legal-bottom-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1.5px solid #E2E8F8;
  font-size: .82rem;
  color: #9CA3AF;
}
.legal-bottom-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #1B4FFF;
  font-weight: 700;
  text-decoration: none;
  padding: .35rem .9rem;
  border: 1.5px solid rgba(27,79,255,.2);
  border-radius: 99px;
  background: rgba(27,79,255,.04);
  transition: background .2s ease, border-color .2s ease;
}
.legal-bottom-links a:hover { background: #EEF3FF; border-color: #1B4FFF; }


/* =========================================================
   MOBILE RESPONSIVENESS FIXES — TERMS & PRIVACY PAGES
   ========================================================= */

html,
body {
  overflow-x: hidden;
}

.legal-page,
.legal-content,
.legal-section,
.legal-highlight,
.legal-rule-block,
.legal-safety-card,
.legal-card,
.legal-right-item,
.legal-contact-card {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Prevent flex children from overflowing */
.legal-section-header,
.legal-highlight,
.legal-list li,
.legal-meta,
.legal-effective-notice {
  min-width: 0;
}

/* Make long links/emails wrap properly */
.legal-link,
.legal-contact-val,
a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Tables responsive */
.legal-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile typography improvements */
@media (max-width: 768px) {

  .legal-page {
    padding: 1.5rem 0 3rem;
  }

  .legal-container {
    padding: 0 0.9rem;
  }

  .legal-content {
    padding: 1.25rem 1rem;
  }

  .legal-section-title {
    font-size: 1.05rem;
    line-height: 1.4;
  }

  .legal-section-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .legal-section p,
  .legal-list li,
  .legal-highlight,
  .legal-card-desc,
  .legal-right-desc,
  .legal-contact-val,
  .legal-safety-desc {
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .legal-meta {
    gap: 0.7rem;
    justify-content: center;
  }

  .legal-meta span {
    font-size: 0.72rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .legal-highlight {
    padding: 0.9rem;
  }

  .legal-rule-block {
    padding: 1rem;
  }

  .legal-safety-card,
  .legal-card,
  .legal-right-item,
  .legal-contact-card {
    padding: 1rem;
  }

  .legal-hero {
    padding: 3rem 1rem 2.5rem;
  }

  .legal-hero-sub {
    font-size: 0.9rem;
  }

  /* Prevent giant words/text from escaping */
  h1, h2, h3, h4, h5, h6,
  p,
  span,
  div,
  li {
    max-width: 100%;
  }
}

/* Extra small phones */
@media (max-width: 480px) {

  .legal-content {
    border-radius: 14px;
    padding: 1rem 0.9rem;
  }

  .legal-section-num {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
  }

  .legal-hero-title {
    font-size: 1.8rem;
  }

  .legal-badge {
    font-size: 0.65rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.7rem;
    font-size: 0.78rem;
  }
}