/*
Theme Name: Rayde Child
Theme URI: https://rayde.sa
Description: Child theme of Hello Elementor with an optimized single post template (Classic Editor friendly, FAQ fields).
Author: Rayde
Template: hello-elementor
Version: 1.3.0
Text Domain: rayde-child
*/

/* Single centred reading column. Font comes from the Elementor kit (Droid Arabic Kufi);
   every rule is prefixed with .rayde-post so the kit's global styles cannot override it. */
.rayde-post {
  --ink: #1b1b1b;
  --red: #D4272D;
  --red-d: #b51f25;
  --steel: #757575;
  --line: #e2e2e2;
  --wash: #f5f5f5;
  --col: 960px;
  color: #2b2b2b;
  font-size: 19px;
  line-height: 2;
  direction: rtl;
  background: #fff;
}
.rayde-post *, .rayde-post *::before, .rayde-post *::after { box-sizing: border-box; }
.rayde-post bdi { unicode-bidi: isolate; }
.rayde-post .rp-col { width: 100%; max-width: calc(var(--col) + 40px); margin-inline: auto; padding-inline: 20px; }
.rayde-post .rp-wide { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }

/* ---------- title ---------- */
.rayde-post .rp-hero { padding-top: 44px; padding-bottom: 32px; }
.rayde-post .rp-breadcrumb { font-size: 14px; line-height: 1.8; color: var(--steel); margin: 0 0 18px; }
.rayde-post .rp-breadcrumb a { color: var(--steel); font-weight: 400; text-decoration: none; }
.rayde-post .rp-breadcrumb a:hover { color: var(--red); }
.rayde-post .rp-breadcrumb .breadcrumb_last { color: #9a9a9a; }
.rayde-post .rp-title {
  font-size: clamp(27px, 4.2vw, 40px);
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: none;
  width: 100%;
  text-wrap: wrap;
}
.rayde-post .rp-meta { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0; font-size: 15px; line-height: 1.8; color: var(--steel); }
.rayde-post .rp-meta span { color: var(--ink); }

/* cover: a little wider than the text column */
.rayde-post .rp-cover { max-width: 1000px; margin: 0 auto 44px; padding-inline: 20px; }
.rayde-post .rp-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }

/* ---------- article text ---------- */
.rayde-post .rp-article { padding-bottom: 64px; }
.rayde-post .rp-content > *:first-child { margin-top: 0; }
.rayde-post .rp-content p { margin: 0 0 1.15em; }
.rayde-post .rp-content > p:first-of-type { font-size: 1.12em; line-height: 1.95; color: var(--ink); }
.rayde-post .rp-content h2 {
  font-size: clamp(23px, 3vw, 28px);
  line-height: 1.6;
  font-weight: 700;
  color: var(--ink);
  margin: 2.2em 0 .6em;
  padding: 0;
  scroll-margin-top: 90px;
}
.rayde-post .rp-content h3 { font-size: clamp(19px, 2.6vw, 22px); line-height: 1.6; font-weight: 700; color: var(--ink); margin: 1.7em 0 .5em; }
.rayde-post .rp-content h4 { font-size: 18px; font-weight: 700; color: var(--ink); margin: 1.4em 0 .4em; }
.rayde-post .rp-content strong { color: var(--ink); }
.rayde-post .rp-content a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.rayde-post .rp-content a:hover { color: var(--red-d); text-decoration-thickness: 2px; }
.rayde-post .rp-content ul, .rayde-post .rp-content ol { margin: 0 0 1.3em; padding: 0; list-style: none; }
.rayde-post .rp-content ul > li { position: relative; padding-inline-start: 26px; margin-bottom: .5em; }
.rayde-post .rp-content ul > li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .95em; width: 7px; height: 7px; background: var(--red); }
.rayde-post .rp-content ol { counter-reset: n; }
.rayde-post .rp-content ol > li { position: relative; padding-inline-start: 36px; margin-bottom: .5em; counter-increment: n; }
.rayde-post .rp-content ol > li::before { content: counter(n); position: absolute; inset-inline-start: 0; top: .3em; width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--ink); }
.rayde-post .rp-content figure { margin: 2em 0; }
.rayde-post .rp-content img { max-width: 100%; height: auto; border-radius: 2px; }
.rayde-post .rp-content blockquote { margin: 1.6em 0; padding: 4px 22px; border-inline-start: 4px solid var(--red); background: var(--wash); }
.rayde-post .rp-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.8em 0; font-size: 16px; line-height: 1.8; }
.rayde-post .rp-content th, .rayde-post .rp-content td { padding: 11px 14px; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.rayde-post .rp-content th { background: var(--ink); color: #fff; font-weight: 700; border-color: var(--ink); }
.rayde-post .rp-content tbody tr:nth-child(even) td { background: var(--wash); }
.rayde-post .rp-content .rx-btn { margin: 1.6em 0; }
.rayde-post .rp-content .rx-btn a { display: inline-block; padding: 11px 26px; background: var(--ink); color: #fff; text-decoration: none; line-height: 1.6; }
.rayde-post .rp-content .rx-btn a:hover { background: var(--red); color: #fff; }

/* ---------- FAQ ---------- */
.rayde-post .rp-faq { margin-top: 3.2em; padding: 30px 32px 10px; background: var(--wash); }
.rayde-post .rp-faq h2 { font-size: clamp(23px, 3vw, 28px); line-height: 1.6; font-weight: 700; color: var(--ink); margin: 0 0 .5em; padding: 0; border: 0; }
.rayde-post .rp-q { border-top: 1px solid #d4d4d4; }
.rayde-post .rp-q:last-of-type { border-bottom: 1px solid #d4d4d4; margin-bottom: 20px; }
.rayde-post .rp-q summary { position: relative; cursor: pointer; list-style: none; padding: 16px 0 16px 44px; font-weight: 700; color: var(--ink); line-height: 1.75; }
.rayde-post .rp-q summary::-webkit-details-marker { display: none; }
.rayde-post .rp-q summary::after { content: ""; position: absolute; left: 8px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); transition: transform .2s; }
.rayde-post .rp-q[open] summary::after { transform: rotate(135deg); margin-top: -2px; }
.rayde-post .rp-q summary:hover { color: var(--red); }
.rayde-post .rp-q summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.rayde-post .rp-q .rp-a { padding: 0 0 14px; }
.rayde-post .rp-q .rp-a p { margin: 0 0 .9em; }

/* ---------- contact band (end of article) ---------- */
.rayde-post .rp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 36px;
  margin-top: 3.2em;
  padding: 30px 32px;
  background: var(--ink);
  color: #fff;
  border-inline-start: 6px solid var(--red);
}
.rayde-post .rp-cta-text { flex: 1 1 280px; }
.rayde-post .rp-cta h2 { font-size: 23px; line-height: 1.6; font-weight: 700; color: #fff; margin: 0 0 .3em; padding: 0; border: 0; }
.rayde-post .rp-cta p { margin: 0; color: #cfcfcf; font-size: 16px; line-height: 1.9; }
.rayde-post .rp-cta-actions { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.rayde-post a.rp-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 24px; line-height: 1.6; font-weight: 700; text-decoration: none; white-space: nowrap; color: #fff; background: var(--red); border: 1px solid var(--red); }
.rayde-post a.rp-btn:hover { background: var(--red-d); border-color: var(--red-d); color: #fff; }
.rayde-post a.rp-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rayde-post .rp-num { font-size: 17px; letter-spacing: .02em; }
.rayde-post a.rp-btn-line { background: transparent; border-color: #8a8a8a; }
.rayde-post a.rp-btn-line:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* ---------- related ---------- */
.rayde-post .rp-related { background: var(--wash); padding: 56px 0 64px; }
.rayde-post .rp-related h2 { font-size: clamp(22px, 3vw, 27px); font-weight: 700; color: var(--ink); line-height: 1.5; margin: 0 0 26px; }
.rayde-post .rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.rayde-post a.rp-card { display: block; color: var(--ink); text-decoration: none; }
.rayde-post .rp-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 14px; border-radius: 2px; }
.rayde-post .rp-card-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.7; }
.rayde-post a.rp-card:hover .rp-card-title { color: var(--red); }
.rayde-post .rp-card time { display: block; margin-top: 4px; font-size: 13px; color: var(--steel); }

/* ---------- blog + category archives ---------- */
.rayde-archive .rp-hero { padding-bottom: 28px; }
.rayde-archive .rp-page-no { font-weight: 400; color: var(--steel); font-size: .6em; margin-inline-start: 8px; }
.rayde-archive .rp-intro { max-width: 70ch; color: #444; font-size: 17px; line-height: 1.95; margin: 4px 0 0; }
.rayde-archive .rp-intro p { margin: 0 0 .6em; }
.rayde-archive .rp-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.rayde-archive .rp-cats a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 15px; line-height: 1.7; color: var(--ink); text-decoration: none; border: 1px solid #cfcfcf; border-radius: 999px; background: #fff; }
.rayde-archive .rp-cats a span { font-size: 12px; color: var(--steel); }
.rayde-archive .rp-cats a:hover { border-color: var(--ink); }
.rayde-archive .rp-cats a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rayde-archive .rp-cats a[aria-current="page"] span { color: #bdbdbd; }
.rayde-archive .rp-cats a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.rayde-archive .rp-list { padding-bottom: 64px; }
.rayde-archive .rp-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.rayde-archive .rp-post { display: flex; flex-direction: column; min-width: 0; }
.rayde-archive .rp-post-img { display: block; aspect-ratio: 3 / 2; background: var(--wash); overflow: hidden; margin-bottom: 14px; }
.rayde-archive .rp-post-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rayde-archive .rp-post-cat { align-self: flex-start; font-size: 13px; line-height: 1.6; color: var(--red); text-decoration: none; margin-bottom: 4px; }
.rayde-archive .rp-post-cat:hover { text-decoration: underline; }
.rayde-archive .rp-post-title { font-size: 18px; line-height: 1.7; font-weight: 700; margin: 0 0 8px; padding: 0; color: var(--ink); }
.rayde-archive .rp-post-title a { color: var(--ink); text-decoration: none; }
.rayde-archive .rp-post-title a:hover { color: var(--red); }
.rayde-archive .rp-post-ex { font-size: 15px; line-height: 1.9; color: #555; margin: 0 0 10px; }
.rayde-archive .rp-post time { margin-top: auto; font-size: 13px; color: var(--steel); }

/* newest post: large card across the column */
.rayde-archive .rp-post--feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-bottom: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
.rayde-archive .rp-post--feature .rp-post-img { margin: 0; aspect-ratio: 16 / 10; }
.rayde-archive .rp-post--feature .rp-post-title { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.6; }
.rayde-archive .rp-post--feature .rp-post-ex { font-size: 16px; }

.rayde-archive .rp-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 52px; }
.rayde-archive .rp-pages .page-numbers { min-width: 42px; padding: 7px 12px; text-align: center; font-size: 15px; line-height: 1.7; color: var(--ink); text-decoration: none; border: 1px solid #d0d0d0; }
.rayde-archive .rp-pages a.page-numbers:hover { border-color: var(--ink); }
.rayde-archive .rp-pages .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.rayde-archive .rp-pages .page-numbers.dots { border-color: transparent; }
.rayde-archive .rp-empty { padding: 40px 0; text-align: center; }
.rayde-archive .rp-empty .rp-btn { display: inline-flex; }

@media (max-width: 1023px) {
  .rayde-archive .rp-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .rayde-archive .rp-cats { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding-inline: 20px; padding-bottom: 4px; scrollbar-width: none; }
  .rayde-archive .rp-cats a { flex: 0 0 auto; }
  .rayde-archive .rp-posts { grid-template-columns: 1fr; gap: 32px; }
  .rayde-archive .rp-post--feature { grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px; padding-bottom: 32px; }
}

/* ---------- mobile call bar ---------- */
.rayde-post .rp-callbar { display: none; }

@media (max-width: 767px) {
  .rayde-post { font-size: 17px; line-height: 1.95; padding-bottom: 54px; }
  .rayde-post .rp-hero { padding-top: 24px; padding-bottom: 22px; }
  .rayde-post .rp-cover { padding-inline: 0; margin-bottom: 28px; }
  .rayde-post .rp-cover img { border-radius: 0; }
  .rayde-post .rp-faq { padding: 22px 18px 6px; margin-inline: -20px; }
  .rayde-post .rp-cta { flex-direction: column; align-items: stretch; gap: 18px; padding: 22px 20px 20px; margin-inline: -20px; border-inline-start: 0; border-top: 4px solid var(--red); }
  .rayde-post .rp-cta-text { flex: 0 0 auto; }
  .rayde-post .rp-cta h2 { font-size: 20px; line-height: 1.6; margin-bottom: .25em; }
  .rayde-post .rp-cta p { font-size: 15px; line-height: 1.85; }
  .rayde-post .rp-cta-actions { flex: 0 0 auto; }
  .rayde-post a.rp-btn { padding: 13px 16px; white-space: normal; }
  .rayde-post .rp-article { padding-bottom: 40px; }
  .rayde-post .rp-related { padding: 40px 0 44px; }
  .rayde-post .rp-grid { grid-template-columns: 1fr; gap: 26px; }

  /* tables: one card per row, header text shown as a label above each value */
  .rayde-post .rp-content table.rp-stack { display: block; overflow: visible; border: 0; font-size: 16px; }
  .rayde-post .rp-content table.rp-stack tbody,
  .rayde-post .rp-content table.rp-stack thead,
  .rayde-post .rp-content table.rp-stack tr,
  .rayde-post .rp-content table.rp-stack td,
  .rayde-post .rp-content table.rp-stack th { display: block; width: 100%; }
  .rayde-post .rp-content table.rp-stack tr.rp-head,
  .rayde-post .rp-content table.rp-stack thead tr { display: none; }
  .rayde-post .rp-content table.rp-stack tr { margin: 0 0 14px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: #fff; }
  .rayde-post .rp-content table.rp-stack td,
  .rayde-post .rp-content table.rp-stack th { border: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; background: #fff !important; color: #2b2b2b; font-weight: 400; }
  .rayde-post .rp-content table.rp-stack td:last-child { border-bottom: 0; }
  .rayde-post .rp-content table.rp-stack td:first-child { background: var(--wash) !important; font-weight: 700; color: var(--ink); }
  .rayde-post .rp-content table.rp-stack td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 13px; font-weight: 400; color: var(--steel); }
  .rayde-post .rp-content table.rp-stack td:first-child::before { display: none; }
  .rayde-post .rp-callbar { display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 99; padding: 13px; text-align: center; font-weight: 700; color: #fff; background: var(--red); text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { .rayde-post .rp-q summary::after { transition: none; } }
