/* =====================================================================
   PRIVACY POLICY PAGE — SpinesTech
   Ink + Emerald design system — matches the site's dark-mode aesthetic.
   Mobile-first, uses main.css tokens exclusively.
   ===================================================================== */

:root {
  --pp-ink: #070d09;
  --pp-ink-card: #0d1811;
  --pp-emerald: #036d36;
  --pp-emerald-bright: #1fae62;
  --pp-emerald-glow: rgba(3, 109, 54, 0.25);
  --pp-text: #eef1ea;
  --pp-text-soft: rgba(238, 241, 234, 0.7);
  --pp-text-muted: rgba(238, 241, 234, 0.45);
  --pp-border: rgba(255, 255, 255, 0.08);
  --pp-border-hover: rgba(62, 207, 116, 0.28);
}

.privacy-page {
  background-color: var(--pp-ink) !important;
  color: var(--pp-text) !important;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif;
  padding-bottom: 5rem;
}

/* ── Hero Section ── */
.pp-hero {
  position: relative;
  padding-top: clamp(6.5rem, 12vw, 9rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--pp-border);
}

.pp-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.pp-hero__glow--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(3, 109, 54, 0.28) 0%, transparent 70%);
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
}
.pp-hero__glow--2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(31, 174, 98, 0.15) 0%, transparent 70%);
  bottom: 0;
  right: 15%;
}

.pp-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(3, 109, 54, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3, 109, 54, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, black 10%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 20%, black 10%, transparent 100%);
}

.pp-hero__container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.pp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 9999px;
  background: rgba(3, 109, 54, 0.16);
  border: 1px solid rgba(62, 207, 116, 0.3);
  color: #3ecf74;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.pp-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf74;
  box-shadow: 0 0 10px #3ecf74;
  animation: ppPulse 2s ease-in-out infinite;
}
@keyframes ppPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.75); }
}

.pp-hero__title {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pp-hero__subtitle {
  color: var(--pp-text-soft);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.8;
  margin: 0 auto 1.5rem;
  max-width: 660px;
}

.pp-hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--pp-text-muted);
}
.pp-hero__meta svg {
  stroke: var(--pp-emerald-bright);
}

/* ── Main Layout ── */
.pp-layout {
  max-width: 1200px;
  margin: 3.5rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .pp-layout {
    grid-template-columns: 280px 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

/* ── Sticky Table of Contents (TOC) ── */
.pp-toc {
  display: none;
}
@media (min-width: 1024px) {
  .pp-toc {
    display: block;
    position: sticky;
    top: 7rem;
    background: var(--pp-ink-card);
    border: 1px solid var(--pp-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
}

.pp-toc__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3ecf74;
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pp-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pp-toc__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--pp-text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  line-height: 1.4;
  border: 1px solid transparent;
}
.pp-toc__link:hover {
  color: #ffffff;
  background: rgba(3, 109, 54, 0.12);
  border-color: rgba(62, 207, 116, 0.2);
}
.pp-toc__link.is-active {
  color: #3ecf74;
  background: rgba(3, 109, 54, 0.18);
  border-color: rgba(62, 207, 116, 0.35);
  font-weight: 600;
}

/* ── Content Sections ── */
.pp-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.pp-card {
  background: var(--pp-ink-card);
  border: 1px solid var(--pp-border);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  transition: all 0.3s ease;
  scroll-margin-top: 6.5rem;
  position: relative;
  overflow: hidden;
}
.pp-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(62, 207, 116, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pp-card:hover {
  border-color: var(--pp-border-hover);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), 0 0 24px -6px var(--pp-emerald-glow);
  transform: translateY(-2px);
}
.pp-card:hover::before {
  opacity: 1;
}

.pp-card__header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.35rem;
}

.pp-card__icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(3, 109, 54, 0.14);
  border: 1px solid rgba(62, 207, 116, 0.25);
  color: #3ecf74;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.pp-card:hover .pp-card__icon-box {
  transform: scale(1.08);
  background: rgba(3, 109, 54, 0.22);
}

.pp-card__title {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
}

.pp-card__text {
  color: var(--pp-text-soft);
  font-size: 1rem;
  line-height: 1.85;
  margin: 0 0 1rem;
}
.pp-card__text:last-child {
  margin-bottom: 0;
}

.pp-pill {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 6px;
  background: rgba(3, 109, 54, 0.2);
  border: 1px solid rgba(62, 207, 116, 0.25);
  color: #5ef393;
  font-weight: 600;
  font-size: 0.9em;
}

.pp-link {
  color: #3ecf74;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.pp-link:hover {
  color: #8df7b4;
}

/* ── Bottom CTA ── */
.pp-cta {
  background: linear-gradient(135deg, rgba(3, 109, 54, 0.2) 0%, rgba(7, 13, 9, 0.7) 100%);
  border: 1px solid rgba(62, 207, 116, 0.25);
  border-radius: 20px;
  padding: 2.75rem 2rem;
  text-align: center;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}
.pp-cta::before {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(62, 207, 116, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.pp-cta__title {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.75rem;
}
.pp-cta__desc {
  color: var(--pp-text-soft);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 auto 1.75rem;
  max-width: 500px;
}
.pp-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  border-radius: 12px;
  background: #036d36;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid rgba(62, 207, 116, 0.4);
  box-shadow: 0 8px 24px -4px rgba(3, 109, 54, 0.5);
  transition: all 0.25s ease;
}
.pp-cta__btn:hover {
  transform: translateY(-2px);
  background: #0f9a52;
  box-shadow: 0 14px 32px -4px rgba(3, 109, 54, 0.65);
}

/* ── RTL Overrides ── */
[dir="rtl"] .pp-card__header {
  flex-direction: row;
  text-align: right;
}
[dir="rtl"] .pp-toc__link {
  text-align: right;
}
[dir="rtl"] .pp-cta__btn svg {
  transform: rotate(180deg);
}

@media (max-width: 767px) {
  .pp-card {
    padding: 1.6rem 1.25rem;
  }
  .pp-card__header {
    gap: 0.85rem;
  }
  .pp-card__icon-box {
    width: 2.6rem;
    height: 2.6rem;
  }
}
