*,
*::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: space-between;
  padding: 0.6rem 0;
  gap: 1.5rem;
}

.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;
}

.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;
}

.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-kicker {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4c542;
  margin-bottom: 0.75rem;
}

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

.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;
}

.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-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

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

.btn-outline:hover {
  background-color: rgba(0,0,0,0.2);
}

/* 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.6rem;
}

.section-header p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

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

/* تحسين المسافة فوق قسم المنتجات */
#products {
  padding-top: 3rem;
}

/* Products accordion */
.families {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  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: box-shadow 0.15s ease, transform 0.15s ease;
}

.family-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* هيدر العائلة */
.family-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: #0a3b4a;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.family-header:hover {
  background-color: #f1f5f9;
}

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

.family-header .toggle-icon {
  font-size: 1.1rem;
  transition: transform 0.18s ease-out;
}

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

.family-card.open .family-header span.en {
  color: #e0e0e0;
}

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

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

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

/* عرض الأصناف داخل كل عائلة كقائمة من الكروت (اسم + صورة تحت) */
.family-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}

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

.product-name {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}

.product-card img {
  border-radius: 6px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Distribution */
#distribution p {
  max-width: 720px;
  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;
  align-items: flex-start;
}

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

.contact-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #0a3b4a;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.contact-item span.icon {
  width: 1.4rem;
  text-align: center;
}

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

/* Footer */
footer {
  background-color: #0a3b4a;
  color: #ffffff;
  text-align: center;
  padding: 1.2rem 0.5rem;
  font-size: 0.85rem;
  margin-top: 2rem;
}

/* 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: 40px;
  height: 40px;
  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;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease-out;
  z-index: 1200;
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-bar {
    padding-inline: 0.25rem;
  }

  .company-name {
    font-size: 0.85rem;
  }

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

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

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 60vh;
  }

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

  /* مسافة جانبية للكروت في الموبايل */
  .families {
    padding-inline: 0.5rem;
  }
}
