:root {
  --green: #0F3D2E;
  --green-2: #15513E;
  --lime: #68B821;
  --gold: #C9A227;
  --gold-text: #8A650F;
  --white: #FFFFFF;
  --light: #F7F7F7;
  --text: #555555;
  --black: #111111;
  --border: #E7E7E7;
  --shadow: 0 18px 45px rgba(17, 17, 17, .10);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Tajawal", "Cairo", Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.8;
}
body.is-loaded .hero .eyebrow,
body.is-loaded .hero h1,
body.is-loaded .hero p,
body.is-loaded .hero .hero-actions {
  animation: heroFadeUp .85s cubic-bezier(.2, .8, .2, 1) both;
}
body.is-loaded .hero h1 { animation-delay: .12s; }
body.is-loaded .hero p { animation-delay: .24s; }
body.is-loaded .hero .hero-actions { animation-delay: .36s; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 86px 0; }
.section.alt { background: var(--light); }
.section-head { max-width: 720px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow { color: var(--gold-text); font-weight: 800; margin: 0 0 8px; }
.hero .eyebrow, .page-hero .eyebrow, .agency-hero .eyebrow, .distribution-band .eyebrow, .cta .eyebrow {
  color: #E0C14B;
}
h1, h2, h3 { margin: 0; line-height: 1.35; color: var(--black); }
h1 { font-size: clamp(34px, 5vw, 64px); }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 22px; }
p { color: var(--text); margin: 10px 0 0; }

.topbar {
  background: var(--green);
  color: rgba(255,255,255,.9);
  font-size: 14px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 12px 30px rgba(17, 17, 17, .08); background: rgba(255,255,255,.98); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; color: var(--green); }
.brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15, 61, 46, .14);
}
.nav { display: flex; align-items: center; gap: 8px; }
.nav a, .dropdown-toggle {
  position: relative;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--black);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .2s ease, color .2s ease;
}
.nav a:hover, .dropdown:hover .dropdown-toggle, .nav a.is-active, .dropdown-toggle.is-active { color: var(--green); }
.nav a.is-active, .dropdown-toggle.is-active { background: rgba(201,162,39,.12); border-radius: var(--radius); }
.dropdown { position: relative; }
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dropdown-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}
.dropdown:hover .dropdown-toggle::after,
.dropdown.is-open .dropdown-toggle::after {
  transform: rotate(225deg) translateY(-1px);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 420px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.98);
  transform-origin: top right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.dropdown:hover .dropdown-menu, .dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.dropdown-menu::before {
  content: "الوكالات والعلامات التجارية";
  display: block;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 7px;
  min-height: 44px;
}
.dropdown-menu a::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,39,.12);
}
.dropdown-menu a:hover, .dropdown-menu a.is-active { background: var(--light); color: var(--green); }
.dropdown-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.dropdown-menu::before { grid-column: 1 / -1; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--border); background: var(--white); border-radius: var(--radius); }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--green); margin: 5px auto; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  display: grid;
  align-items: center;
  color: var(--white);
  background: linear-gradient(90deg, rgba(5,48,16,.88), rgba(15,61,46,.66), rgba(17,17,17,.4)), url("../images/hero/back.jpg") center/cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .95;
}
.hero .container { position: relative; z-index: 1; }
.hero h1, .hero p { color: var(--white); }
.hero p { max-width: 720px; font-size: 22px; color: rgba(255,255,255,.88); }
.hero-actions, .card-actions, .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold), #E0C14B);
  color: var(--black);
  font-weight: 900;
  border: 1px solid var(--gold);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(201,162,39,.22); }
.btn.ghost { background: transparent; color: var(--green); border-color: rgba(15,61,46,.28); }
.hero .btn.ghost, .cta .btn.ghost { color: var(--white); border-color: rgba(255,255,255,.4); }
.agency-hero .btn.ghost {
  background: rgba(255, 255, 255, .96);
  color: var(--green);
  border-color: rgba(255, 255, 255, .96);
}
.agency-hero .btn.ghost:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--black);
}
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.image-panel {
  min-height: 420px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15,61,46,.78), rgba(201,162,39,.58)), url("../images/hero/distribution.svg") center/cover;
  box-shadow: var(--shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}
.image-panel:hover { transform: translateY(-4px); box-shadow: 0 24px 58px rgba(17, 17, 17, .14); }
.about-image-panel {
  background: linear-gradient(135deg, rgba(15,61,46,.08), rgba(201,162,39,.08)), url("../images/hero/about-food-distribution.jpg") center/cover;
}
.grid { display: grid; gap: 22px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.products { grid-template-columns: repeat(4, 1fr); }

.info-card, .agency-card, .product-card, .value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.info-card, .value-card { padding: 26px; }
.info-card:hover, .agency-card:hover, .product-card:hover, .value-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); border-color: rgba(201,162,39,.42); }
.info-icon { width: 48px; height: 48px; display: grid; place-items: center; background: rgba(201,162,39,.14); color: var(--green); border-radius: 50%; font-weight: 900; margin-bottom: 14px; transition: transform .28s ease, background .28s ease; }
.info-card:hover .info-icon { transform: rotate(-6deg) scale(1.06); background: rgba(201,162,39,.24); }

.stats {
  background: linear-gradient(135deg, #063B16, var(--green));
  color: var(--white);
  padding: 54px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-size: 34px; color: #D7F46B; }
.stat span { color: rgba(255,255,255,.88); font-weight: 700; }
.stat { transition: transform .25s ease; }
.stat:hover { transform: translateY(-4px); }

.agency-card {
  position: relative;
  min-height: 330px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  isolation: isolate;
}
.agency-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), rgba(15,61,46,.72));
}
.agency-card::after {
  content: "";
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 0;
  width: 42%;
  height: 118px;
  background: linear-gradient(135deg, rgba(201,162,39,.12), rgba(15,61,46,.04));
  border-end-start-radius: 60px;
  z-index: -1;
}
.agency-card img {
  width: 100%;
  height: 118px;
  object-fit: contain;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(247,247,247,.94)),
    linear-gradient(135deg, #F7F7F7, #EEF7E9);
  border: 1px solid rgba(15,61,46,.08);
  padding: 18px;
  transition: transform .28s ease;
}
.agency-card:hover img { transform: scale(1.05); }
.agency-card > div {
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  flex-direction: column;
}
.agency-card .eyebrow {
  width: fit-content;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201,162,39,.13);
  border: 1px solid rgba(201,162,39,.28);
  color: var(--green);
  font-size: 13px;
}
.agency-card h3 {
  position: relative;
  padding-bottom: 10px;
}
.agency-card h3::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}
.agency-card p:not(.eyebrow) {
  margin-top: 12px;
  min-height: 58px;
}
.agency-card .card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: auto;
  padding-top: 22px;
  gap: 10px;
}
.agency-card .btn.small {
  width: 100%;
  min-height: 42px;
  padding-inline: 12px;
}
.product-image { width: 100%; aspect-ratio: 4 / 3; border: 0; cursor: zoom-in; background: var(--light); overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 18px; transition: .3s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.product-content { padding: 18px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.meta span, .filters button, .tags span {
  background: var(--light);
  color: var(--green);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
}
.text-link { color: var(--green); font-weight: 900; }

.distribution-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(5,48,16,.94), rgba(15,61,46,.78), rgba(17,17,17,.54)), url("../images/hero/about-food-distribution.jpg") center/cover;
  color: var(--white);
}
.distribution-band::after {
  content: "";
  position: absolute;
  inset-block: 18%;
  inset-inline-start: 0;
  width: 6px;
  background: var(--gold);
  border-radius: 999px;
}
.distribution-band h2, .distribution-band p { color: var(--white); }
.cta { background: var(--black); color: var(--white); text-align: center; }
.cta h2, .cta p { color: var(--white); }

.page-hero, .agency-hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0;
  color: var(--white);
  background: linear-gradient(90deg, rgba(5,48,16,.94), rgba(15,61,46,.78), rgba(17,17,17,.36)), url("../images/hero/page.svg") center/cover;
}
.page-hero::after, .agency-hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.page-hero .container, .agency-hero .container { position: relative; z-index: 1; }
.page-hero h1, .page-hero p, .agency-hero h1, .agency-hero p { color: var(--white); }
.agency-hero { min-height: 430px; display: grid; align-items: center; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.filters button { cursor: pointer; font-family: inherit; }
.filters button.active { background: var(--green); color: var(--white); border-color: var(--lime); }
.search-box { width: min(440px, 100%); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font: inherit; }
.notice { padding: 18px; border: 1px solid rgba(201,162,39,.35); background: rgba(201,162,39,.1); border-radius: var(--radius); color: var(--black); }
.empty-state { grid-column: 1 / -1; padding: 24px; background: var(--light); border-radius: var(--radius); text-align: center; }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 26px;
  align-items: stretch;
}
.contact-form {
  display: grid;
  gap: 16px;
  padding: 34px;
  border: 1px solid rgba(201,162,39,.28);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.contact-form .section-head { margin-bottom: 4px; }
.contact-form label { display: grid; gap: 8px; font-weight: 800; color: var(--black); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--light);
  color: var(--black);
  font: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(201,162,39,.14);
}
.map-panel {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,.28);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.map-panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}
.contact-layout .map-panel { grid-column: 1 / -1; }
.contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(201,162,39,.28);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.contact-panel h2 { font-size: clamp(24px, 3vw, 34px); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.site-footer { background: linear-gradient(135deg, #052A10, #0b2d22); color: rgba(255,255,255,.82); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.site-footer h3, .site-footer strong { color: var(--white); }
.site-footer a { display: block; color: rgba(255,255,255,.82); margin: 8px 0; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 18px; text-align: center; }

.back-to-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: .2s ease;
  z-index: 40;
}
.back-to-top.show { opacity: 1; visibility: visible; animation: softPulse 1.8s ease-in-out infinite; }
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.82);
  z-index: 100;
}
.lightbox.show { display: grid; }
.lightbox img { max-height: 78vh; border-radius: var(--radius); background: var(--white); }
.lightbox p { color: var(--white); font-weight: 800; }
.lightbox button { position: absolute; top: 20px; left: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; font-size: 28px; cursor: pointer; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s cubic-bezier(.2, .8, .2, 1), transform .65s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--reveal-index, 0) * 55ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,162,39,.22); }
  50% { box-shadow: 0 0 0 10px rgba(201,162,39,0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
