:root {
  --main-color: #1b2b49;
  --accent-color: #d92525;
  --secondary-color: #2c3e50;
  --light-bg: #f5f7fa;
  --text-dark: #333;
  --text-light: #f8f9fa;
  --transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tajawal', sans-serif;
}

html {
  scroll-behavior: smooth;
}

.custom-box-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 30px 15px;
}

.custom-box {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  width: 100%;
  max-width: 950px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s ease forwards;
}
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl; /* لضمان دعم اللغة العربية بشكل صحيح */
    background-color: #f4f4f4;
}



/* محتوى الصفحة الرئيسي */
.main-content {
    margin-right: 0; /* لا يوجد هامش في البداية */
    padding: 20px;
    transition: margin-right 0.5s; /* للانتقال السلس عند فتح القائمة */
}

.section-title {
    font-size: 24px;
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

/* قائمة الجوال (Mobile Menu) */
.mobile-menu {
    display: none; /* مخفي افتراضياً على الشاشات الكبيرة */
    font-size: 30px;
    color: var(--accent-gold);
    cursor: pointer;
    transition: transform 0.4s ease; /* انتقال أبطأ */
}

.mobile-menu:hover {
    transform: scale(1.18); /* تكبير الأيقونة عند التحويم */
}

/* لتجربة الأيقونة الحمراء في أسفل الصفحة */
.red-arrow-up {
    width: 50px;
    height: 50px;
    background-color: #e74c3c;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* العنوان */
.custom-box-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1b2b49;
  text-align: center;
  margin-bottom: 20px;
}

/* القائمة */
.custom-projects-list {
  list-style: none;
  padding: 0;
}

.custom-projects-list li {
  background-color: #f0f4fa;
  margin-bottom: 12px;
  padding: 15px;
  border-right: 6px solid #d92525;
  border-radius: 8px;
  font-size: 1.1rem;
  color: #1b2b49;
  transition: transform 0.3s ease;
}

.custom-projects-list li:hover {
  transform: scale(1.02);
}

/* حركة البوكس */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.8;
  overflow-x: hidden;
  direction: rtl;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, var(--main-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 30px 0 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header-content {
  position: relative;
  z-index: 2;
}

header img {
  width: 120px;
  height: auto;
  margin-bottom: 15px;
  transition: var(--transition);
  background-color: white;
  border-radius: 12px;
  padding: 6px;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
  background-size: 50px 50px;
  opacity: 0.3;
}

header img:hover {
  transform: scale(1.05);
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  max-width: 800px;
  margin: 0 auto;
}

/* Navigation */
nav {
  background: rgba(34, 53, 89, 0.95);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
}

nav a {
  color: white;
  margin: 0 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
}

nav a:hover {
  color: var(--accent-color);
}

nav a:hover::after {
  width: 100%;
  left: 0;
}

.nav-container i{
  display: none;
  color: white;
  margin: 0 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 3vh;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}
.nav-container i::after {
 content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition);
}
.nav-container i:hover {
  color: var(--accent-color);
}
.nav-container button{
  border: none;
  background-color: #1b2b4900;
 color: white;
  margin: 0 20px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}
.nav-container button:hover{
  color: var(--accent-color);
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 0;
  z-index: 999;
  overflow-x: hidden;
  background-color: rgb(27, 43, 73);
  box-shadow: -10px 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-radius: 20px 0 10px 0;
  transition: width 0.7s ease;
}




.sidebar a{
  position: relative;
  margin: 10px 0;
  font-size: 2.5vh;
}

.sidebar i {
  position: relative;
  right: 85px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 4vh;
  transition: var(--transition);
  padding: 10px 0;
}

.sidebar i:hover {
  color: var(--accent-color);
}


/* Hero Section */
.hero {
  background: linear-gradient(rgba(27, 43, 73, 0.85), rgba(27, 43, 73, 0.85)), 
              url('https://images.unsplash.com/photo-1583337130417-3346a1e9bfa7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center/cover;
  color: white;
  padding: 150px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero h2 {
  font-size: 3.2rem;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 30px;
  color: rgba(255,255,255,0.9);
}

.cta-button {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 12px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 2px solid var(--accent-color);
  box-shadow: 0 5px 15px rgba(217, 37, 37, 0.3);
}

.cta-button:hover {
  background: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(217, 37, 37, 0.4);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23f5f7fa"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23f5f7fa"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23f5f7fa"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

/* Section Titles */
.section-title {
  text-align: center;
  margin-bottom: 70px;
  color: var(--main-color);
  font-size: 2.8rem;
  font-weight: 800;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-color), var(--main-color));
  display: block;
  margin: 15px auto 0;
  border-radius: 5px;
}

/* Services Section */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service {
  background: white;
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: var(--transition);
  border-bottom: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.service::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: var(--accent-color);
  transform: translateY(-100%);
  transition: var(--transition);
}

.service:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-bottom-color: var(--accent-color);
}

.service:hover::before {
  transform: translateY(0);
}

.service i {
  font-size: 3.5rem;
  margin-bottom: 25px;
  color: var(--main-color);
  transition: var(--transition);
}

.service:hover i {
  color: var(--accent-color);
  transform: scale(1.1);
}

.service h3 {
  color: var(--main-color);
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.service h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-color);
  transition: var(--transition);
}

.service:hover h3::after {
  width: 80px;
}

.service p {
  color: #555;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Services Section */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20%, 1fr));
  grid-auto-rows: 200px;
  gap: 30px;
}

.work {
  background: white;
  padding: 0;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.work img {
  display: flex;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.MImageBTN {
  display: flex;
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition-duration: 0.3s;
}

.work:hover .MImageBTN {
  opacity: 1;
}

/* Services Section */
.certificates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30%, 1fr));
  grid-auto-rows: 550px;
  gap: 30px;
}

.certificate {
  background: white;
  padding: 0;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.certificate img {
  display: flex;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.certificate:hover .MImageBTN {
  opacity: 1;
}

.MImageBTN svg {
  display: flex;
  width: 50px;
  height: 50px;
  fill: #fff;
  cursor: pointer;
  transition-duration: 0.3s;
}

.MImageBTN svg:hover {
  transform: scale(1.1);
  fill: var(--accent-color);
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text {
  flex: 1;
  text-align: right;
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.9;
}

.about-text p {
  margin-bottom: 20px;
}

.about-image {
  flex: 1;
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition);
}


.about-image img {
  width: 80%;
  height: auto;
  display: block;
  padding-right: 50px;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: center;
}

.contact-info {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.contact-info h3 {
  color: var(--main-color);
  font-size: 1.8rem;
  margin-bottom: 25px;
  font-weight: 700;
}

.contact-info p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #555;
}

.contact-details {
  margin-top: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  justify-content: center;
}

.contact-item i {
  width: 50px;
  height: 50px;
  background: var(--light-bg);
  color: var(--main-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-left: 15px;
  transition: var(--transition);
}

.contact-item:hover i {
  background: #ddd;
  color: white;
  transform: scale(1.1);
}

.contact-item span {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 500;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.social-links a {
  width: 45px;
  height: 45px;
  background: var(--light-bg);
  color: var(--main-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-5px);
}

.contact-form {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--main-color);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light-bg);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(217, 37, 37, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  width: auto;
}

.submit-btn:hover {
  background: var(--main-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(217, 37, 37, 0.3);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--main-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-align: center;
  padding: 60px 0 30px;
  margin-top: 80px;
  position: relative;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  text-align: right;
}

.footer-column h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background: var(--accent-color);
}

.footer-column p {
  margin-bottom: 20px;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
}

.footer-links li {
  margin-bottom: 12px;
  list-style: none;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: var(--transition);
  display: block;
}

.footer-links a:hover {
  color: var(--accent-color);
  padding-right: 10px;
}

.footer-bottom {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* Contact Information Section */
.contact-info-section {
  background: white;
  padding: 60px 0;
  text-align: center;
}

.contact-info-box {
  max-width: 800px;
  margin: 0 auto;
  background: var(--light-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-info-box h2 {
  color: var(--main-color);
  margin-bottom: 30px;
  font-size: 2rem;
}

.contact-detail {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.contact-detail strong {
  color: var(--accent-color);
  font-weight: 700;
}

.working-hours {
  margin-top: 30px;
  font-style: italic;
  color: var(--secondary-color);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--main-color);
  transform: translateY(-5px);
}

.WorkImage {
  width: 200px;
  height: 100px;
}

/* Responsive Design */
@media (max-width: 800px){
  .hideonmobile {
    display: none;
  }
  .nav-container i{
    display: flex;
  }
  .nav-container {
    display: flex;
    justify-content: space-between;
  }
}
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    margin-top: 30px;
  }
  
  .section-title {
    font-size: 2.4rem;
  }
  
  .hero h2 {
    font-size: 2.8rem;
  }
  
  .contact-info-box {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2.4rem;
  }
  
  header p {
    font-size: 1.1rem;
  }
  
  .hero {
    padding: 100px 20px;
  }
  
  .hero h2 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 50px;
  }
  
  .nav-container {
    padding: 10px;
  }
  
  nav a {
    margin: 5px 15px;
    font-size: 1rem;
  }
  
  .contact-info-box {
    padding: 25px 20px;
  }
}

@media (max-width: 576px) {
  header h1 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .service {
    padding: 30px 20px;
  }
  
  .contact-info, .contact-form {
    padding: 30px 20px;
  }
  
  .contact-info-box h2 {
    font-size: 1.6rem;
  }
  
  .contact-detail {
    font-size: 1rem;
  }
}