/* ============================================
   LOCATION: public/css/legal.css
   Pagini legale (privacy, terms, cookies)
   ============================================ */

/* ============================================
   LAYOUT
   ============================================ */
.legal-page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

@media (min-width: 768px) {
  .legal-page {
    padding: 60px 32px 100px;
  }
}

/* ============================================
   HEADER
   ============================================ */
.legal-header {
  text-align: center;
  margin-bottom: 48px;
}

.legal-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.12), rgba(175, 82, 222, 0.12));
  border: 1px solid rgba(0, 122, 255, 0.15);
  color: var(--accent);
}

.legal-header-icon svg {
  width: 36px;
  height: 36px;
}

.legal-title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

@media (min-width: 768px) {
  .legal-title { font-size: 36px; }
}

.legal-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.legal-intro {
  margin: 0 auto;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* ============================================
   CUPRINS
   ============================================ */
.legal-toc {
  padding: 20px 24px;
  margin-bottom: 40px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.legal-toc-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  counter-reset: toc;
}

@media (min-width: 600px) {
  .legal-toc-list {
    grid-template-columns: 1fr 1fr;
  }
}

.legal-toc-list li {
  counter-increment: toc;
}

.legal-toc-list a {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 4px 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.legal-toc-list a::before {
  content: counter(toc) ". ";
  color: var(--accent);
  font-weight: 700;
}

.legal-toc-list a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

/* ============================================
   CONȚINUT
   ============================================ */
.legal-content {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  letter-spacing: -0.01em;
}

.legal-section {
  margin-bottom: 40px;
  scroll-margin-top: 90px; /* offset pentru header sticky */
}

.legal-section h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
}

@media (min-width: 768px) {
  .legal-section h2 { font-size: 22px; }
}

.legal-section h3 {
  margin: 24px 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.legal-section p {
  margin: 0 0 14px;
}

.legal-section ul {
  margin: 0 0 14px;
  padding-left: 20px;
  list-style: none;
}

.legal-section ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
}

.legal-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-section strong {
  font-weight: 700;
  color: var(--text);
}

.legal-section a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.15s ease;
}

.legal-section a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ============================================
   NAVIGARE ÎNTRE PAGINI LEGALE
   ============================================ */
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
}

.legal-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.legal-nav-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] .legal-toc {
  background: rgba(28, 28, 30, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .legal-nav-link {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .legal-toc,
  .legal-nav,
  .site-header,
  .site-footer,
  .mobile-nav {
    display: none !important;
  }

  .legal-page {
    padding: 0;
    max-width: none;
  }

  .legal-section {
    page-break-inside: avoid;
  }
}
/* ============================================
   LOGO THEME SWITCHING (light/dark)
   Adăugat automat de script
   ============================================ */
.logo-icon-light { display: inline-block !important; }
.logo-icon-dark  { display: none !important; }

[data-theme="dark"] .logo-icon-light { display: none !important; }
[data-theme="dark"] .logo-icon-dark  { display: inline-block !important; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .logo-icon-light { display: none !important; }
  html:not([data-theme="light"]) .logo-icon-dark  { display: inline-block !important; }
}

.auth-logo-img.logo-icon-light { display: inline-block !important; }
.auth-logo-img.logo-icon-dark  { display: none !important; }
[data-theme="dark"] .auth-logo-img.logo-icon-light { display: none !important; }
[data-theme="dark"] .auth-logo-img.logo-icon-dark  { display: inline-block !important; }
