/* privacy.css — enhanced with TOC, left border accent, back-to-top */
.privacy-main {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.privacy-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Hero */
.privacy-hero {
  text-align: center;
  margin-bottom: 48px;
}
.privacy-hero h1 {
  font-family: var(--mono);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #1E293B 0%, #0066FF 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.last-updated {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== ENHANCED TABLE OF CONTENTS (TOC) ========== */
.privacy-toc {
  margin-bottom: 56px;
}
.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}
.toc-card:hover {
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
}
.toc-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--bg-raised);
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.toc-label::before {
  content: "📑";
  font-size: 14px;
  font-weight: normal;
  opacity: 0.8;
}
.toc-card ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 20px 24px;
}
.toc-card li {
  margin: 0;
}
.toc-card a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px 8px 20px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}
.toc-card a::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.2s ease;
}
.toc-card a:hover {
  color: var(--accent);
  background: var(--bg-raised);
  transform: translateX(4px);
}
.toc-card a:hover::before {
  height: 16px;
}
.toc-card a::after {
  content: "›";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toc-card a:hover::after {
  opacity: 0.6;
  transform: translateY(-50%) translateX(4px);
}

/* ========== CARD ENHANCEMENTS ========== */
.privacy-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.privacy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.privacy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
}
.privacy-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.heading-icon {
  font-size: 24px;
  opacity: 0.8;
}
.privacy-card p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 70ch;
}
.privacy-card p:last-child {
  margin-bottom: 0;
}
.privacy-card ul {
  margin: 12px 0 12px 24px;
  padding: 0;
}
.privacy-card li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.privacy-card li::marker {
  color: var(--accent);
}
.privacy-card address {
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
}
.privacy-card a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.privacy-card a:hover {
  border-bottom-color: var(--accent);
}

/* Back to Top button */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: 60px;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 99;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--bg-raised);
  border-color: var(--border-hi);
  color: var(--accent);
  transform: translateY(-3px);
}
.back-to-top svg {
  flex-shrink: 0;
}

.contact-main {
  margin-bottom: 24px;
}

.contact-external {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9em;
  opacity: 0.8;
  line-height: 1.6; /* เพิ่มบรรทัดให้อ่านง่ายขึ้น */
}

/* คุณสามารถเพิ่ม Hover effect ให้อีเมลดูแพงขึ้นได้ที่นี่ด้วย */
.contact-main a {
  color: var(--accent-color); /* หรือสีที่คุณใช้ในโปรเจกต์ */
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.contact-main a:hover {
  text-decoration: underline;
  opacity: 0.9;
}


/* Responsive */
@media (max-width: 680px) {
  .privacy-main {
    padding: 24px 16px 60px;
  }
  .privacy-card {
    padding: 20px 20px;
  }
  .privacy-card h2 {
    font-size: 20px;
  }
  .privacy-card p,
  .privacy-card li,
  .privacy-card address {
    font-size: 14px;
  }
  .toc-card ul {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 20px;
  }
  .toc-label {
    padding: 12px 20px;
    font-size: 11px;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    padding: 8px 14px;
    font-size: 12px;
  }
}
@media (max-width: 480px) {
  .privacy-hero h1 {
    font-size: 28px;
  }
  .privacy-card {
    padding: 16px;
  }
  .privacy-card ul {
    margin-left: 16px;
  }
}