/* ==========================================================================
   D-Solutionist - Legal Pages Stylesheet (Privacy Policy & Terms)
   Theme: #0a192f (Navy), #00bcd4 (Teal), #64748b (Slate), #ffffff (White)
   ========================================================================== */

/* Hero Banner */
.legal-hero {
  background-color: #0a192f;
  background-image: linear-gradient(rgba(10, 25, 47, 0.88), rgba(10, 25, 47, 0.88)), url('../../banner1.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 130px 20px 60px;
  text-align: center;
  position: relative;
}

.legal-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.legal-breadcrumbs {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 15px;
}

.legal-breadcrumbs a {
  color: #00bcd4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.legal-breadcrumbs span {
  margin: 0 8px;
  color: #64748b;
}

.legal-hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: #ffffff;
  line-height: 1.2;
}

.legal-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-top: 15px;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-meta-item strong {
  color: #ffffff;
  font-weight: 600;
}

/* Main Layout: Sidebar TOC + Content Area */
.legal-layout {
  padding: 60px 20px;
  background-color: #f9f9f9;
}

.legal-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: start;
}

/* Table of Contents - Desktop Sticky Sidebar */
.legal-toc-wrapper {
  position: sticky;
  top: 100px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(10, 25, 47, 0.04);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.legal-toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0a192f;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  letter-spacing: 0.2px;
}

.legal-toc-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.legal-toc-nav a {
  display: block;
  font-size: 0.9rem;
  color: #64748b;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.legal-toc-nav a:hover {
  color: #0a192f;
  background-color: #f1f5f9;
  border-left-color: #00bcd4;
}

.legal-toc-nav a.active {
  color: #0a192f;
  background-color: #f0fdfa;
  border-left-color: #00bcd4;
  font-weight: 600;
}

/* Legal Content Body */
.legal-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 45px 50px;
  box-shadow: 0 2px 8px rgba(10, 25, 47, 0.04);
}

.legal-section {
  margin-bottom: 40px;
  padding-bottom: 35px;
  border-bottom: 1px solid #edf2f7;
  scroll-margin-top: 100px;
}

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

.legal-section h2 {
  font-size: 1.55rem;
  color: #0a192f;
  font-weight: 700;
  margin: 0 0 18px 0;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.legal-section h3 {
  font-size: 1.2rem;
  color: #1e293b;
  font-weight: 600;
  margin: 24px 0 12px 0;
  line-height: 1.4;
}

.legal-section p {
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 16px 0;
}

.legal-section ul,
.legal-section ol {
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 18px 0;
  padding-left: 24px;
}

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

.legal-section strong {
  color: #0a192f;
}

.legal-section a {
  color: #008c9e;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.legal-section a:hover {
  color: #00bcd4;
}

/* Informational Callout (Restrained, not flashy) */
.legal-callout {
  background-color: #f8fafc;
  border-left: 4px solid #00bcd4;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.legal-callout p {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Contact Block & Copy Email Button */
.legal-contact-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 24px;
  margin-top: 20px;
}

.legal-contact-box p {
  margin-bottom: 12px;
}

.legal-contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.copy-email-btn {
  background-color: #0a192f;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: background-color 0.2s ease;
}

.copy-email-btn:hover {
  background-color: #008c9e;
}

.copy-email-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.copy-status-text {
  font-size: 0.88rem;
  color: #008c9e;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-status-text.show {
  opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .legal-container {
    grid-template-columns: 260px 1fr;
    gap: 30px;
  }
  .legal-content {
    padding: 35px;
  }
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 110px 15px 45px;
  }
  .legal-hero h1 {
    font-size: 2.2rem;
  }
  .legal-layout {
    padding: 35px 15px;
  }
  .legal-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .legal-toc-wrapper {
    position: static;
    max-height: none;
    padding: 20px;
  }
  .legal-content {
    padding: 25px 20px;
  }
  .legal-section h2 {
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .legal-hero h1 {
    font-size: 1.8rem;
  }
  .legal-meta {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  .legal-content {
    padding: 20px 16px;
  }
}

/* Print Stylesheet */
@media print {
  header,
  footer.site-footer,
  .legal-toc-wrapper,
  .copy-email-btn,
  .copy-status-text,
  .legal-breadcrumbs {
    display: none !important;
  }

  body,
  .legal-layout {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  .legal-hero {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px 0 !important;
    text-align: left !important;
  }

  .legal-hero h1 {
    color: #000000 !important;
    font-size: 24pt !important;
  }

  .legal-meta {
    color: #555555 !important;
    justify-content: flex-start !important;
  }

  .legal-container {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    max-width: 100% !important;
  }

  .legal-content {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .legal-section {
    border-bottom: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  .legal-section h2 {
    color: #000000 !important;
  }

  .legal-section p,
  .legal-section li {
    color: #111111 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: none !important;
  }
}
