/* إعدادات عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Tajawal", sans-serif;
  background-color: #f8f9fb;
  color: #222;
  line-height: 1.7;
  transition: background 0.6s, color 0.6s;
  overflow-x: hidden;
  
}

/* الرأس */
header {
  background: linear-gradient(90deg, #004b8d, #0070c9);
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  opacity: 0.97;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-area img {
  filter: brightness(0) invert(1); /* يحول الشعار للون الأبيض */
  width: 50px;
}

h1 {
  font-size: 22px;
  font-weight: 700;
}

/* الروابط */
nav a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #ffda47;
}

/* زر اللغة */
.lang-btn {
  background: #ffb703;
  color: #004b8d;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.lang-btn:hover {
  background: #ffd166;
}

/* القسم الترحيبي */
.hero {
  background: linear-gradient(rgba(0, 46, 81, 0.585), rgba(1, 30, 52, 0.6), rgba(0, 47, 87, 0.8), rgba(0, 46, 87)),
    url("https://prpbuildmart.com/wp-content/uploads/2023/08/49a73f117b-1.jpeg");
  background-size: cover;
  background-position: center;
  color: #ffb703;
  text-align: center;
  padding: 140px 20px;
  animation: fadeIn 0.5s ease;
}
.hero img {
  width: 180px; /* تكبير الشعار */
  margin-bottom: 25px;
  filter: brightness(0) invert(1); /* يحول الشعار للون الأبيض */
  animation: zoomIn 1.5s ease;
}
.hero h2 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #ffffff; /* جعل النص أبيض */
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5); /* ظل خفيف أسود لتحسين الوضوح */
}


.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 10px auto;
}

/* الأقسام العامة */
section {
  width: 90%;
  max-width: 1100px;
  margin: 60px auto;
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

section h2 {
  color: #004b8d;
  margin-bottom: 20px;
  border-right: 5px solid #ffb703;
  padding-right: 10px;
  font-size: 26px;
}

ul {
  list-style-type: square;
  margin-right: 25px;
  margin-top: 10px;
}

li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* شبكة الصور (تعديل جديد) */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  justify-items: center;
  align-items: stretch;
  margin-top: 25px;
}

.image-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.image-grid img:hover {
  transform: scale(1.04);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

/* التذييل */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 25px;
  font-size: 15px;
  margin-top: 60px;
}

/* زر العودة للأعلى */
#toTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #004b8d;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  font-size: 18px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, transform 0.3s;
}

#toTop:hover {
  background-color: #0070d1;
  transform: scale(1.1);
}

/* شاشة التحميل */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #004b8d;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 1s ease forwards;
}

.loader-logo {
  width: 110px;
  filter: brightness(0) invert(1);
  animation: logoZoom 1.6s ease-in-out infinite alternate;
}

.loader-circle {
  margin-top: 20px;
  width: 45px;
  height: 45px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

@keyframes logoZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.15);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* الحركات */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* الشاشات الصغيرة */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    text-align: center;
  }

  nav {
    margin-top: 10px;
  }

  section {
    padding: 25px;
  }

  section h2 {
    font-size: 22px;
  }

  .hero h2 {
    font-size: 26px;
  }

  .hero p {
    font-size: 16px;
  }

  .image-grid img {
    height: 220px;
  }
}
