/*
   Talkiva — css/pages/community-guidelines.css
   Community Guidelines page — legal-page styles + penal-actions table.
   Shares the same .policy-* system as privacy/terms/payment-policy pages so all
   legal pages stay visually identical. Load order: base → components → this → responsive.
*/

/* ---- Page wrapper & hero meta row ---- */
.policy-wrap { max-width: 860px; margin: 0 auto; }

.policy-meta {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  margin-top: 20px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.55);
}
.policy-meta span { display: inline-flex; align-items: center; gap: 8px; }
.policy-meta i { color: var(--primary); }

.privacy-intro {
  justify-content: center;
  text-align: center;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.72);
}
.privacy-intro span { color: rgba(255, 255, 255, 0.72); }

/* ---- Table of contents ---- */
.policy-toc {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px; margin: 0 auto 56px; max-width: 720px;
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 28px 32px;
}
.policy-toc-title {
  grid-column: 1 / -1; font-family: var(--font-head); font-weight: 600;
  font-size: 0.95rem; color: #fff; margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 10px;
}
.policy-toc-title i { color: var(--gold); }
.policy-toc a {
  color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; padding: 4px 0;
  transition: color 0.25s;
}
.policy-toc a:hover { color: var(--primary-soft); }

/* ---- Section cards ---- */
.policy-section {
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px;
  margin-bottom: 24px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.policy-section h2 {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 600;
  color: #fff; margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px;
}
.policy-section h2 .policy-no {
  color: var(--primary); font-weight: 800; font-size: 0.95rem;
  letter-spacing: 0.5px; flex-shrink: 0;
}
.policy-section p { color: rgba(255, 255, 255, 0.68); font-size: 0.95rem; margin-bottom: 12px; line-height: 1.75; }
.policy-section p:last-child { margin-bottom: 0; }
.policy-section strong { color: rgba(255, 255, 255, 0.92); font-weight: 600; }
.policy-section a { color: var(--primary-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Legal clauses with hanging indent ---- */
.policy-section .clauses { list-style: none; padding-left: 0; margin: 0 0 12px; }
.policy-section .clauses > li {
  position: relative; padding-left: 34px; margin-bottom: 10px;
  font-size: 0.95rem; color: rgba(255, 255, 255, 0.68); line-height: 1.75;
}
.policy-section .clauses > li:last-child { margin-bottom: 0; }
.policy-section .clauses > li::before {
  content: ""; position: absolute; left: 14px; top: 0.72em;
  width: 10px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}
.policy-section .clauses ul.nested { list-style: none; padding-left: 0; margin: 6px 0 0; }
.policy-section .clauses ul.nested > li { position: relative; padding-left: 18px; margin-bottom: 4px; }
.policy-section .clauses ul.nested > li::before {
  content: "—"; position: absolute; left: 0; color: var(--primary-soft);
}
.policy-section .clauses .ph {
  color: rgba(255, 255, 255, 0.5); font-style: italic;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3); padding: 0 2px;
}

/* ---- Callout (safety / emergency notices) ---- */
.policy-note {
  background: rgba(239, 27, 67, 0.08);
  border: 1px solid rgba(239, 27, 67, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 12px 0;
  display: flex; gap: 12px; align-items: flex-start;
}
.policy-note i { color: var(--primary); margin-top: 4px; flex-shrink: 0; }
.policy-note p { margin: 0; font-size: 0.9rem; }

/* ---- Grievance Officer card ---- */
.grievance-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 20px 24px; margin-top: 12px;
}
.grievance-card div { display: flex; gap: 10px; padding: 6px 0; font-size: 0.95rem; color: rgba(255, 255, 255, 0.68); }
.grievance-card i { color: var(--gold); margin-top: 5px; flex-shrink: 0; }
.grievance-card .ph {
  color: rgba(255, 255, 255, 0.45); font-style: italic;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3); padding: 0 4px;
}

/* ---- Legal Action Table (§9 — penal actions) ---- */
.legal-table-wrap {
  overflow-x: auto;                          /* horizontal scroll on small screens */
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.legal-table {
  width: 100%;
  min-width: 560px;                          /* tidy scroll instead of crushed columns */
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal-table th, .legal-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  line-height: 1.6;
}
.legal-table thead th {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(239, 27, 67, 0.16);       /* distinct red-tinted header */
  border-bottom: 1px solid rgba(239, 27, 67, 0.4);
  white-space: nowrap;
}
.legal-table tbody td { color: rgba(255, 255, 255, 0.7); }
.legal-table tbody td:first-child {
  color: var(--primary-soft); font-weight: 700; width: 40px;
}
.legal-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }  /* zebra stripe */
.legal-table tbody tr:hover { background: rgba(239, 27, 67, 0.07); }
.legal-table tbody tr:last-child td { border-bottom: none; }

/* ---- Footer note ---- */
.policy-footer-note {
  text-align: center; color: rgba(255, 255, 255, 0.45); font-size: 0.85rem;
  margin-top: 8px; padding-bottom: 16px;
}

@media (max-width: 680px) {
  .policy-section { padding: 26px 20px 24px; }
  .policy-toc { grid-template-columns: 1fr; padding: 22px 20px; }
  .legal-table th, .legal-table td { padding: 10px 12px; font-size: 0.84rem; }
}
