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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #ffffff;
  color: #222222;
  line-height: 1.7;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===========================
   HEADER
   =========================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #0a3b4a;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* تجميع العناصر في نفس الجهة */
  padding: 0.6rem 0;
  gap: 1rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-wrap img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.company-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-inline-start: auto; /* إبعادها عن اسم الشركة وتقريبها من المنيو/المنيو + اللينكات */
}

.lang-switch .lang {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  opacity: 0.75;
  transition: 0.2s;
}

.lang-switch .lang:hover {
  opacity: 1;
}

.lang-switch .lang.active {
  background-color: #ffffff;
  color: #0a3b4a;
  font-weight: 600;
  opacity: 1;
}

.lang-switch .divider {
  opacity: 0.4;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.15rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #f4c542, #e53935);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease-out;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  color: #ffffff;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #071f28;
  opacity: 0.75;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  transform: scale(1.03);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  margin: 0 0 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  max-width: 650px;
  margin: 0 auto 1.5rem;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* BUTTONS (نفس الألوان السابقة) */
.btn {
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #f4c542, #e53935);
  color: #1b2227;
  font-weight: 600;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.65);
}

.btn-outline:hover {
  background-color: rgba(255,255,255,0.15);
}

/* ===========================
   SECTIONS
   =========================== */
section {
  padding: 3.5rem 0;
}

section:nth-of-type(odd) {
  background-color: #f8fafb;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
  color: #0a3b4a;
}

/* ABOUT SECTION */
#about p {
  max-width: 750px;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: 1rem;
}

/* ===========================
   PRODUCTS ACCORDION
   =========================== */
.families {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  max-width: 900px;
  margin: 0 auto;
}

.family-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: 0.15s ease;
}

.family-card:hover {
  transform: translateY(-2px);
}

.family-header {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0a3b4a;
  cursor: pointer;
}

.family-header span.en {
  margin-inline-start: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.family-card.open .family-header {
  background: linear-gradient(90deg, #0a3b4a, #145c72);
  color: #ffffff;
}

.toggle-icon {
  transition: transform 0.2s;
}

.family-card.open .toggle-icon {
  transform: rotate(180deg);
}

.family-body {
  display: none;
  padding: 1rem;
}

.family-card.open .family-body {
  display: block;
}

.family-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
}

.product-card {
  width: 100%;
  max-width: 260px;
  background-color: #f9fbfc;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.product-name {
  font-weight: 600;
  margin-top: 0.5rem;
}

/* ===========================
   DISTRIBUTION
   =========================== */
/* لو حاب تضيف تعديل للنص هنا لاحقاً */
#distribution p {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
}

/* ===========================
   CONTACT
   =========================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

.contact-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.contact-note {
  font-size: 0.85rem;
  color: #666;
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background-color: #0a3b4a;
  color: #ffffff;
  text-align: center;
  padding: 1.3rem 0.5rem;
  font-size: 0.85rem;
}

/* ===========================
   FLOATING BUTTONS
   =========================== */
.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  z-index: 1200;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(7,31,40,0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease-out;
  z-index: 1200;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===========================
   MOBILE RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset-inline: 0;
    top: 56px;
    background-color: #0a3b4a;
    flex-direction: column;
    padding: 1rem 1.5rem;
    transform: translateY(-130%);
    transition: transform 0.2s ease-out;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .hero {
    min-height: 60vh;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  /* ضبط مكان AR | EN بالنسبة للمنيو على الموبايل */
  .lang-switch {
    margin-right: auto; /* دفع اللغات ناحيّة المنيو */
    margin-inline-start: 0;
  }

  .nav-toggle {
    margin-right: 0.5rem; /* تقريب المنيو من اللغات */
  }

  header .nav-bar {
    gap: 0.4rem; /* تقليل الفراغات العامة في الهيدر بالموبايل */
  }
}
