/* ============================================================
   Takamul — shared theme (matched to the Muathren site)
   Dark palette, silver-gradient accents, Tajawal font.
   ============================================================ */
:root {
  --bg: #050505;
  --bg-2: #0b0b0d;
  --text: #ffffff;
  --muted: #a9a9ad;
  --dim: #6f6f76;
  --silver-1: #e9e9ec;
  --silver-2: #b8b8bd;
  --silver-3: #6f6f76;
  --silver-4: #2a2a2e;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --header-h: 68px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  /* Clash Display for Latin; Arabic glyphs fall back to Tajawal automatically */
  font-family: "Clash Display", "Tajawal", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(220, 220, 220, 0.06), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(220, 220, 220, 0.05), transparent 60%),
    #000;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* silver-gradient text helper */
.silver-text {
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 55%, #7a7a7d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* keep the header layout identical on RTL pages (Muathren) */
  direction: ltr;
  padding: 0 32px;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand-link {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.16em;
  text-decoration: none;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 55%, #7a7a7d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}
/* landing page: no nav, center the logo */
.landing-header { justify-content: center; }

/* ---------- Services page ---------- */
.services-title {
  text-align: center;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.05;
}
.services-sub {
  text-align: center;
  margin-top: 10px;
  color: var(--silver-3);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 13px;
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 60px;
  max-width: 1000px;
  margin: 56px auto 0;
}
.service-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 18px;
}
.service-head::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: var(--silver-1);
}
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-list li {
  position: relative;
  padding-right: 20px;
  color: var(--silver-1);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.55;
}
.service-list li::before {
  content: "•";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--silver-3);
}
@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; gap: 34px; }
}

/* Services — editorial numbered list */
.s2-wrap { max-width: 940px; margin: 46px auto 0; }
.s2-row { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: start; padding: 36px 0; border-top: 1px solid var(--border); }
.s2-row:last-child { border-bottom: 1px solid var(--border); }
.s2-num { font-family: "Clash Display", sans-serif; font-size: clamp(3rem, 7vw, 5rem); font-weight: 700; line-height: .85;
  background: linear-gradient(180deg, #fff, #7a7a7d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.s2-head { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; color: #fff; margin-bottom: 16px; }
.s2-items { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.s2-items span { padding: 9px 18px; border: 1px solid var(--border); border-radius: 999px; color: var(--silver-1); font-size: .95rem;
  transition: border-color .2s, background .2s; }
.s2-items span:hover { border-color: rgba(255,255,255,.4); background: var(--glass); }
@media (max-width: 560px) { .s2-row { grid-template-columns: 1fr; gap: 12px; } }

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav a:hover {
  color: var(--text);
  background: var(--glass);
}

.nav a.active {
  color: #0a0a0c;
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
}

/* ---------- Page ---------- */
.page {
  min-height: calc(100vh - var(--header-h));
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 32px;
}

.page h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 55%, #7a7a7d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page .subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
}

/* silver divider under headings */
.page h1 + .subtitle::after {
  content: "";
  display: block;
  margin-top: 20px;
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--silver-1), transparent);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

/* Empty-state / placeholder */
.content {
  margin-top: 40px;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 30, 32, 0.55), rgba(10, 10, 12, 0.78));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 24px;
}

/* ---------- Blog feed ---------- */
.feed {
  margin: 40px auto 0;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.post-card {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 30, 32, 0.55), rgba(10, 10, 12, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* silver gradient hairline border */
.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.25) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 255, 255, 0.05);
}

.post-card:hover::before { opacity: 1; }

.post-media {
  display: block;
  max-width: 100%;
  max-height: 600px;
  height: auto;
  margin: 16px auto;
  border-radius: 12px;
  background: #000;
}

.post-body { padding: 26px 28px; }

.post-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
}

.post-heading {
  margin: 20px 0 4px;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.post-text {
  margin: 8px 0;
  color: var(--silver-1);
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.post-date {
  display: block;
  margin-top: 18px;
  color: var(--dim);
  font-size: 13px;
}

/* ---------- Cards (full photo, title overlaid, masonry) ---------- */
.events-grid {
  margin: 40px auto 0;
  max-width: 1220px;
  column-gap: 20px;
  column-count: 4;
}
.events-grid .content { column-span: all; }
@media (max-width: 1100px) { .events-grid { column-count: 3; } }
@media (max-width: 760px)  { .events-grid { column-count: 2; } }
@media (max-width: 460px)  { .events-grid { column-count: 1; } }

.event-card {
  display: block;
  position: relative;
  break-inside: avoid;
  margin: 0 0 20px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #0b0b0d;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9); }

/* the full main photo — no cropping */
.event-photo { width: 100%; height: auto; display: block; }
.event-photo.empty {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver-2);
  font-weight: 800;
  letter-spacing: 0.16em;
  background:
    radial-gradient(120% 90% at 50% 15%, rgba(150, 190, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #1a1a1f, #0b0b0d);
}

.event-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 46px 18px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 8%, rgba(0, 0, 0, 0.45) 55%, transparent);
}
.event-overlay h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.event-overlay time {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

/* ---------- Event detail page ---------- */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
}
/* full-bleed event detail: content border reaches the screen edges */
.page-full {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.page-full .article-wrap { max-width: none; }
.page-full .back-link { margin-left: 20px; }
.page-full .post-card { border-radius: 0; border-left: none; border-right: none; }
.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--silver-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s;
}
.back-link:hover { color: #fff; }

/* ---------- Forms / buttons ---------- */
.form {
  margin-top: 28px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 22, 0.6);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.form textarea { resize: vertical; }

.form input::placeholder,
.form textarea::placeholder { color: var(--dim); }

.file-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Block editor ---------- */
.blocks { display: flex; flex-direction: column; gap: 12px; }
.blocks-hint { font-size: 14px; padding: 4px 2px; }

.editor-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(20, 20, 22, 0.6);
  padding: 12px 14px;
}
.editor-block .bhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.editor-block .btype {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--silver-2);
  font-weight: 700;
}
.editor-block .bctrls { display: flex; gap: 4px; }
.editor-block .bctrls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--silver-1);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.editor-block .bctrls button:hover { background: var(--glass); border-color: rgba(255,255,255,0.3); }
.editor-block .bbody input,
.editor-block .bbody textarea { width: 100%; }
.editor-block .bbody { display: flex; flex-direction: column; gap: 8px; }
.editor-block .bprev img {
  max-width: 160px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.editor-block .bprev { color: var(--muted); font-size: 13px; }

.add-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Builder layout ---------- */
.builder { max-width: 720px; }
.builder-top { display: flex; flex-direction: column; gap: 14px; }
.cover-field { display: flex; flex-direction: column; gap: 8px; }
.cover-label { color: var(--muted); font-size: 14px; }
.cover-drop {
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(20, 20, 22, 0.5);
  overflow: hidden;
  color: var(--dim);
  font-size: 14px;
}
.cover-drop:hover { border-color: rgba(255, 255, 255, 0.3); }
.cover-prev img { max-height: 220px; max-width: 100%; border-radius: 10px; display: block; }

.builder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.view-toggle { display: flex; gap: 4px; }
.view-toggle button,
.preview-controls button {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.view-toggle button.on,
.preview-controls button.on {
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
  color: #0a0a0c;
  border-color: transparent;
}

/* drag handle + states */
.editor-block .bhead { gap: 8px; }
.editor-block .drag {
  cursor: grab;
  user-select: none;
  color: var(--dim);
  font-size: 18px;
  margin-right: auto;
  line-height: 1;
}
.editor-block .btype { margin-right: auto; }
.editor-block.dragging { opacity: 0.45; }
.editor-block.drop-hint { border-color: var(--silver-2); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14); }

/* album thumbnails in the editor */
.alb-thumbs { display: inline-flex; flex-wrap: wrap; gap: 8px; max-width: 100%; vertical-align: top; }
.alb-thumb { position: relative; width: 72px; height: 72px; }
.alb-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.alb-thumb button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #ff6b6b;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

/* preview pane */
.preview-controls { display: flex; gap: 6px; margin-bottom: 12px; }
.preview-frame {
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(10, 10, 12, 0.5);
  overflow: hidden;
  transition: max-width 0.3s ease;
}
.preview-frame.desktop { max-width: 100%; }
.preview-frame.mobile { max-width: 390px; }

/* ---------- Post cover / album / link (public + preview) ---------- */
.post-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 14px;
}
/* inline-flex so the block can be aligned left / center / right via the wrapper's text-align */
.album-grid {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  max-width: 100%;
  vertical-align: top;
}
.album-img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
@media (max-width: 460px) { .album-img { width: 44vw; height: 44vw; } }
.post-link {
  display: inline-block;
  margin: 12px 10px 12px 0;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
  color: #0a0a0c;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.post-link:hover { box-shadow: 0 0 22px rgba(255, 255, 255, 0.25); transform: translateY(-1px); }

/* ---------- Public layout (rows / columns from the builder) ---------- */
.pb-row { display: flex; flex-wrap: wrap; gap: 22px; margin: 4px 0; }
.pb-col { flex: 1 1 220px; min-width: 0; }
.pb-el-r { margin: 6px 0; }
.pb-el-r .post-media { margin: 12px 0; display: inline-block; }
@media (max-width: 680px) { .pb-col { flex-basis: 100%; } }

/* ============================================================
   Visual builder (admin)
   ============================================================ */
.pb-settings { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; max-width: 620px; }

.pb-devicebar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 18px 0 12px;
}
.device-toggle, .pb-actions { display: flex; gap: 6px; }
.device-toggle button {
  width: 40px; height: 34px; border: 1px solid var(--border); border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 15px; cursor: pointer;
}
.device-toggle button.on { background: linear-gradient(180deg,#fff,#cfcfd4); color: #0a0a0c; border-color: transparent; }
.btn-ghost.small { padding: 7px 12px; font-size: 13px; }

.pb-wrap { display: flex; gap: 18px; align-items: flex-start; }

.pb-palette {
  width: 168px; flex: 0 0 168px; position: sticky; top: 82px;
  display: flex; flex-direction: column; gap: 8px;
}
.palette-title { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--silver-2); font-weight: 700; }
.palette-list { display: flex; flex-direction: column; gap: 8px; }
.widget {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(20,20,22,0.6); color: var(--silver-1); font-size: 14px; font-weight: 600;
  cursor: grab; user-select: none;
}
.widget:hover { border-color: rgba(255,255,255,0.3); background: rgba(30,30,34,0.7); }
.palette-hint { font-size: 12px; color: var(--dim); margin-top: 4px; }

.pb-main { flex: 1; min-width: 0; }
.pb-stage {
  margin: 0 auto; border: 1px solid var(--border); border-radius: 16px;
  background: rgba(10,10,12,0.4); padding: 16px; transition: max-width .3s ease;
}
.pb-stage.desktop { max-width: 100%; }
.pb-stage.tablet { max-width: 820px; }
.pb-stage.mobile { max-width: 390px; }

/* canvas rows/cols (editor chrome) */
.pb-canvas .pb-row {
  display: block; position: relative;
  border: 1px dashed rgba(255,255,255,0.12); border-radius: 12px;
  padding: 30px 12px 12px; margin-bottom: 14px;
}
.pb-row-tools { position: absolute; top: 6px; right: 8px; display: flex; gap: 6px; align-items: center; }
.pb-row-handle { cursor: grab; color: var(--dim); user-select: none; }
.pb-row-tools button {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 7px; padding: 3px 8px; font-size: 12px; cursor: pointer;
}
.pb-cols { display: flex; flex-wrap: wrap; gap: 12px; }
.pb-canvas .pb-col {
  flex: 1 1 150px; min-width: 0; min-height: 64px;
  border: 1px dashed rgba(255,255,255,0.10); border-radius: 9px; padding: 8px;
}
.pb-stage.mobile .pb-col { flex-basis: 100%; }

.pb-el { position: relative; border: 1px solid transparent; border-radius: 9px; padding: 8px; margin: 4px 0; }
.pb-el:hover { border-color: var(--border); background: rgba(255,255,255,0.02); }
.el-toolbar {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  opacity: 0; transition: opacity .15s;
}
.pb-el:hover .el-toolbar { opacity: 1; }
.el-drag { cursor: grab; color: var(--dim); user-select: none; }
.el-type { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-right: auto; }
.el-align { display: flex; gap: 2px; }
.el-align button, .el-del {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 6px; width: 24px; height: 24px; font-size: 12px; cursor: pointer; line-height: 1;
}
.el-align button.on { background: var(--glass); color: #fff; }
.el-del { color: #ff8a8a; }

.el-content [contenteditable] { outline: none; min-height: 1.2em; }
[contenteditable]:empty:before { content: attr(data-ph); color: var(--dim); }
.pb-h { font-size: 19px; font-weight: 800; color: #fff; }
.pb-t { color: var(--silver-1); font-size: 16px; line-height: 1.7; white-space: pre-wrap; }
.el-content .ph {
  color: var(--dim); font-size: 14px; padding: 22px; text-align: center;
  border: 1px dashed var(--border); border-radius: 8px; cursor: pointer;
}
.el-content { position: relative; }
.media-replace {
  position: absolute; top: 8px; right: 8px; padding: 5px 10px; font-size: 12px;
  border: none; border-radius: 7px; background: rgba(0,0,0,0.65); color: #fff; cursor: pointer;
}
.pb-btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(180deg,#fff,#cfcfd4); color: #0a0a0c; font-weight: 700; outline: none;
}
.btn-url { margin-top: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: rgba(20,20,22,0.6); color: var(--text); font: inherit; font-size: 13px; }
.pb-spacer { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 6px, transparent 6px 12px); border-radius: 6px; }
.sp-ctrl { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 6px; color: var(--dim); font-size: 12px; }
.sp-ctrl button { width: 24px; height: 24px; border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; }

.add-row-btn {
  width: 100%; padding: 12px; margin-top: 6px; border: 1px dashed var(--border);
  border-radius: 12px; background: transparent; color: var(--muted); font: inherit;
  font-weight: 600; cursor: pointer;
}
.add-row-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }

.sortable-ghost { opacity: 0.4; }
.sortable-drag { opacity: 0.9; }

@media (max-width: 680px) {
  .pb-wrap { flex-direction: column; }
  .pb-palette { width: 100%; flex: none; position: static; flex-direction: row; flex-wrap: wrap; }
  .palette-list { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Photo bar (slideshow) ---------- */
/* keep the controls LTR so the ‹ › arrows don't mirror/swap on RTL pages */
.photobar { position: relative; display: inline-block; direction: ltr; width: min(100%, 680px); vertical-align: top; margin: 16px 0; border-radius: 12px; overflow: hidden; background: #000; }
.pbar-track { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.pbar-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.5s ease;
}
.pbar-slide.on { opacity: 1; }
.pbar-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pbar-nav.prev { left: 10px; }
.pbar-nav.next { right: 10px; }
.pbar-nav:hover { background: rgba(0, 0, 0, 0.78); }
.pbar-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pbar-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); cursor: pointer; }
.pbar-dot.on { background: #fff; }

/* ---------- Lightbox (tap a photo to enlarge) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.on { display: flex; }
.lb-img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }
.lb-close {
  position: absolute; top: 16px; right: 20px; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 20px; cursor: pointer;
}

/* links applied to a whole text/heading block */
.post-textlink { text-decoration: none; color: inherit; }
.post-textlink:hover .post-heading,
.post-textlink:hover .post-text { text-decoration: underline; }

/* ---------- Builder extras ---------- */
.date-field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.date-field input { color-scheme: dark; }
.pb-el .el-content .post-media { display: inline-block; max-width: 100%; }
.el-linkrow { margin-top: 8px; }
.el-link { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: rgba(20,20,22,0.6); color: var(--text); font: inherit; font-size: 13px; }
.el-linkbtn { border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 6px; width: 24px; height: 24px; font-size: 12px; cursor: pointer; }
.el-linkbtn.on { background: var(--glass); color: #fff; }

.btn-primary {
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
  color: #0a0a0c;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-primary:hover {
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--silver-1);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.55); color: #fff; }

/* ---------- Admin ---------- */
.status {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status.error { color: #ff8a8a; }

.muted { color: var(--muted); }

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stages-title {
  margin-top: 48px;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}

.post-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-list .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(20, 20, 22, 0.6);
}

.post-list .tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0a0a0c;
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
  padding: 3px 10px;
  border-radius: 999px;
}

.post-list .row-title { flex: 1; }

.post-list .del {
  border: 1px solid var(--border);
  background: transparent;
  color: #ff8a8a;
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.post-list .del:hover { background: rgba(255, 138, 138, 0.1); }

/* ============================================================
   Shared background + hero + scroll effects
   ============================================================ */
section { position: relative; z-index: 1; }
.page { position: relative; z-index: 1; }

/* full-viewport background layer — fixed so the starfield covers the whole page as you scroll */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* twinkling stars */
.twinkle-star {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.twinkle-star::before,
.twinkle-star::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 50%;
}
.twinkle-star::before {
  width: var(--size, 2px);
  height: var(--size, 2px);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 14px rgba(255, 255, 255, 0.5);
}
.twinkle-star::after {
  width: calc(var(--size, 2px) * 6);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}
.twinkle-star .cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  width: calc(var(--size, 2px) * 6);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50%      { opacity: var(--peak, 0.9); transform: scale(1); }
}

/* shooting star */
.shooting-star {
  position: absolute;
  top: var(--y, 20%);
  left: -15%;
  width: 180px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85));
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.65));
  opacity: 0;
  animation: shoot var(--sdur, 22s) linear var(--sdelay, 0s) infinite;
  pointer-events: none;
  z-index: 0;
  transform: rotate(18deg);
  border-radius: 2px;
}
@keyframes shoot {
  0%   { transform: translateX(0) rotate(18deg); opacity: 0; }
  6%   { opacity: 1; }
  55%  { opacity: 1; }
  70%  { transform: translateX(140vw) rotate(18deg); opacity: 0; }
  100% { transform: translateX(140vw) rotate(18deg); opacity: 0; }
}

/* ---------- Planets: wireframe / blueprint with orbital rings ---------- */
.orb {
  position: absolute;
  width: var(--osize, 80px);
  height: var(--osize, 80px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  background: radial-gradient(circle at 50% 50%, rgba(150, 190, 255, 0.05), transparent 70%);
  border: 1.5px solid rgba(190, 215, 255, 0.55);
  box-shadow: 0 0 14px rgba(150, 190, 255, 0.28), inset 0 0 14px rgba(150, 190, 255, 0.12);
  animation: spin var(--odur, 40s) linear infinite;
  animation-delay: var(--odelay, 0s);
}
.orb::before {
  content: "";
  position: absolute;
  inset: -30% -58%;
  border-radius: 50%;
  border: 1px solid rgba(185, 212, 255, 0.42);
  transform: rotate(-24deg);
  pointer-events: none;
}
.orb::after {
  content: "";
  position: absolute;
  inset: -48% -74%;
  border-radius: 50%;
  border: 1px dashed rgba(185, 212, 255, 0.22);
  transform: rotate(-24deg);
  pointer-events: none;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* kept for the local home-style previews that still reference it */
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(14px, -12px); }
}

/* ---------- Hero / intro splash ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 2rem;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 300px at 50% 45%, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.25));
}
.brand-en {
  font-family: "Clash Display", sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 55%, #7a7a7d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  position: relative;
}
.brand-en::before {
  content: "'";
  position: absolute;
  top: -0.1em;
  right: -0.4em;
  color: #fff;
  font-weight: 300;
}
.brand-ar {
  font-family: "Tajawal", sans-serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.35em;
  color: #fff;
  opacity: 0.95;
}
.brand.small .brand-en { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.brand.small .brand-ar { font-size: clamp(1.2rem, 3vw, 1.6rem); }

/* hero logo image (replaces the typographic wordmark) */
.hero-logo {
  width: clamp(240px, 42vw, 620px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 26px rgba(255, 255, 255, 0.22));
}
.hero-logo.small { width: clamp(170px, 28vw, 300px); }

/* landing-page entry buttons */
.landing-buttons {
  margin-top: 2.4rem;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.land-btn {
  padding: 14px 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.land-btn:hover {
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
  color: #0a0a0c;
  border-color: transparent;
  transform: translateY(-2px);
}
@media (max-width: 460px) {
  .landing-buttons { gap: 10px; }
  .land-btn { padding: 12px 22px; font-size: 15px; }
}

.tagline {
  margin-top: 3rem;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  color: var(--silver-1);
  letter-spacing: 0.02em;
}
.sub-tagline {
  margin-top: 0.6rem;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--silver-3);
  font-weight: 300;
}
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: dropDown 2.4s ease-in-out infinite;
}
@keyframes dropDown {
  0%   { transform: translateY(-20px); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateY(20px); opacity: 0; }
}

/* ---------- Scroll-reveal "shine" text ---------- */
.scroll-type {
  position: relative;
  display: inline-block;
}
.scroll-type .st-ghost {
  color: rgba(255, 255, 255, 0.10);
}
.scroll-type .st-fill {
  position: absolute;
  inset: 0;
  color: #fff;
  /* hidden, revealed right→left (Arabic-safe) */
  clip-path: inset(0 0 0 100%);
  transition: clip-path 1.1s cubic-bezier(0.22, 0.7, 0.2, 1);
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.scroll-type.done .st-fill {
  clip-path: inset(0 0 0 0);
}

/* fade-in reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Style-variant switcher (local home previews only) ---------- */
.style-switch {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--silver-1);
  letter-spacing: 0.02em;
  direction: ltr;
}
.style-switch .label {
  margin-right: 6px;
  color: var(--silver-2);
  white-space: nowrap;
}
.style-switch a {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.style-switch a:hover { background: var(--glass); color: #fff; }
.style-switch a.on {
  background: linear-gradient(180deg, #ffffff, #cfcfd4);
  color: #0a0a0c;
}

/* ============================================================
   Mobile / responsive
   ============================================================ */
@media (max-width: 680px) {
  :root { --header-h: 58px; }
  /* on phones, anchor the intro brand near the top instead of centering it */
  .hero { justify-content: flex-start; padding-top: 5.5rem; }
  .site-header { padding: 0 14px; }
  .brand-link { font-size: 16px; letter-spacing: 0.1em; }
  .brand-logo { height: 27px; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 11px; font-size: 13px; }
  .page { padding: 44px 18px; }
  .feed { grid-template-columns: 1fr; gap: 18px; }
  .form { max-width: 100%; }
  .admin-bar { gap: 10px; }
  .tagline { margin-top: 2rem; }
  .style-switch { font-size: 12px; padding: 7px 10px; }
  .style-switch a { width: 24px; height: 24px; }
}
@media (max-width: 420px) {
  .brand-link { font-size: 14px; letter-spacing: 0.06em; }
  .nav a { padding: 6px 8px; font-size: 12px; }
  .site-header { padding: 0 10px; }
  .post-media-wrap.multi { grid-template-columns: 1fr; }
}
