/* ============================================
   DigiOps Policy Pages - Shared Styles
   Matches toolbox light-theme aesthetic
   ============================================ */
:root {
  --pol-blue: #1e6bb8;
  --pol-green: #27ae60;
  --pol-text: #1a2332;
  --pol-text-muted: #5a6a7a;
  --gradient-primary: linear-gradient(135deg, #1e6bb8, #27ae60);
}

/* Page background - matches toolbox */
.policy-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #e8ecf3 0%, #eef1f6 100%);
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.policy-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(30, 107, 184, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(39, 174, 96, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.policy-page::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(30, 107, 184, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 184, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Document card */
.policy-card {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 107, 184, 0.12);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  animation: policyFadeIn 0.6s ease-out;
}

@keyframes policyFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Gradient header bar */
.policy-header {
  background: var(--gradient-primary);
  color: #fff;
  padding: 2.5rem 3rem;
  position: relative;
}

.policy-header h1 {
  font-size: 2.2rem;
  margin: 0;
  font-weight: 700;
}

.policy-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.policy-back:hover {
  color: #fff;
  text-decoration: none;
}

/* Content area */
.policy-content {
  padding: 3rem;
  font-family: 'Roboto', 'Poppins', sans-serif;
}

.policy-intro {
  color: var(--pol-text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Section blocks */
.policy-section {
  margin-bottom: 3rem;
}

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

/* Section headings with gradient number circles */
.policy-section h2 {
  font-size: 1.5rem;
  color: var(--pol-text);
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.policy-section h2 .sec-num {
  background: var(--gradient-primary);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 1rem;
  flex-shrink: 0;
}

.policy-section h3 {
  font-size: 1.1rem;
  color: var(--pol-text);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.policy-section h4 {
  font-size: 1.1rem;
  color: var(--pol-text);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  font-weight: 600;
}

/* Body text */
.policy-body {
  color: var(--pol-text-muted);
  line-height: 1.7;
}

.policy-body p {
  margin-bottom: 1rem;
}

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

.policy-body strong {
  color: var(--pol-text);
}

/* Links */
.policy-body a {
  color: var(--pol-blue);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.policy-body a:hover {
  color: var(--pol-green);
  text-decoration: underline;
}

/* Lists */
.policy-body ul,
.policy-body ol {
  margin: 0.5rem 0 1rem 1rem;
  padding-left: 1rem;
}

.policy-body li {
  margin-bottom: 0.5rem;
}

.policy-body li:last-child {
  margin-bottom: 0;
}

/* Definition grid */
.policy-def-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.policy-def-grid:last-child {
  margin-bottom: 0;
}

.policy-def-grid p {
  margin: 0;
}

/* Highlight box (replacing beige) */
.policy-highlight {
  background: linear-gradient(135deg, rgba(30, 107, 184, 0.06) 0%, rgba(39, 174, 96, 0.06) 100%);
  border-left: 4px solid var(--pol-blue);
  padding: 1.5rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 1rem;
}

.policy-highlight p {
  margin: 0 0 0.5rem;
}

.policy-highlight p:last-child {
  margin-bottom: 0;
}

/* Info box (neutral background) */
.policy-infobox {
  background: rgba(30, 107, 184, 0.04);
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.policy-infobox p {
  margin: 0 0 0.3rem;
}

.policy-infobox p:last-child {
  margin-bottom: 0;
}

/* Two-column grid for DPA parties */
.policy-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

/* Tables */
.policy-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.policy-table thead tr {
  background: var(--gradient-primary);
  color: #fff;
}

.policy-table th {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.policy-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  color: var(--pol-text-muted);
}

.policy-table tbody tr:hover {
  background: rgba(30, 107, 184, 0.03);
}

/* Checkmark list (for security/operations page) */
.policy-checklist {
  list-style: none;
  margin: 0.5rem 0 1rem 0;
  padding: 0;
}

.policy-checklist li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.policy-checklist li:last-child {
  margin-bottom: 0;
}

.policy-check {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Appendix heading */
.policy-appendix-heading {
  font-size: 1.8rem;
  color: var(--pol-text);
  margin-bottom: 2rem;
  font-weight: 700;
  border-bottom: 2px solid #eee;
  padding-bottom: 1rem;
  margin-top: 4rem;
}

/* Section border (for DPA sections) */
.policy-section-bordered {
  border-bottom: 1px solid #eee;
  padding-bottom: 2rem;
}

/* Italic note */
.policy-note {
  color: #666;
  font-style: italic;
  margin: 0;
}

/* Footer */
.policy-footer {
  background: linear-gradient(135deg, rgba(30, 107, 184, 0.08) 0%, rgba(39, 174, 96, 0.08) 100%);
  padding: 1.5rem;
  text-align: center;
  color: var(--pol-text-muted);
  font-size: 0.9rem;
}

.policy-footer p {
  margin: 0;
}

.policy-footer .policy-date {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .policy-page {
    padding: 1rem;
  }

  .policy-header {
    padding: 2rem 1.5rem;
  }

  .policy-header h1 {
    font-size: 1.6rem;
  }

  .policy-content {
    padding: 2rem 1.5rem;
  }

  .policy-def-grid {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .policy-parties {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
