/* Privacy Policy Page Styles */
.privacy-policy {
  padding: 8rem 0 2rem 0; /* Added top padding to account for fixed navbar */
  background: var(--background-color, #f8f9fa);
  min-height: 100vh;
}

.privacy-policy .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Ensure main content is visible */
.main {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

/* Page Header - Centered */
.privacy-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
  box-shadow: 0 10px 40px rgba(103, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.privacy-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/>'); /* no semicolon here */
  opacity: 0.3;
}

.privacy-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  position: relative;
  z-index: 1;
}

.privacy-header .last-updated {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* Enhanced Table of Contents with premium hover */
.table-of-contents {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.table-of-contents:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(103, 126, 234, 0.12);
}

.table-of-contents::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 16px 16px 0 0;
}

.table-of-contents h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.table-of-contents h2 i {
  color: #667eea;
  font-size: 1.5rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.toc-list li {
  margin-bottom: 0;
}

/* Enhanced TOC links */
.toc-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  text-decoration: none;
  color: #4b5563;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 2px solid transparent;
  background: #f9fafb;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-20px);
}

.toc-list a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(103, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
}

.toc-list a:hover::before {
  left: 100%;
}

.toc-list a:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateX(8px) scale(1.02);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(103, 126, 234, 0.3);
}

.toc-list a i {
  color: #667eea;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  width: 20px;
  text-align: center;
}

.toc-list a:hover i {
  color: white;
  transform: scale(1.1);
}

/* Privacy Content */
.privacy-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 3rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.privacy-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(103, 126, 234, 0.12);
}

/* Privacy Sections with Collapsible Feature */
.privacy-section {
  margin-bottom: 2rem;
  scroll-margin-top: 120px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(20px);
}

.privacy-section:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(103, 126, 234, 0.12);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.section-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(103, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
}

.section-header:hover::before {
  left: 100%;
}

.section-header:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 20px rgba(103, 126, 234, 0.15);
}

.section-toggle {
  color: #667eea;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced section content animations */
.section-content {
  padding: 0 2rem;
  background: #ffffff;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition: 
    max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.section-header:hover h2,
.section-header:hover h2 i,
.section-header:hover .section-number,
.section-header:hover .section-toggle {
  color: white !important;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0; /* Allow h2 to shrink */
}

.section-header h2 i {
  color: #667eea;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.section-title-text {
  flex: 1; /* Allow text to take remaining space */
  min-width: 0; /* Allow text to shrink and wrap */
  line-height: 1.3; /* Adjust line height for wrapping */
}

.section-number {
  background: #667eea;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  /* margin-right: 0.5rem; */ /* Removed this margin */
  flex-shrink: 0; /* Prevent number circle from shrinking */
}

.section-toggle {
  color: #667eea;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  transform: rotate(0deg);
}

.section-header[aria-expanded="true"] .section-toggle {
  transform: rotate(180deg);
}

.section-content {
  padding: 2rem;
  background: #ffffff;
  display: none; /* Hidden by default */
}

.section-content.show {
  display: block; /* Show when expanded */
  border-top: 1px solid #e5e7eb;
}

.section-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.5rem 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-content h3 i {
  color: #764ba2;
  font-size: 1.1rem;
}

.section-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.25rem 0 0.75rem 0;
}

.section-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 1.25rem;
}

.section-content ul, 
.section-content ol {
  margin: 1.25rem 0;
  padding-left: 2rem;
}

.section-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: #4b5563;
  margin-bottom: 0.75rem;
}

.section-content li strong {
  color: #1f2937;
  font-weight: 600;
}

/* Enhanced Info Boxes */
.info-box {
  background: linear-gradient(135deg, rgba(103, 126, 234, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 1px solid #667eea;
  border-left: 4px solid #667eea;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(103, 126, 234, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.info-box h4 {
  color: #667eea;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.info-box h4 i {
  font-size: 1.2rem;
}

.info-box p,
.info-box ul {
  margin-bottom: 0.5rem;
  color: #4b5563;
  position: relative;
  z-index: 1;
}

/* Highlight Boxes */
.highlight-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(103, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  transform: rotate(45deg);
}

.highlight-box h4 {
  color: white;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.highlight-box h4 i {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3rem;
}

.highlight-box p,
.highlight-box ul {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

/* Warning Box */
.warning-box {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
  border-left: 4px solid #ff1744;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.warning-box h4 {
  color: white;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.warning-box h4 i {
  font-size: 1.2rem;
}

.warning-box p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0;
}

/* Contact Info */
.contact-info {
  background: #f9fafb;
  padding: 2.5rem;
  border-radius: 16px;
  margin: 2rem 0;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-info h4 {
  color: #1f2937;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.contact-info h4 i {
  color: #667eea;
  font-size: 1.2rem;
}

/* Enhanced info boxes with smooth animations */
.info-box, .highlight-box, .warning-box, .contact-info {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.info-box:hover, .highlight-box:hover, .warning-box:hover, .contact-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(103, 126, 234, 0.15);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(103, 126, 234, 0.15);
}

.contact-item i {
  color: #667eea;
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.contact-item span {
  color: #4b5563;
  font-weight: 500;
  flex: 1; /* Allow span to grow and wrap content */
  min-width: 0; /* Allow span to shrink */
}

.contact-item a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  word-break: break-all; /* Allow long links to break */
}

.contact-item a:hover {
  color: #764ba2;
}

/* Back to Top Button */
.privacy-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(103, 126, 234, 0.3);
  z-index: 1000;
}

.privacy-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0px) scale(1);
}

.privacy-back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 36px rgba(103, 126, 234, 0.4);
}

/* Active state for TOC links */
.toc-list a.active {
  background: #667eea !important;
  color: white !important;
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(103, 126, 234, 0.3);
}

.toc-list a.active i {
  color: white !important;
}

/* Fallback: ensure elements with data-aos are visible if AOS not initialized */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Make overlay non-blocking by default (navbar.js should toggle .show on open) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
  z-index: 900;
}
.overlay.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .privacy-policy {
    padding: 6rem 0 2rem 0; /* Reduced top padding for mobile */
  }

  .privacy-header {
    margin-bottom: 2rem;
    padding: 2rem 1.5rem;
  }

  .privacy-header h1 {
    font-size: 2.2rem;
  }

  .table-of-contents {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .table-of-contents h2 {
    font-size: 1.5rem;
  }

  .toc-list a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .toc-list a:hover {
    transform: translateX(4px) scale(1.01);
  }

  .privacy-content {
    padding: 2rem 1.5rem;
  }

  .section-header {
    padding: 1.25rem 1.5rem;
  }

  .section-header h2 {
    font-size: 1.3rem;
    gap: 0.75rem; /* Reduced gap for tablet */
  }

  .section-content {
    padding: 1.5rem;
  }

  .section-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .highlight-box,
  .contact-info,
  .info-box {
    padding: 1.5rem;
  }

  .privacy-back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .privacy-policy {
    padding: 5rem 0 1rem 0; /* Further reduced for very small screens */
  }

  .privacy-header {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .privacy-header h1 {
    font-size: 1.8rem;
  }

  .table-of-contents {
    padding: 1.5rem 1rem;
  }

  .table-of-contents h2 {
    font-size: 1.3rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .toc-list {
    gap: 0.5rem;
  }

  .toc-list a {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .privacy-content {
    padding: 1.5rem 1rem;
  }

  .section-header {
    padding: 1rem 1.25rem;
  }

  .section-header h2 {
    font-size: 1.2rem;
    gap: 0.5rem; /* Further reduced gap for mobile */
  }

  .section-content {
    padding: 1.25rem;
  }

  .section-content ul, 
  .section-content ol {
    padding-left: 1.5rem;
  }

  .highlight-box,
  .contact-info,
  .info-box {
    padding: 1.25rem;
  }
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .privacy-policy {
  background: #2c3e50 !important;
}

[data-bs-theme="dark"] .table-of-contents {
  background: #34495e !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .table-of-contents h2 {
  color: #e2e8f0 !important;
  border-bottom-color: #4a5568 !important;
}

[data-bs-theme="dark"] .toc-list a {
  background: #2d3748 !important;
  color: #e2e8f0 !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .toc-list a:hover {
  background: #667eea !important;
  color: white !important;
}

[data-bs-theme="dark"] .privacy-content {
  background: #34495e !important;
  border-color: #4a5568 !important;
}

/* Privacy sections dark mode */
[data-bs-theme="dark"] .privacy-section {
  background: #34495e !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .section-header {
  background: #2d3748 !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .section-header h2 {
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .section-header h2 i {
  color: #667eea !important;
}

[data-bs-theme="dark"] .section-content {
  background: #34495e !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .section-content h3,
[data-bs-theme="dark"] .section-content h4 {
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .section-content p,
[data-bs-theme="dark"] .section-content li {
  color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .section-content li strong {
  color: #e2e8f0 !important;
}

/* Info boxes dark mode */
[data-bs-theme="dark"] .info-box {
  background: linear-gradient(135deg, rgba(103, 126, 234, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%) !important;
  border-color: #667eea !important;
  border-left-color: #667eea !important;
}

[data-bs-theme="dark"] .info-box h4 {
  color: #a78bfa !important;
}

[data-bs-theme="dark"] .info-box p,
[data-bs-theme="dark"] .info-box ul,
[data-bs-theme="dark"] .info-box li {
  color: #cbd5e0 !important;
}

/* Contact info dark mode */
[data-bs-theme="dark"] .contact-info {
  background: #2d3748 !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .contact-info h4 {
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .contact-item {
  background: #34495e !important;
  border-color: #4a5568 !important;
}

[data-bs-theme="dark"] .contact-item span {
  color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .contact-item a {
  color: #a78bfa !important;
}

[data-bs-theme="dark"] .contact-item a:hover {
  color: #c4b5fd !important;
}

/* Warning box dark mode */
[data-bs-theme="dark"] .warning-box {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

/* Highlight box - keep original gradient but ensure visibility */
[data-bs-theme="dark"] .highlight-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Privacy header dark mode */
[data-bs-theme="dark"] .privacy-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Section numbers dark mode */
[data-bs-theme="dark"] .section-number {
  background: #667eea !important;
  color: white !important;
}

[data-bs-theme="dark"] .section-toggle {
  color: #a78bfa !important;
}

[data-bs-theme="dark"] .section-header:hover .section-toggle {
  color: white !important;
}

/* TOC active state dark mode */
[data-bs-theme="dark"] .toc-list a.active {
  background: #667eea !important;
  color: white !important;
}

[data-bs-theme="dark"] .toc-list a.active i {
  color: white !important;
}

/* Dark-mode: convert the contact card inside "Privacy Rights" to dark + readable text
   Targets common theme toggles: data-bs-theme, data-theme, and class-based toggles */
[data-bs-theme="dark"] .section-content .contact-info,
html[data-theme="dark"] .section-content .contact-info,
html.dark .section-content .contact-info,
body.dark .section-content .contact-info,
html.theme-dark .section-content .contact-info,
body.theme-dark .section-content .contact-info,
html.night-mode .section-content .contact-info,
body.night-mode .section-content .contact-info,
html.is-dark .section-content .contact-info,
body.is-dark .section-content .contact-info {
  background: rgba(255,255,255,0.02) !important; /* subtle elevated surface */
  border: 1px solid rgba(255,255,255,0.04) !important;
  color: #e6eef8 !important;
  box-shadow: 0 6px 20px rgba(2,6,23,0.45) inset;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

/* inner rows / items inside the contact card */
[data-bs-theme="dark"] .section-content .contact-info .contact-item,
html[data-theme="dark"] .section-content .contact-info .contact-item,
html.dark .section-content .contact-info .contact-item,
body.dark .section-content .contact-info .contact-item {
  background: rgba(255,255,255,0.015) !important;
  border: 1px solid rgba(255,255,255,0.03) !important;
  color: #cfe7ff !important;
}

/* headings / labels inside the contact card */
[data-bs-theme="dark"] .section-content .contact-info h4,
html[data-theme="dark"] .section-content .contact-info h4,
html.dark .section-content .contact-info h4,
body.dark .section-content .contact-info h4 {
  color: #e6eef8 !important;
}

/* contact links (email / website) */
[data-bs-theme="dark"] .section-content .contact-info a,
html[data-theme="dark"] .section-content .contact-info a,
html.dark .section-content .contact-info a,
body.dark .section-content .contact-info a {
  color: #a8c7ff !important;
  text-decoration: none;
  font-weight: 600;
}

/* icon color */
[data-bs-theme="dark"] .section-content .contact-info .contact-item i,
html[data-theme="dark"] .section-content .contact-info .contact-item i,
html.dark .section-content .contact-info .contact-item i,
body.dark .section-content .contact-info .contact-item i {
  color: #97b7ff !important;
}

/* ensure small devices keep padding/contrast */
@media (max-width: 768px) {
  [data-bs-theme="dark"] .section-content .contact-info,
  html[data-theme="dark"] .section-content .contact-info,
  html.dark .section-content .contact-info,
  body.dark .section-content .contact-info {
    padding: 1.25rem !important;
  }
}

/* end of appended dark-card rules */

/* Dark-mode: ensure text/content remains readable (high-specificity overrides) */
html[data-theme="dark"] .table-of-contents,
body[data-theme="dark"] .table-of-contents,
html.dark .table-of-contents,
body.dark .table-of-contents {
  color: #e6eef8 !important;
  border-color: rgba(255,255,255,0.06) !important;
}

html[data-theme="dark"] .privacy-content,
body[data-theme="dark"] .privacy-content,
html.dark .privacy-content,
body.dark .privacy-content {
  color: #e6eef8 !important;
  border-color: rgba(255,255,255,0.05) !important;
}

/* Headings inside the two cards */
html[data-theme="dark"] .table-of-contents h2,
body[data-theme="dark"] .table-of-contents h2,
html.dark .table-of-contents h2,
body.dark .table-of-contents h2,
html[data-theme="dark"] .section-header h2,
body[data-theme="dark"] .section-header h2,
html.dark .section-header h2,
body.dark .section-header h2 {
  color: #e6eef8 !important;
  text-shadow: none !important;
}

/* Section content background + text for contrast */
html[data-theme="dark"] .section-content,
body[data-theme="dark"] .section-content,
html.dark .section-content,
body.dark .section-content {
  background: rgba(255,255,255,0.02) !important; /* subtle card surface */
  color: #cfe7ff !important; /* readable paragraph color */
}

/* Paragraphs, lists, links inside sections */
html[data-theme="dark"] .section-content p,
body[data-theme="dark"] .section-content p,
html.dark .section-content p,
body.dark .section-content p,
html[data-theme="dark"] .section-content li,
body[data-theme="dark"] .section-content li,
html.dark .section-content li,
body.dark .section-content li,
html[data-theme="dark"] .section-content a,
body[data-theme="dark"] .section-content a,
html.dark .section-content a,
body.dark .section-content a {
  color: #cfe7ff !important;
}

/* Headings inside section content */
html[data-theme="dark"] .section-content h3,
body[data-theme="dark"] .section-content h3,
html.dark .section-content h3,
body.dark .section-content h3,
html[data-theme="dark"] .section-content h4,
body[data-theme="dark"] .section-content h4,
html.dark .section-content h4,
body.dark .section-content h4 {
  color: #e6eef8 !important;
}

html[data-theme="dark"] .section-content h3 i,
body[data-theme="dark"] .section-content h3 i,
html.dark .section-content h3 i,
body.dark .section-content h3 i {
  color: #a78bfa !important; /* Dark mode for h3 icons */
}

/* Strong tags inside section content */
html[data-theme="dark"] .section-content p strong,
body[data-theme="dark"] .section-content p strong,
html.dark .section-content p strong,
body.dark .section-content p strong,
html[data-theme="dark"] .section-content li strong,
body[data-theme="dark"] .section-content li strong,
html.dark .section-content li strong,
body.dark .section-content li strong {
  color: #e6eef8 !important; /* Brighter than paragraph text */
}

/* Info/highlight/warning boxes inside card -> keep readable */
html[data-theme="dark"] .info-box,
body[data-theme="dark"] .info-box,
html.dark .info-box,
body.dark .info-box,
html[data-theme="dark"] .highlight-box,
body[data-theme="dark"] .highlight-box,
html.dark .highlight-box,
body.dark .highlight-box,
html[data-theme="dark"] .warning-box,
body[data-theme="dark"] .warning-box,
html.dark .warning-box,
body.dark .warning-box {
  color: #e6eef8 !important;
}

/* Icons, badges and number pills */
html[data-theme="dark"] .toc-list a i,
body[data-theme="dark"] .toc-list a i,
html.dark .toc-list a i,
body.dark .toc-list a i,
html[data-theme="dark"] .section-number,
body[data-theme="dark"] .section-number,
html.dark .section-number,
body.dark .section-number {
  color: #9fb7ff !important;
  background: rgba(159,183,255,0.06) !important;
}

/* Ensure TOC link hover/active remain legible */
html[data-theme="dark"] .toc-list a:hover,
body[data-theme="dark"] .toc-list a:hover,
html.dark .toc-list a:hover,
body.dark .toc-list a:hover,
html[data-theme="dark"] .toc-list a.active,
body[data-theme="dark"] .toc-list a.active,
html.dark .toc-list a.active,
body.dark .toc-list a.active {
  color: #ffffff !important;
}

/* keep smooth transition when toggling theme */
.table-of-contents, .privacy-content, .section-content {
  transition: background .18s ease, color .18s ease, border-color .18s ease !important;
}

/* Print styles */
@media print {
  .privacy-back-to-top,
  .table-of-contents {
    display: none !important;
  }
  
  .privacy-content {
    box-shadow: none;
    border: none;
  }
  
  .section-content {
    display: block !important;
  }
  
  .section-header {
    break-after: avoid;
  }
}

@media (max-width: 768px) {
  /* Footer Container */
  footer.footer .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Stack footer columns and center them */
  .footer .footer-top .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }

  /* Center link groups and remove extra left padding */
  .footer-links,
  .footer-about,
  .footer-newsletter {
    text-align: center;
    width: 100%;
  }

  .footer-links ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: inline-block; /* keeps width compact and centered */
  }

  .footer-links ul li {
    margin: 0.45rem 0;
  }

  .footer-links ul li a {
    display: block;
    padding: 0;
    color: inherit;
  }

  /* Center social icons */
  .footer-about .social-links,
  .social-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
  }

  /* Ensure bottom spacing consistent */
  .footer-bottom .container {
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
  }
}

/* High-specificity dark-mode override for only the two cards:
   targets data-theme attribute and common theme classes so toggle will work. */
html[data-theme="dark"] .table-of-contents,
body[data-theme="dark"] .table-of-contents,
html.dark .table-of-contents,
body.dark .table-of-contents,
html.theme-dark .table-of-contents,
body.theme-dark .table-of-contents,
html.night-mode .table-of-contents,
body.night-mode .table-of-contents,
html.is-dark .table-of-contents,
body.is-dark .table-of-contents {
  background: #11151a !important;
  border-color: rgba(255,255,255,0.04) !important;
  box-shadow: none !important;
  color: #e6eef8 !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

/* privacy-content card */
html[data-theme="dark"] .privacy-content,
body[data-theme="dark"] .privacy-content,
html.dark .privacy-content,
body.dark .privacy-content,
html.theme-dark .privacy-content,
body.theme-dark .privacy-content,
html.night-mode .privacy-content,
body.night-mode .privacy-content,
html.is-dark .privacy-content,
body.is-dark .privacy-content {
  background: #0f1214 !important;
  border-color: rgba(255,255,255,0.03) !important;
  box-shadow: none !important;
  color: #dbeafe !important;
}

/* inner elements in those two cards */
html[data-theme="dark"] .table-of-contents h2,
body[data-theme="dark"] .table-of-contents h2,
html.dark .table-of-contents h2,
body.dark .table-of-contents h2 {
  color: #e6eef8 !important;
  border-bottom-color: rgba(255,255,255,0.03) !important;
}

html[data-theme="dark"] .toc-list a,
body[data-theme="dark"] .toc-list a,
html.dark .toc-list a,
body.dark .toc-list a {
  background: rgba(255,255,255,0.02) !important;
  color: #cfe7ff !important;
  border-color: rgba(255,255,255,0.02) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .toc-list a:hover,
body[data-theme="dark"] .toc-list a:hover,
html.dark .toc-list a:hover,
body.dark .toc-list a:hover {
  background: linear-gradient(90deg, rgba(102,126,234,0.18), rgba(118,75,162,0.18)) !important;
  color: #ffffff !important;
}

/* section header / content */
html[data-theme="dark"] .section-header,
body[data-theme="dark"] .section-header,
html.dark .section-header,
body.dark .section-header {
  background: rgba(255,255,255,0.02) !important;
  border-bottom-color: rgba(255,255,255,0.02) !important;
  color: #e6eef8 !important;
}

html[data-theme="dark"] .section-content,
body[data-theme="dark"] .section-content,
html.dark .section-content,
body.dark .section-content {
  background: transparent !important;
  color: #cbd5e1 !important;
}

/* icons / number badges */
html[data-theme="dark"] .toc-list a i,
body[data-theme="dark"] .toc-list a i,
html.dark .toc-list a i,
body.dark .toc-list a i,
html[data-theme="dark"] .section-number,
body[data-theme="dark"] .section-number,
html.dark .section-number,
body.dark .section-number {
  color: #8ea9ff !important;
  background: rgba(142,169,255,0.06) !important;
  box-shadow: none !important;
}

/* Ensure light mode behaviour remains unchanged */
html:not([data-theme="dark"]) .table-of-contents,
body:not([data-theme="dark"]) .table-of-contents,
html:not([data-theme="dark"]) .privacy-content,
body:not([data-theme="dark"]) .privacy-content {
  /* fallback to original styles (no !important so original rules apply) */
  background: initial;
  border-color: initial;
  color: initial;
}

/* small transition for smooth toggle */
.table-of-contents, .privacy-content {
  transition: background .18s ease, color .18s ease, border-color .18s ease !important;
}

/* CRITICAL FIX: Override conflicting section-content display rule */
.section-content {
  display: block !important; /* Override the display: none rule */
  padding: 0 2rem !important; /* Ensure consistent padding */
  background: #ffffff !important;
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  transform: translateY(-10px) !important;
  transition: 
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important,
    opacity 0.4s ease !important,
    padding 0.4s ease !important,
    transform 0.4s ease !important;
}

/* Remove the old conflicting rules */
.section-content.show {
  display: block !important;
  border-top: 1px solid #e5e7eb !important;
}

/* Dark mode fix for section content */
[data-bs-theme="dark"] .section-content,
html[data-theme="dark"] .section-content,
html.dark .section-content,
body.dark .section-content {
  background: rgba(255,255,255,0.02) !important;
}

/* Make sure expanded sections show properly */
.section-header.expanded + .section-content {
  max-height: none !important;
  opacity: 1 !important;
  padding: 2rem !important;
  transform: translateY(0px) !important;
}