/* ==========================================================================
   COMPLIZEN GLOBAL PRIVATE LIMITED - LEGAL PORTAL STYLES
   Privacy Policy & Terms of Service Stylesheet
   ========================================================================== */

/* ---------- Document Reading Progress ---------- */
.legal-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal-400), var(--accent-cyan));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* ---------- Hero Section ---------- */
.legal-hero {
  position: relative;
  background: linear-gradient(135deg, #070e1a 0%, #0d1a2d 50%, #0a252b 100%);
  color: var(--white);
  padding: 130px 24px 60px;
  overflow: hidden;
  border-bottom: 1px solid rgba(46, 196, 182, 0.2);
  width: 100%;
  box-sizing: border-box;
}

.legal-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(46, 196, 182, 0.15) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.legal-hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(135, 206, 235, 0.08) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.legal-hero-container {
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.legal-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  word-break: break-word;
}

.legal-breadcrumbs a {
  color: var(--teal-300);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-breadcrumbs a:hover {
  color: var(--white);
  text-decoration: underline;
}

.legal-breadcrumbs .separator {
  color: rgba(255, 255, 255, 0.3);
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.35);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal-300);
  margin-bottom: 16px;
  max-width: 100%;
}

.legal-badge svg {
  width: 15px;
  height: 15px;
  stroke: var(--teal-300);
  flex-shrink: 0;
}

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--white);
  letter-spacing: -0.5px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.legal-hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 820px;
  line-height: 1.75;
  margin-bottom: 28px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-hero-subtitle a {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.legal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.legal-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
}

.legal-meta-item svg {
  color: var(--teal-300);
  flex-shrink: 0;
}

.legal-meta-item strong {
  color: var(--white);
}

/* Document Switcher Tabs in Hero */
.legal-switcher-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.legal-tabs-group {
  display: inline-flex;
  background: rgba(13, 13, 43, 0.6);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.legal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 22px;
  min-height: 42px;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  color: var(--white);
  opacity: 0.85;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.legal-tab:hover {
  color: var(--white);
  opacity: 1;
}

.legal-tab.active {
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
  color: var(--white);
  opacity: 1;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(46, 196, 182, 0.4);
}

.legal-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-legal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 22px;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.btn-legal-action svg {
  flex-shrink: 0;
  color: var(--white);
  stroke: var(--white);
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.btn-legal-action:hover {
  background: rgba(46, 196, 182, 0.2);
  border-color: var(--teal-400);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46, 196, 182, 0.2);
}

/* Back to Homepage in action group with white font */
a.btn-legal-action[href="index.html"] {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

a.btn-legal-action[href="index.html"] svg {
  color: var(--white);
  stroke: var(--white);
}

a.btn-legal-action[href="index.html"]:hover {
  background: rgba(46, 196, 182, 0.25);
  border-color: var(--teal-300);
  color: var(--white);
}

a.btn-legal-action[href="index.html"]:hover svg {
  color: var(--white);
  stroke: var(--white);
  transform: translateX(-2px);
}

/* ---------- Legal Main Layout ---------- */
.legal-main {
  background: #f8fafc;
  padding: 48px 24px 80px;
  min-height: 80vh;
  width: 100%;
  box-sizing: border-box;
}

.legal-grid {
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  box-sizing: border-box;
}

/* Ensure sticky positioning works without overflow clipping */
html, body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ---------- Sticky Sidebar ---------- */
.legal-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 96px;
  align-self: start;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  max-height: calc(100vh - 116px);
  display: flex;
  flex-direction: column;
  z-index: 50;
  will-change: transform;
}

.sidebar-header {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--navy-500);
  margin-bottom: 12px;
}

.sidebar-title svg {
  color: var(--teal-500);
}

.sidebar-search-box {
  position: relative;
}

.sidebar-search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  background: #fdfdfd;
  color: var(--navy-600);
  transition: all 0.2s ease;
}

.sidebar-search-input:focus {
  outline: none;
  border-color: var(--teal-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}

.sidebar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--gray-400);
  pointer-events: none;
}

.sidebar-nav-container {
  overflow-y: auto;
  padding-right: 4px;
  flex-grow: 1;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav-container::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav-container::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 10px;
}
.sidebar-nav-container::-webkit-scrollbar-thumb:hover {
  background: var(--teal-400);
}

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

.sidebar-nav-item {
  margin-bottom: 3px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy-500);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.35;
}

.sidebar-nav-link:hover {
  background: rgba(46, 196, 182, 0.08);
  color: var(--teal-600);
  padding-left: 14px;
}

.sidebar-nav-link.active {
  background: rgba(46, 196, 182, 0.12);
  color: var(--teal-600);
  font-weight: 700;
  border-left: 3px solid var(--teal-500);
}

.sidebar-nav-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal-500);
  background: rgba(46, 196, 182, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-contact-card {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sidebar-contact-card p {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 8px;
  line-height: 1.4;
}

.sidebar-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-600);
  text-decoration: none;
}

.sidebar-contact-link:hover {
  text-decoration: underline;
}

/* Mobile Quick Navigation Floating Dropdown Trigger & Wrapper */
.mobile-toc-wrapper {
  display: none; /* hidden on desktop */
}

.mobile-toc-toggle {
  display: flex;
  width: 100%;
  padding: 13px 18px;
  background: var(--navy-600);
  color: var(--white);
  border: 1px solid rgba(46, 196, 182, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(13, 13, 43, 0.16);
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.mobile-toc-toggle:hover {
  background: var(--navy-500);
  border-color: var(--teal-400);
}

.mobile-toc-toggle svg {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.mobile-toc-toggle.expanded {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: var(--navy-500);
}

.mobile-toc-toggle.expanded svg {
  transform: rotate(180deg);
}

.mobile-toc-menu {
  display: none;
  background: var(--white);
  border: 1px solid rgba(46, 196, 182, 0.3);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-bottom: 24px;
  padding: 14px 16px;
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.mobile-toc-menu.open {
  display: block;
}

/* ---------- Main Legal Content Container ---------- */
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Individual Section Card */
.legal-section {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03);
  scroll-margin-top: 116px;
  transition: border-color 0.25s ease;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-section:hover {
  border-color: rgba(46, 196, 182, 0.3);
}

.legal-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  min-width: 0;
  width: 100%;
}

.legal-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.legal-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.15), rgba(46, 196, 182, 0.05));
  border: 1px solid rgba(46, 196, 182, 0.3);
  color: var(--teal-600);
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.legal-section-header h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--navy-600);
  margin: 0;
  line-height: 1.25;
}

.btn-copy-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.btn-copy-anchor:hover {
  background: var(--teal-50);
  border-color: var(--teal-400);
  color: var(--teal-600);
}

.btn-copy-anchor svg {
  width: 16px;
  height: 16px;
}

.btn-copy-anchor::after {
  content: 'Copy link';
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--navy-600);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.15s ease;
}

.btn-copy-anchor:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.btn-copy-anchor.copied::after {
  content: 'Link copied!';
  background: var(--teal-600);
}

/* Typography Inside Legal Body */
.legal-body {
  color: var(--navy-600);
  font-size: 1.025rem;
  line-height: 1.85;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
}

.legal-body p {
  margin-bottom: 16px;
  color: rgba(18, 18, 46, 0.85);
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-body h3 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-600);
  margin-top: 28px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-body h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--teal-400);
  border-radius: 2px;
  flex-shrink: 0;
}

.legal-body ul, .legal-body ol {
  padding-left: 0;
  margin: 14px 0 22px;
  list-style: none;
}

.legal-body ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: rgba(18, 18, 46, 0.85);
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-body ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--teal-500);
  font-weight: 700;
  font-size: 0.95rem;
}

.legal-body ol {
  counter-reset: legal-counter;
}

.legal-body ol li {
  position: relative;
  counter-increment: legal-counter;
  padding-left: 28px;
  margin-bottom: 10px;
  color: rgba(18, 18, 46, 0.85);
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-body ol li::before {
  content: counter(legal-counter) '.';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal-600);
  font-weight: 700;
  font-size: 0.9rem;
}

.legal-body a:not(.btn-legal-back-home):not(.btn-legal-switch-doc):not(.btn) {
  color: var(--teal-600);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed rgba(26, 171, 158, 0.4);
  transition: all 0.2s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-body a:not(.btn-legal-back-home):not(.btn-legal-switch-doc):not(.btn):hover {
  color: var(--teal-700);
  border-bottom-style: solid;
}

/* ---------- Custom Highlight & Alert Boxes ---------- */
.legal-box {
  padding: 22px 26px;
  border-radius: var(--radius-md);
  margin: 24px 0;
  font-size: 0.975rem;
  line-height: 1.7;
}

.legal-box-highlight {
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.08), rgba(46, 196, 182, 0.03));
  border-left: 4px solid var(--teal-400);
  border-top: 1px solid rgba(46, 196, 182, 0.15);
  border-right: 1px solid rgba(46, 196, 182, 0.15);
  border-bottom: 1px solid rgba(46, 196, 182, 0.15);
}

.legal-box-highlight p {
  color: var(--navy-600);
  font-weight: 500;
  margin-bottom: 0;
}

.legal-box-alert {
  background: #fffbf0;
  border-left: 4px solid var(--accent-gold);
  border-top: 1px solid rgba(212, 168, 68, 0.2);
  border-right: 1px solid rgba(212, 168, 68, 0.2);
  border-bottom: 1px solid rgba(212, 168, 68, 0.2);
}

.legal-box-alert p {
  color: #725000;
  margin-bottom: 0;
}

.legal-box-navy {
  background: linear-gradient(135deg, #091322, #101c30);
  border: 1px solid rgba(46, 196, 182, 0.25);
  color: var(--white);
}

.legal-box-navy h4 {
  color: var(--teal-300);
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-box-navy p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
}

/* ---------- Modern Structured Tables ---------- */
.legal-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.02);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.legal-table thead {
  background: #f1f5f9;
  border-bottom: 2px solid rgba(46, 196, 182, 0.3);
}

.legal-table th {
  padding: 14px 18px;
  font-weight: 700;
  color: var(--navy-600);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
}

.legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: rgba(18, 18, 46, 0.85);
  vertical-align: top;
  line-height: 1.6;
}

.legal-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-table tbody tr:hover {
  background: rgba(46, 196, 182, 0.03);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.status-badge-positive {
  background: #e8f9f0;
  color: #0d8248;
  border: 1px solid #b7ecd0;
}

.status-badge-neutral {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-badge-notice {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ---------- Feature / Cards Grid (Rights, Security, Services) ---------- */
.legal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.legal-card-item {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: all 0.25s ease;
}

.legal-card-item:hover {
  background: var(--white);
  border-color: var(--teal-400);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.legal-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(46, 196, 182, 0.12);
  color: var(--teal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.legal-card-icon svg {
  width: 18px;
  height: 18px;
}

.legal-card-item h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-600);
  margin-bottom: 8px;
}

.legal-card-item p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ---------- Officer / Contact Card ---------- */
.legal-contact-card {
  background: linear-gradient(135deg, #f8fafc 0%, #edf7f6 100%);
  border: 1px solid rgba(46, 196, 182, 0.3);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-top: 20px;
}

.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.legal-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.legal-contact-icon {
  width: 34px;
  height: 34px;
  background: var(--white);
  border: 1px solid rgba(46, 196, 182, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-600);
  flex-shrink: 0;
}

.legal-contact-info strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.legal-contact-info span, .legal-contact-info a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-600);
}

/* Bottom Navigation Footer inside Legal Container */
.legal-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.legal-body .legal-footer-nav a.btn-legal-back-home,
.legal-footer-nav a.btn-legal-back-home,
a.btn-legal-back-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  min-height: 46px;
  background: var(--navy-700);
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none !important;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.legal-body .legal-footer-nav a.btn-legal-back-home *,
.legal-footer-nav a.btn-legal-back-home * {
  color: #ffffff !important;
}

.legal-body .legal-footer-nav a.btn-legal-back-home svg,
.legal-footer-nav a.btn-legal-back-home svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  transition: transform 0.25s ease, stroke 0.25s ease;
}

.legal-body .legal-footer-nav a.btn-legal-back-home:hover,
.legal-footer-nav a.btn-legal-back-home:hover {
  background: var(--navy-800);
  border-color: var(--teal-300) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 196, 182, 0.3);
}

.legal-body .legal-footer-nav a.btn-legal-back-home:hover svg,
.legal-footer-nav a.btn-legal-back-home:hover svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  transform: translateX(-3px);
}

.legal-body .legal-footer-nav a.btn-legal-switch-doc,
.legal-footer-nav a.btn-legal-switch-doc,
a.btn-legal-switch-doc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  min-height: 46px;
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
  color: #ffffff !important;
  border: 1.5px solid transparent !important;
  border-bottom: 1.5px solid transparent !important;
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(46, 196, 182, 0.35);
  box-sizing: border-box;
}

.legal-body .legal-footer-nav a.btn-legal-switch-doc span,
.legal-footer-nav a.btn-legal-switch-doc span,
.legal-body .legal-footer-nav a.btn-legal-switch-doc *,
.legal-footer-nav a.btn-legal-switch-doc * {
  color: #ffffff !important;
}

.legal-body .legal-footer-nav a.btn-legal-switch-doc svg,
.legal-footer-nav a.btn-legal-switch-doc svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  transition: transform 0.25s ease;
}

.legal-body .legal-footer-nav a.btn-legal-switch-doc:hover,
.legal-footer-nav a.btn-legal-switch-doc:hover {
  background: linear-gradient(135deg, var(--teal-300), var(--teal-500));
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 196, 182, 0.5);
}

.legal-body .legal-footer-nav a.btn-legal-switch-doc:hover svg,
.legal-footer-nav a.btn-legal-switch-doc:hover svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  transform: translateX(4px);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1120px) and (min-width: 901px) {
  .legal-grid {
    grid-template-columns: 260px 1fr;
    gap: 28px;
  }
  .legal-sidebar {
    padding: 18px;
    top: 90px;
  }
  .sidebar-nav-link {
    font-size: 0.82rem;
    padding: 6px 10px;
  }
}

@media (max-width: 900px) {
  .legal-main {
    padding: 24px 16px 60px;
  }
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
  }
  .legal-sidebar {
    display: none; /* Replaced by mobile-toc-wrapper */
  }
  .mobile-toc-wrapper {
    display: block;
    position: -webkit-sticky;
    position: sticky;
    top: 64px;
    z-index: 950;
    margin: -10px auto 18px auto;
    padding-top: 10px;
    padding-bottom: 6px;
    background: #f8fafc;
    width: 100%;
    box-sizing: border-box;
  }
  .mobile-toc-toggle {
    display: flex;
    position: relative;
    top: 0;
    margin: 0;
    width: 100%;
  }
  .mobile-toc-menu {
    position: absolute;
    top: calc(100% - 6px);
    left: 0;
    right: 0;
    z-index: 960;
    width: 100%;
    margin: 0;
  }
  .legal-section {
    padding: 28px 20px;
    scroll-margin-top: 125px;
  }
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 100px 14px 36px;
  }
  .legal-hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.1rem);
    line-height: 1.2;
    word-break: break-word;
  }
  .legal-breadcrumbs {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.8rem;
  }
  .legal-hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .legal-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    font-size: 0.84rem;
    width: 100%;
    box-sizing: border-box;
  }
  .legal-switcher-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }
  .legal-tabs-group {
    display: flex;
    width: 100%;
    padding: 4px;
    box-sizing: border-box;
    justify-content: stretch;
  }
  .legal-tab {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.82rem;
    text-align: center;
    white-space: nowrap;
    gap: 6px;
  }
  .legal-actions-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .btn-legal-action {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.84rem;
    box-sizing: border-box;
  }
  .legal-main {
    padding: 24px 12px 60px;
  }
  .legal-section {
    padding: 20px 14px;
    border-radius: var(--radius-md);
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .legal-section-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  .legal-section-title-wrap {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }
  .legal-section-header h2 {
    font-size: 1.25rem;
    word-break: break-word;
    line-height: 1.3;
  }
  .legal-section-badge {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  .btn-copy-anchor {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  .legal-body {
    font-size: 0.94rem;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
  }
  .legal-body p {
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 12px;
  }
  .legal-body h3 {
    font-size: 1.05rem;
    word-break: break-word;
    margin-top: 22px;
    margin-bottom: 10px;
  }
  .legal-body ul, .legal-body ol {
    padding-left: 0;
    margin: 10px 0 16px;
  }
  .legal-body ul li, .legal-body ol li {
    padding-left: 24px;
    overflow-wrap: break-word;
    word-break: break-word;
    margin-bottom: 8px;
  }
  .legal-body a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .legal-box {
    padding: 14px 14px;
    margin: 18px 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .legal-cards-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .legal-card-item {
    padding: 16px 14px;
  }
  .legal-contact-card {
    padding: 18px 14px;
  }
  .legal-contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .legal-contact-info span, .legal-contact-info a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .legal-footer-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 32px;
    padding-top: 20px;
  }
  .btn-legal-back-home, .btn-legal-switch-doc {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 0.88rem;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .legal-hero {
    padding: 95px 10px 30px;
  }
  .legal-main {
    padding: 20px 8px 50px;
  }
  .mobile-toc-wrapper {
    top: 58px;
    margin: -8px auto 14px auto;
  }
  .legal-section {
    padding: 16px 10px;
    scroll-margin-top: 118px;
  }
  .legal-section-header h2 {
    font-size: 1.15rem;
  }
  .legal-body {
    font-size: 0.9rem;
    line-height: 1.65;
  }
  .mobile-toc-toggle {
    font-size: 0.82rem;
    padding: 11px 13px;
  }
}

/* ---------- Floating Back to Top Portal Button ---------- */
.back-to-top {
  border: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  box-shadow: 0 6px 20px rgba(46, 196, 182, 0.4) !important;
}

.back-to-top:focus {
  outline: none !important;
}

.back-to-top:focus-visible {
  outline: 2px solid var(--teal-400) !important;
  outline-offset: 3px !important;
}

/* ---------- Print Media Query ---------- */
@media print {
  .navbar,
  .legal-hero::before,
  .legal-hero::after,
  .legal-breadcrumbs,
  .legal-switcher-tabs,
  .legal-actions-group,
  .legal-sidebar,
  .mobile-toc-wrapper,
  .mobile-toc-toggle,
  .mobile-toc-menu,
  .btn-copy-anchor,
  .legal-footer-nav,
  .footer,
  .cursor-dot,
  .cursor-ring,
  .scroll-progress,
  .legal-progress-bar,
  .back-to-top {
    display: none !important;
  }

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

  .legal-hero {
    background: none !important;
    color: #000000 !important;
    padding: 0 0 20px 0 !important;
    border-bottom: 2px solid #000000 !important;
  }

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

  .legal-hero-subtitle {
    color: #333333 !important;
  }

  .legal-meta-bar {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: #333333 !important;
  }

  .legal-meta-item strong, .legal-meta-item span {
    color: #000000 !important;
  }

  .legal-grid {
    display: block !important;
  }

  .legal-section {
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid #cccccc !important;
    padding: 20px 0 !important;
    page-break-inside: avoid;
  }

  .legal-section-header h2 {
    color: #000000 !important;
    font-size: 16pt !important;
  }

  .legal-body {
    font-size: 11pt !important;
    line-height: 1.6 !important;
    color: #000000 !important;
  }

  .legal-box {
    border: 1px solid #999999 !important;
    background: #f9f9f9 !important;
  }

  .legal-box-navy {
    background: #f0f0f0 !important;
    color: #000000 !important;
  }

  .legal-box-navy h4, .legal-box-navy p {
    color: #000000 !important;
  }
}
