/* ====================================================================
   BIONUL EDTECH - LEGAL & INFO PAGES (Standalone Public Pages)
   Help Centre, Privacy Policy, Terms of Service, Refund Policy
   ==================================================================== */

/* ---- Page Shell ---- */
.legal-page {
  min-height: 100vh;
  background-color: var(--bg-main, #F8F9FD);
  font-family: var(--font-family, 'Plus Jakarta Sans', -apple-system, sans-serif);
  color: var(--text-body, #334155);
  display: flex;
  flex-direction: column;
}

/* ---- Top Navigation Bar ---- */
.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color, #EAEBF2);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}

.legal-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-heading, #0F172A);
}

.legal-topbar-logo {
  height: 34px;
  max-height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.legal-topbar-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-heading, #0F172A);
}

.legal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
  border: none;
  cursor: pointer;
}

.legal-topbar-btn.btn-outline {
  background: transparent;
  color: var(--text-body, #334155);
  border: 1.5px solid var(--border-color, #EAEBF2);
}

.legal-topbar-btn.btn-outline:hover {
  border-color: var(--primary, #5B3DF5);
  color: var(--primary, #5B3DF5);
  background: var(--primary-light, #F1EEFF);
}

.legal-topbar-btn.btn-filled {
  background: var(--primary, #5B3DF5);
  color: #FFFFFF;
}

.legal-topbar-btn.btn-filled:hover {
  background: var(--primary-dark, #4326D8);
}

/* ---- Hero Banner ---- */
.legal-hero {
  background: var(--primary-gradient, linear-gradient(135deg, #5B3DF5, #4326D8));
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.legal-hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.legal-hero-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.legal-hero-icon svg {
  width: 28px;
  height: 28px;
  fill: #FFFFFF;
}

.legal-hero h1 {
  font-size: 1.75rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1.2;
  position: relative;
}

.legal-hero-sub {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ---- Content Container ---- */
.legal-content {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  width: 100%;
}

/* ---- Last Updated Badge ---- */
.legal-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light, #F1EEFF);
  color: var(--primary, #5B3DF5);
  padding: 5px 14px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.legal-updated-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* ---- Section Cards ---- */
.legal-section {
  background: #FFFFFF;
  border-radius: var(--radius-lg, 20px);
  padding: 24px 22px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color, #EAEBF2);
  box-shadow: var(--shadow-sm, 0 2px 10px rgba(91, 61, 245, 0.04));
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.legal-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legal-section-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-heading, #0F172A);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal-section p,
.legal-section li {
  font-size: 0.88rem;
  color: var(--text-body, #334155);
  line-height: 1.7;
  margin-bottom: 10px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-section strong {
  color: var(--text-heading, #0F172A);
  font-weight: 700;
}

.legal-section a {
  color: var(--primary, #5B3DF5);
  text-decoration: none;
  font-weight: 600;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* ---- Help Centre Specific: Contact Card ---- */
.help-contact-card {
  background: var(--primary-light, #F1EEFF);
  border-radius: var(--radius-md, 14px);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
}

.help-contact-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary, #5B3DF5);
}

.help-contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-contact-icon svg {
  width: 20px;
  height: 20px;
  fill: #FFFFFF;
}

.help-contact-info {
  flex: 1;
}

.help-contact-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  margin-bottom: 2px;
}

.help-contact-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-heading, #0F172A);
}

.help-contact-arrow {
  color: var(--primary, #5B3DF5);
  font-size: 1.2rem;
  font-weight: 800;
}

/* ---- Help Centre: FAQ Accordion ---- */
.faq-item {
  border-bottom: 1px solid var(--border-subtle, #F0F1F6);
  padding: 14px 0;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading, #0F172A);
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
}

.faq-question .faq-toggle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-light, #F1EEFF);
  color: var(--primary, #5B3DF5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  font-size: 0.8rem;
  font-weight: 900;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  font-size: 0.85rem;
  color: var(--text-body, #334155);
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-top: 10px;
}

/* ---- Footer ---- */
.legal-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border-color, #EAEBF2);
  padding: 24px 20px;
  text-align: center;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 14px;
}

.legal-footer-links a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  text-decoration: none;
  transition: color 0.15s ease;
}

.legal-footer-links a:hover {
  color: var(--primary, #5B3DF5);
}

.legal-footer-copy {
  font-size: 0.72rem;
  color: var(--text-light, #94A3B8);
  font-weight: 500;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
  .legal-hero {
    padding: 56px 32px 48px;
  }

  .legal-hero h1 {
    font-size: 2.2rem;
  }

  .legal-content {
    padding: 36px 32px 80px;
  }

  .legal-section {
    padding: 28px 28px;
  }
}
