/* ============================================================
   LEGAL PAGES — Privacy Policy & Terms of Service
   ============================================================ */

/* ---- Legal Hero ---- */
.legal-hero {
  position: relative;
  padding: 10rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.legal-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(168, 85, 247, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  z-index: 0;
}

.legal-hero-content {
  position: relative;
  z-index: 1;
}

.legal-hero-content h1 {
  font-family: var(--ff-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal-hero-content > p {
  font-size: 0.95rem;
  color: var(--clr-text-dim);
  margin-top: 0.75rem;
}

/* ---- Legal Layout ---- */
.legal-content {
  padding: 4rem 0 6rem;
  background: var(--clr-bg);
}

.legal-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- Table of Contents (Sidebar) ---- */
.legal-toc {
  position: sticky;
  top: 100px;
  padding: 1.5rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.legal-toc h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-toc h4 i {
  color: var(--clr-primary-light);
  font-size: 0.85rem;
}

.legal-toc ul {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.legal-toc a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease-out);
  line-height: 1.4;
}

.legal-toc a:hover,
.legal-toc a.active {
  color: var(--clr-white);
  background: rgba(168, 85, 247, 0.1);
  padding-left: 1rem;
}

/* ---- Legal Body ---- */
.legal-body {
  max-width: 820px;
}

.legal-section {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--clr-border);
  scroll-margin-top: 100px;
}

.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: var(--ff-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(168, 85, 247, 0.2);
  display: inline-block;
}

.legal-section h3 {
  font-family: var(--ff-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--clr-primary-light);
  margin: 1.5rem 0 0.75rem;
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  line-height: 1.85;
  margin-bottom: 0.75rem;
}

.legal-section p strong {
  color: var(--clr-text);
  font-weight: 600;
}

.legal-section > ul {
  margin: 0.75rem 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.legal-section > ul > li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.92rem;
  color: var(--clr-text-muted);
  line-height: 1.75;
}

.legal-section > ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-primary);
}

.legal-section > ul > li strong {
  color: var(--clr-text);
  font-weight: 600;
}

/* ---- Highlight Boxes ---- */
.legal-highlight {
  padding: 1.5rem 1.75rem;
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-left: 3px solid var(--clr-primary);
  border-radius: var(--radius-md);
  margin: 1.25rem 0;
}

.legal-highlight.security {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.15);
  border-left-color: var(--clr-success);
}

.legal-highlight.warning {
  background: rgba(251, 191, 36, 0.05);
  border-color: rgba(251, 191, 36, 0.15);
  border-left-color: #fbbf24;
}

.legal-highlight ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-highlight li {
  font-size: 0.92rem;
  color: var(--clr-text-muted);
  line-height: 1.75;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.legal-highlight li i {
  margin-top: 0.3em;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.legal-highlight li i.fa-check-circle { color: var(--clr-primary-light); }
.legal-highlight li i.fa-shield-halved { color: var(--clr-success); }
.legal-highlight li i.fa-lock { color: var(--clr-secondary); }

.legal-highlight li strong {
  color: var(--clr-text);
}

.legal-highlight p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.legal-highlight p i {
  margin-top: 0.2em;
  color: #fbbf24;
  flex-shrink: 0;
}

/* ---- Table ---- */
.legal-table-wrapper {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table thead {
  background: rgba(168, 85, 247, 0.1);
}

.legal-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: var(--clr-white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--clr-border);
}

.legal-table td {
  padding: 0.85rem 1.25rem;
  color: var(--clr-text-muted);
  border-bottom: 1px solid var(--clr-border);
  line-height: 1.6;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.legal-table td strong {
  color: var(--clr-text);
}

/* ---- Rights Grid ---- */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.right-card {
  padding: 1.5rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.3s var(--ease-out);
}

.right-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.1);
}

.right-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--clr-white);
}

.right-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.right-card p {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ---- Services List (Terms Page) ---- */
.services-list-legal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}

.service-legal-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  transition: all 0.3s var(--ease-out);
}

.service-legal-item:hover {
  border-color: rgba(168, 85, 247, 0.2);
  transform: translateX(4px);
}

.service-legal-item > i {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--clr-white);
  flex-shrink: 0;
}

.service-legal-item strong {
  font-size: 0.9rem;
  color: var(--clr-white);
  display: block;
  margin-bottom: 0.2rem;
}

.service-legal-item p {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ---- Contact Card ---- */
.legal-contact-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1.75rem;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
}

.legal-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.legal-contact-item > i {
  width: 42px;
  height: 42px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--clr-white);
  flex-shrink: 0;
}

.legal-contact-item strong {
  font-size: 0.9rem;
  color: var(--clr-white);
  display: block;
  margin-bottom: 0.1rem;
}

.legal-contact-item p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  margin: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .rights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 7rem 0 3rem;
  }

  .legal-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal-toc {
    position: static;
    order: -1;
  }

  .legal-section h2 {
    font-size: 1.3rem;
  }

  .rights-grid {
    grid-template-columns: 1fr;
  }

  .services-list-legal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .legal-hero-content h1 {
    font-size: 1.8rem;
  }

  .legal-section {
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
  }

  .legal-highlight {
    padding: 1.25rem;
  }

  .legal-contact-card {
    padding: 1.25rem;
  }
}
