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

/* ---------- Legal Hero ---------- */
.legal-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  padding-top: 120px;
  padding-bottom: 60px;
  overflow: hidden;
  text-align: center;
}
.legal-hero .legal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, rgba(79, 110, 247, .2), rgba(0, 212, 255, .1));
  border: 1px solid rgba(79, 110, 247, .3);
  color: var(--accent);
  font-size: 1.8rem;
  animation: pulse-glow 3s ease-in-out infinite;
}
.legal-hero .legal-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.legal-hero .legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
}
.legal-hero .legal-meta-item i {
  color: var(--accent);
  font-size: .75rem;
}

/* ---------- Legal Content ---------- */
.legal-content {
  background: var(--navy);
  padding: 80px 0 100px;
}

.legal-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* ---------- Sidebar TOC ---------- */
.legal-sidebar {
  flex: 0 0 260px;
  position: sticky;
  top: 100px;
}
.legal-toc {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.legal-toc h6 {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.legal-toc-list li {
  margin-bottom: 4px;
}
.legal-toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .82rem;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}
.legal-toc-list a:hover,
.legal-toc-list a.active {
  background: rgba(79, 110, 247, .1);
  color: #fff;
}
.legal-toc-list a .toc-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 700;
  background: rgba(79, 110, 247, .12);
  border: 1px solid rgba(79, 110, 247, .2);
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Main Content ---------- */
.legal-main {
  flex: 1;
  min-width: 0;
}

.legal-card {
  background: var(--gradient-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 48px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.legal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}

/* Sections */
.legal-section {
  margin-bottom: 48px;
  scroll-margin-top: 100px;
}
.legal-section:last-child {
  margin-bottom: 0;
}
.legal-section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}
.legal-section-title .section-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(79, 110, 247, .18), rgba(0, 212, 255, .08));
  border: 1px solid rgba(79, 110, 247, .25);
  color: var(--accent);
  flex-shrink: 0;
}

.legal-section p {
  color: var(--text-secondary);
  font-size: .92rem;
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-section p:last-child {
  margin-bottom: 0;
}

/* Lists */
.legal-section ul,
.legal-section ol {
  margin: 12px 0 16px;
  padding-left: 0;
  list-style: none;
}
.legal-section ul li,
.legal-section ol li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.legal-section ol {
  counter-reset: legal-counter;
}
.legal-section ol li {
  counter-increment: legal-counter;
}
.legal-section ol li::before {
  content: counter(legal-counter) '.';
  position: absolute;
  left: 4px;
  top: 8px;
  font-weight: 700;
  font-size: .82rem;
  color: var(--accent);
}

/* Highlight Box */
.legal-highlight {
  background: rgba(79, 110, 247, .06);
  border: 1px solid rgba(79, 110, 247, .15);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 20px 0;
}
.legal-highlight p {
  margin: 0;
  font-size: .88rem;
}
.legal-highlight strong {
  color: var(--text-primary);
}

/* Warning Box */
.legal-warning {
  background: rgba(249, 115, 22, .06);
  border: 1px solid rgba(249, 115, 22, .15);
  border-left: 3px solid #f97316;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 20px 0;
}
.legal-warning p {
  margin: 0;
  font-size: .88rem;
}

/* Separator */
.legal-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 40px 0;
}

/* Contact Card at bottom */
.legal-contact-card {
  background: linear-gradient(135deg, rgba(79, 110, 247, .08), rgba(0, 212, 255, .04));
  border: 1px solid rgba(79, 110, 247, .15);
  border-radius: var(--radius-sm);
  padding: 28px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.legal-contact-card .contact-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 110, 247, .2), rgba(0, 212, 255, .1));
  border: 1px solid rgba(79, 110, 247, .25);
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.legal-contact-card h6 {
  font-size: .92rem;
  margin-bottom: 4px;
}
.legal-contact-card p {
  color: var(--text-secondary);
  font-size: .82rem;
  margin: 0;
}
.legal-contact-card a {
  color: var(--accent);
  font-weight: 600;
}
.legal-contact-card a:hover {
  color: #fff;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
  .legal-layout {
    flex-direction: column;
  }
  .legal-sidebar {
    flex: none;
    position: relative;
    top: 0;
    width: 100%;
  }
  .legal-card {
    padding: 32px 24px;
  }
}
@media (max-width: 767.98px) {
  .legal-hero {
    min-height: 260px;
    padding-top: 100px;
    padding-bottom: 40px;
  }
  .legal-content {
    padding: 50px 0 70px;
  }
  .legal-card {
    padding: 24px 18px;
  }
  .legal-section-title {
    font-size: 1.1rem;
  }
  .legal-contact-card {
    flex-direction: column;
    text-align: center;
  }
}
