:root {
  --brand-orange: #f17a25;
  --brand-blue: #1f3a8a;
  --brand-blue-dark: #142861;
  --brand-accent: #e63946;
  --soft: #f7f9fc;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1f2937;
  background: #fff;
}

html[lang="en"] body {
  font-family: 'Poppins', 'Cairo', system-ui, sans-serif;
}

/* Top bar */
.top-bar {
  background: var(--brand-blue-dark);
  color: #fff;
}
.top-bar .btn-outline-light.active,
.top-bar .btn-outline-light:focus {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
}

/* Brand logo (CSS-based, evokes the letterhead's circle + stripe) */
.brand-logo .logo-circle {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 0 38%, #fff 38% 62%, transparent 62% 100%),
    linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange) 50%, var(--brand-blue) 50%, var(--brand-blue) 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  position: relative;
}
.brand-text strong { color: var(--brand-blue-dark); font-size: 1.05rem; line-height: 1.1; }
.brand-text small { font-size: .72rem; }

/* Nav */
.navbar .nav-link {
  font-weight: 600;
  color: #1f2937;
  position: relative;
  padding: .5rem .75rem;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 50%;
  bottom: .25rem;
  height: 2px;
  width: 0;
  background: var(--brand-orange);
  transition: all .25s ease;
  transform: translateX(50%);
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after { width: 60%; inset-inline: 20%; transform: none; }

/* Hero */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(20,40,97,.85) 0%, rgba(241,122,37,.75) 100%),
    url('../images/inventory/inv-4.jpeg') center/cover no-repeat;
  min-height: 70vh;
  display: flex;
  align-items: center;
}
.min-vh-60 { min-height: 60vh; }
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,.07), transparent 60%);
  pointer-events: none;
}

/* Section helpers */
.section-tag {
  display: inline-block;
  background: rgba(241,122,37,.12);
  color: var(--brand-orange);
  font-weight: 700;
  font-size: .8rem;
  padding: .35rem .9rem;
  border-radius: 50px;
  margin-bottom: .75rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.section-title {
  font-weight: 800;
  color: var(--brand-blue-dark);
  margin-bottom: 1rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--brand-orange);
  border-radius: 4px;
  margin-top: .5rem;
}
.text-center .section-title::after { margin-inline: auto; }

/* Highlights */
.highlight-box {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef2f7;
  transition: transform .25s ease, box-shadow .25s ease;
}
.highlight-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(20,40,97,.08);
}

/* About collage */
.about-collage {
  position: relative;
  min-height: 420px;
}
.a-img {
  position: absolute;
  border: 6px solid #fff;
  object-fit: cover;
  transition: transform .3s ease;
}
.a-img:hover { transform: scale(1.03); z-index: 5; }
.a-img-1 { width: 70%; height: 280px; top: 0; inset-inline-start: 0; }
.a-img-2 { width: 55%; height: 230px; bottom: 0; inset-inline-end: 0; }
.a-img-3 { width: 40%; height: 170px; top: 55%; inset-inline-start: 35%; }

/* Category cards */
.cat-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #eef2f7;
  transition: all .3s ease;
  color: inherit;
  display: block;
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(20,40,97,.12);
}
.cat-img {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.cat-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,40,97,.4), transparent 50%);
}
.cat-body { padding: 1.25rem 1.25rem 1.5rem; text-align: center; }
.cat-body i { margin-bottom: .5rem; }
.cat-body h4 { color: var(--brand-blue-dark); font-weight: 800; }

/* Galleries */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: #f3f4f6;
  aspect-ratio: 1 / 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: "\F52A"; /* bootstrap-icons search */
  font-family: "bootstrap-icons";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,40,97,.55);
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery-item:hover::after { opacity: 1; }

/* Contact */
.contact-box {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef2f7;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}

/* Form fields: align text & placeholder per current language direction */
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
  text-align: right;
  direction: rtl;
}
html[dir="ltr"] .form-control,
html[dir="ltr"] .form-select {
  text-align: left;
  direction: ltr;
}
html[dir="rtl"] .form-control::placeholder { text-align: right; }
html[dir="ltr"] .form-control::placeholder { text-align: left; }
.contact-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--brand-blue-dark) 0%, #0c1a44 100%);
}
.footer a:hover { color: var(--brand-orange) !important; }

/* Back to top */
.back-top {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  z-index: 1000;
  transition: transform .2s ease;
}
.back-top.visible { display: flex; }
.back-top:hover { color: #fff; transform: translateY(-3px); }

/* Modal preview */
#imgModalImg { max-height: 85vh; object-fit: contain; width: 100%; }

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero { min-height: 55vh; }
  .a-img-1 { width: 100%; height: 200px; position: static; margin-bottom: 1rem; }
  .a-img-2, .a-img-3 { display: none; }
  .about-collage { min-height: auto; }
}

/* RTL/LTR icon margin helpers */
html[dir="ltr"] .ms-1 { margin-right: .25rem !important; margin-left: 0 !important; }
html[dir="ltr"] .ms-2 { margin-right: .5rem !important; margin-left: 0 !important; }
html[dir="ltr"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
html[dir="ltr"] .me-2 { margin-left: .5rem !important; margin-right: 0 !important; }
