/* Policy pages: terms, privacy, refund-policy, offers-terms. Namespace: policy-
   Layout: hero, then the text (left in the reading order) next to a side column with the other policies,
   the contents of this page and a help box. Under 900px the side contents become a collapsible list. */

/* 1. Hero ------------------------------------------------------------------- */
.page-hero__inner.policy-hero { padding-block: 36px; }
.policy-hero__lead { max-width: 760px; }
.policy-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; line-height: normal; color: var(--c-text-3); }

/* [placeholder]: information or a decision the team still has to provide */
.policy-ph { padding: 1px 6px; border-radius: 6px; background: #FFF4D6; color: var(--c-gold-ink); font-weight: 600; }

/* Links inside the text */
.policy-link { color: var(--c-primary); font-weight: 600; text-decoration: none; }
.policy-link:hover { color: var(--c-link-hover); text-decoration: underline; }
.policy-link--strong { font-weight: 700; text-decoration: underline; }

/* 2. Layout ----------------------------------------------------------------- */
.policy-layout {
  padding-block: 40px 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
  line-height: normal; /* the design sets line-height only where it matters */
}
.policy-article { flex: 999 1 560px; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 32px; }
.policy-aside {
  flex: 1 1 280px;
  max-width: 340px;
  position: sticky;
  top: calc(var(--sticky-top) + 24px); /* below the sticky site header */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 900px) {
  .policy-aside { position: static; }
}
@media (max-width: 720px) {
  .policy-layout { padding-block: 24px 56px; gap: 32px; }
  .policy-article { gap: 28px; }
}

/* 3. Contents of this page ---------------------------------------------------- */
.policy-toc__link {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.policy-toc__link:hover { color: var(--c-link-hover); text-decoration: underline; }
.policy-toc__link--side { font-size: 14.5px; }
.policy-toc__num { min-width: 18px; color: var(--c-text-3); font-size: 13px; }

/* Side list (over 900px) */
.policy-toc-side { padding: 18px 20px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.policy-toc-side__title { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--c-text-3); }

/* Collapsible list (900px and under) */
.policy-toc-mobile { display: none; padding: 0 18px; border: 1px solid var(--c-border); border-radius: 14px; }
.policy-toc-mobile__summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15.5px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.policy-toc-mobile__summary::-webkit-details-marker { display: none; }
.policy-toc-mobile__summary svg { transition: transform .2s ease; }
.policy-toc-mobile[open] .policy-toc-mobile__summary svg { transform: rotate(180deg); }
.policy-toc-mobile__nav { padding-bottom: 12px; display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .policy-toc-mobile { display: block; }
  .policy-toc-side { display: none; }
}

/* 4. «باختصار» summary --------------------------------------------------------- */
.policy-summary {
  padding: 24px 26px;
  border: 1px solid #BFE3D2;
  border-radius: var(--radius-lg);
  background: #F2FAF6;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.policy-summary__title { font-size: 21px; font-weight: 800; line-height: normal; }
.policy-summary__list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.75; color: #1F3448; }
.policy-summary__item { display: flex; align-items: flex-start; gap: 10px; }
.policy-summary__icon { margin-top: 5px; }
.policy-note { font-size: 14px; color: var(--c-text-2); }

@media (max-width: 720px) {
  .policy-summary { padding: 20px 18px; }
}

/* 5. Numbered sections --------------------------------------------------------- */
.policy-sec {
  scroll-margin-top: 8px; /* html already keeps room for the sticky header */
  padding-top: 28px;
  border-top: 1px solid #E6EEF5;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.policy-sec__title { display: flex; align-items: baseline; gap: 12px; font-size: 24px; font-weight: 800; line-height: normal; }
.policy-sec__num { font-size: 16px; color: var(--c-primary); }
.policy-p { font-size: 16.5px; line-height: 1.95; color: #2B3F55; }
.policy-ul { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16.5px; line-height: 1.85; color: #2B3F55; }

@media (max-width: 720px) {
  .policy-sec__title { font-size: 21px; gap: 10px; }
  .policy-p, .policy-ul { font-size: 16px; }
}

/* Tables (scroll sideways inside their frame on small screens) */
.policy-table-wrap { border: 1px solid var(--c-border); border-radius: 14px; overflow-x: auto; }
.policy-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.policy-table th { text-align: right; }
.policy-table thead th { padding: 12px 16px; background: var(--c-mist); font-size: 14px; font-weight: 700; color: var(--c-text-2); }
.policy-table tbody th,
.policy-table td { padding: 14px 16px; border-top: 1px solid #E6EEF5; vertical-align: top; }
.policy-table tbody th { font-size: 15.5px; font-weight: 700; color: var(--c-ink); }
.policy-table td { font-size: 15px; line-height: 1.7; color: #2B3F55; }

/* 6. Side column ---------------------------------------------------------------- */
.policy-nav { padding: 10px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 2px; }
.policy-nav__link {
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.policy-nav__link:hover { background: var(--c-pale-2); color: var(--c-navy); }
.policy-nav__link[aria-current="page"] { background: var(--c-pale); color: var(--c-navy); font-weight: 700; box-shadow: inset -3px 0 0 var(--c-primary); }
.policy-nav__link--all { min-height: 40px; color: var(--c-text-3); font-size: 13px; font-weight: 700; }

.policy-help {
  padding: 20px;
  border: 1.5px solid var(--c-success);
  border-radius: var(--radius-lg);
  background: #F2FAF6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policy-help--blue { border-color: var(--c-primary); background: var(--c-pale-2); }
.policy-help__title { font-family: var(--font-head); font-size: 18px; font-weight: 800; }
.policy-help__text { font-size: 14.5px; line-height: 1.7; color: var(--c-text-2); }
.policy-help__btn {
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--c-success);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
}
.policy-help__btn:hover { background: var(--c-success-ink); color: var(--c-white); }
.policy-help__btn--blue { background: var(--c-primary); }
.policy-help__btn--blue:hover { background: var(--c-primary-hover); }

/* 7. Refund: «هل أسترد ما دفعته؟» ------------------------------------------------- */
.policy-verdict { display: flex; flex-direction: column; gap: 16px; }
.policy-verdict__title { font-size: 24px; font-weight: 800; line-height: normal; }
.policy-case { padding: 24px; border: 2px solid; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 12px; }
.policy-case--yes { border-color: var(--c-success); background: #F2FAF6; }
.policy-case--no { border-color: #9AABBB; background: #F6F8FA; }
.policy-case__head { display: flex; align-items: center; gap: 12px; }
.policy-case__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--c-success);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.policy-case--no .policy-case__icon { background: var(--c-neutral-ink); }
.policy-case__when { font-size: 17px; font-weight: 700; color: #1F3448; }
.policy-case__answer { font-family: var(--font-head); font-size: 28px; font-weight: 900; line-height: 1.4; color: var(--c-success-ink); }
.policy-case--no .policy-case__answer { color: var(--c-neutral-ink); }
.policy-case__text { font-size: 16px; line-height: 1.8; color: #1F3448; }
.policy-example {
  padding: 16px 18px;
  border: 1px solid #C9DDEE;
  border-radius: 14px;
  background: var(--c-pale);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.policy-example__icon { margin-top: 3px; }
.policy-example__text { font-size: 16px; line-height: 1.8; color: var(--c-ink); }

@media (max-width: 720px) {
  .policy-case { padding: 20px; }
  .policy-case__answer { font-size: 24px; }
}

/* 8. Refund request form ---------------------------------------------------------- */
.policy-form {
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #FBFDFF;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.policy-form__set { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
.policy-form__legend { margin-bottom: 10px; padding: 0; font-size: 15px; font-weight: 700; }

.policy-opt {
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-white);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.policy-opt:hover { border-color: var(--c-primary); }
.policy-opt:has(input:checked) { border-color: var(--c-primary); box-shadow: inset 0 0 0 1px var(--c-primary); background: var(--c-pale-2); }
.policy-opt:has(input:focus-visible) { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.policy-opt input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--c-primary); }
.policy-opt__text { display: flex; flex-direction: column; gap: 2px; }
.policy-opt__name { font-weight: 700; }
.policy-opt__meta { font-size: 13.5px; color: var(--c-text-2); }

.policy-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.policy-field__label { font-size: 15px; font-weight: 700; }
.policy-field__optional { font-weight: 500; color: var(--c-text-3); }
.policy-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid #B8CCDD;
  border-radius: var(--radius);
  background: var(--c-white);
  font-size: 16px;
  color: var(--c-ink);
}
.policy-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(22, 112, 173, 0.16); outline: none; }
.policy-input:user-invalid { border-color: #B42318; }
.policy-input--ltr { direction: ltr; text-align: right; }
.policy-input--area { height: auto; padding: 12px 14px; resize: vertical; }

.policy-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.policy-form .policy-form__btn { height: 52px; padding: 0 28px; border-radius: var(--radius-md); font-size: 16.5px; font-weight: 800; }
.policy-form__hint { font-size: 14px; line-height: 1.7; color: var(--c-text-2); }
.policy-form__alt {
  padding-top: 14px;
  border-top: 1px solid #E6EEF5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 14.5px;
  color: var(--c-text-2);
}
.policy-form__wa { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: var(--c-success); font-weight: 700; text-decoration: none; }
.policy-form__wa:hover { color: var(--c-success-ink); text-decoration: underline; }

@media (max-width: 720px) {
  .policy-form { padding: 18px 16px; }
  .policy-form .policy-form__btn { width: 100%; }
}

/* 9. Refund: transfer conditions (term + answer rows) -------------------------------- */
.policy-facts { border: 1px solid var(--c-border); border-radius: 14px; overflow: hidden; }
.policy-facts__row {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 4px 20px;
}
.policy-facts__row + .policy-facts__row { border-top: 1px solid #E6EEF5; }
.policy-facts dt { font-size: 15px; font-weight: 700; color: var(--c-ink); }
.policy-facts dd { font-size: 15.5px; line-height: 1.75; color: #2B3F55; }

/* 10. Offers: one card per offer ---------------------------------------------------- */
.policy-offer {
  padding: 22px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-white);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.policy-offer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.policy-offer__scope { font-size: 13px; font-weight: 700; color: var(--c-primary); }
.policy-offer__badge {
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: var(--c-success-bg);
  color: var(--c-success-ink);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}
.policy-offer__title { font-size: 19px; font-weight: 800; line-height: 1.45; }
.policy-offer__facts { display: flex; flex-direction: column; gap: 10px; }
.policy-offer__fact { padding-top: 10px; border-top: 1px solid #E6EEF5; display: flex; flex-direction: column; gap: 2px; }
.policy-offer__fact dt { font-size: 13px; font-weight: 700; color: var(--c-text-3); }
.policy-offer__fact dd { font-size: 15px; line-height: 1.7; color: #1F3448; }
