/* ========================================
   OneFootball - Legal Pages (Terms, Privacy)
   Clean, readable document styling
   ======================================== */

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

:root {
  --primary: #0D9B6A;
  --primary-light: #E8F7F1;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --text: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 0; }

.container { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}
.logo-icon { font-size: 1.3rem; }
.nav-logo-img { height: 24px; width: auto; }
.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --- Legal Header --- */
.legal-header {
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--border);
}
.legal-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --- Legal Intro --- */
.legal-intro {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.legal-intro p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* --- Table of Contents --- */
.legal-toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 48px;
}
.legal-toc h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.legal-toc ol {
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}
.legal-toc li {
  font-size: 0.88rem;
  padding: 4px 0;
  break-inside: avoid;
}
.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.legal-toc a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* --- Legal Content --- */
.legal-content {
  padding: 48px 0 80px;
}

/* --- Legal Article --- */
.legal-article {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.legal-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.legal-article h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.legal-article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text);
}
.legal-article p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 12px;
}
.legal-article > ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.legal-article > ol > li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.9;
  padding: 4px 0;
}
.legal-article ol ol,
.legal-article ol ul {
  padding-left: 20px;
  margin-top: 8px;
}
.legal-article ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.legal-article ul li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 2px 0;
  list-style-type: disc;
}
.legal-article ul li ul li {
  list-style-type: circle;
}
.legal-article strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Legal Table --- */
.legal-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.legal-table thead {
  background: var(--bg-alt);
}
.legal-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.legal-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.legal-table tbody tr:last-child td {
  border-bottom: none;
}
.legal-table tbody tr:hover {
  background: rgba(13,155,106,0.02);
}

/* --- Highlight Box --- */
.legal-highlight {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.legal-highlight strong {
  color: var(--primary);
}

/* --- Contact Card --- */
.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 16px 0;
}
.contact-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text);
}
.contact-row {
  display: flex;
  gap: 12px;
  font-size: 0.88rem;
  padding: 4px 0;
  color: var(--text-secondary);
}
.contact-label {
  font-weight: 600;
  color: var(--text);
  min-width: 60px;
}

/* --- Footer --- */
.legal-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-inner p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); }

/* --- FAQ --- */
.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.faq-cat {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.faq-cat:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.faq-cat.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.faq-section {
  margin-bottom: 40px;
}
.faq-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover {
  border-color: #c5c9cf;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  line-height: 1.5;
}
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-item.open .faq-question {
  color: var(--primary);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding: 0 20px 20px;
}
.faq-answer p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}
.faq-answer p:last-child {
  margin-bottom: 0;
}
.faq-answer ul {
  padding-left: 20px;
  margin: 8px 0;
}
.faq-answer ul li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 2px 0;
  list-style-type: disc;
}
.faq-answer strong {
  color: var(--text);
  font-weight: 600;
}
.faq-contact-box {
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  margin-top: 20px;
}
.faq-contact-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.faq-contact-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.faq-contact-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: var(--transition);
}
.faq-contact-btn:hover {
  background: #0A7D55;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .legal-header { padding: 60px 0 32px; }
  .legal-header h1 { font-size: 1.7rem; }
  .legal-toc ol { columns: 1; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.8rem; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .faq-categories { gap: 6px; }
  .faq-cat { font-size: 0.78rem; padding: 5px 12px; }
  .faq-question { padding: 14px 16px; font-size: 0.88rem; }
  .faq-item.open .faq-answer { padding: 0 16px 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .legal-toc { padding: 20px; }
  .contact-row { flex-direction: column; gap: 2px; }
  .legal-table th, .legal-table td { padding: 10px 12px; font-size: 0.8rem; }
}

/* --- Print --- */
@media print {
  .nav, .legal-footer { display: none; }
  .legal-header { padding: 20px 0; }
  .legal-content { padding: 20px 0; }
  .legal-article { break-inside: avoid; }
  body { font-size: 11pt; line-height: 1.5; }
}