/* ===== ROOT VARIABLES & RESET ===== */
:root {
  --navy-900: #0a1628;
  --navy-800: #0f2140;
  --navy-700: #142c54;
  --navy-600: #1a3a6e;
  --navy-500: #1e4d8f;
  --gold-400: #d4a843;
  --gold-500: #c8952e;
  --gold-600: #b8860b;
  --cream-50: #faf8f3;
  --cream-100: #f5f0e6;
  --cream-200: #ebe3d0;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --text-primary: #1a2332;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.05);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 22, 40, 0.1);
  --shadow-xl: 0 20px 50px rgba(10, 22, 40, 0.12);
  --shadow-gold: 0 4px 15px rgba(200, 149, 46, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background: var(--cream-50);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  border-bottom: 2px solid var(--gold-500);
  backdrop-filter: blur(20px);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.3);
}

.header-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-logo {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gold-500);
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
  object-fit: cover;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-app-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream-100);
  letter-spacing: 0.02em;
}

.header-page-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ===== HERO BANNER ===== */
.hero-banner {
  margin-top: 80px;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-800) 100%);
  padding: 60px 32px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(200, 149, 46, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(200, 149, 46, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 25px rgba(200, 149, 46, 0.35);
}

.hero-icon i {
  font-size: 30px;
  color: var(--navy-900);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--cream-200);
  opacity: 0.85;
  margin-bottom: 20px;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 149, 46, 0.25);
  border-radius: 50px;
  padding: 8px 22px;
  font-size: 0.85rem;
  color: var(--gold-400);
}

.hero-meta i {
  font-size: 0.9rem;
}

/* ===== MAIN LAYOUT (Sidebar + Content) ===== */
.page-wrapper {
  max-width: 1340px;
  margin: 0 auto;
  padding: 40px 32px 60px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* ===== SIDEBAR / TABLE OF CONTENTS ===== */
.sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}

.sidebar::-webkit-scrollbar {
  width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}

.toc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.toc-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cream-200);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-heading i {
  color: var(--gold-500);
  font-size: 0.9rem;
}

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

.toc-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.toc-item a:hover {
  background: var(--cream-100);
  color: var(--navy-700);
  border-left-color: var(--gold-400);
}

.toc-item a.active {
  background: linear-gradient(135deg, rgba(200, 149, 46, 0.08), rgba(200, 149, 46, 0.04));
  color: var(--navy-800);
  border-left-color: var(--gold-500);
  font-weight: 600;
}

.toc-item a .toc-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: var(--transition);
}

.toc-item a.active .toc-num {
  background: var(--gold-500);
  color: var(--white);
}

.toc-item a:hover .toc-num {
  background: var(--gold-400);
  color: var(--white);
}

/* ===== CONTENT AREA ===== */
.content-area {
  min-width: 0;
}

.policy-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.policy-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-400));
  opacity: 0;
  transition: var(--transition);
}

.policy-section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 149, 46, 0.2);
}

.policy-section:hover::before {
  opacity: 1;
}

.policy-section.active-section {
  box-shadow: var(--shadow-lg);
  border-color: rgba(200, 149, 46, 0.3);
}

.policy-section.active-section::before {
  opacity: 1;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.section-icon i {
  font-size: 18px;
  color: var(--gold-400);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.3;
}

.section-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

.section-body p:last-child {
  margin-bottom: 0;
}

.section-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Info list styling */
.info-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--cream-50);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.info-list li:hover {
  background: var(--cream-100);
  border-color: var(--cream-200);
}

.info-list li i {
  color: var(--gold-500);
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Simple bullet list */
.bullet-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.bullet-list li i {
  color: var(--gold-500);
  font-size: 0.55rem;
  margin-top: 9px;
  flex-shrink: 0;
}

/* Highlight box */
.highlight-box {
  background: linear-gradient(135deg, rgba(200, 149, 46, 0.06), rgba(200, 149, 46, 0.02));
  border: 1px solid rgba(200, 149, 46, 0.18);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 16px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.highlight-box i {
  color: var(--gold-500);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.highlight-box p {
  margin: 0 !important;
  font-size: 0.92rem;
}

/* Permission box */
.permission-box {
  background: var(--cream-50);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 16px 0;
}

.permission-name {
  font-weight: 700;
  color: var(--navy-800);
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-name i {
  color: var(--gold-500);
}

.permission-box p {
  margin-bottom: 8px;
}

/* Contact card */
.contact-card {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border-radius: var(--radius-md);
  padding: 26px 30px;
  margin-top: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item i {
  color: var(--gold-400);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.contact-item span {
  color: var(--cream-100);
  font-size: 0.92rem;
}

.contact-item a {
  color: var(--gold-400);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--gold-500);
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.site-footer {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  border-top: 2px solid var(--gold-500);
  padding: 40px 32px;
  text-align: center;
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}

.footer-logo img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-500);
}

.footer-logo span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream-100);
}

.footer-contact {
  margin-bottom: 18px;
}

.footer-contact a {
  color: var(--gold-400);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-contact a:hover {
  text-decoration: underline;
  color: var(--gold-500);
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: var(--gold-500);
  margin: 18px auto;
  border-radius: 2px;
}

.footer-updated {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--gray-500);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  border: 2px solid var(--gold-500);
  color: var(--gold-400);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold-500);
  color: var(--navy-900);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

/* ===== MOBILE SIDEBAR TOGGLE ===== */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  border: 2px solid var(--gold-500);
  color: var(--gold-400);
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--gold-500);
  color: var(--navy-900);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.policy-section {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.policy-section:nth-child(1) { animation-delay: 0.05s; }
.policy-section:nth-child(2) { animation-delay: 0.1s; }
.policy-section:nth-child(3) { animation-delay: 0.15s; }
.policy-section:nth-child(4) { animation-delay: 0.2s; }
.policy-section:nth-child(5) { animation-delay: 0.25s; }
.policy-section:nth-child(6) { animation-delay: 0.3s; }
.policy-section:nth-child(7) { animation-delay: 0.35s; }
.policy-section:nth-child(8) { animation-delay: 0.4s; }
.policy-section:nth-child(9) { animation-delay: 0.45s; }
.policy-section:nth-child(10) { animation-delay: 0.5s; }
.policy-section:nth-child(11) { animation-delay: 0.55s; }
.policy-section:nth-child(12) { animation-delay: 0.6s; }
.policy-section:nth-child(13) { animation-delay: 0.65s; }
.policy-section:nth-child(14) { animation-delay: 0.7s; }
.policy-section:nth-child(15) { animation-delay: 0.75s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 240px 1fr;
    gap: 28px;
    padding: 30px 24px 50px;
  }

  .policy-section {
    padding: 28px 30px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }

  .header-inner {
    padding: 12px 20px;
  }

  .app-logo {
    width: 42px;
    height: 42px;
  }

  .header-app-name {
    font-size: 1.1rem;
  }

  .hero-banner {
    padding: 44px 20px 38px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-icon {
    width: 58px;
    height: 58px;
  }

  .hero-icon i {
    font-size: 24px;
  }

  .page-wrapper {
    grid-template-columns: 1fr;
    padding: 24px 16px 50px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    z-index: 1001;
    background: var(--white);
    padding: 90px 16px 30px;
    box-shadow: var(--shadow-xl);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    overflow-y: auto;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  .sidebar-toggle {
    display: flex;
  }

  .toc-card {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .policy-section {
    padding: 24px 22px;
    margin-bottom: 16px;
  }

  .section-header {
    gap: 12px;
  }

  .section-icon {
    width: 38px;
    height: 38px;
  }

  .section-icon i {
    font-size: 16px;
  }

  .section-title {
    font-size: 1.15rem;
  }

  .info-list {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 20px 22px;
  }

  .site-footer {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .hero-banner {
    padding: 36px 16px 30px;
    margin-top: 70px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-meta {
    font-size: 0.78rem;
    padding: 6px 16px;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .app-logo {
    width: 36px;
    height: 36px;
  }

  .header-app-name {
    font-size: 0.95rem;
  }

  .header-page-title {
    font-size: 0.68rem;
  }

  .policy-section {
    padding: 20px 18px;
  }

  .section-title {
    font-size: 1.05rem;
  }

  .back-to-top,
  .sidebar-toggle {
    width: 42px;
    height: 42px;
    bottom: 22px;
    font-size: 0.95rem;
  }

  .back-to-top {
    right: 22px;
  }

  .sidebar-toggle {
    left: 22px;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .site-header,
  .sidebar,
  .back-to-top,
  .sidebar-toggle,
  .sidebar-overlay,
  .hero-banner {
    display: none !important;
  }

  .page-wrapper {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .policy-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    opacity: 1;
    animation: none;
  }
}
