/* ===== منصة حسين عقيل — تصميم الموقع ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #c9a227;
  --gold-2: #e8c96a;
  --ink: #17130c;
  --ink-2: #2b2416;
  --paper: #fdfaf3;
  --muted: #7a7060;
  --radius: 18px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
}

.container { max-width: 1150px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.center { text-align: center; margin-top: 26px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }

/* ---- أزرار ---- */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 10px 22px; border-radius: 999px; transition: all .25s;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #a8821a);
  color: #fff; box-shadow: 0 6px 18px rgba(201, 162, 39, .35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201, 162, 39, .45); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid rgba(23, 19, 12, .2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-lg { padding: 14px 34px; font-size: 17px; }
.btn-mini { padding: 6px 14px; font-size: 13px; }

/* ---- الهيدر ---- */
.site-nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  background: rgba(253, 250, 243, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(23, 19, 12, .07);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { font-weight: 900; font-size: 20px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), #8f6d12); color: #fff; font-size: 18px;
}
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--gold); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---- الهيرو ---- */
.hero {
  position: relative; overflow: hidden; padding: 150px 0 90px;
  background: radial-gradient(1200px 600px at 70% -10%, #2e2410 0%, #17130c 55%);
  color: #fdf8ec; text-align: center;
}
.hero-stars {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #e8c96a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 20%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 85% 60%, #e8c96a 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 10% 80%, #e8c96a 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: .7; } }
.hero-inner { position: relative; }
.hero-pill {
  display: inline-block; padding: 8px 18px; border-radius: 999px; font-size: 14px;
  background: rgba(232, 201, 106, .12); border: 1px solid rgba(232, 201, 106, .4); color: var(--gold-2);
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 5.5vw, 54px); font-weight: 900; line-height: 1.35; }
.grad {
  background: linear-gradient(90deg, var(--gold-2), #f7e7b3, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 640px; margin: 18px auto 30px; font-size: 18px; color: #d9cfb8; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-ghost { color: #fdf8ec; border-color: rgba(253, 248, 236, .35); }
.hero .btn-ghost:hover { border-color: var(--gold-2); color: var(--gold-2); }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.stat b { display: block; font-size: 26px; color: var(--gold-2); }
.stat span { font-size: 13px; color: #b8ac92; }

/* ---- الأقسام ---- */
.section { padding: 80px 0; }
.section-alt { background: #f4eee0; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 900; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 40px; font-size: 16px; }
.group-title { margin: 26px 0 14px; font-size: 20px; }
.group-title small { color: var(--muted); font-weight: 400; font-size: 13px; margin-inline-start: 8px; }

/* ---- بطاقات القوالب ---- */
.tpl-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 250px;
  gap: 18px; overflow-x: auto; padding: 10px 4px 20px;
  scroll-snap-type: x mandatory;
}
.tpl-row::-webkit-scrollbar { height: 8px; }
.tpl-row::-webkit-scrollbar-thumb { background: #d9cba5; border-radius: 4px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tpl-card {
  position: relative; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 6px 22px rgba(23, 19, 12, .08); scroll-snap-align: start;
  transition: transform .25s, box-shadow .25s;
}
.tpl-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(23, 19, 12, .14); }
.tpl-badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
  background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
}
.tpl-info { padding: 14px 16px 18px; }
.tpl-info b { font-size: 17px; }
.tpl-info p { color: var(--muted); font-size: 13px; margin: 4px 0 12px; min-height: 38px; }
.tpl-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- رسومات القوالب المصغّرة ---- */
.tpl-art {
  height: 150px; position: relative; overflow: hidden;
  background: var(--tb); display: grid; place-items: center;
}
.tpl-glyph { position: relative; display: block; }

/* أبواب — صور فنية حقيقية */
.tpl-art-bab-alfarah, .tpl-art-classic, .tpl-art-palace {
  background-size: cover; background-position: center 20%;
}
.tpl-art-bab-alfarah { background-image: url('/img/door-bab-alfarah.jpg'); }
.tpl-art-classic { background-image: url('/img/door-classic.jpg'); }
.tpl-art-palace { background-image: url('/img/door-palace.jpg'); }
.tpl-art-bab-alfarah .tpl-glyph, .tpl-art-classic .tpl-glyph, .tpl-art-palace .tpl-glyph { display: none; }
/* مظاريف */
.tpl-art-letter .tpl-glyph, .tpl-art-pink-dream .tpl-glyph, .tpl-art-swan-lake .tpl-glyph, .tpl-art-rose .tpl-glyph {
  width: 104px; height: 68px; background: linear-gradient(180deg, #fff, #f1e8dc);
  border-radius: 8px; box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}
.tpl-art-letter .tpl-glyph::before, .tpl-art-pink-dream .tpl-glyph::before, .tpl-art-swan-lake .tpl-glyph::before, .tpl-art-rose .tpl-glyph::before {
  content: ''; position: absolute; inset: 0;
  clip-path: polygon(0 0, 50% 55%, 100% 0);
  background: var(--tc); border-radius: 8px 8px 0 0;
}
.tpl-art-letter .tpl-glyph::after, .tpl-art-pink-dream .tpl-glyph::after, .tpl-art-swan-lake .tpl-glyph::after, .tpl-art-rose .tpl-glyph::after {
  content: '✦'; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 15px;
}
/* الخاتم */
.tpl-art-ring .tpl-glyph { font-size: 56px; }
.tpl-art-ring .tpl-glyph::before { content: '💍'; filter: drop-shadow(0 0 14px rgba(255, 200, 220, .8)); }
/* النجوم */
.tpl-art-starry .tpl-glyph { font-size: 46px; }
.tpl-art-starry .tpl-glyph::before { content: '🌙'; filter: drop-shadow(0 0 16px rgba(244, 211, 94, .9)); }
.tpl-art-starry { background: radial-gradient(circle at 30% 30%, #14224a, var(--tb)); }
/* هديل */
.tpl-art-hadeel .tpl-glyph { font-size: 50px; }
.tpl-art-hadeel .tpl-glyph::before { content: '🕊️'; }
/* وصال */
.tpl-art-wisal .tpl-glyph { font-size: 44px; letter-spacing: -8px; }
.tpl-art-wisal .tpl-glyph::before { content: '🤍✨🤍'; }
/* روزنة */
.tpl-art-rozana .tpl-glyph {
  width: 84px; height: 104px; background: linear-gradient(180deg, #fff8ec, #f3e3c8);
  border-radius: 6px; box-shadow: 0 8px 16px rgba(0, 0, 0, .18);
}
.tpl-art-rozana .tpl-glyph::before {
  content: ''; position: absolute; top: 8px; bottom: 8px; right: 50%; width: 1px;
  background: repeating-linear-gradient(180deg, var(--tc) 0 6px, transparent 6px 12px);
}

/* ---- خطوات العمل ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.step {
  background: #fff; padding: 26px 22px; border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(23, 19, 12, .07); text-align: center;
}
.step-num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #a8821a); color: #fff;
  font-weight: 900; font-size: 20px; margin-bottom: 12px;
}
.step b { display: block; font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---- آراء العملاء ---- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.review {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: 0 6px 18px rgba(23, 19, 12, .07);
}
.review-head { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.review-phone { direction: ltr; color: var(--muted); font-weight: 600; }
.review p { font-size: 14.5px; color: var(--ink-2); }
.privacy-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---- الباقات ---- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; align-items: start; }
.price-card {
  position: relative; background: #fff; border-radius: 22px; padding: 30px 26px;
  box-shadow: 0 8px 24px rgba(23, 19, 12, .08); text-align: center;
}
.price-featured { border: 2px solid var(--gold); transform: scale(1.03); box-shadow: 0 14px 34px rgba(201, 162, 39, .2); }
.price-ribbon {
  position: absolute; top: -14px; right: 50%; transform: translateX(50%);
  background: var(--gold); color: #fff; font-size: 13px; font-weight: 700;
  padding: 4px 18px; border-radius: 999px; white-space: nowrap;
}
.price-icon { font-size: 38px; }
.price-card h3 { font-size: 22px; margin: 6px 0 2px; }
.price-tag { font-size: 42px; font-weight: 900; color: var(--gold); }
.price-note { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.price-card ul { list-style: none; text-align: right; margin-bottom: 22px; }
.price-card li { padding: 7px 26px 7px 0; position: relative; font-size: 14.5px; }
.price-card li::before { content: '✓'; position: absolute; right: 0; color: var(--gold); font-weight: 900; }

/* ---- الأسئلة ---- */
.faq {
  background: #fff; border-radius: 14px; margin-bottom: 12px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(23, 19, 12, .06);
}
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16px; list-style: none; position: relative; }
.faq summary::after { content: '＋'; position: absolute; left: 20px; color: var(--gold); font-size: 20px; }
.faq[open] summary::after { content: '－'; }
.faq p { padding: 0 22px 18px; color: var(--muted); }

/* ---- الفوتر ---- */
.site-footer { background: var(--ink); color: #cfc4ac; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 30px; padding: 46px 20px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .brand { color: #fdf8ec; margin-bottom: 10px; }
.footer-brand p { font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #cfc4ac; text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--gold-2); }
.footer-pay span { font-size: 13px; }
.pay-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pay-badge {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px; padding: 4px 12px; font-size: 12px; font-weight: 700;
}
.footer-bottom { text-align: center; padding: 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }

/* ===== معالج إنشاء الدعوة ===== */
.wizard-steps { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.wstep {
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #efe7d3; color: var(--muted);
}
.wstep.active { background: linear-gradient(135deg, var(--gold), #a8821a); color: #fff; }
.wpanel { animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wnav { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }
.wnav .btn:only-child { margin-inline-start: auto; }

.tpl-grid-compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tpl-pick {
  position: relative; background: #fff; border-radius: 16px; overflow: hidden; cursor: pointer;
  border: 3px solid transparent; box-shadow: 0 4px 14px rgba(23, 19, 12, .07);
  display: block; text-align: center; padding-bottom: 12px; transition: all .2s;
}
.tpl-pick input { position: absolute; opacity: 0; }
.tpl-pick:has(input:checked) { border-color: var(--gold); box-shadow: 0 8px 22px rgba(201, 162, 39, .3); }
.tpl-pick .tpl-art { height: 100px; margin-bottom: 8px; }
.tpl-pick .tpl-art .tpl-glyph { transform: scale(.7); }
.tpl-pick b { display: block; font-size: 15px; }
.tpl-pick small { color: var(--muted); font-size: 11px; padding: 0 8px; display: block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.form-full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  font-family: inherit; font-size: 15px; padding: 10px 14px;
  border: 2px solid #e5dcc6; border-radius: 12px; background: #fff; transition: border .2s;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--gold); }
.check-row { flex-direction: row !important; align-items: center; }
.check-row input { width: 18px; height: 18px; }

.pkg-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.pkg-pick {
  position: relative; background: #fff; border-radius: 16px; padding: 22px 16px; text-align: center;
  cursor: pointer; border: 3px solid transparent; box-shadow: 0 4px 14px rgba(23, 19, 12, .07); transition: all .2s;
}
.pkg-pick input { position: absolute; opacity: 0; }
.pkg-pick:has(input:checked) { border-color: var(--gold); box-shadow: 0 8px 22px rgba(201, 162, 39, .3); }
.pkg-icon { font-size: 34px; display: block; }
.pkg-pick b { display: block; font-size: 18px; margin: 6px 0 2px; }
.pkg-price { color: var(--gold); font-weight: 900; font-size: 24px; }
.pkg-featured::after {
  content: 'الأكثر طلباً'; position: absolute; top: -10px; right: 50%; transform: translateX(50%);
  background: var(--gold); color: #fff; font-size: 11px; padding: 2px 12px; border-radius: 999px;
}

.done-box { background: #fff; border-radius: 22px; padding: 40px 30px; text-align: center; box-shadow: 0 10px 30px rgba(23, 19, 12, .1); }
.done-box h2 { margin: 10px 0 6px; }
.link-row { text-align: right; margin: 18px 0; }
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input {
  flex: 1; direction: ltr; font-size: 13px; padding: 10px 12px;
  border: 2px solid #e5dcc6; border-radius: 10px; background: #faf6ec;
}
.pay-note { background: #fdf3d8; border: 1px solid #ecd9a0; border-radius: 14px; padding: 16px; margin: 22px 0; text-align: right; }
.pay-note p { font-size: 14px; margin: 6px 0 10px; }

/* ===== لوحة التحكم ===== */
.manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .manage-grid { grid-template-columns: 1fr; } }
.mcard { background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 6px 18px rgba(23, 19, 12, .07); }
.mcard h3 { margin-bottom: 14px; font-size: 18px; }
.stats-row { display: flex; gap: 12px; }
.stat-box { flex: 1; background: #faf5e8; border-radius: 14px; padding: 16px; text-align: center; }
.stat-box b { display: block; font-size: 30px; color: var(--gold); }
.stat-box span { font-size: 12.5px; color: var(--muted); }
.mtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.mtable td, .mtable th { padding: 9px 8px; border-bottom: 1px solid #f0e9d8; text-align: right; }
.mtable th { color: var(--muted); font-size: 12.5px; }
.admin-table { display: block; overflow-x: auto; }
.wish-item { border-bottom: 1px solid #f0e9d8; padding: 10px 0; }
.wish-item b { font-size: 14px; }
.wish-item p { font-size: 13.5px; color: var(--muted); }
