/* ==========================================================================
         MANDATORY CSS RESET & GLOBAL BASELINE
         ========================================================================== */
* {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  background: #0b0f19;
  color: #a1a1aa;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  line-height: 1.65;
  scroll-behavior: smooth;
}
img,
svg,
canvas,
iframe,
textarea,
input,
select,
button {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
         BRANDING & COLOR TOKENS
         ========================================================================== */
:root {
  --bg-night: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #162035;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(244, 63, 94, 0.3);
  --primary-rose: #f43f5e;
  --secondary-amber: #fb923c;
  --text-headings: #ffffff;
  --text-body: #a1a1aa;
  --text-muted: #71717a;
  --signature-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --gradient-glow: 0 0 35px rgba(244, 63, 94, 0.28);
  --container-max: 1240px;
}

/* Reading Progress Bar */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--signature-gradient);
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-headings);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: #fb923c;
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}
a:hover {
  color: #f43f5e;
}

.gradient-text {
  background: var(--signature-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
         SECTION 1: NAVBAR (HEADER)
         ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-headings);
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo .logo-accent {
  background: var(--signature-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 22px rgba(244, 63, 94, 0.45);
  display: inline-block;
}

/* Desktop Navigation Links */
.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link-item a {
  font-size: 0.925rem;
  font-weight: 500;
  color: #d4d4d8;
  white-space: nowrap;
  position: relative;
  padding: 6px 0;
}

.nav-link-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--signature-gradient);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

.nav-link-item a:hover {
  color: #ffffff;
}

.nav-link-item a:hover::after {
  width: 100%;
}

/* Hamburger Toggle Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-headings);
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
}

/* Mobile Full-Width Drawer */
.mobile-nav-drawer {
  display: none;
  width: 100%;
  background: #0e1424;
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 24px 28px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.6);
}

.mobile-nav-drawer.active {
  display: block;
  animation: slideDown 0.25s ease-out forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-links a {
  display: block;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:focus {
  background: rgba(244, 63, 94, 0.08);
  border-color: var(--border-accent);
  color: #ffffff;
}

/* ==========================================================================
         SECTION 2: LEGAL HEADER
         ========================================================================== */
.legal-header-section {
  position: relative;
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(
    circle at 50% 0%,
    rgba(244, 63, 94, 0.09) 0%,
    rgba(11, 15, 25, 0) 70%
  );
}

.legal-header-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.effective-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fb923c;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 9999px;
  padding: 6px 16px;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.effective-date-badge svg {
  width: 15px;
  height: 15px;
}

.legal-header-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 18px;
  color: var(--text-headings);
}

.legal-header-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 32px;
}

.legal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-meta-item svg {
  width: 14px;
  height: 14px;
  stroke: #f43f5e;
}

/* Search & Filter Toolbar inside Header */
.policy-toolbar {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.search-box-wrapper input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px 12px 42px;
  color: #ffffff;
  font-size: 0.925rem;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-box-wrapper input:focus {
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18);
}

.search-box-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
}

/* ==========================================================================
         SECTION 3: DETAILED ADSENSE & GDPR/CCPA COMPLIANT POLICY DOCUMENT
         ========================================================================== */
.policy-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 64px 0 80px;
  align-items: start;
}

/* Sticky Table of Contents Navigation */
.toc-sidebar {
  position: sticky;
  top: 96px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
}

.toc-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-header svg {
  width: 16px;
  height: 16px;
  stroke: var(--secondary-amber);
}

.toc-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 0.865rem;
  color: var(--text-body);
  border-radius: 6px;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.toc-nav-link:hover,
.toc-nav-link.active {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.12);
  border-left: 2px solid var(--primary-rose);
}

.toc-quick-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.btn-cookie-prefs {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-cookie-prefs:hover {
  background: rgba(251, 146, 60, 0.15);
  border-color: rgba(251, 146, 60, 0.4);
}

/* Article Main Content */
.policy-article {
  background: transparent;
}

.policy-section {
  margin-bottom: 56px;
  scroll-margin-top: 96px;
}

.section-badge-num {
  display: inline-block;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-rose);
  margin-bottom: 8px;
}

.policy-section h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  color: var(--text-headings);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.policy-section h3 {
  font-size: 1.15rem;
  color: #f4f4f5;
  margin: 24px 0 12px;
}

.policy-section p {
  margin-bottom: 16px;
  font-size: 0.985rem;
  color: var(--text-body);
  line-height: 1.75;
}

.policy-section ul,
.policy-section ol {
  margin: 16px 0 20px 24px;
  color: var(--text-body);
  font-size: 0.975rem;
}

.policy-section li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.policy-section li strong {
  color: #f4f4f5;
}

/* Callout Boxes within Policy */
.policy-callout {
  background: #0e1628;
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 22px 26px;
  margin: 24px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.policy-callout.highlight-amber {
  border-color: rgba(251, 146, 60, 0.3);
  background: #151722;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.callout-title svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary-rose);
}

.callout-title.amber svg {
  stroke: var(--secondary-amber);
}

.policy-callout p {
  margin-bottom: 0;
  font-size: 0.935rem;
}

/* Legal Table */
.legal-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

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

.legal-table th,
.legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-table th {
  background: #131a2d;
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
}

.legal-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
         SECTION 4: PRIVACY HIGHLIGHTS GRID
         ========================================================================== */
.highlights-section {
  padding: 80px 0;
  background: #090d15;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.highlights-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 52px;
}

.highlights-header .section-tag {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary-amber);
  margin-bottom: 12px;
  display: block;
}

.highlights-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.highlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    var(--gradient-glow);
}

.card-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.card-icon-bubble svg {
  width: 26px;
  height: 26px;
  stroke: var(--primary-rose);
}

.highlight-card:nth-child(2) .card-icon-bubble {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.25);
}
.highlight-card:nth-child(2) .card-icon-bubble svg {
  stroke: var(--secondary-amber);
}

.highlight-card h3 {
  font-size: 1.18rem;
  color: var(--text-headings);
  margin-bottom: 12px;
}

.highlight-card p {
  font-size: 0.925rem;
  color: var(--text-body);
  line-height: 1.6;
  flex-grow: 1;
}

.card-footer-pill {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.775rem;
  font-weight: 600;
  color: #d4d4d8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-footer-pill svg {
  width: 14px;
  height: 14px;
  stroke: #10b981;
}

/* ==========================================================================
         SECTION 5: MANDATORY FOOTER
         ========================================================================== */
.site-footer {
  background: #080c14;
  border-top: 1px solid var(--border-subtle);
  padding: 72px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}

/* Column 1: Site Bio */
.footer-col-bio {
  max-width: 460px;
}

.footer-bio-logo {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-bio-text {
  font-size: 0.925rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-compliance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compliance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: #d4d4d8;
}

.compliance-chip svg {
  width: 12px;
  height: 12px;
  stroke: var(--secondary-amber);
}

/* Column 2 & 3: Lists */
.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  font-size: 0.9rem;
  color: var(--text-body);
  transition:
    color 0.2s,
    transform 0.2s;
  display: inline-block;
}

.footer-links-list a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

/* Active Link on Privacy Policy */
.footer-links-list a.active-link {
  color: var(--secondary-amber);
  font-weight: 600;
  position: relative;
}

.footer-links-list a.active-link::before {
  content: "•";
  color: var(--primary-rose);
  margin-right: 6px;
}

/* Bottom Copyright Bar */
.footer-bottom-bar {
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom-bar p {
  color: var(--text-muted);
}

/* Back To Top Floating Button */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--primary-rose);
  transform: translateY(-3px);
  box-shadow: var(--gradient-glow);
}

.back-to-top-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Cookie Modal Overlay */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.cookie-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal-card {
  background: #111827;
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
  position: relative;
}

.cookie-modal-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.cookie-modal-card p {
  font-size: 0.925rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 20px;
}

.cookie-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0e1628;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
}

.cookie-toggle-info {
  max-width: 80%;
}

.cookie-toggle-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.cookie-toggle-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.cookie-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary {
  background: var(--signature-gradient);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  border: 1px solid var(--border-subtle);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
         RESPONSIVE BREAKPOINTS (ANTI-OVERFLOW & ULTRA-RESPONSIVENESS)
         ========================================================================== */
@media (max-width: 1024px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .policy-layout-grid {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }
}

@media (max-width: 991px) {
  /* Section 1: Mobile Header toggle (<992px) */
  .nav-links-desktop {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex !important;
  }

  .policy-layout-grid {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    display: none; /* In mobile, article reads continuously with top search filter */
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-col-bio {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .footer-col-bio {
    grid-column: span 1;
  }
  .legal-header-section {
    padding: 48px 0 32px;
  }
  .highlights-section {
    padding: 56px 0;
  }
  .policy-layout-grid {
    padding: 40px 0 56px;
  }
  .policy-callout {
    padding: 18px;
  }
}
