/* ============================================================
   LEGAL DOCUMENT PAGES — privacy policy, refund policy, disclaimer
   ─────────────────────────────────────────────────────────
   Extracted from the inline <style> in terms-and-conditions.php so
   the legal pages share one stylesheet instead of four copies.
   Namespace is .legal-doc-page (terms still carries its own inline
   copy under .legal-terms-page — migrate it here when convenient).
   ============================================================ */
/* Main Container Overflow Fix */
.legal-doc-page #main-content {
  position: relative;
  z-index: 1;
  background: #081926;
  overflow: hidden;
}

/* Hero Section — Premium Ambient Dark Navy Theme */
.legal-doc-page .aad-hero {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(157, 228, 210, 0.12) 0%,
      transparent 450px
    ),
    radial-gradient(
      circle at 15% 80%,
      rgba(14, 165, 233, 0.1) 0%,
      transparent 400px
    ),
    linear-gradient(135deg, #05131f 0%, #081926 50%, #0a2236 100%) !important;
  padding: 65px 0 80px;
  border-bottom: 1px solid rgba(157, 228, 210, 0.15);
}

.legal-doc-page .aad-hero H1 {
  font-size: clamp(2.2rem, 3.8vw, 2.85rem) !important;
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.22 !important;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  max-width: 860px;
}

.legal-doc-page .aad-hero H1 span {
  color: #9de4d2 !important;
  background: linear-gradient(135deg, #ffffff 0%, #9de4d2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-doc-page .aad-hero-lead {
  color: rgba(255, 255, 255, 0.84) !important;
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 880px;
}

.terms-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.terms-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(157, 228, 210, 0.12);
  border: 1px solid rgba(157, 228, 210, 0.3);
  color: #9de4d2;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terms-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.terms-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #9de4d2 0%, #64d1b7 100%) !important;
  color: #081926 !important;
  border: none !important;
  padding: 7px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(157, 228, 210, 0.3);
  transition: all 0.3s ease;
  margin-left: auto;
}

.terms-print-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(157, 228, 210, 0.45);
  background: linear-gradient(135deg, #aef0df 0%, #76dfc6 100%) !important;
}

/* Quick Summary Stat Grid in Hero */
.terms-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}

.terms-summary-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.terms-summary-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(157, 228, 210, 0.4) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.terms-summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(157, 228, 210, 0.15);
  border: 1px solid rgba(157, 228, 210, 0.3);
  color: #9de4d2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.terms-summary-card strong {
  display: block;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 2px;
}

.terms-summary-card span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  line-height: 1.3;
}

/* Main Body Layout — Sticky Sidebar + Content */
.terms-body-sec {
  background-color: #f7f5f0 !important;
  background-image: radial-gradient(
    rgba(0, 0, 0, 0.05) 1px,
    transparent 1px
  ) !important;
  background-size: 20px 20px !important;
  padding: 70px 0 90px;
  border-bottom: 1px solid #eae7e0;
}

.terms-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
}

/* Sticky Sidebar Table of Contents */
.terms-sidebar {
  position: sticky;
  top: 90px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}
.terms-sidebar-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.terms-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.terms-nav li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.terms-nav li a:hover,
.terms-nav li a.active {
  background: #e6f7f3;
  color: #059669;
  font-weight: 700;
}
.terms-nav li a i {
  font-size: 14px;
  opacity: 0.8;
}

/* Content Area Cards */
.terms-content-area {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.terms-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 20px;
  padding: 36px 36px 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03) !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  scroll-margin-top: 100px;
}
.terms-card:hover {
  border-color: #059669 !important;
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.09) !important;
}

.terms-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #e2e8f0;
}
.terms-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #e6f7f3;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.terms-card h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a !important;
  margin: 0;
}

.terms-card p {
  font-size: 1.02rem;
  color: #475569 !important;
  line-height: 1.7;
  margin-bottom: 16px;
}
.terms-card p:last-child {
  margin-bottom: 0;
}

.terms-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 16px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
.terms-list li {
  display: block !important;
  position: relative !important;
  padding-left: 32px !important;
  font-size: 0.98rem !important;
  color: #334155 !important;
  line-height: 1.65 !important;
  text-align: left !important;
  word-spacing: normal !important;
  letter-spacing: normal !important;
}
.terms-list li > i {
  position: absolute !important;
  left: 0 !important;
  top: 3px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

/* Alert Boxes for Critical Items */
.terms-alert-prohibited {
  background: #fff5f5 !important;
  border: 1.5px solid #fecaca !important;
  border-left: 6px solid #dc2626 !important;
  border-radius: 16px;
  padding: 24px 28px;
  margin: 20px 0;
}
.terms-alert-prohibited h3 {
  color: #991b1b !important;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.terms-alert-prohibited p {
  color: #7f1d1d !important;
  margin: 0;
  line-height: 1.65;
}

.terms-alert-payment {
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  border-left: 6px solid #059669 !important;
  border-radius: 16px;
  padding: 22px 26px;
  margin: 20px 0;
}
.terms-alert-payment h3 {
  color: #065f46 !important;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.terms-alert-payment p {
  color: #047857 !important;
  margin: 0;
}

@media (max-width: 1024px) {
  .terms-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .terms-layout {
    grid-template-columns: 1fr;
  }
  .terms-sidebar {
    display: none;
  }
}
@media (max-width: 640px) {
  .terms-summary-grid {
    grid-template-columns: 1fr;
  }
  .terms-card {
    padding: 26px 20px;
  }
}
