/* Start Global Rules */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
body {
  font-family: "Noto Kufi Arabic", sans-serif;
}
.container {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}
/* Small */
@media (min-width: 768px) {
    .container {
        width: 750px;
    }
}
/* Medium */
@media (min-width: 992px) {
    .container {
        width: 970px;
    }
}
/* Large */
@media (min-width: 1200px) {
    .container {
        width: 1170px;
    }
}
/* End Global Rules */

/* Start Header */
.header {
  background-color: #fff;
  direction: rtl;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 85px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between; /* الأعمدة الثلاثة */
  align-items: center;
  width: 100%;
  padding: 0 40px;
}
.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
}

/* اللوقو */
.header .logo {
  position: relative;
  right: 0;
  max-height: 250px;
  width: auto;
}

/* الروابط */
.header .links {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header .links ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

.header .links a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 16px;
  position: relative;
  padding-bottom: 4px;
  transition: all 0.3s ease;
}

/* الخط عند المرور */
.header .links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #9A12BB; /* لون الخط الجديد */
  transition: width 0.3s ease;
}

.header .links a:hover::after {
  width: 100%;
}

/* لا يتغير اللون عند المرور */
.header-center .links li a:hover {
  color: #333;            /* اللون يبقى مثل الأصل */
  background: transparent; /* الخلفية لا تتغير */
}

.header-center .links li a:hover::after {
  width: 100%; /* يظهر الخط تحت النص */
}

/* تسجيل الدخول */
.header-left .login {
  background-color: #02594B; /* الخلفية خضراء */
  color: #fff !important;               /* النص أبيض */
  padding: 10px 22px;        /* يوسع المساحة عن الروابط */
  margin-right: 200px;        /* مسافة عن الروابط */
  border-radius: 8px;
  border: 2px solid #02594B; /* الحدود خضراء */
  transition: all 0.3s ease;
}

/* عند المرور أو التركيز */
.header-left .login:hover,
.header-left .login:focus {
  background-color: #fff;      /* الخلفية بيضاء */
  color: #02594B !important;              /* النص أخضر */
  border: 2px solid #02594B;   /* الحدود خضراء */
  transform: scale(1.05);
}

/* عند الضغط */
.header-left .login:active {
  background-color: #fff;
  color: #02594B;
  border: 2px solid #02594B;
  transform: scale(1);
}
.header-left .login::after {
  display: none;  /* يمنع أي خط أسفل الزر */
}
/* End Header */

/* Start Background */
.hero {
  width: 100%;
  min-height: 32vh; /* تصغير ارتفاع الخلفية */
  background-color: #02594B;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* يجعل المحتوى باتجاه اليمين */
  text-align: right;
  direction: rtl;
  padding: 2rem 5rem 2rem 2rem; /* padding من اليمين أكثر */
  overflow: hidden;
}

/* النص */
.hero .left {
  position: absolute;
  top: rem;       /* ارتفاع النص */
  right: 400px;    /* المسافة من يمين الشاشة، حسب حجم الشعار */
  max-width: 980px;
  color: white;
  text-align: right;
  z-index: 2;
}

/* التحكم عند الشاشات الصغيرة */
@media (max-width: 1200px) {
  .hero .left {
    max-width: 60%; /* يقل الحجم مع الشاشة */
    margin-right: 1rem; /* يقل المسافة */
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .hero .right img {
    width: 350px;
  }
}

/* العنوان */
.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* النص */
.hero p {
  font-size: 1.3rem;
  color: #d9ebe4;
  line-height: 1.6;
}

/* الشعار */
.hero .right {
  position: absolute;
  right: 0;  /* أقصى اليمين */
  bottom: -40px; /* مرفوع شوي للأعلى */
  z-index: 1;
}

/* الصورة داخل الشعار */
.hero .right img {
  width: 600px; /* كبر الشعار */
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(-4px 6px 20px rgba(0, 0, 0, 0.3)); /* ظل ناعم */
    transform: translate(80px, 0); /* حرك 30px يمين */

}

/* End Background */

/* Start Services */
.services-section {
  margin: 0 auto;           
  padding: 60px 0;          
  max-width: 1200px;        
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px; 
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 0;
}

.flip-card {
  background-color: transparent;
  width: 290px;
  height: 220px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  direction: rtl;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  background-color: #f2d368;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flip-card-front i {
  font-size: 38px;
  color: #02594B;
  margin-bottom: 10px;
}

.flip-card-front p {
  font-size: 1.3rem;
  color: white;
  font-weight: 600;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

.flip-card-back {
  background-color: #02594B;
  color: white;
  transform: rotateY(180deg);
  padding: 20px;
  font-size: 1.1rem;
  line-height: 1.6;
  border-radius: 15px;
}

.services-section:last-of-type {
  padding-bottom: 60px;
}


/* End Services */

/* Start Footer */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}


.main-content {
    flex: 1;
}

.footer {
    background-color: #02594B;
    color: #fff;
    font-family: "Noto Kufi Arabic", sans-serif;
    direction: rtl; /* النص عربي */
    font-size: 20px;
}

.footer-container {
    display: flex;
    flex-direction: row-reverse; /* اللوقو يمين والكلام يسار */
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px;
    flex-wrap: wrap;
}

.footer-left {
    direction: rtl; 
    text-align: right;
}

.footer-left h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.footer-left p {
    margin: 3px 0;
    font-size: 16px;
}

.footer-left a {
    color: #fff;
    text-decoration: none;
}

.footer-left a:hover {
    text-decoration: underline;
}
.email-link {
    color: #ffffff;        
    text-decoration: none; 
}

.email-link:hover {
    color: #ffffff;        
    text-decoration: none; 
}
.phone-link {
    color: #ffffff;        
    text-decoration: none; 
}

.phone-link:hover {
    color: #ffffff;        
    text-decoration: none; 
}
/* اللوقو على اليمين */
.footer-right .footer-logo {
    max-height: 300px;
    width: auto;
}

/* الحقوق */
.footer-bottom {
    background-color: #fff;
    color: #333;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    margin-top: 10px;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* End Footer */

/*  Start Responsive Web Design */


/* الهواتف الصغيرة (أقل من 768px) */
@media (max-width: 767px) {

  /* ✅ الهيدر */
  .header {
    height: auto;
    padding: 10px 0;
  }

  .header .container {
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    gap: 10px;
  }

  .header .links ul {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 0;
  }

  .header-left .login {
    margin-right: 0;
    padding: 8px 18px;
  }

  /* ✅ قسم الخلفية (Hero Section) */
  .hero {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
  }

  .hero .left {
    position: static;
    max-width: 100%;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .hero .right {
    position: static;
    transform: none;
  }

  .hero .right img {
    width: 85%;
    max-width: 320px;
    height: auto;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  /* ✅ قسم الخدمات (Services Section) */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    justify-content: center;
    max-width: 100%;
  }

  .flip-card {
    width: 85%;
    height: 220px;
    margin: 0 auto;
  }

  /* ✅ الفوتر */
  .footer-container {
    flex-direction: column;
    text-align: center;
    padding: 25px 15px;
  }

  .footer-right {
    margin-bottom: 15px;
  }

  .footer-left {
    text-align: center;
  }

  .footer-right .footer-logo {
    max-height: 120px;
  }
}

/* ✅ الأجهزة اللوحية (من 768px إلى 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .header .container {
    padding: 0 20px;
  }

  .header .links ul {
    gap: 15px;
  }

  .hero .left {
    right: 150px;
    max-width: 70%;
  }

  .hero .right img {
    width: 400px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer-container {
    padding: 30px;
  }
}

/* ✅ الشاشات المتوسطة (من 992px إلى 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .right img {
    width: 450px;
  }
}

/* End Responsive Web Design */

