/* ================================================================
   SIMPLE-PAGE.CSS
   ================================================================
   CSS dùng chung cho các trang thông tin đơn giản:
   Về chúng tôi, Liên hệ, FAQ, Điều khoản.
   Đồng bộ theme (màu, font, nav, footer) với public/index.html.
   Sửa 1 file này -> áp dụng cho cả 4 trang.
   ================================================================ */

:root {
  --color-primary: #3d7a52;
  --color-primary-light: #4d9a66;
  --color-primary-dark: #2d5a3d;
  --color-secondary: #a08060;
  --color-accent: #c9a227;
  --color-accent-light: #dbb84a;

  --color-bg: #0d1117;
  --color-bg-alt: #161b22;
  --color-surface: #21262d;
  --color-surface-light: #30363d;

  --color-text: #e6edf3;
  --color-text-secondary: #8b949e;
  --color-text-muted: #6e7681;
  --color-text-light: #f0f6fc;

  --color-border: #30363d;
  --color-border-light: #21262d;

  --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;

  --container-padding: 2rem;
}

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

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

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   NAVIGATION (giống index.html)
======================================== */
.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem var(--container-padding);
}

.nav-group { display: flex; align-items: center; flex: 1; min-width: 0; }
.nav-group.nav-left { justify-content: space-between; padding-right: 3rem; }
.nav-group.nav-right { justify-content: space-between; padding-left: 3rem; }

.nav-logo {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-light);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0 2rem;
}

.nav-link {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--duration-fast);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width var(--duration-normal) var(--ease-out);
}
.nav-link:hover { color: var(--color-accent); }
.nav-link:hover::after { width: 100%; }

.nav-link.logged-in {
  background: var(--color-accent);
  color: var(--color-bg) !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.nav-link.logged-in:hover { background: var(--color-accent-light); }
.nav-link.logged-in::after { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 5px; z-index: 1001;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--color-text-light); transition: all var(--duration-fast); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(30, 61, 42, 0.98);
  backdrop-filter: blur(10px);
  flex-direction: column;
  justify-content: center; align-items: center;
  gap: 1.5rem;
  z-index: 1001;
}
.nav-mobile-overlay.active { display: flex; }
.nav-mobile-overlay .nav-link { font-size: 1.2rem; color: var(--color-text-light) !important; padding: 0.5rem 1rem; }
.nav-mobile-divider { width: 60px; height: 1px; background: rgba(255,255,255,0.2); margin: 0.5rem 0; }

/* ========================================
   PAGE HEADER (thay cho hero)
======================================== */
.page-header {
  padding: calc(var(--space-2xl) + 3rem) var(--container-padding) var(--space-xl);
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-bg) 70%);
  text-align: center;
}
.page-header-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 0.75rem;
}
.page-header-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}
.page-header-desc {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* ========================================
   PAGE CONTENT
======================================== */
.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-xl) var(--container-padding) var(--space-2xl);
}

.content-block { margin-bottom: var(--space-lg); }
.content-block:last-child { margin-bottom: 0; }

.content-block h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.content-block p {
  color: var(--color-text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 0.9rem;
}
.content-block p:last-child { margin-bottom: 0; }

.content-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.content-block ul li {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 1.4rem;
  position: relative;
}
.content-block ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Feature grid (Về chúng tôi) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}
.feature-card-icon {
  width: 36px; height: 36px;
  margin: 0 auto 0.75rem;
  color: var(--color-accent-light);
}
.feature-card-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; fill: none; }
.feature-card-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text-light); margin-bottom: 0.25rem; }
.feature-card-desc { font-size: 0.8rem; color: var(--color-text-muted); }

/* Contact cards (Liên hệ) */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--duration-fast), transform var(--duration-fast);
}
.contact-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.contact-card-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--color-primary-dark);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent-light);
}
.contact-card-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.contact-card-label { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.15rem; }
.contact-card-value { font-size: 0.95rem; font-weight: 600; color: var(--color-text-light); }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--color-accent-light);
  flex-shrink: 0;
  transition: transform var(--duration-fast);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--color-accent-light); }
.faq-answer {
  padding: 0 1.25rem 1.1rem;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}
.faq-answer a { color: var(--color-accent-light); }

/* Điều khoản: numbered sections */
.terms-section { margin-bottom: var(--space-md); }
.terms-section-title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}
.terms-section-title span { color: var(--color-accent-light); font-weight: 700; }
.terms-updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* CTA back to library */
.page-cta {
  margin-top: var(--space-lg);
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}
.page-cta p { color: var(--color-text-secondary); margin-bottom: 1rem; }
.page-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: var(--color-text-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--duration-fast);
}
.page-cta a:hover { background: var(--color-primary-dark); }

/* ========================================
   FOOTER (giống index.html)
======================================== */
.footer {
  background: #1a1a1a;
  color: #f5f5f5;
  padding: var(--space-xl) var(--container-padding) var(--space-lg);
}
.footer-content { max-width: 1400px; margin: 0 auto; }
.footer-main {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { max-width: 280px; }
.footer-logo { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-logo-icon { width: 32px; height: 32px; background: var(--color-primary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.footer-logo-icon svg { width: 18px; height: 18px; stroke: var(--color-text-light); stroke-width: 2; fill: none; }
.footer-description { font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 1.5rem; }
.footer-col-title { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-light); margin-bottom: 1.25rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { font-size: 0.9rem; color: rgba(255,255,255,0.65); text-decoration: none; transition: all var(--duration-fast); display: block; }
.footer-links a:hover { color: var(--color-text-light); transform: translateX(5px); }
.footer-links a.active { color: var(--color-accent-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--space-lg); flex-wrap: wrap; gap: 1rem; }
.footer-copyright { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.footer-made { font-size: 0.85rem; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 0.5rem; }
.footer-heart { color: #e74c3c; }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 900px) {
  .nav-group.nav-left, .nav-group.nav-right { display: none; }
  .nav-toggle { display: flex; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  :root { --container-padding: 1rem; }
  .page-header { padding: calc(var(--space-2xl) + 1rem) var(--container-padding) var(--space-lg); }
}
