/* ==========================================================
   Enas Fahmy — document pages (privacy, refunds, terms, contact)
   Loaded AFTER css/style.css
   ========================================================== */

/* ---------- Language blocks ---------- */
html[lang=ar] [data-lang="en"] { display: none !important; }
html:not([lang=ar]) [data-lang="ar"] { display: none !important; }

body.doc-page { background: var(--cream); }

/* ---------- Header band ---------- */
.doc-hero {
  position: relative;
  background:
    radial-gradient(circle at 80% 30%, #ff5a62 0%, transparent 50%),
    var(--red);
  color: #fff;
  padding: 140px 24px 72px;
  border-radius: 0 0 48px 48px;
  overflow: hidden;
  text-align: center;
}
.doc-hero::before { /* dotted texture, like the site hero */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 95%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 95%);
}
.doc-hero > * { position: relative; }
.doc-kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  font: 700 13px/1.2 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.doc-hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  max-width: 900px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}
.doc-updated { margin: 18px 0 0; font-size: 15px; opacity: .9; }

/* ---------- Article ---------- */
.doc-main { padding: 0 16px 40px; }
.doc {
  position: relative;
  max-width: 780px;
  margin: -36px auto 0;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 48px 52px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  overflow-wrap: break-word;
}
.doc h2 {
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  margin: 40px 0 12px;
  padding-top: 26px;
  border-top: 2px dashed rgba(23,19,43,.18);
}
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 24px 0 8px; letter-spacing: -.01em; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-inline-start: 1.4em; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--red); font-weight: 700; }
.doc a { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.doc a:hover { color: var(--red); }
.doc strong { font-weight: 700; }
.doc .doc-intro {
  font-size: 18.5px;
  margin-bottom: 28px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--cream);
  border: 2px solid var(--ink);
}
.doc .note {
  margin: 18px 0;
  padding: 16px 20px;
  border-radius: 18px;
  background: #fff6d6;
  border: 2px solid var(--ink);
  border-inline-start-width: 8px;
  border-inline-start-color: var(--yellow);
}
.doc .note p:last-child { margin-bottom: 0; }
.doc [dir=ltr] { unicode-bidi: isolate; }

/* ---------- Contact cards ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
.contact-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: var(--cream);
  box-shadow: 4px 4px 0 var(--ink);
  min-width: 0;
}
.contact-card.c-mint { background: var(--mint); }
.contact-card.c-yellow { background: var(--yellow); }
.contact-card.c-pink { background: var(--pink); }
.contact-card.c-lilac { background: var(--lilac); }
.contact-card .label { font: 700 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.contact-card .value { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.doc .contact-card a { color: var(--ink); text-decoration: none; }
.doc .contact-card a:hover { text-decoration: underline; }
.contact-card-wide { grid-column: 1 / -1; }
.doc .btn { text-decoration: none; color: var(--ink); margin-top: 6px; align-self: flex-start; }
.doc .btn:hover { color: var(--ink); }

/* ---------- Payment badges (shared footer) ---------- */
/* .pay-badges / .pay-badge live in style.css (shared with the homepage footer) */

/* ---------- Arabic ---------- */
html[lang=ar] .doc { line-height: 1.9; }
html[lang=ar] .doc p, html[lang=ar] .doc li { line-height: 1.9; }
html[lang=ar] .doc h2, html[lang=ar] .doc h3, html[lang=ar] .doc-hero h1 { letter-spacing: 0; line-height: 1.35; }
html[lang=ar] .doc-kicker, html[lang=ar] .contact-card .label { letter-spacing: 0; text-transform: none; }
html[lang=ar] .doc-hero h1 { font-weight: 900; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .doc-hero { padding: 116px 18px 64px; border-radius: 0 0 32px 32px; }
  .doc-hero h1 { font-size: 40px; }
  html[lang=ar] .doc-hero h1 { font-size: 36px; }
  .doc-main { padding: 0 14px 28px; }
  .doc { padding: 28px 20px; font-size: 16px; margin-top: -28px; box-shadow: 4px 4px 0 var(--ink); }
  .doc .doc-intro { font-size: 16.5px; padding: 14px 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer { padding: 40px 18px 32px; }
}
@media (max-width: 400px) {
  .brand { font-size: 22px; }
}
