/* ============================================
   WTHAYQ - Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #0D1B3E;
  --navy-light: #1A2D5A;
  --blue: #2563EB;
  --blue-hover: #1D4ED8;
  --blue-light: rgba(37,99,235,.08);
  --white: #fff;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-600: #475569;
  --gray-800: #1E293B;
  --green: #10B981;
  --gold: #F59E0B;
  --red: #EF4444;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; scroll-behavior: smooth; }
body { font-family: 'Cairo', sans-serif; background: var(--gray-50); color: var(--gray-800); line-height: 1.6; font-size: 16px; }
a { text-decoration: none; color: inherit; transition: color .2s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
input, button, select, textarea { font-family: inherit; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--radius); font-size: .92rem; font-weight: 700;
  cursor: pointer; border: none; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.35); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-light); }
.btn-ghost { background: rgba(255,255,255,.1); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-sm { padding: 7px 16px; font-size: .82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ============================================
   NAVBAR
   ============================================ */
.site-header {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.navbar-brand { display: flex; align-items: center; gap: 4px; }
.navbar-brand .logo { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.navbar-brand .logo-icon { color: var(--blue); font-weight: 800; }
.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: var(--gray-600);
  transition: all .2s; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--blue); background: var(--blue-light); }
.nav-link .arr { font-size: .65rem; transition: transform .25s; }
.nav-item:hover .arr { transform: rotate(180deg); }
/* Dropdown */
.dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px; z-index: 999;
}
.nav-item:hover .dropdown { display: block; }
.dropdown-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: .85rem; color: var(--gray-600); transition: all .2s;
}
.dropdown-link:hover { background: var(--blue-light); color: var(--blue); }
.dropdown-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--blue); flex-shrink: 0;
}
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 6px 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--navy); }

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 80px 24px 72px; text-align: center; color: var(--white); position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(37,99,235,.2) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 740px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin-bottom: 16px; }
.hero h1 span { color: #60A5FA; }
.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,.75); margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.search-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border-radius: var(--radius-lg);
  padding: 6px 6px 6px 20px; max-width: 580px; margin: 0 auto 20px;
  box-shadow: var(--shadow-md);
}
.search-bar input { flex: 1; border: none; outline: none; font-size: .95rem; color: var(--gray-800); text-align: right; background: transparent; }
.search-bar input::placeholder { color: var(--gray-400); }
.search-bar .search-ico { color: var(--gray-400); }
.trust-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 30px; padding: 8px 20px; font-size: .82rem; color: rgba(255,255,255,.8);
  margin-top: 20px;
}

/* ============================================
   CATEGORIES
   ============================================ */
.cats-section { background: var(--white); padding: 40px 24px; }
.cats-grid { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; max-width: 800px; margin: 0 auto; }
.cat-item { text-align: center; cursor: pointer; transition: all .2s; }
.cat-item:hover { transform: translateY(-4px); }
.cat-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--gray-100); border: 2px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--navy); margin: 0 auto 10px; transition: all .2s;
}
.cat-item:hover .cat-icon { background: var(--navy); color: var(--white); border-color: var(--navy); }
.cat-item span { font-size: .85rem; font-weight: 600; color: var(--gray-600); }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); transition: all .25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.doc-card { padding: 24px; text-align: center; }
.doc-card .doc-icon { font-size: 2rem; color: var(--navy); margin-bottom: 12px; }
.doc-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.doc-card .price { font-size: 1.3rem; font-weight: 800; color: var(--blue); margin-bottom: 16px; }
.doc-card .price span { font-size: .8rem; color: var(--gray-400); font-weight: 400; }

/* ============================================
   SECTION STYLES
   ============================================ */
.section { padding: 64px 24px; }
.section-dark { background: var(--gray-50); }
.section-navy { background: var(--navy); color: var(--white); }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 32px; }
.section-title.center { text-align: center; }
.section-title.white { color: var(--white); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }

/* ============================================
   FEATURES
   ============================================ */
.feat-card { padding: 24px; text-align: center; }
.feat-card .icon { font-size: 1.8rem; margin-bottom: 12px; }
.feat-card h4 { color: var(--navy); margin-bottom: 8px; }
.feat-card p { font-size: .85rem; color: var(--gray-600); line-height: 1.7; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-family: inherit; font-size: .9rem;
  color: var(--gray-800); background: var(--white); outline: none;
  transition: border .2s; text-align: right;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control.error { border-color: var(--red); }
.form-error { font-size: .75rem; color: var(--red); margin-top: 4px; display: none; }
.form-error.show { display: block; }

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.badge-blue { background: rgba(37,99,235,.1); color: var(--blue); }
.badge-green { background: rgba(16,185,129,.1); color: var(--green); }
.badge-gold { background: rgba(245,158,11,.1); color: var(--gold); }
.badge-red { background: rgba(239,68,68,.1); color: var(--red); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.6); }
.footer-main { max-width: 1200px; margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-logo span { color: var(--blue); }
.footer-desc { font-size: .82rem; line-height: 1.8; max-width: 220px; }
.footer-col h4 { color: var(--white); font-size: .88rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .82rem; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.social-link { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: var(--white); font-size: .8rem; transition: background .2s; }
.social-link:hover { background: var(--blue); }
.footer-cta { background: rgba(255,255,255,.04); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-cta-grid { max-width: 1200px; margin: 0 auto; padding: 28px 24px; display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.footer-cta-item h3 { color: var(--white); font-size: .92rem; margin-bottom: 8px; }
.footer-cta-item a { font-size: .82rem; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.footer-cta-item a:hover { color: var(--white); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: .75rem; color: rgba(255,255,255,.35); }
.payment-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.payment-badge { background: rgba(255,255,255,.08); padding: 4px 10px; border-radius: 6px; font-size: .72rem; color: rgba(255,255,255,.6); font-weight: 700; }

/* ============================================
   PAYWALL
   ============================================ */
.paywall-wrap { position: relative; overflow: hidden; }
.paywall-blur { position: absolute; bottom: 0; left: 0; right: 0; height: 200px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.98)); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 24px; }
.paywall-lock { text-align: center; }
.lock-icon { font-size: 2rem; margin-bottom: 8px; }
.paywall-lock p { font-size: .88rem; color: var(--gray-600); margin-bottom: 14px; }

/* ============================================
   DASHBOARD
   ============================================ */
.dash-layout { display: flex; min-height: calc(100vh - 64px); }
.dash-sidebar { width: 230px; background: var(--white); border-left: 1px solid var(--gray-200); padding: 20px 0; flex-shrink: 0; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.dash-user-info { padding: 0 16px 16px; border-bottom: 1px solid var(--gray-200); margin-bottom: 8px; text-align: center; }
.dash-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin: 0 auto 8px; }
.dash-name { font-size: .88rem; font-weight: 700; color: var(--navy); }
.dash-plan { font-size: .72rem; color: var(--blue); font-weight: 700; background: var(--blue-light); padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }
.dash-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: .85rem; color: var(--gray-600); transition: all .2s; }
.dash-nav a:hover, .dash-nav a.active { background: var(--blue-light); color: var(--blue); font-weight: 700; border-right: 3px solid var(--blue); }
.dash-main { flex: 1; padding: 28px; background: var(--gray-50); min-width: 0; }
.dash-header { margin-bottom: 24px; }
.dash-header h1 { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.dash-header p { font-size: .85rem; color: var(--gray-400); margin-top: 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 18px; text-align: center; }
.stat-card .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.stat-card .stat-label { font-size: .75rem; color: var(--gray-400); }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-200); }
.data-table th { background: var(--gray-50); padding: 12px 16px; text-align: right; font-size: .82rem; font-weight: 700; color: var(--gray-600); border-bottom: 1px solid var(--gray-200); }
.data-table td { padding: 12px 16px; font-size: .85rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }

/* ============================================
   ADMIN
   ============================================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: var(--navy); padding: 0; flex-shrink: 0; }
.admin-logo { padding: 20px 24px; font-size: 1.2rem; font-weight: 800; color: var(--white); border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-logo span { color: var(--blue); }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 24px; font-size: .88rem; color: rgba(255,255,255,.65); transition: all .2s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.08); color: var(--white); border-right: 3px solid var(--blue); }
.admin-main { flex: 1; background: var(--gray-50); min-width: 0; }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }
.admin-topbar h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.admin-content { padding: 24px; }
.admin-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 24px; margin-bottom: 20px; }
.admin-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-200); }

/* ============================================
   OTP INPUT
   ============================================ */
.otp-wrap { display: flex; gap: 10px; justify-content: center; direction: ltr; margin: 20px 0; }
.otp-inp { width: 52px; height: 58px; border: 2px solid var(--gray-200); border-radius: var(--radius); text-align: center; font-size: 1.4rem; font-weight: 800; color: var(--navy); outline: none; transition: all .2s; }
.otp-inp:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.otp-inp.filled { border-color: var(--blue); background: var(--blue-light); }

/* ============================================
   ALERTS
   ============================================ */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: .88rem; font-weight: 600; }
.alert-success { background: rgba(16,185,129,.1); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.alert-error { background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.alert-info { background: rgba(37,99,235,.08); color: var(--blue); border: 1px solid rgba(37,99,235,.2); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .nav-menu.open { display: flex; flex-direction: column; position: absolute; top: 64px; right: 0; left: 0; background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 12px; box-shadow: var(--shadow-md); z-index: 999; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-cta-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 20px 48px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .admin-sidebar { display: none; }
}
