/* shared.css — الذهب اليوم */
/* Performance: font-display swap to prevent invisible text during font load */
@font-face {
  font-family: 'Cairo';
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  font-display: swap;
}

:root {
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dim: #8B6914;
  --silver: #C0C0C0;
  --bg-deep: #060608;
  --bg-card: rgba(255,255,255,0.03);
  --border: rgba(212,175,55,0.15);
  --border-bright: rgba(212,175,55,0.5);
  --text-main: #F0EAD6;
  --text-muted: #8a8070;
  --text-dim: #555;
  --green: #2ECC71;
  --red: #E74C3C;
  --radius: 16px;
  --glass: blur(20px) saturate(180%);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.8;
  direction: rtl;
}
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,6,8,0.92);
  backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(16px,4vw,60px);
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.nav-logo-text {
  font-family: 'Tajawal', sans-serif; font-weight: 900; font-size: 1.3rem;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; color: var(--text-muted); font-size: 0.85rem;
  font-weight: 500; transition: color 0.2s; cursor: pointer; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.page-wrap { max-width: 900px; margin: 0 auto; padding: 60px clamp(16px,4vw,40px) 100px; }
.page-hero { text-align: center; margin-bottom: 52px; }
.page-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(212,175,55,0.1); border: 1px solid var(--border); border-radius: 50px;
  padding: 5px 16px; font-size: 0.78rem; color: var(--gold); margin-bottom: 20px;
}
.page-hero h1 {
  font-family: 'Tajawal', sans-serif; font-weight: 900;
  font-size: clamp(1.8rem,4vw,2.8rem); line-height: 1.3; margin-bottom: 14px;
}
.page-hero h1 span {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.page-hero p { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }
.prose { font-size: 0.96rem; color: var(--text-muted); }
.prose h2 {
  font-family: 'Tajawal', sans-serif; font-weight: 700; font-size: 1.35rem;
  color: var(--text-main); margin: 40px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.prose h3 { font-weight: 700; font-size: 1.05rem; color: var(--gold); margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; line-height: 1.9; }
.prose ul, .prose ol { padding-right: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; line-height: 1.8; }
.prose strong { color: var(--text-main); font-weight: 700; }
.prose a { color: var(--gold); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose blockquote {
  border-right: 3px solid var(--gold); padding: 12px 20px;
  background: rgba(212,175,55,0.05); border-radius: 0 8px 8px 0; margin: 20px 0;
  font-style: italic; color: var(--text-main);
}
.info-box {
  background: rgba(212,175,55,0.06); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px; margin: 24px 0;
}
.info-box .label { font-size: 0.75rem; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
footer {
  border-top: 1px solid var(--border); padding: 40px clamp(16px,4vw,60px);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.footer-logo {
  font-family: 'Tajawal', sans-serif; font-weight: 900;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-size: 1.1rem;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.8rem; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.75rem; color: var(--text-dim); }
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.08;
  animation: orbFloat 20s ease-in-out infinite alternate;
}
.orb-1 { width: 500px; height: 500px; background: var(--gold); top: -150px; right: -100px; }
.orb-2 { width: 350px; height: 350px; background: #8B6914; bottom: 10%; left: -80px; animation-delay: -10s; }
@keyframes orbFloat { from { transform: translate(0,0); } to { transform: translate(20px,30px); } }
.content-wrap { position: relative; z-index: 1; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37, #8B6914);
  border: none;
  color: #000;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212,175,55,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 999;
  font-weight: 900;
}
.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(212,175,55,0.5);
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
  --bg-deep: #F8F4E8;
  --bg-card: rgba(255,255,255,0.7);
  --bg-card-hover: rgba(212,175,55,0.12);
  --border: rgba(139,105,20,0.2);
  --border-bright: rgba(139,105,20,0.5);
  --text-main: #1a1200;
  --text-muted: #5a4a20;
  --text-dim: #9a8a60;
}
[data-theme="light"] body { background: #F8F4E8; color: #1a1200; }
[data-theme="light"] nav { background: rgba(248,244,232,0.92); border-bottom-color: rgba(139,105,20,0.15); }
[data-theme="light"] .orb { opacity: 0.05; }
[data-theme="light"] .prose { color: #5a4a20; }
[data-theme="light"] .prose h2 { color: #1a1200; }
[data-theme="light"] .info-box { background: rgba(212,175,55,0.08); }
[data-theme="light"] .faq-item { background: rgba(255,255,255,0.8); }
[data-theme="light"] .contact-card { background: rgba(255,255,255,0.7); }
[data-theme="light"] .form-card { background: rgba(255,255,255,0.7); }
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select { background: rgba(255,255,255,0.9); color: #1a1200; }
[data-theme="light"] .blog-card { background: rgba(255,255,255,0.75); }
[data-theme="light"] .blog-card:hover { box-shadow: 0 12px 32px rgba(139,105,20,0.15); }
[data-theme="light"] .article-hero-img { border-color: rgba(139,105,20,0.2); }

/* Theme toggle */
.theme-toggle {
  background: rgba(212,175,55,0.15);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  width: 52px;
  height: 28px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.3s;
  padding: 0;
}
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 0.3s;
}
[data-theme="light"] .theme-toggle::after { transform: translateX(-24px); }
.theme-toggle-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.theme-icon { font-size: 0.9rem; }

/* ===== MOBILE IMPROVEMENTS (shared) ===== */
@media (max-width: 640px) {
  nav { height: 60px; padding: 0 16px; }
  .nav-logo-text { font-size: 1.1rem; }
  .nav-links { display: none; }
  .page-wrap { padding: 36px 16px 80px; }
  .page-hero { margin-bottom: 36px; }
  .page-hero h1 { font-size: 1.6rem; }
  .page-hero p { font-size: 0.9rem; }
  .prose h2 { font-size: 1.15rem; }
  .prose { font-size: 0.92rem; }
  .footer-links { gap: 12px; }
  .footer-links a { font-size: 0.76rem; }
}

/* Touch */
@media (hover: none) {
  .blog-card:hover { transform: none; }
  .contact-card:hover { transform: none; }
}

/* Nav logo image */
.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .nav-logo-img { width: 26px; height: 26px; }
}
