:root{
  --font-main: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #f6f4f1;              /* light marble base */
  --bg-2: #fbfaf8;
  --ink: #1e293b;
  --muted: #64748b;
  --card: rgba(255,255,255,.72);
  --card-2: rgba(255,255,255,.88);
  --stroke: rgba(15, 23, 42, .10);
  --shadow: 0 18px 45px rgba(15, 23, 42, .10);
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, .08);
  --accent: #1b8a6b;          /* soft teal/green */
  --accent-2: #f2b04c;        /* warm golden */
  --radius: 18px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

/* Subtle marble layer (SVG veins + noise-like gradient) */
.marble-layer{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .9;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(27,138,107,.08), transparent 60%),
    radial-gradient(900px 700px at 85% 35%, rgba(242,176,76,.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.15)),
    url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width='900'%20height='900'%3E%0A%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.85'%20numOctaves='2'%20stitchTiles='stitch'%2F%3E%3C%2Ffilter%3E%0A%3Crect%20width='900'%20height='900'%20filter='url(#n)'%20opacity='.05'%2F%3E%0A%3Cpath%20d='M30%20160%20C220%2060%20260%20280%20450%20170%20S720%20240%20870%20140'%20fill='none'%20stroke='#94a3b8'%20stroke-opacity='.22'%20stroke-width='2'%2F%3E%0A%3Cpath%20d='M60%20520%20C240%20420%20300%20650%20520%20540%20S760%20610%20880%20520'%20fill='none'%20stroke='#cbd5e1'%20stroke-opacity='.25'%20stroke-width='2'%2F%3E%0A%3Cpath%20d='M120%20760%20C260%20680%20320%20820%20520%20750%20S760%20820%20870%20760'%20fill='none'%20stroke='#94a3b8'%20stroke-opacity='.16'%20stroke-width='2'%2F%3E%0A%3C%2Fsvg%3E");
  background-size: cover;
}

a{ text-decoration: none; }
.link-plain{ color: inherit; text-decoration: none; opacity: .9; }
.link-plain:hover{ opacity: 1; color: var(--accent); }

/* Layering: ensure content above marble */
body > *{ position: relative; z-index: 1; }

/* Topbar */
.topbar{
  background: rgba(255,255,255,.55);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .9rem;
  color: var(--muted);
  padding: .55rem 0;
}

/* Navbar */
.nav-glass{
  background: rgba(255,255,255,.70);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar .nav-link{
  font-weight: 600;
  color: #22324a;
  padding: .65rem .85rem;
  border-radius: 999px;
}
.navbar .nav-link:hover{
  background: rgba(27,138,107,.08);
  color: var(--accent);
}
.navbar .nav-link.active{
  background: rgba(27,138,107,.12);
  color: var(--accent);
}

.brand-mark{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    radial-gradient(14px 14px at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(27,138,107,.95), rgba(242,176,76,.85));
  box-shadow: 0 10px 20px rgba(27,138,107,.18);
  border: 1px solid rgba(255,255,255,.65);
}
.brand-mark.small{ width: 38px; height: 38px; border-radius: 14px; }
.brand-title{ font-weight: 800; letter-spacing: .2px; line-height: 1.15; }
.brand-sub{ font-size: .84rem; color: var(--muted); margin-top: .1rem; }

/* Buttons */
.btn-primary{
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: #157d60;
  --bs-btn-hover-border-color: #157d60;
  --bs-btn-active-bg: #126c53;
  --bs-btn-active-border-color: #126c53;
}
.btn-soft{
  background: rgba(27,138,107,.10);
  border: 1px solid rgba(27,138,107,.20);
  color: var(--accent);
}
.btn-soft:hover{
  background: rgba(27,138,107,.14);
  color: var(--accent);
}

/* Hero */
.hero{
  padding: 3.25rem 0 2.75rem;
}
.hero-badge{
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: .55rem .9rem;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.hero-badge i{ color: var(--accent); }

.hero-title{
  margin: 1rem 0 .75rem;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
}
.hero-title .accent{
  color: var(--accent);
  position: relative;
}
.hero-lead{
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 1.25rem;
}
.hero-cta{
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 1.5rem;
}
.hero-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.stat{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: .85rem .9rem;
  box-shadow: var(--shadow-sm);
}
.stat-num{ font-weight: 900; font-size: 1.25rem; color: #1f2a44; }
.stat-label{ color: var(--muted); font-size: .86rem; margin-top: .15rem; }

.hero-media{
  display: grid;
  grid-template-columns: 1.35fr .75fr;
  gap: .85rem;
}
.media-card{
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.6);
}
.media-card.tall{ height: 420px; }
.media-stack{ display: grid; gap: .85rem; }
.media-stack .media-card{ height: calc((420px - .85rem) / 2); }

.media-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
}
.media-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .25rem;
  padding: 1rem;
  color: #fff;
}
.media-tag{
  display: inline-flex;
  width: fit-content;
  font-size: .8rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
}
.media-title{
  font-weight: 800;
  font-size: 1.15rem;
}
.hero-note{
  margin-top: .9rem;
  color: var(--muted);
  font-size: .92rem;
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}
.hero-note i{ color: var(--accent-2); }

@media (max-width: 991px){
  .hero{ padding-top: 2.25rem; }
  .hero-media{ grid-template-columns: 1fr; }
  .media-card.tall{ height: 320px; }
  .media-stack .media-card{ height: 220px; }
  .hero-stats{ grid-template-columns: 1fr 1fr; }
}

/* Sections */
.section{ padding: 4rem 0; }
.section-alt{
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.15));
  border-top: 1px solid rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(255,255,255,.55);
}
.section-head{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-title{
  font-weight: 900;
  margin: 0;
}
.section-sub{
  margin: .3rem 0 0;
  color: var(--muted);
}

.card-glass{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,23,42,.10);
  font-size: .9rem;
  color: #24324a;
}
.pill i{ color: var(--accent); }

.soft-divider{
  border-top: 1px solid rgba(15,23,42,.10);
  opacity: 1;
  margin: 1rem 0;
}

/* Mini gallery */
.mini-gallery{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.mini-gallery img{
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.55);
}

/* Feature cards */
.feature-card{
  height: 100%;
  padding: 1.25rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-icon{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(27,138,107,.10);
  border: 1px solid rgba(27,138,107,.18);
  color: var(--accent);
  margin-bottom: .75rem;
  font-size: 1.25rem;
}
.feature-title{ font-weight: 900; margin-bottom: .35rem; }
.feature-text{ color: var(--muted); margin: 0; line-height: 1.85; }

/* Brand strip */
.brand-strip{
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.strip-item{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: .75rem .85rem;
  color: #24324a;
  display: flex;
  align-items: center;
  gap: .55rem;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.strip-item i{ color: var(--accent); }

@media (max-width: 991px){
  .brand-strip{ grid-template-columns: 1fr 1fr; }
}

/* Product chips */
.chip{
  cursor: pointer;
  user-select: none;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--stroke);
  color: #24324a;
  font-weight: 700;
  font-size: .92rem;
}
.chip:hover{ background: rgba(27,138,107,.08); color: var(--accent); }
.chip.active{
  background: rgba(27,138,107,.12);
  border-color: rgba(27,138,107,.22);
  color: var(--accent);
}

/* Products grid */
.product-card{
  height: 100%;
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.product-media{
  position: relative;
  height: 210px;
  overflow: hidden;
}
.product-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-badge{
  position: absolute;
  top: 12px;
  right: 12px; /* RTL: keep on right */
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  padding: .25rem .65rem;
  font-weight: 800;
  font-size: .8rem;
}
.product-body{ padding: 1rem 1rem 1.05rem; }
.product-title{ font-weight: 900; font-size: 1.05rem; margin: 0 0 .35rem; }
.product-text{ margin: 0 0 .75rem; color: var(--muted); line-height: 1.8; font-size: .95rem; }
.product-cta{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 900;
  color: var(--accent);
}
.product-cta:hover{ color: #157d60; }

/* Masonry gallery */
.masonry{
  columns: 1;
  column-gap: 1rem;
}
@media (min-width: 576px){ .masonry{ columns: 2; } }
@media (min-width: 992px){ .masonry{ columns: 3; } }

.masonry-item{
  display: block;
  position: relative;
  margin: 0 0 1rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow-sm);
  break-inside: avoid;
}
.masonry-item img{
  width: 100%;
  height: auto;
  display: block;
}
.masonry-item .zoom{
  position: absolute;
  left: 12px; /* RTL: left is fine for hover icon */
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.65);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.masonry-item:hover .zoom{
  opacity: 1;
  transform: translateY(0);
}

/* Contact */
.contact-item{
  display: flex;
  gap: .85rem;
  align-items: center;
  padding: .65rem 0;
}
.contact-icon{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(27,138,107,.10);
  border: 1px solid rgba(27,138,107,.18);
  color: var(--accent);
  font-size: 1.1rem;
}
.contact-form .form-control{
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  padding: .7rem .85rem;
}
.contact-form .form-control:focus{
  box-shadow: 0 0 0 .2rem rgba(27,138,107,.14);
  border-color: rgba(27,138,107,.35);
}
.map-placeholder{
  border-radius: 18px;
  border: 1px dashed rgba(15,23,42,.25);
  background: rgba(255,255,255,.55);
  padding: 1.1rem;
}
.map-inner{
  display: flex;
  gap: .75rem;
  align-items: center;
  color: var(--muted);
}
.map-inner i{ font-size: 1.6rem; color: var(--accent); }

/* Footer */
.footer{
  padding: 2.75rem 0 1.25rem;
  border-top: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.40);
}
.footer-title{ font-weight: 900; margin-bottom: .5rem; }
.footer-links{
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}
.footer-links li{ padding: .35rem 0; }
.footer-links a{ color: var(--muted); text-decoration: none; }
.footer-links a:hover{ color: var(--accent); }
.social{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.10);
  color: #24324a;
}
.social:hover{ color: var(--accent); background: rgba(27,138,107,.08); }
.footer-bottom{
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15,23,42,.10);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Floating buttons */
.floating-wa{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #25D366;
  color: #fff;
  box-shadow: 0 16px 35px rgba(0,0,0,.18);
  z-index: 20;
}
.floating-wa:hover{ color: #fff; filter: brightness(.95); }

.back-top{
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.78);
  color: #24324a;
  box-shadow: var(--shadow-sm);
  z-index: 20;
  display: none;
}
.back-top:hover{ color: var(--accent); }

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.show{
  opacity: 1;
  transform: translateY(0);
}


/* Info tiles (Contact details replacement) */
.info-tile{
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.info-ico{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(27,138,107,.10);
  border: 1px solid rgba(27,138,107,.18);
  color: var(--accent);
  font-size: 1.15rem;
  flex: 0 0 auto;
}
/* ✅ FIX: Prevent header brand from being clipped on mobile (RTL) */
.navbar .navbar-brand{
  max-width: 100%;
  overflow: visible;
}

.navbar .navbar-brand .brand-text{
  flex: 1 1 auto;
  min-width: 0;              /* مهم جدًا داخل flex */
}

.navbar .navbar-brand .brand-title{
  white-space: normal;       /* يسمح باللف */
  overflow: visible;
  word-break: break-word;
  line-height: 1.25;
}

/* اجعل العنوان أصغر في الشاشات الصغيرة، و اخفِ السطر الثاني */
@media (max-width: 576px){
  .navbar .navbar-brand{
    gap: .6rem !important;
  }
  .navbar .navbar-brand .brand-title{
    font-size: 1rem;
  }
  .navbar .navbar-brand .brand-sub{
    display: none;
  }
  /* اترك مساحة كافية لزر القائمة */
  .navbar .navbar-brand .brand-text{
    max-width: calc(100vw - 120px);
  }
}
/* ✅ Make hero stats stack nicely on very small screens */
@media (max-width: 480px){
  .hero-stats{
    grid-template-columns: 1fr !important;
  }
}

/* ✅ FINAL FIX: Mobile navbar clipping (RTL) */
@media (max-width: 576px){

  /* اجعل الكونتينر يسمح بالتموضع */
  .navbar .container{
    position: relative;
  }

  /* ثبّت زر القائمة على الطرف (يسار في RTL عادة) */
  .navbar .navbar-toggler{
    position: absolute;
    left: .75rem;          /* جرّب right بدل left لو تبيه على اليمين */
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
  }

  /* أعطِ البراند مساحة كاملة + اترك حيز لزر القائمة */
  .navbar .navbar-brand{
    display: flex !important;
    align-items: center;
    gap: .55rem !important;
    width: 100%;
    padding-left: 3.25rem; /* مساحة لزر القائمة (لأنه على اليسار الآن) */
    margin: 0;
  }

  /* صغّر اللوجو قليلاً عشان لا يضغط */
  .navbar .brand-mark{
    width: 38px;
    height: 38px;
    border-radius: 14px;
    flex: 0 0 auto;
  }

  /* خليه يلتف فعلاً ويمنع القص */
  .navbar .brand-text{
    min-width: 0;
    flex: 1 1 auto;
  }
  .navbar .brand-title{
    display: block;
    font-size: .98rem;
    line-height: 1.25;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* اخفاء السطر الثاني لتخفيف الضغط */
  .navbar .brand-sub{
    display: none !important;
  }
}
/* ✅ HARD FIX (iOS Safari) — stop navbar text clipping */
@media (max-width: 576px){

  /* 1) اسمح للـNavbar بالتمدد عمودياً */
  .navbar{
    padding-top: .55rem !important;
    padding-bottom: .55rem !important;
    min-height: auto !important;
  }

  /* 2) لا تجعل عناصر الـNavbar "في المنتصف" لأنها تسبب قص عمودي مع الخطوط */
  .navbar .container{
    align-items: flex-start !important;
  }

  /* 3) اجعل البراند يأخذ سطرين بدون قص */
  .navbar .navbar-brand{
    align-items: flex-start !important;
    overflow: visible !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 3.25rem !important; /* اترك مساحة زر القائمة (يسار) */
  }

  /* 4) زر القائمة مثبت ولا يضغط النص */
  .navbar .navbar-toggler{
    position: absolute !important;
    left: .75rem !important;
    top: .6rem !important;            /* بدل 50% لتجنب القص */
    transform: none !important;
    z-index: 10 !important;
  }

  /* 5) عالج قص خطوط Cairo/Tajawal في iOS: line-height + padding */
  .navbar .brand-text{
    min-width: 0 !important;
    flex: 1 1 auto !important;
    padding-top: .15rem !important;
  }
  .navbar .brand-title{
    font-size: .98rem !important;
    line-height: 1.35 !important;
    padding-top: .15rem !important;
    padding-bottom: .15rem !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  /* 6) اخفاء السطر الثاني لتخفيف الضغط */
  .navbar .brand-sub{
    display: none !important;
  }

  /* 7) مهم: امنع أي قص من عناصر النافبار نفسها */
  .nav-glass,
  #mainNav{
    overflow: visible !important;
  }
}
