/* ========================================
   مؤسسة مسيعيد خلف الجميلي للمقاولات
   نمط عصري لشركة مقاولات - دهانات وسيراميك
   ======================================== */

/* متغيرات الألوان */
:root {
  --primary-color: #c49a2b;
  --primary-dark: #a07d22;
  --primary-light: #e0b549;
  --secondary-color: #1a2a3a;
  --secondary-dark: #0f1a24;
  --dark-bg: #0a0f14;
  --gray-bg: #f5f5f0;
  --text-dark: #2c2c2c;
  --text-light: #6c6c6c;
  --white: #ffffff;
  --shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ========================================
   ضبط معرض الأعمال (Projects Section)
   ======================================== */

/* المسافة بين الصفوف */
.projects .portfolio-container {
  display: flex;
  flex-wrap: wrap;
  margin: -15px;
}

/* المسافة بين الأعمدة */
.projects .portfolio-item {
  padding: 15px;
  margin-bottom: 0;
}

/* المسافة بين الصور داخل العمود الواحد */
.projects .portfolio-content {
  margin-bottom: 0;
  height: 100%;
}

/* ضبط الصور نفسها */
.projects .portfolio-content img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

/* المسافة بين الصور المتعددة في نفس العنصر */
.projects .portfolio-content img:not(:first-child) {
  margin-top: 10px;
}

/* إضافة مسافة بين الأعمدة في الصف */
.projects .row.gy-4 {
  --bs-gutter-y: 1.5rem;
  --bs-gutter-x: 1.5rem;
  margin-top: 0;
  margin-left: calc(-1 * var(--bs-gutter-x) / 2);
  margin-right: calc(-1 * var(--bs-gutter-x) / 2);
}

.projects .row.gy-4 > * {
  padding-left: calc(var(--bs-gutter-x) / 2);
  padding-right: calc(var(--bs-gutter-x) / 2);
  margin-top: var(--bs-gutter-y);
}

/* تحسين ظهور الـ Portfolio Info */
.projects .portfolio-info {
  padding: 1rem;
  text-align: center;
  background: var(--white);
  border-radius: 0 0 15px 15px;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
  .projects .portfolio-content img {
    height: 200px;
  }
  
  .projects .row.gy-4 {
    --bs-gutter-y: 1rem;
    --bs-gutter-x: 1rem;
  }
  
  .projects .portfolio-item {
    padding: 10px;
  }
}

@media (max-width: 576px) {
  .projects .portfolio-content img {
    height: 180px;
  }
}
/* ========================================
   توسيط جميع السيكشنات
   ======================================== */

/* توسيط الحاويات الرئيسية */
.container,
.container-fluid {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* توسيط محتوى السيكشنات */
section {
  width: 100%;
  overflow-x: hidden;
}

section .container,
section .container-fluid {
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

/* توسيط النصوص في السيكشنات */
.section-header {
  text-align: center;
  width: 100%;
}

.section-header h2,
.section-header p {
  text-align: center;
}

/* توسيط أقسام الخدمات */
.get-started .content {
  text-align: center;
}

.get-started .content h3,
.get-started .content h1 {
  text-align: center;
}

/* توسيط الصفوف (rows) */
.row {
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* لضبط الأعمدة (columns) */
.col-lg-6,
.col-lg-12,
.col-lg-4,
.col-lg-5 {
  position: relative;
  width: 100%;
}

/* منع أي انحراف من الـ RTL */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .text-center {
  text-align: center !important;
}
body {
  font-family: 'El Messiri', 'Cairo', 'Tajawal', sans-serif;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
}
/* ========================================
   الهيدر (Header) والناف بار (Navbar)
   ======================================== */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 10px 0;
  transition: var(--transition);
  border-bottom: 2px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}
/* إزالة الخط من الرابط بالكامل */
.header .logo {
  text-decoration: none !important;
  border-bottom: none !important;
}

.header .logo h1 {
  border-bottom: none !important;
  text-decoration: none !important;
}
/* منع التمرير الأفقي من الهيدر */
.header .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  overflow-x: hidden;
}

.header .logo h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* ========================================
   أزرار القائمة للأجهزة المحمولة
   ======================================== */
.mobile-nav-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
  background: none;
  border: none;
  padding: 0;
  color: var(--secondary-color);
}

.mobile-nav-toggle:hover {
  color: var(--primary-color);
}

/* ========================================
   شريط التنقل (Navbar) - النسخة المكتبية
   ======================================== */
.navbar {
  display: flex;
  align-items: center;
}

.navbar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.navbar ul li {
  position: relative;
}

.navbar ul li a {
  color: var(--secondary-color);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 8px 0;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

/* تأثير الخط السفلي */
.navbar ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
  width: 100%;
  right: auto;
  left: 0;
}

.navbar ul li a:hover,
.navbar ul li a.active {
  color: var(--primary-color);
}

/* ========================================
   استجابة الناف بار للشاشات المتوسطة والصغيرة
   ======================================== */
@media (max-width: 992px) {
  /* منع التمرير الأفقي من الجسم بالكامل */
  body {
    overflow-x: hidden;
    width: 100%;
  }
  
  .mobile-nav-toggle {
    display: block;
    z-index: 10001;
    position: relative;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: 0.3s ease-in-out;
    z-index: 10000;
    padding: 80px 25px 30px;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
  }

  .navbar.active {
    right: 0;
  }

  .navbar ul {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }

  .navbar ul li a {
    font-size: 1.1rem;
    display: block;
    width: 100%;
    padding: 12px 0;
    white-space: normal;
  }

  /* تحكم في ظهور وإخفاء أزرار القائمة */
  .mobile-nav-show {
    display: block;
  }
  
  .mobile-nav-hide {
    display: none;
  }
  
  /* عند فتح القائمة */
  body.nav-open {
    overflow: hidden;
  }
  
  body.nav-open .mobile-nav-show {
    display: none;
  }
  
  body.nav-open .mobile-nav-hide {
    display: flex;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10001;
    background: var(--white);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
  }
}

/* تحسين إضافي للشاشات الصغيرة جداً */
@media (max-width: 576px) {
  .header .logo h1 {
    font-size: 0.9rem;
    white-space: normal;
    line-height: 1.3;
    max-width: 180px;
  }
  
  .navbar {
    width: 85%;
  }
}

/* منع التمرير الأفقي من الجسم بالكامل */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* التأكد من أن كل المحتوى لا يخرج عن الحدود */
* {
  max-width: 100%;
  box-sizing: border-box;
}

/* ========================================
   هيرو سيكشن (Hero Section)
   ======================================== */
.hero {
  position: relative;
  min-height: 85vh;
  overflow: hidden;
}

.hero .info {
  position: relative;
  z-index: 3;
  min-height: 85vh;
  background: linear-gradient(135deg, rgba(10, 15, 20, 0.85) 0%, rgba(26, 42, 58, 0.75) 100%);
}

.hero h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero h2 span {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 5px;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.btn-get-started {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 12px 35px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid var(--primary-color);
}

.btn-get-started:hover {
  background: transparent;
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* كاروسيل الصور */
#hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

#hero-carousel .carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}




/* ========================================
   عنوان القسم العام
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--secondary-color);
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
  margin-bottom: 1rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background: var(--primary-color);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   قسم الخدمات (Get Started)
   ======================================== */
.get-started {
  padding: 70px 0;
  background: var(--gray-bg);
}

.get-started .content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.service-section {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.service-section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.service-section img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
}

.service-section h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 1.5rem 0 1rem;
}

.service-section p {
  color: var(--text-light);
  font-size: 1rem;
}

/* ========================================
   قسم من نحن (Services Section)
   ======================================== */
.services {
  padding: 70px 0;
  background: var(--white);
}

.service-item {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid #eee;
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.service-item .icon {
  width: 70px;
  height: 70px;
  background: rgba(196, 154, 43, 0.1);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-item .icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.service-item h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.service-item p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.readmore {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.readmore:hover {
  color: var(--primary-dark);
  letter-spacing: 1px;
}

/* ========================================
   قسم تواصل معنا (Alt Services)
   ======================================== */
.alt-services {
  padding: 70px 0;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
  color: var(--white);
}

.alt-services h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.alt-services > p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.icon-box {
  margin-bottom: 2rem;
  gap: 1rem;
}

.icon-box i {
  font-size: 2rem;
  color: var(--primary-color);
  width: 50px;
}

.icon-box h4 a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  transition: var(--transition);
}

.icon-box h4 a:hover {
  color: var(--primary-color);
}

.icon-box p {
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 0;
}

/* ========================================
   قسم أعمالنا (Projects)
   ======================================== */
.projects {
  padding: 70px 0;
  background: var(--gray-bg);
}

/* فلاتر المشاريع */
.portfolio-flters {
  padding: 0;
  margin: 0 0 2rem 0;
  list-style: none;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.portfolio-flters li {
  cursor: pointer;
  padding: 8px 24px;
  background: var(--white);
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  color: var(--text-dark);
}

.portfolio-flters li:hover,
.portfolio-flters li.filter-active {
  background: var(--primary-color);
  color: var(--white);
}

/* بطاقات المشاريع */
.portfolio-content {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.portfolio-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.portfolio-content img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-content:hover img {
  transform: scale(1.05);
}

.portfolio-info {
  padding: 1.2rem;
  text-align: center;
}

.portfolio-info h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.portfolio-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.portfolio-info .preview-link,
.portfolio-info .details-link {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--gray-bg);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  color: var(--secondary-color);
  transition: var(--transition);
  margin: 0 4px;
}

.portfolio-info .preview-link:hover,
.portfolio-info .details-link:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* ========================================
   الفوتر (Footer)
   ======================================== */
.footer {
  background: var(--secondary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 20px;
}

.footer-info p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer a:hover {
  color: var(--primary-light);
}

/* ========================================
   سكرول توب (Scroll Top)
   ======================================== */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 998;
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ========================================
   بريلودر (Preloader)
   ======================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader::after {
  content: '';
  width: 50px;
  height: 50px;
  border: 4px solid #eee;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   قسم Constructions (نظرة سريعة)
   ======================================== */
.constructions {
  padding: 70px 0;
  background: var(--white);
}

.card-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-bg {
  height: 200px;
  background-size: cover;
  background-position: center;
}

/* ========================================
   تخصيص شريط التمرير (Scrollbar)
   ======================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ========================================
   استجابة للشاشات المختلفة
   ======================================== */
@media (max-width: 992px) {
  .hero h2 {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .service-section h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 1.6rem;
  }
  
  .hero p {
    font-size: 0.95rem;
  }
  
  .service-section img {
    height: 200px;
  }
  
  .portfolio-flters li {
    padding: 6px 16px;
    font-size: 0.85rem;
  }
  
  .floating-buttons {
    bottom: 20px;
    left: 15px;
  }
  
  .btn-floating {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }
}

@media (max-width: 576px) {
  .hero h2 {
    font-size: 1.3rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .service-section {
    padding: 1.2rem;
  }
}

/* ========================================
   تأثيرات إضافية
   ======================================== */
[data-aos] {
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}