/* ==========================================================================
   شركة العربية الأفريقية لاستيراد المواد الغذائية والمواشي واللحوم المحدودة
   تصميم فاخر مستوحى من الهوية البصرية للشعار — تصميم </> wijhadev
   ========================================================================== */

:root {
  --emerald-950: #062113;
  --emerald-900: #082e1b;
  --emerald-800: #0e4228;
  --emerald-700: #165938;
  --gold-600: #9f7b2c;
  --gold-500: #c9a24b;
  --gold-400: #dfc073;
  --gold-100: #f6eed8;
  --olive-500: #7fb832;
  --ivory-50: #faf8f3;
  --ivory-100: #f2eee4;
  --white: #ffffff;
  --ink-900: #132019;
  --ink-700: #33443a;
  --ink-500: #5c6e63;
  --border-soft: rgba(201, 162, 75, 0.24);
  --border-dark: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 4px 16px rgba(8, 46, 27, 0.06);
  --shadow-md: 0 12px 34px rgba(8, 46, 27, 0.10);
  --shadow-lg: 0 22px 54px rgba(6, 33, 19, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1200px;
  --transition: 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--ivory-50);
  color: var(--ink-900);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.ltr-num {
  direction: ltr;
  unicode-bidi: embed;
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

/* Top Utility Bar */
.topbar {
  background: var(--emerald-950);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(201, 162, 75, 0.2);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 0.5rem 0;
}

.topbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.88);
  transition: color var(--transition);
}
.topbar-link:hover { color: var(--gold-400); }

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-400);
  font-weight: 600;
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(8, 46, 27, 0.14));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald-900);
}
.brand-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-600);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-700);
  transition: all var(--transition);
}
.nav-link:hover {
  color: var(--emerald-900);
  background: rgba(201, 162, 75, 0.14);
}
.nav-link.active {
  color: var(--white);
  background: var(--emerald-900);
  box-shadow: 0 4px 14px rgba(8, 46, 27, 0.22);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--emerald-900);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), #b58d35);
  color: var(--emerald-950);
  box-shadow: 0 8px 22px rgba(201, 162, 75, 0.32);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(201, 162, 75, 0.42);
}

.btn-emerald {
  background: var(--emerald-900);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(8, 46, 27, 0.22);
}
.btn-emerald:hover {
  background: var(--emerald-800);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(223, 192, 115, 0.5);
  color: var(--white);
  backdrop-filter: blur(8px);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold-400);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--emerald-900);
}
.btn-outline-dark:hover {
  background: var(--gold-100);
  border-color: var(--gold-500);
}

.btn-sm { padding: 0.5rem 1.05rem; font-size: 0.85rem; }

/* Hero Section */
.hero {
  position: relative;
  background: var(--emerald-950);
  color: var(--white);
  overflow: hidden;
  padding: 4.5rem 0 5.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(6, 33, 19, 0.94) 15%, rgba(8, 46, 27, 0.82) 55%, rgba(6, 33, 19, 0.72) 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 1rem;
  border-radius: 999px;
  background: rgba(201, 162, 75, 0.16);
  border: 1px solid rgba(223, 192, 115, 0.38);
  color: var(--gold-400);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive-500);
  box-shadow: 0 0 0 4px rgba(127, 184, 50, 0.25);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.hero h1 .gold-text { color: var(--gold-400); }

.hero-lead {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 60ch;
  margin: 0 0 1.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(223, 192, 115, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

.hero-card-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.hero-card-title {
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gold-400);
  margin-bottom: 1rem;
}

.legal-mini-list {
  display: grid;
  gap: 0.65rem;
  font-size: 0.88rem;
}

.legal-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 33, 19, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-mini-row span:first-child { color: rgba(255, 255, 255, 0.74); }
.legal-mini-row strong { color: var(--white); font-weight: 700; }

/* Stats Strip */
.stats-strip {
  margin-top: -2.4rem;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--emerald-900);
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-500);
}

/* Sections */
.section { padding: 4.5rem 0; }
.section-muted { background: var(--ivory-100); }
.section-dark {
  background: var(--emerald-900);
  color: var(--white);
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section-header.center {
  margin-inline: auto;
  text-align: center;
}

.section-kicker {
  display: inline-block;
  color: var(--gold-600);
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}
.section-dark .section-kicker { color: var(--gold-400); }

.section-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 800;
  color: var(--emerald-900);
  line-height: 1.3;
}
.section-dark .section-title { color: var(--white); }

.section-desc {
  margin: 0;
  color: var(--ink-500);
  font-size: 1rem;
}
.section-dark .section-desc { color: rgba(255, 255, 255, 0.78); }

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--emerald-950);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.card:hover .card-media img { transform: scale(1.05); }

.card-tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(6, 33, 19, 0.86);
  color: var(--gold-400);
  border: 1px solid rgba(223, 192, 115, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--emerald-900);
}

.card-text {
  margin: 0 0 1.25rem;
  color: var(--ink-700);
  font-size: 0.94rem;
  flex: 1;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--ink-700);
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.feature-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-500);
  flex-shrink: 0;
}

/* Page Hero (Subpages) */
.page-hero {
  background: linear-gradient(135deg, var(--emerald-950), var(--emerald-900));
  color: var(--white);
  padding: 3.5rem 0;
  border-bottom: 3px solid var(--gold-500);
}
.page-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
}
.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  max-width: 66ch;
}

/* Legal Table & Registry Cards */
.legal-panel {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.legal-item {
  background: var(--ivory-50);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.legal-item-label {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-500);
  font-weight: 600;
}

.legal-item-value {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--emerald-900);
}

.copy-btn {
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--emerald-900);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.copy-btn:hover {
  background: var(--emerald-900);
  color: var(--white);
}

/* Filter Tabs */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--ink-700);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--emerald-900);
  color: var(--white);
  border-color: var(--emerald-900);
}

/* Contact & Map */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--emerald-900);
  margin-bottom: 0.35rem;
}
.form-control {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(8, 46, 27, 0.2);
  background: var(--ivory-50);
  font-size: 0.95rem;
  color: var(--ink-900);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.2);
  background: var(--white);
}

.map-frame-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  background: var(--ivory-100);
  height: 360px;
}
.map-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Unified Luxury Footer */
.site-footer {
  background: var(--emerald-950);
  color: rgba(255, 255, 255, 0.84);
  border-top: 3px solid var(--gold-500);
  padding-top: 3.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1fr 1.1fr;
  gap: 2rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--border-dark);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.footer-brand-row img { width: 58px; height: 58px; object-fit: contain; }
.footer-brand-row strong {
  display: block;
  color: var(--white);
  font-size: 1.02rem;
}
.footer-brand-row span {
  display: block;
  color: var(--gold-400);
  font-size: 0.8rem;
}

.footer-title {
  color: var(--gold-400);
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold-400); }

.social-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 700;
  transition: all var(--transition);
}
.social-pill:hover {
  background: var(--gold-500);
  color: var(--emerald-950);
  border-color: var(--gold-500);
}

.footer-bottom {
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.wijha-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(201, 162, 75, 0.14);
  border: 1px solid rgba(223, 192, 115, 0.35);
  color: var(--gold-400);
  font-weight: 700;
  transition: all var(--transition);
}
.wijha-credit:hover {
  background: var(--gold-500);
  color: var(--emerald-950);
}
.wijha-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  direction: ltr;
  unicode-bidi: embed;
  font-weight: 800;
}

/* Scroll-Triggered Floating WhatsApp Button (Visible for 3s on scroll) */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: #25D366;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.38);
  opacity: 0;
  transform: translateY(22px) scale(0.92);
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.wa-float.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.wa-float:hover {
  background: #1ebe5b;
  transform: translateY(-2px) scale(1.03);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 140;
  background: var(--emerald-950);
  color: var(--white);
  border: 1px solid var(--gold-500);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 260ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid, .grid-2, .legal-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory-50);
    border-bottom: 1px solid var(--border-soft);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .header-actions .btn-emerald { display: none; }
  .menu-toggle { display: inline-flex; }
  .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 4.5rem; }
  .wa-float { bottom: 1rem; left: 1rem; padding: 0.65rem 1rem; }
}
