@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  /* هوية المعرض: بني موف + رملي ذهبي + خوخي */
  --green: #6b5a5c;
  --green-2: #57484a;
  --green-soft: #f3ebe4;
  --gold: #d9a866;
  --gold-soft: #f6ead6;
  --peach: #d4a088;
  --ink: #3a3031;
  --muted: #7a6d6e;
  --line: #e8dfd6;
  --bg: #fbf8f4;
  --card: #ffffff;
  --danger: #b42318;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}
a { color: var(--green); }

/* الرأس */
.site-header {
  background: #fff;
  border-bottom: 4px solid var(--gold);
  color: var(--ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--green); text-decoration: none; }
.brand-logo { height: 58px; width: auto; display: block; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--gold); display: grid; place-items: center;
  font-weight: 800; color: var(--gold); font-size: 20px; flex: none;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.brand-title { font-weight: 800; font-size: 18px; line-height: 1.3; }
.brand-sub { font-size: 13px; opacity: .8; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--green); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--gold-soft); }

.wrap { max-width: 980px; margin: 0 auto; }
main.wrap { padding: 28px 20px 60px; }
.narrow { max-width: 760px; }

/* الصفحة الرئيسية */
.hero {
  background: var(--gold) url('/assets/hero.jpg') center / cover no-repeat;
  border-radius: 22px; padding: 36px 24px; display: grid; place-items: center; text-align: center;
}
.hero-panel {
  background: rgba(255,252,248,.92); border-radius: 18px; padding: 26px 30px; max-width: 640px;
  box-shadow: 0 12px 30px rgba(87,72,74,.18);
}
.hero-logo { width: min(320px, 80%); height: auto; display: block; margin: 0 auto 14px; }
.hero h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hero p { margin: 0; color: var(--ink); font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 26px; }
.card-link {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,81,50,.10); border-color: var(--gold); }
.card-link h2 { margin: 0 0 6px; font-size: 20px; color: var(--green); }
.card-link p { margin: 0; color: var(--muted); font-size: 15px; }
.card-link .go { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--green); }
.card-link.primary { border-top: 5px solid var(--gold); }

/* النماذج */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.form-head { background: var(--green) linear-gradient(135deg, rgba(217,168,102,.18), transparent 60%); color: #fff; padding: 24px 26px; border-bottom: 5px solid var(--gold); }
.form-head h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.4; }
.form-head p { margin: 0; opacity: .9; font-size: 15px; }
form.body { padding: 10px 26px 26px; }
.field { padding: 16px 0; border-bottom: 1px solid var(--line); }
.field:last-of-type { border-bottom: 0; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 8px; }
.req { color: var(--gold); margin-inline-start: 3px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], textarea, select {
  width: 100%; font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
input[type=tel], input[type=email] { direction: ltr; text-align: right; }
textarea { min-height: 110px; resize: vertical; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-block; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; cursor: pointer; transition: all .12s; user-select: none;
}
.choice input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px var(--green-soft); }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 5px; accent-color: var(--green); flex: none; }

.file-drop {
  display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center;
  cursor: pointer; color: var(--muted); background: #fcfcfa;
}
.file-drop:hover { border-color: var(--green); }
.file-drop input { display: none; }
.file-drop.has-file { border-style: solid; border-color: var(--green); color: var(--green); background: var(--green-soft); }

.btn {
  font: inherit; font-weight: 700; border: 2px solid var(--gold); background: var(--green); color: #fff;
  padding: 12px 28px; border-radius: 12px; cursor: pointer; font-size: 18px;
}
.btn:hover { background: var(--green-2); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.secondary { background: #fff; color: var(--green); border-color: var(--line); font-size: 15px; padding: 8px 16px; }
.btn.danger { background: #fff; color: var(--danger); border-color: #f1c4c0; font-size: 14px; padding: 6px 12px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

.alert { border-radius: 10px; padding: 12px 16px; margin-top: 14px; }
.alert.error { background: #fdecea; color: var(--danger); border: 1px solid #f5c2bd; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* التقويم */
.calendar { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--green-soft); }
.cal-head strong { font-size: 17px; color: var(--green); }
.cal-nav { background: #fff; border: 1px solid var(--line); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 18px; color: var(--green); }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 10px; }
.cal-dow { text-align: center; font-size: 13px; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1 / 1; max-height: 52px; border: 0; border-radius: 10px; background: transparent; font: inherit;
  color: #b5beb9; cursor: default;
}
.cal-day.open { background: var(--green-soft); color: var(--green); font-weight: 700; cursor: pointer; }
.cal-day.open:hover { outline: 2px solid var(--green); }
.cal-day.full { color: #b5beb9; text-decoration: line-through; }
.cal-day.selected { background: var(--green); color: #fff; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 14px; }
.slot {
  font: inherit; border: 1.5px solid var(--green); color: var(--green); background: #fff; border-radius: 10px;
  padding: 8px 16px; cursor: pointer; font-weight: 700;
}
.slot[disabled] { border-color: var(--line); color: #b5beb9; text-decoration: line-through; cursor: not-allowed; }
.slot.selected { background: var(--green); color: #fff; }
.slots-title { padding: 0 12px 6px; font-size: 15px; color: var(--muted); }
.picked {
  margin-top: 10px; background: var(--green); color: #fff; border-radius: 10px; padding: 10px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.picked button { background: none; border: 0; color: var(--gold); font: inherit; cursor: pointer; text-decoration: underline; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); padding: 0 12px 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-inline-end: 4px; }

/* صفحة النجاح */
.success { text-align: center; padding: 40px 26px; }
.success .tick {
  width: 72px; height: 72px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; font-size: 38px; margin: 0 auto 12px; border: 3px solid var(--gold);
}
.success h2 { color: var(--green); margin: 0 0 8px; }
.ref { display: inline-block; font-size: 22px; letter-spacing: 3px; font-weight: 800; background: var(--gold-soft); padding: 6px 16px; border-radius: 10px; direction: ltr; }
.success .links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.success .links a { text-decoration: none; }

footer.site-footer { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 16px 40px; }

[hidden] { display: none !important; }
input.short { max-width: 200px; }
.legend i.lg-open { background: var(--green-soft); }
.legend i.lg-closed { background: #eef0ef; }
#role_other { margin-top: 10px; }

.site-footer .credit {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 13px; color: var(--muted);
}
.site-footer .credit img { width: 28px; height: auto; display: block; }
.site-footer .credit strong { color: #0b1a3a; letter-spacing: .5px; }

/* إرشادات الزيارة */
.guide {
  position: relative; overflow: hidden; margin-bottom: 22px;
  background: #fffaf3; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 10px 28px rgba(87,72,74,.08);
}
.guide-head {
  background: var(--gold) url('/assets/hero.jpg') center / cover no-repeat;
  padding: 30px 26px 28px; text-align: center; position: relative;
}
.guide-head::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(107,90,92,.55), rgba(87,72,74,.82)); }
.guide-head > * { position: relative; }
.guide-kicker {
  display: inline-block; background: rgba(255,250,243,.95); color: var(--green); font-weight: 800; font-size: 14px;
  padding: 4px 16px; border-radius: 999px; margin-bottom: 12px; border: 1px solid var(--gold);
}
.guide-head h2 { margin: 0 0 8px; color: #fff; font-size: clamp(21px, 3.2vw, 27px); line-height: 1.5; font-weight: 800; }
.guide-head p { margin: 0 auto; max-width: 560px; color: #fdf6ec; font-size: 16px; }
.guide-list {
  list-style: none; margin: 0; padding: 22px; counter-reset: g;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (max-width: 640px) { .guide-list { grid-template-columns: 1fr; padding: 16px; } }
.guide-list li {
  counter-increment: g; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  font-size: 15.5px; line-height: 1.6; position: relative;
}
.guide-list li::after {
  content: counter(g); position: absolute; top: 8px; left: 10px;
  font-size: 12px; font-weight: 800; color: var(--gold);
}
.g-ico {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-soft); border: 1px solid #ecd9b8;
}
.g-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--green); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.g-ico svg .x { stroke: #b4533a; stroke-width: 2; }
.guide-foot {
  margin: 0; padding: 14px 22px 20px; text-align: center; color: var(--green); font-weight: 700; font-size: 16px;
  border-top: 1px dashed #e6d6bf;
}
.guide-foot::before, .guide-foot::after { content: '❖'; color: var(--gold); margin: 0 10px; font-size: 13px; }
.guide-list li { padding-inline-end: 30px; }
