/* زاد الوطن — Zad Alwatan */
:root {
  --ink: #0f1419;
  --paper: #f7f5f0;
  --sand: #e8e4dc;
  --gold: #b8860b;
  --gold-light: #d4a84b;
  --accent: #1a4d3a;
  --accent-soft: rgba(26, 77, 58, 0.08);
  --shadow: 0 20px 60px rgba(15, 20, 25, 0.12);
  --radius: 14px;
  --font-ar: "Tajawal", "Segoe UI", sans-serif;
  --font-en: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

body.lang-en {
  font-family: var(--font-en);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo {
  height: 48px;
  width: auto;
  max-width: min(160px, 38vw);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.85;
  transition: background 0.2s, opacity 0.2s;
}

.nav-links a:hover {
  background: var(--accent-soft);
  opacity: 1;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--sand);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.lang-toggle button {
  border: none;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  opacity: 0.55;
  transition: background 0.2s, opacity 0.2s;
}

.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* WhatsApp floating bubble + alert pulse */
.wa-bubble-floating {
  position: fixed;
  z-index: 1100;
  bottom: 1.35rem;
  inset-inline-end: 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.wa-bubble-floating .wa-bubble-hint,
.wa-bubble-floating .wa-bubble-alert {
  pointer-events: auto;
}

.wa-bubble-hint {
  margin: 0;
  padding: 0.5rem 0.85rem;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 6px 28px rgba(15, 20, 25, 0.15);
  position: relative;
  animation: wa-hint-pop 3s ease-in-out infinite;
}

.wa-bubble-hint::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 4px 4px rgba(15, 20, 25, 0.06));
}

@keyframes wa-hint-pop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.wa-bubble-alert {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2fe066, #25d366);
  color: #fff;
  box-shadow: 0 10px 36px rgba(37, 211, 102, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.wa-bubble-alert:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 44px rgba(37, 211, 102, 0.55);
}

.wa-bubble-icon {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 2;
}

.wa-bubble-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: wa-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 0;
}

.wa-bubble-pulse--delay {
  animation-delay: 1s;
}

@keyframes wa-ping {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  100% {
    transform: scale(2.15);
    opacity: 0;
  }
}

.wa-bubble-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.55);
  z-index: 3;
  animation: wa-badge-attn 2.5s ease-in-out infinite;
}

@keyframes wa-badge-attn {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.12);
  }
  30% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-bubble-pulse,
  .wa-bubble-pulse--delay {
    animation: none;
    opacity: 0;
  }

  .wa-bubble-hint {
    animation: none;
  }

  .wa-bubble-badge {
    animation: none;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  margin-top: 72px;
}

.hero-slider {
  position: relative;
  height: min(88vh, 720px);
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 20, 25, 0.35) 0%,
    rgba(15, 20, 25, 0.65) 100%
  );
  z-index: 2;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: #fff;
}

body[dir="rtl"] .hero-content {
  text-align: right;
  align-items: flex-end;
}

body[dir="ltr"] .hero-content {
  text-align: left;
  align-items: flex-start;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 1rem;
  max-width: 32ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  opacity: 0.95;
  max-width: 40ch;
  margin: 0 0 1.75rem;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--ink);
  box-shadow: 0 8px 28px rgba(184, 134, 11, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 0.5rem;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, background 0.2s;
}

.hero-dots button.active {
  background: #fff;
  transform: scale(1.2);
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0;
  color: var(--ink);
}

.section-desc {
  margin-top: 0.75rem;
  max-width: 65ch;
  color: #4a5560;
  font-size: 1.02rem;
}

body[dir="ltr"] .section-head {
  text-align: left;
}

body[dir="rtl"] .section-head {
  text-align: right;
}

/* Marketing strip */
.marketing-strip {
  background: linear-gradient(135deg, var(--accent) 0%, #143d2f 100%);
  color: #fff;
  padding: 2.5rem 1.25rem;
}

.marketing-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .marketing-inner {
    grid-template-columns: 1fr auto;
  }
}

.marketing-text {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.75;
  margin: 0;
}

.marketing-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.35rem;
}

/* Vision / Mission / Goals */
.vmg-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .vmg-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vmg-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--sand);
  box-shadow: 0 4px 24px rgba(15, 20, 25, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}

.vmg-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.vmg-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

body[dir="rtl"] .vmg-icon {
  margin-right: 0;
  margin-left: auto;
}

body[dir="ltr"] .vmg-icon {
  margin-left: 0;
  margin-right: auto;
}

.vmg-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

.vmg-card p {
  margin: 0;
  color: #5c6570;
  font-size: 0.98rem;
  line-height: 1.75;
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--sand);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: zoom-in;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4/3;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s;
  background: var(--sand);
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card figcaption {
  padding: 1rem 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.product-card:focus {
  outline: none;
}

.product-card:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

/* Product image lightbox */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.product-lightbox__panel {
  position: relative;
  max-width: min(96vw, 1100px);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.product-lightbox__panel img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.product-lightbox.is-open .product-lightbox__panel img {
  transform: scale(1);
  opacity: 1;
}

.product-lightbox__caption {
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  max-width: 42ch;
}

.product-lightbox__close {
  position: absolute;
  top: -12px;
  inset-inline-end: -12px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, background 0.2s;
  z-index: 2;
}

.product-lightbox__close:hover {
  transform: scale(1.08);
  background: var(--sand);
}

.product-lightbox__close:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .product-lightbox__panel img {
    transition: opacity 0.2s ease;
    transform: none;
  }

  .product-lightbox.is-open .product-lightbox__panel img {
    transform: none;
  }
}

/* Contact */
.contact-section {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  margin-top: 1rem;
}

.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) and (max-width: 999px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .contact-block--email {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

.contact-block h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.phone-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.phone-list li {
  margin-bottom: 0.5rem;
}

.phone-list a {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.phone-list a:hover {
  text-decoration: underline;
}

.address-line {
  font-weight: 600;
  color: #3d4650;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.email-line {
  font-weight: 600;
  color: #3d4650;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  word-break: break-all;
}

.email-line a {
  font-weight: 700;
  color: var(--accent);
}

.email-line a:hover {
  text-decoration: underline;
}

.email-line svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.wa-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.85rem 1.35rem;
  background: #25d366;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wa-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
}

.wa-cta svg {
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 1.25rem 5.5rem;
  text-align: center;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: 42px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  opacity: 0.95;
  filter: brightness(1.08);
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: var(--gold-light);
}

/* Mobile nav */
.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 0.4rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(247, 245, 240, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--sand);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }
}
