/* ==========================================================================
   Bitezor Legal & Policy Pages Stylesheet
   ========================================================================== */

/* Design Tokens & Reset */
:root {
  --primary-color: #0f172a; /* Slate 900 */
  --secondary-color: #475569; /* Slate 600 */
  --accent-pink: #c92778; /* Bitezor Pink */
  --accent-pink-hover: #b01c64;
  --bg-gradient-start: #f8fafc; /* Slate 50 */
  --bg-gradient-end: #f1f5f9; /* Slate 100 */
  --card-bg: #ffffff;
  --border-color: #e2e8f0; /* Slate 200 */
  --border-light: #f1f5f9;
  --text-light: #64748b; /* Slate 500 */
  --font-headers: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --border-radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--primary-color);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow effects */
.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  top: -10%;
  left: -10%;
  background: var(--accent-pink);
}

.glow-2 {
  bottom: -10%;
  right: -10%;
  background: var(--accent-pink);
}

/* Layout Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header styling */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
}

.logo {
  font-family: var(--font-headers);
  font-size: 1.8rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo__brand {
  color: var(--primary-color);
}

.logo__accent {
  color: var(--accent-pink);
}

.nav-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background-color: var(--card-bg);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.nav-home-btn:hover {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-home-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.nav-home-btn:hover svg {
  transform: translateX(-2px);
}

/* Two-column layout */
.policy-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 64px;
}

/* Sticky Sidebar Navigation */
.sidebar-nav {
  position: sticky;
  top: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-nav h2 {
  font-family: var(--font-headers);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.sidebar-nav a {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-color);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--accent-pink);
  background-color: var(--border-light);
  border-left-color: var(--accent-pink);
}

.sidebar-nav li.active a {
  color: var(--accent-pink);
  background-color: #fdf2f8; /* Soft pink tint */
  border-left-color: var(--accent-pink);
  font-weight: 600;
}

/* Policy Card Content */
.policy-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

/* Content Typography */
.policy-card h1 {
  font-family: var(--font-headers);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
  line-height: 1.2;
}

.policy-card .last-updated {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.policy-card p {
  font-size: 1.05rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  line-height: 1.65;
}

.policy-card h2 {
  font-family: var(--font-headers);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
  scroll-margin-top: 24px;
}

.policy-card h3 {
  font-family: var(--font-headers);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 24px 0 12px;
}

/* Lists */
.policy-card ul, 
.policy-card ol {
  margin: 0 0 24px 24px;
  color: var(--secondary-color);
}

.policy-card li {
  font-size: 1.05rem;
  margin-bottom: 10px;
  line-height: 1.6;
}

.policy-card li strong {
  color: var(--primary-color);
}

.policy-card ul {
  list-style-type: disc;
}

.policy-card ul ul {
  list-style-type: circle;
  margin-top: 10px;
  margin-bottom: 0;
}

.policy-card ol {
  list-style-type: decimal;
}

/* Links */
.policy-card a {
  color: var(--accent-pink);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.policy-card a:hover {
  color: var(--accent-pink-hover);
}

/* Tables styling */
.policy-card .table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0 32px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.policy-card table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.policy-card th {
  background-color: var(--bg-gradient-start);
  font-family: var(--font-headers);
  font-weight: 700;
  color: var(--primary-color);
  padding: 14px 18px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.policy-card td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--secondary-color);
  vertical-align: top;
}

.policy-card tr:last-child td {
  border-bottom: none;
}

.policy-card tr:hover td {
  background-color: #fafbfc;
}

/* Badges for tables */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
}

.badge--refund {
  background-color: #ecfdf5;
  color: #059669;
}

.badge--partial {
  background-color: #fffbeb;
  color: #d97706;
}

.badge--none {
  background-color: #fef2f2;
  color: #dc2626;
}

/* Inline code or math blocks */
.policy-card code {
  font-family: monospace;
  background-color: var(--border-light);
  color: var(--accent-pink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.math-block {
  text-align: center;
  background: var(--bg-gradient-start);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0 24px;
  font-style: italic;
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  color: var(--primary-color);
}

/* Dividers */
.policy-card hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 40px 0;
}

/* Page Footer */
.page-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 64px;
}

.page-footer p {
  font-size: 0.95rem;
  color: var(--text-light);
}

.page-footer .footer-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.page-footer .footer-links a {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.page-footer .footer-links a:hover {
  color: var(--accent-pink);
}

.page-footer .separator {
  color: var(--border-color);
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--accent-pink);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(201, 39, 120, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
}

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

.back-to-top:hover {
  background-color: var(--accent-pink-hover);
  transform: translateY(-2px);
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .policy-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sidebar-nav {
    position: static;
    max-height: none;
  }

  .policy-card {
    padding: 32px;
  }
  
  .policy-card h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .policy-card {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .policy-card h1 {
    font-size: 1.7rem;
  }

  .policy-card h2 {
    font-size: 1.3rem;
  }

  .policy-card p,
  .policy-card li {
    font-size: 0.98rem;
  }
  
  .header {
    padding: 16px 0;
    margin-bottom: 24px;
  }
}
