/* =============================================================
   HAS Children's Foundation - legal pages, shared footer additions
   and cookie banner.  Loaded on every page.
   ============================================================= */

/* ---------- Legal pages ---------- */
.legalSection { padding: 90px 0 100px; }
.legal-meta {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  font-size: 15px; color: #60646b; margin-bottom: 28px;
  padding-bottom: 20px; border-bottom: 1px solid #e3e8ee;
}
.legal-meta strong { color: #20212b; }

.legal-toc {
  position: sticky; top: 110px;
  background: #f4f8fa; border-left: 4px solid #055874;
  border-radius: 8px; padding: 24px 22px; margin-bottom: 40px;
}
.legal-toc__title {
  font-family: "Oswald", sans-serif; font-size: 18px; text-transform: uppercase;
  letter-spacing: .04em; color: #055874; margin: 0 0 14px;
}
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.legal-toc li + li { margin-top: 8px; }
.legal-toc a { color: #20212b; font-size: 15px; line-height: 1.4; display: block; text-decoration: none; }
.legal-toc a:hover, .legal-toc a:focus-visible { color: #055874; text-decoration: underline; }
.legal-toc__others { margin-top: 22px; padding-top: 18px; border-top: 1px solid #d7e2e8; }
.legal-toc__others a[aria-current="page"] { font-weight: 700; color: #055874; }

.legal-body { font-size: 17px; line-height: 1.75; color: #3a3d44; max-width: 820px; }
.legal-body .legal-lead { font-size: 19px; color: #20212b; margin-bottom: 28px; }
.legal-body h2 {
  font-family: "Oswald", sans-serif; font-size: 26px; line-height: 1.3;
  color: #055874; margin: 48px 0 16px; scroll-margin-top: 110px;
}
.legal-body h3 { font-family: "Barlow", sans-serif; font-weight: 700; font-size: 19px; color: #20212b; margin: 28px 0 10px; }
.legal-body p, .legal-body ul { margin-bottom: 16px; }
.legal-body ul { padding-left: 22px; list-style: disc; }
.legal-body ul li { list-style: disc; margin-bottom: 6px; }
.legal-body a { color: #0a6f92; text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: #055874; }
.legal-body code { font-size: 14px; background: #eef3f6; padding: 1px 6px; border-radius: 4px; color: #20212b; }

.legal-card {
  background: #f4f8fa; border: 1px solid #dbe6ec; border-radius: 12px;
  padding: 24px 26px; margin: 22px 0 26px;
}
.legal-card--summary { background: #f3f9ec; border-color: #d4e8bd; }
.legal-card h3 { margin-top: 0; }
.legal-card ul:last-child { margin-bottom: 0; }
.legal-facts { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 10px 20px; margin: 0; }
.legal-facts dt { font-weight: 700; color: #20212b; }
.legal-facts dd { margin: 0; }
@media (max-width: 575px) { .legal-facts { grid-template-columns: 1fr; gap: 2px; } .legal-facts dd { margin-bottom: 10px; } }

.legal-table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid #dbe6ec; border-radius: 10px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.55; }
.legal-table th { background: #055874; color: #fff; text-align: left; padding: 12px 14px; font-weight: 600; }
.legal-table td { padding: 12px 14px; border-top: 1px solid #e3e8ee; vertical-align: top; }
.legal-table tbody tr:nth-child(even) td { background: #f8fafb; }

.legal-fill { background: #fff3c4; color: #6b4e00; padding: 0 4px; border-radius: 3px; font-weight: 600; }
.legal-signoff { border-left: 4px solid #7fb432; padding: 6px 0 6px 18px; margin-top: 12px; }
.legal-cta { margin: 0 0 8px; }
.legal-btn, .cookieBanner__btn {
  font-family: "Barlow", sans-serif; font-weight: 600; font-size: 16px;
  border-radius: 6px; padding: 11px 22px; cursor: pointer; line-height: 1.2;
  border: 2px solid #055874; background: #055874; color: #fff;
}
.legal-btn:hover, .cookieBanner__btn:hover { background: #04465d; border-color: #04465d; }
.legal-btn:focus-visible, .cookieBanner__btn:focus-visible { outline: 3px solid #08c2ff; outline-offset: 2px; }

/* ---------- Shared footer additions ---------- */
.footer__menu ul li a:hover { text-decoration: underline; }
.footer__contact { color: #fff; font-size: 15px; line-height: 1.7; }
.footer__contact li { display: flex; gap: 10px; margin-bottom: 10px; }
.footer__contact i { margin-top: 5px; width: 16px; color: #08c2ff; }
.footer__contact a { color: #fff; }
.footer__charity { display: flex; align-items: center; gap: 22px; padding: 26px 0 6px; }
.footer__charity img { width: 171px; height: auto; flex: 0 0 auto; border-radius: 4px; background: #fff; }
.footer__charity p { color: #e6f1f5; font-size: 14.5px; line-height: 1.6; margin: 0; }
.footer__legalNav { margin-top: 18px; }
.footer__legalLinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; }
.footer__legalLinks li { display: flex; align-items: center; }
.footer__legalLinks li + li::before { content: ""; width: 1px; height: 14px; background: rgba(255,255,255,.45); margin: 0 14px; }
.footer__legalLinks a, .footer__legalLinks button {
  color: #fff; font-size: 14.5px; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.footer__legalLinks a:hover, .footer__legalLinks button:hover,
.footer__legalLinks a:focus-visible, .footer__legalLinks button:focus-visible { text-decoration: underline; }
.footer__bottom .footer__copyright { padding-top: 14px; }
@media (max-width: 767px) {
  .footer__charity { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---------- Cookie banner ---------- */
.cookieBanner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99999;
  max-width: 760px; margin: 0 auto; background: #fff; color: #20212b;
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  border-top: 5px solid #055874; padding: 22px 24px;
  font-family: "Barlow", sans-serif; font-size: 16px; line-height: 1.55;
}
.cookieBanner[hidden] { display: none; }
.cookieBanner__title { font-family: "Oswald", sans-serif; font-size: 20px; margin: 0 0 6px; color: #055874; }
.cookieBanner p { margin: 0 0 14px; }
.cookieBanner a { color: #0a6f92; text-decoration: underline; }
.cookieBanner__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookieBanner__btn--alt { background: #fff; color: #055874; }
.cookieBanner__btn--alt:hover { background: #eef5f8; color: #04465d; }
.cookieBanner__status { font-size: 14px; color: #60646b; margin: 10px 0 0 !important; }

/* ---------- Dark theme ---------- */
html[data-theme="dark"] .legal-body,
html[data-theme="dark"] .legal-body .legal-lead,
html[data-theme="dark"] .legal-body h3,
html[data-theme="dark"] .legal-facts dt,
html[data-theme="dark"] .legal-meta strong,
html[data-theme="dark"] .legal-toc a { color: #dfe2ea; }
html[data-theme="dark"] .legal-body h2,
html[data-theme="dark"] .legal-toc__title { color: #6fd3f5; }
html[data-theme="dark"] .legal-body a { color: #6fd3f5; }
html[data-theme="dark"] .legal-meta { color: #a9adb6; border-color: #42444c; }
html[data-theme="dark"] .legal-toc,
html[data-theme="dark"] .legal-card { background: #35363d; border-color: #4a4c55; }
html[data-theme="dark"] .legal-card--summary { background: #33392d; border-color: #4f5d40; }
html[data-theme="dark"] .legal-table-wrap { border-color: #4a4c55; }
html[data-theme="dark"] .legal-table td { border-color: #4a4c55; }
html[data-theme="dark"] .legal-table tbody tr:nth-child(even) td { background: #313238; }
html[data-theme="dark"] .legal-body code { background: #3d3f47; color: #dfe2ea; }
html[data-theme="dark"] .cookieBanner { background: #2f3036; color: #dfe2ea; }
html[data-theme="dark"] .cookieBanner a,
html[data-theme="dark"] .cookieBanner__title { color: #6fd3f5; }
html[data-theme="dark"] .cookieBanner__btn--alt { background: transparent; color: #dfe2ea; border-color: #6fd3f5; }

@media print {
  .legal-toc, .cookieBanner, header, footer, #site-footer, .pageBreadcumbTopDown { display: none !important; }
  .legalSection { padding: 0; }
}

/* small screens */
@media (max-width: 991px) {
  .legal-toc { position: static; }
  .legal-toc__others { display: none; }
  .legalSection { padding: 60px 0 70px; }
}
@media (max-width: 575px) {
  .cookieBanner { left: 8px; right: 8px; bottom: 8px; padding: 16px 18px; font-size: 15px; }
  .cookieBanner__title { font-size: 18px; }
  .cookieBanner__btn { flex: 1 1 100%; }
  .legal-body { font-size: 16px; }
  .legal-body h2 { font-size: 23px; }
}
