/* ============================================================
   ESSE INDIA — TERMS-CONDITIONS.CSS
   Terms & Conditions page styles
   ============================================================ */

/* ============================================================
   1. HERO BADGE
   ============================================================ */
.terms-hero-badge {
  display: inline-block;
  background: rgba(255, 215, 0, .15);
  color: var(--gold-light);
  padding: 6px 20px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 16px;
  border: 1px solid rgba(245, 180, 0, .25);
}

/* ============================================================
   2. TERMS CONTENT WRAPPER
   ============================================================ */
.terms-content {
  padding: 60px 0 80px;
  background: #fff;
}
.terms-wrapper {
  max-width: 920px;
  margin: 0 auto;
}

.terms-wrapper .last-updated {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--lilac-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.terms-wrapper .last-updated i {
  color: var(--purple-500);
  margin-right: 6px;
}
.terms-wrapper .last-updated b { color: var(--ink); }
.terms-wrapper .last-updated .version {
  background: var(--lilac-100);
  color: var(--purple-600);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   3. SECTION CARDS
   ============================================================ */
.terms-section {
  position: relative;
  scroll-margin-top: 110px;
  margin-bottom: 32px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  border: 1px solid var(--lilac-100);
  transition: border-color .3s, box-shadow .3s;
}
.terms-section:hover {
  border-color: var(--purple-300);
  box-shadow: 0 10px 30px -12px rgba(75, 33, 196, .12);
}

/* Faint numeral in the corner */
.terms-section::before {
  content: attr(data-num);
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 34px;
  font-weight: 800;
  color: var(--lilac-100);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.terms-section h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--purple-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.terms-section h2 i {
  color: var(--purple-500);
  font-size: 20px;
  width: 28px;
  flex-shrink: 0;
}
.terms-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--purple-700);
  margin: 16px 0 8px;
}
.terms-section p {
  font-size: 15.5px;
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 12px;
}
.terms-section ul,
.terms-section ol {
  padding-left: 4px;
  margin: 10px 0 16px;
  list-style: none;
}
.terms-section ul li,
.terms-section ol li {
  font-size: 15.5px;
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 6px;
  padding-left: 4px;
}
.terms-section ul li i {
  color: var(--purple-500);
  margin-right: 8px;
  width: 16px;
  flex-shrink: 0;
}
.terms-section a {
  color: var(--purple-600);
  font-weight: 600;
  text-decoration: none;
}
.terms-section a:hover { text-decoration: underline; }

/* ============================================================
   4. HIGHLIGHT BOXES
   ============================================================ */
.terms-section .highlight-box {
  background: var(--lilac-50);
  border-left: 4px solid var(--purple-500);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}
.terms-section .highlight-box p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.7;
}
.terms-section .highlight-box i {
  color: var(--purple-500);
  margin-right: 8px;
}
.terms-section .highlight-box.warning {
  border-left-color: var(--gold);
  background: #fffbf0;
}
.terms-section .highlight-box.warning i { color: #b8860b; }
.terms-section .highlight-box.danger {
  border-left-color: #e74c3c;
  background: #fdf2f2;
}
.terms-section .highlight-box.danger i { color: #e74c3c; }
.terms-section .highlight-box.success {
  border-left-color: #27ae60;
  background: #f0faf4;
}
.terms-section .highlight-box.success i { color: #27ae60; }

/* ============================================================
   5. TABLE OF CONTENTS (inline, mobile/tablet)
   ============================================================ */
.toc {
  background: var(--lilac-50);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 40px;
  border: 1px solid var(--lilac-100);
}
.toc h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--purple-800);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc h3 i { color: var(--purple-500); }
.toc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 30px;
}
.toc-grid a {
  font-size: 13.5px;
  color: var(--gray);
  transition: color .25s;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.toc-grid a:hover { color: var(--purple-600); }
.toc-grid a i {
  color: var(--purple-500);
  font-size: 10px;
}

/* ============================================================
   6. FOOTER NOTE
   ============================================================ */
.terms-footer-note {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--lilac-100);
  text-align: center;
}
.terms-footer-note p {
  font-size: 13px;
  color: var(--gray-light);
  margin-bottom: 4px;
}
.terms-footer-note a {
  color: var(--gray-light);
  transition: color .25s;
}
.terms-footer-note a:hover { color: var(--purple-600); }

/* ============================================================
   7. READING PROGRESS
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400), var(--gold));
  z-index: 999;
  transition: width .1s linear;
}

/* ============================================================
   8. BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-800));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 10px 26px -8px rgba(75, 33, 196, .55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  z-index: 60;
  cursor: pointer;
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); }

/* ============================================================
   9. DESKTOP: STICKY SIDEBAR
   ============================================================ */
.terms-layout { display: block; }
.terms-sidebar { display: none; }

@media (min-width: 1150px) {
  .terms-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 52px;
    align-items: start;
    max-width: 1200px;
  }

  .terms-sidebar {
    display: block;
    position: sticky;
    top: 100px;
  }

  .toc { display: none; }

  .sidebar-inner {
    background: var(--lilac-50);
    border: 1px solid var(--lilac-100);
    border-radius: var(--radius-md);
    padding: 20px 20px 22px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
  .sidebar-inner h4 {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--purple-700);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .sidebar-inner h4 i { color: var(--purple-500); }

  .sidebar-toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 2px solid var(--lilac-100);
  }
  .sidebar-toc a {
    font-size: 13px;
    color: var(--gray);
    padding: 7px 0 7px 14px;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: color .25s, border-color .25s, background .25s;
    line-height: 1.4;
  }
  .sidebar-toc a:hover { color: var(--purple-600); }
  .sidebar-toc a.active {
    color: var(--purple-700);
    font-weight: 700;
    border-left-color: var(--purple-500);
    background: var(--lilac-100);
    border-radius: 0 8px 8px 0;
  }
}

/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .toc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .terms-content { padding: 40px 0 60px; }
  .terms-wrapper { padding: 0 4px; }
  .terms-section { padding: 18px 16px; }
  .terms-section h2 { font-size: 17px; }
  .terms-section h2 i { font-size: 17px; width: 22px; }
  .terms-section ul,
  .terms-section ol { padding-left: 0; }
  .terms-wrapper .last-updated {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   11. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .terms-section,
  .reading-progress,
  .back-to-top,
  .sidebar-toc a {
    transition: none !important;
  }
}