/* =========================================================
   LEGAL PAGES - Modern Document Style
   - Clean, readable typography
   - Mirah brand colors (Blue, Purple, Pink)
   - Single column layout optimized for reading
   - Consistent with Mirah's design language
========================================================= */

/* =========================================================
   CSS RESET & BASE STYLES
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #0d0f12;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   LEGAL PAGE CONTAINER
========================================================= */

.legal-page {
  background: #fff;
  min-height: 100vh;
  padding: 120px 20px 140px;
  position: relative;
}

.legal-container {
  max-width: 1280px; /* Wider to accommodate sidebar */
  margin: 0 auto;
  position: relative;
}

/* =========================================================
   LAYOUT WITH SIDEBAR
========================================================= */

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  align-items: start;
}

/* =========================================================
   LEFT SIDEBAR NAVIGATION
========================================================= */

.legal-sidebar {
  position: sticky;
  top: 120px;
  align-self: start;
}

.legal-nav {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(13, 15, 18, 0.08);
  border-radius: 16px;
  padding: 20px 16px;
  backdrop-filter: blur(10px);
}

.legal-nav-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(13, 15, 18, 0.5);
  margin-bottom: 16px;
  padding: 0 8px;
}

.legal-nav-item {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(13, 15, 18, 0.65);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.legal-nav-item:hover {
  background: rgba(59, 130, 246, 0.06);
  color: #3b82f6;
  transform: translateX(2px);
}

.legal-nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(236,72,153,0.08));
  color: #3b82f6;
  font-weight: 600;
  border-left-color: #3b82f6;
}

/* Add smooth scroll offset for anchor links */
html {
  scroll-padding-top: 140px;
}

/* =========================================================
   BACK LINK (Top Left)
========================================================= */

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ec4899; /* Mirah Pink Accent */
  text-decoration: none;
  margin-bottom: 40px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.legal-back:hover {
  transform: translateX(-4px);
  color: #db2777; /* Darker pink on hover */
}

.legal-back svg {
  transition: transform 0.2s ease;
}

.legal-back:hover svg {
  transform: translateX(-2px);
}

/* =========================================================
   HEADER SECTION
========================================================= */

.legal-header {
  margin-bottom: 60px;
  border-bottom: 2px solid rgba(13, 15, 18, 0.08);
  padding-bottom: 32px;
}

.legal-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: #0d0f12;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.legal-meta {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: rgba(13, 15, 18, 0.5);
  font-weight: 500;
}

.legal-date {
  color: #0d0f12;
  font-weight: 600;
}

/* =========================================================
   CONTENT TYPOGRAPHY
========================================================= */

.legal-content {
  color: rgba(13, 15, 18, 0.8);
}

.legal-content section {
  margin-bottom: 50px;
}

.legal-content h2 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #0d0f12;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  padding-top: 10px;
}

.legal-content h3 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0d0f12;
  margin: 28px 0 14px;
  letter-spacing: -0.01em;
}

.legal-content .legal-subheading {
  font-size: 18px;
  font-weight: 600;
  color: rgba(13, 15, 18, 0.9);
  margin: 24px 0 12px;
}

.legal-content p {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(13, 15, 18, 0.75);
  margin-bottom: 18px;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   HIGHLIGHTED TEXT & NOTES
========================================================= */

.legal-highlight {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(236,72,153,0.08));
  border-left: 4px solid #3b82f6;
  padding: 16px 20px;
  border-radius: 8px;
  font-weight: 600;
  color: #0d0f12 !important;
  display: block;
  margin: 24px 0;
}

.legal-note {
  background: rgba(251, 191, 36, 0.08); /* Soft yellow tint */
  border-left: 4px solid #f59e0b;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 15px;
  color: rgba(13, 15, 18, 0.8);
  font-style: italic;
  margin: 20px 0;
}

/* =========================================================
   LISTS (Bullets)
========================================================= */

.legal-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.legal-content li {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(13, 15, 18, 0.75);
  margin-bottom: 14px;
  padding-left: 28px;
  position: relative;
}

/* Custom Gradient Bullet Dot */
.legal-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  background: linear-gradient(135deg, #3b82f6, #ec4899); /* Mirah gradient */
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Nested Lists (Level 2) */
.legal-content ul ul {
  margin: 10px 0 10px 16px;
}

.legal-content ul ul li::before {
  background: linear-gradient(135deg, #8b5cf6, #ec4899); /* Purple-Pink for nested */
  width: 6px;
  height: 6px;
}

/* =========================================================
   STRONG & EMPHASIS
========================================================= */

.legal-content strong {
  font-weight: 700;
  color: #0d0f12;
}

.legal-content em {
  font-style: italic;
  color: rgba(13, 15, 18, 0.7);
}

/* =========================================================
   LINKS
========================================================= */

.legal-content a {
  color: #3b82f6; /* Mirah Blue */
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.legal-content a:hover {
  color: #2563eb; /* Darker blue on hover */
  border-bottom-color: #3b82f6;
}

/* =========================================================
   CONTACT BOX
========================================================= */

.legal-contact-box {
  background: linear-gradient(135deg, rgba(59,130,246,0.04), rgba(236,72,153,0.04));
  border: 1px solid rgba(13, 15, 18, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin: 28px 0;
}

.contact-item {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(13, 15, 18, 0.75);
  margin-bottom: 12px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item strong {
  color: #0d0f12;
  font-weight: 600;
  display: inline-block;
  min-width: 140px;
}

.contact-item a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.contact-item a:hover {
  color: #2563eb;
  border-bottom-color: #3b82f6;
}

/* =========================================================
   FOOTER
========================================================= */

.legal-footer {
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid rgba(13, 15, 18, 0.08);
  text-align: center;
}

.legal-footer p {
  font-size: 14px;
  color: rgba(13, 15, 18, 0.5);
  margin-bottom: 8px;
}

.legal-footer p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .legal-sidebar {
    position: static;
    max-width: 100%;
  }

  .legal-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .legal-nav::-webkit-scrollbar {
    display: none;
  }

  .legal-nav-title {
    display: none;
  }

  .legal-nav-item {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 16px;
    margin-bottom: 0;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .legal-page {
    padding: 80px 16px 100px;
  }

  .legal-container {
    max-width: 100%;
  }

  .legal-title {
    font-size: 32px;
  }

  .legal-content h2 {
    font-size: 22px;
  }

  .legal-content h3,
  .legal-content .legal-subheading {
    font-size: 18px;
  }

  .legal-content p,
  .legal-content li {
    font-size: 15px;
  }

  .legal-back {
    font-size: 13px;
    margin-bottom: 30px;
  }

  .legal-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
  }

  .legal-highlight,
  .legal-note {
    padding: 14px 16px;
    font-size: 14px;
  }

  .legal-contact-box {
    padding: 20px 16px;
  }

  .contact-item {
    font-size: 14px;
  }

  .contact-item strong {
    display: block;
    margin-bottom: 4px;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .legal-page {
    padding: 60px 12px 80px;
  }

  .legal-title {
    font-size: 28px;
  }

  .legal-content h2 {
    font-size: 20px;
  }

  .legal-content p,
  .legal-content li {
    font-size: 14px;
    line-height: 1.7;
  }

  .legal-content li {
    padding-left: 24px;
  }

  .legal-content li::before {
    width: 6px;
    height: 6px;
    top: 8px;
  }
}

/* =========================================================
   PRINT STYLES
========================================================= */

@media print {
  .legal-back {
    display: none;
  }

  .legal-page {
    padding: 0;
  }

  .legal-container {
    max-width: 100%;
  }

  .legal-content a {
    color: #0d0f12;
    text-decoration: underline;
  }

  .legal-highlight,
  .legal-note {
    border: 1px solid #ccc;
    background: #f9f9f9;
  }
}

/* =========================================================
   ACCESSIBILITY ENHANCEMENTS
========================================================= */

/* Focus Styles */
.legal-back:focus,
.legal-content a:focus {
  outline: 3px solid #3b82f6;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .legal-title,
  .legal-content h2,
  .legal-content h3,
  .legal-content strong {
    color: #000;
  }

  .legal-content p,
  .legal-content li {
    color: #222;
  }

  .legal-highlight {
    background: #e0e7ff;
    border-color: #000;
  }

  .legal-note {
    background: #fef3c7;
    border-color: #000;
  }
}

/* =========================================================
   SMOOTH SCROLL PADDING (For Anchor Links)
========================================================= */

html {
  scroll-padding-top: 100px;
}

/* =========================================================
   SELECTION STYLING (Mirah Brand)
========================================================= */

::selection {
  background: rgba(59, 130, 246, 0.2);
  color: #0d0f12;
}

::-moz-selection {
  background: rgba(59, 130, 246, 0.2);
  color: #0d0f12;
}

/* =========================================================
   CUSTOM SCROLLBAR (Webkit Browsers)
========================================================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2563eb, #7c3aed);
}

/* =========================================================
   ADDITIONAL UTILITY CLASSES
========================================================= */

/* Text Alignment */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Spacing Utilities */
.mt-small {
  margin-top: 16px;
}

.mt-medium {
  margin-top: 32px;
}

.mt-large {
  margin-top: 64px;
}

.mb-small {
  margin-bottom: 16px;
}

.mb-medium {
  margin-bottom: 32px;
}

.mb-large {
  margin-bottom: 64px;
}

/* Display Utilities */
.hidden {
  display: none;
}

.visible {
  display: block;
}

/* =========================================================
   END OF LEGAL PAGES CSS
========================================================= */