/* ===================================
   Legal Pages - Professional Styling
   =================================== */

/* Legal Hero Section */
.legal-hero-section {
  padding: 120px 0 80px;
  background: var(--primary-gradient);
  color: white;
  text-align: center;
}

.legal-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.legal-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
  color: white !important;
}

.legal-hero-description {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.legal-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.legal-date,
.legal-version {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* Legal Content Section */
.legal-content-section {
  padding: 80px 0;
}

.legal-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

/* Table of Contents */
.legal-toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 48px;
}

.legal-toc h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.legal-toc li {
  margin: 0;
}

.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: block;
  transition: all var(--transition-duration) var(--transition-timing);
  font-weight: 500;
}

.legal-toc a:hover {
  color: var(--primary-color);
  background: var(--primary-color-10);
  transform: translateX(4px);
}

/* Legal Sections */
.legal-section {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

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

.legal-section h2 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.legal-section h3 {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 16px;
  margin-top: 32px;
}

.legal-section h4 {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 12px;
  margin-top: 24px;
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 1rem;
}

.legal-section ul,
.legal-section ol {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  padding-left: 24px;
}

.legal-section li {
  margin-bottom: 8px;
}

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

.legal-section a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-duration) var(--transition-timing);
}

.legal-section a:hover {
  color: var(--primary-color-dark);
  text-decoration: underline;
}

/* Special Content Blocks */
.cookie-type,
.cookie-category,
.third-party-service {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.cookie-type h4,
.cookie-category h4,
.third-party-service h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 0;
}

.browser-instructions {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
}

.browser-instructions h4 {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 20px;
}

.browser-instructions h4:first-child {
  margin-top: 0;
}

.browser-instructions ol {
  margin-bottom: 20px;
}

/* Contact Information */
.contact-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  margin: 24px 0;
}

.contact-info h3 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 0;
}

.contact-info p {
  margin-bottom: 16px;
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .legal-hero-section {
    padding: 80px 0 60px;
  }
  
  .legal-content {
    padding: 40px 24px;
    border-radius: 16px;
  }
  
  .legal-toc {
    padding: 24px;
  }
  
  .legal-toc ul {
    grid-template-columns: 1fr;
  }
  
  .legal-section {
    margin-bottom: 32px;
  }
  
  .legal-section h2 {
    font-size: 1.5rem;
  }
  
  .legal-meta {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .cookie-type,
  .cookie-category,
  .third-party-service,
  .browser-instructions,
  .contact-info {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .legal-content {
    padding: 32px 20px;
  }
  
  .legal-toc {
    padding: 20px;
  }
  
  .legal-section h2 {
    font-size: 1.3rem;
  }
  
  .legal-section h3 {
    font-size: 1.2rem;
  }
  
  .legal-section h4 {
    font-size: 1.1rem;
  }
}

/* Smooth Scrolling for Anchor Links */
html {
  scroll-behavior: smooth;
}

/* Print Styles */
@media print {
  .legal-hero-section {
    background: none !important;
    color: black !important;
    padding: 40px 0 20px;
  }
  
  .legal-badge {
    background: none !important;
    color: black !important;
    border: 1px solid black;
  }
  
  .legal-hero-title {
    color: black !important;
  }
  
  .legal-hero-description {
    color: black !important;
  }
  
  .legal-content {
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  
  .legal-toc,
  .cookie-type,
  .cookie-category,
  .third-party-service,
  .browser-instructions,
  .contact-info {
    background: #f9f9f9 !important;
    border: 1px solid #ccc;
  }
  
  .legal-section a {
    color: black !important;
    text-decoration: underline !important;
  }
}

/* Dark Theme Compatibility */
.theme-dark .legal-content,
[data-theme="dark"] .legal-content {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

.theme-dark .legal-toc,
[data-theme="dark"] .legal-toc,
.theme-dark .cookie-type,
[data-theme="dark"] .cookie-type,
.theme-dark .cookie-category,
[data-theme="dark"] .cookie-category,
.theme-dark .third-party-service,
[data-theme="dark"] .third-party-service,
.theme-dark .browser-instructions,
[data-theme="dark"] .browser-instructions,
.theme-dark .contact-info,
[data-theme="dark"] .contact-info {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

.theme-dark .legal-section h2,
[data-theme="dark"] .legal-section h2,
.theme-dark .legal-section h3,
[data-theme="dark"] .legal-section h3,
.theme-dark .legal-section h4,
[data-theme="dark"] .legal-section h4 {
  color: var(--text-primary) !important;
}

.theme-dark .legal-section p,
[data-theme="dark"] .legal-section p,
.theme-dark .legal-section li,
[data-theme="dark"] .legal-section li {
  color: var(--text-secondary) !important;
}
