/* إعدادات عامة */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma,
    sans-serif;
  background: #0f172a;
  color: #0f172a;
  line-height: 1.8;
}

/* حاوية موحدة */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

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

/* ألوان مأخوذة من الشعار تقريباً */
:root {
  --blue-main: #008fbc;
  --blue-dark: #006489;
  --green-main: #4c9a3c;
  --bg-soft: #f1f5f9;
  --card-bg: #ffffff;
  --border-soft: #d4e4f2;
  --text-muted: #6b7280;
}

/* شريط علوي */
.top-bar {
  background: var(--blue-dark);
  color: #e5f3ff;
  font-size: 0.85rem;
}

.top-bar-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.top-bar a {
  text-decoration: underline;
}

/* الهيدر */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(241, 245, 249, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
}

/* اللوجو */
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.logo-text .logo-ar {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: 0.5px;
}

.logo-text .logo-en {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-main);
}

.logo-text .logo-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* القائمة */
.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.95rem;
}

.main-nav a {
  position: relative;
  padding-bottom: 4px;
  color: #0f172a;
}

.main-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--blue-main), var(--green-main));
  transition: 0.2s;
}

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

/* زر القائمة للجوال */
.menu-toggle {
  display: none;
  border: none;
  background: var(--blue-main);
  color: #fff;
  font-size: 1.2rem;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

/* قسم الهيرو */
.hero {
  position: relative;
  color: #ffffff;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background-image: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.92),
      rgba(8, 47, 73, 0.85)
    ),
    url("img/1.jpg");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.25),
    transparent 55%
  );
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  padding: 45px 0 55px;
  align-items: center;
}

.hero-text .hero-label {
  color: #e0f2fe;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.hero-text h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-text .hero-desc {
  font-size: 0.98rem;
  max-width: 32rem;
  color: #cbd5f5;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* أزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.22s ease;
  white-space: nowrap;
}

.primary-btn {
  background: linear-gradient(135deg, var(--blue-main), var(--green-main));
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.45);
}

.ghost-btn {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6);
}

.ghost-btn:hover {
  background: rgba(15, 23, 42, 0.6);
}

/* بادجات الهيرو */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.badge {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* كارت الصورة في الهيرو */
.hero-image-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
}

.hero-image-top img {
  display: block;
  width: 50%;
  height: 220px;
  object-fit: cover;
  margin-right: 100px;
}

.hero-image-bottom {
  padding: 12px 14px 14px;
  font-size: 0.88rem;
  color: #e5e7eb;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-image-bottom span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #93c5fd;
}

/* الأقسام العامة */
.section {
  padding: 52px 0;
  background: var(--bg-soft);
}

.section:nth-of-type(even) {
  background: #ffffff;
}

.section-content {
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 26px;
}

.section-header.align-right {
  text-align: right;
}

.section-header h3 {
  font-size: 1.5rem;
  color: var(--blue-dark);
  font-weight: 800;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* من نحن */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
}

.about-text p + p {
  margin-top: 10px;
}

.about-text {
  font-size: 0.97rem;
  color: #1f2937;
}

/* إحصائيات صغيرة */
.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.stat-item {
  min-width: 90px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* كروت الرؤية/الرسالة/القيم */
.about-cards {
  display: grid;
  gap: 12px;
}

.info-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.info-card h4 {
  font-size: 1rem;
  color: var(--green-main);
  margin-bottom: 4px;
}

/* الخدمات */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.service-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 18px 16px 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  transition: 0.18s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  border-color: rgba(59, 130, 246, 0.5);
}

.service-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 8px;
  background: linear-gradient(
    135deg,
    rgba(0, 143, 188, 0.1),
    rgba(76, 154, 60, 0.15)
  );
}

.service-card h4 {
  font-size: 1.05rem;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* المنتجات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  padding: 14px 14px 16px;
  text-align: center;
  transition: 0.18s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  border-color: rgba(59, 130, 246, 0.5);
}

/* ✅ تعديل مهم: صندوق الصورة يتركها كاملة بدون قص */
.product-image {
  width: 100%;
  height: auto;        /* لا ارتفاع ثابت */
  max-height: 260px;   /* حد أعلى لطول الصورة (تقدر تحذفه لو تبيها مفتوحة) */
  border-radius: 12px;
  overflow: visible;   /* لا تقص الصورة */
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 6px;
}

.product-image img {
  width: 100%;
  height: auto;        /* يظهر الحجم الطبيعي */
  object-fit: contain; /* ✅ أهم سطر يمنع القص */
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.02);
}

.product-card h4 {
  font-size: 1rem;
  color: var(--blue-dark);
  margin-bottom: 4px;
}

.product-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* اتصل بنا */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 26px;
}

.contact-list {
  list-style: none;
  font-size: 0.95rem;
  color: #111827;
}

.contact-list li + li {
  margin-top: 6px;
}

/* نموذج الاتصال */
.contact-form-wrapper {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 18px 16px 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.contact-form-wrapper h4 {
  font-size: 1.1rem;
  color: var(--blue-dark);
  margin-bottom: 10px;
}

.contact-form .form-group {
  margin-bottom: 10px;
}

.contact-form label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.88rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  padding: 8px 10px;
  font-size: 0.9rem;
  outline: none;
  transition: 0.15s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue-main);
  box-shadow: 0 0 0 2px rgba(0, 143, 188, 0.12);
}

.form-note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.full-width {
  width: 100%;
}

/* الفوتر */
.footer {
  background: #020617;
  color: #e5e7eb;
  font-size: 0.85rem;
  padding: 12px 0 14px;
}

.footer-content {
  text-align: center;
}

.footer-en {
  margin-top: 3px;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* استجابة الشاشات الصغيرة */
@media (max-width: 880px) {
  .hero-content,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding-top: 32px;
  }

  .hero-image-card {
    order: -1;
  }

  .header-content {
    align-items: center;
  }

  .main-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(241, 245, 249, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    flex-direction: column;
    padding: 10px 18px 12px;
    display: none;
  }

  .main-nav a {
    width: 100%;
    padding: 6px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .logo-text .logo-ar {
    font-size: 1rem;
  }

  .hero {
    min-height: 60vh;
  }
}

/* إظهار القائمة عند تفعيلها */
.main-nav.open {
  display: flex;
}

/* تحسينات شاملة للموبايل والتابلت */
@media (max-width: 768px) {

  body {
    font-size: 16px;
    line-height: 1.9;
  }

  .header-content {
    padding: 12px 0;
  }

  /* تكبير اللوجو قليلاً على الهاتف */
  .logo-img {
    width: 54px;
    height: 54px;
  }

  .logo-text .logo-ar {
    font-size: 1.05rem;
  }

  /* قائمة الهاتف */
  .main-nav {
    background: #ffffff;
    padding: 12px;
    gap: 12px;
  }

  .main-nav a {
    font-size: 1rem;
    padding: 10px 0;
    width: 100%;
    text-align: center;
    border-radius: 6px;
  }

  .menu-toggle {
    display: inline-flex;
    padding: 8px 12px;
    font-size: 1.3rem;
  }

  /* قسم الهيرو */
  .hero {
    min-height: 75vh;
    background-position: center;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: 20px;
  }

  .hero-image-card {
    margin-top: 20px;
  }

  .hero-text h2 {
    font-size: 1.7rem;
    line-height: 2.2rem;
  }

  .hero-text .hero-desc {
    font-size: 1rem;
    line-height: 1.7rem;
  }

  .hero-actions {
    justify-content: center;
  }

  /* البادجات */
  .hero-badges {
    justify-content: center;
  }

  /* قسم من نحن */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    justify-content: center;
  }

  /* الخدمات */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* المنتجات - ✅ لا نضع ارتفاع ثابت هنا */
  .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .product-card {
    padding: 10px;
  }

  /* نفس إعدادات الصورة بدون قص */
  .product-image {
    max-height: 220px;
  }

  /* اتصل بنا */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    margin-top: 20px;
  }

  /* الفوتر */
  .footer {
    font-size: 0.9rem;
    padding: 16px 0;
  }
}

/* تحسين إضافي لشاشات أصغر (مثل iPhone SE) */
@media (max-width: 460px) {

 .products-grid {
  grid-template-columns: 1fr 1fr;
}

  .hero-text h2 {
    font-size: 1.5rem;
  }

  .logo-img {
    width: 48px;
    height: 48px;
  }

  /* صورة المنتج تبقى كاملة */
  .product-image {
    max-height: 210px;
  }
}
@media (max-width: 768px) {

  /* المنتجات في الهاتف */
  .products-grid {
  grid-template-columns: 1fr 1fr;
}

  .product-image {
    max-height: 200px;  /* يمنع الصورة تطول زيادة */
    padding: 6px;
    background: #fff;
  }

  .product-image img {
    width: 100%;
    height: auto;
    object-fit: contain; /* تأكيد عدم القص */
  }
}

