:root {
  --primary-color: #074337;     /* الأخضر الغامق الرئيسي */
  --text-green: #20453B;        /* أخضر النصوص */
  --gold-color: #CCA553;        /* الذهبي */
  --bg-cream: #FDFAF5;          /* خلفية الصفحة البيج الناعمة */
  --card-cream: #FAF5EC;        /* خلفية المربعين العلوي والسفلي */
  --circle-gold-bg: #F5EDE1;    /* خلفية الأيقونات الدائرية الخفيفة */
  --border-gold-light: #EFE2CF; /* حدود البطاقات الذهبية الخفيفة */
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

/* --- التحكم في الاتجاه حسب اللغة --- */
html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html, body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* --- شاشة التحميل (Page Loader) --- */
#page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #002317;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader-logo-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-logo {
  width: 75px;
  height: 75px;
  object-fit: contain;
  z-index: 2;
  animation: loaderPulse 2s infinite ease-in-out;
}

.loader-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(200, 160, 93, 0.15);
  border-top: 3px solid #C8A05D;
  border-right: 3px solid #DAA96C;
  border-radius: 50%;
  animation: loaderSpin 1.1s linear infinite;
}

.loader-text {
  margin-top: 20px;
  color: #C8A05D;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  animation: loaderFade 1.5s infinite ease-in-out;
}

@keyframes loaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes loaderFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- حركة الانتقال الفاتحة للصفحة --- */
body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-cream);
  background-image: 
    url('../img/three/bl1.png'), 
    url('../img/three/br1.png');
  background-position: 
    top left, 
    top right;
  background-repeat: 
    no-repeat, 
    no-repeat;
  background-size: 
    100px auto, 
    100px auto;
  background-attachment: fixed;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}

body.page-fade-out {
  opacity: 0;
}

/* --- Navbar --- */ 
.header-navbar { 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 10px 0 !important; 
  background: transparent; 
  box-shadow: none; 
  margin-bottom: 15px;
  position: relative;
  z-index: 100;
  height: auto !important;
  border-bottom: 1px solid var(--border-gold-light);
} 

.brand-logo-link { 
  display: flex;
  align-items: center;
  z-index: 110;
  text-decoration: none;
  height: auto !important;
  width: auto !important;
} 

.site-logo { 
  height: 95px !important; 
  width: auto !important; 
  max-width: 100% !important; 
  object-fit: contain !important; 
  display: block !important; 
  filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.12));
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.3s ease;
} 

.nav-links { 
  display: flex; 
  align-items: center;
  gap: 18px; 
} 

.nav-links .nav-menu-link { 
  position: relative; 
  text-decoration: none; 
  padding-bottom: 4px; 
  color: var(--text-green); 
  font-size: 0.95rem; 
  font-weight: bold; 
  transition: color 0.3s ease; 
  white-space: nowrap; 
} 

.nav-links .nav-menu-link.active::before, 
.nav-links .nav-menu-link:hover::before { 
  content: ""; 
  position: absolute; 
  bottom: -2px; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 35px; 
  height: 1px; 
  background-color: var(--gold-color); 
  z-index: 1; 
} 

.nav-links .nav-menu-link.active::after, 
.nav-links .nav-menu-link:hover::after { 
  content: ""; 
  position: absolute; 
  bottom: -3px; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 12px; 
  height: 2px; 
  background-color: var(--primary-color); 
  border-radius: 2px; 
  z-index: 2; 
} 

/* زر تحويل اللغة */
.lang-switch-btn {
  background-color: var(--text-green);
  color: #ffffff !important;
  border: 1px solid var(--gold-color);
  padding: 4px 12px;
  border-radius: 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switch-btn:hover {
  background-color: var(--gold-color);
  color: var(--primary-color) !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-menu-btn span {
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* الحاوية الرئيسية */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding-top: 0px !important;
  padding-bottom: 6px;
}

/* 1. قسم الهيدر العلوي */
.hero-card {
  background-color: #FDFAF5;
  border: 1px solid var(--border-gold-light);
  border-radius: 12px;
  padding: 10px 18px;
  box-shadow: 0 2px 8px rgba(7, 67, 55, 0.03);
  position: relative;
}

.brand-divider {
  border-left: 1.5px solid var(--gold-color);
  height: 100%;
  min-height: 75px;
}

.hero-title {
  color: var(--text-green);
  font-weight: 700;
  font-size: 1.25rem;
}

.hero-subtitle {
  color: #666;
  font-size: 0.75rem;
  line-height: 1.3;
}

/* 2. قسم وسائل التواصل الاجتماعي بالوسط */
.social-section-wrapper {
  padding: 2px 0;
  margin: 0 !important;
}

.social-section-title {
  color: var(--text-green);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  text-align: center;
}

.social-icons-wrapper {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 40px;
  max-width: 950px;
  margin: 0 auto;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #20453B;
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.2s ease;
  min-width: 75px;
}

.social-item:hover {
  transform: translateY(-3px);
  color: var(--primary-color);
}

.social-img-crop {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  background-color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.social-img-crop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

/* 3. قسم معلومات التواصل السفلي */
.info-section-card {
  background-color: #FDFAF5;
  border: 1px solid var(--border-gold-light);
  border-radius: 12px;
  padding: 8px 15px;
  box-shadow: 0 2px 8px rgba(7, 67, 55, 0.03);
}

.info-block {
  padding: 2px 6px;
}

.icon-circle-light {
  width: 28px;
  height: 28px;
  background-color: var(--circle-gold-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-circle-light img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.info-title {
  color: var(--text-green);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.info-text {
  color: #333;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.vertical-separator {
  border-left: 1px solid var(--border-gold-light);
}

/* زر الاتصال */
.btn-direct-call {
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  margin-top: 2px;
}

/* الخريطة */
.map-placeholder {
  width: 100%;
  height: 60px;
  border: 1px solid #F3CDCD;
  border-radius: 8px;
  overflow: hidden;
}

/* الفوتر الأخضر */
.footer-bar {
  background-color: var(--primary-color);
  background-image: url('../img/three/bl2.png'), url('../img/three/br2.png');
  background-position: bottom left, bottom right;
  background-repeat: no-repeat, no-repeat;
  background-size: auto 100%;
  color: #ffffff;
  padding: 8px 0;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  position: relative;
}

.footer-gold-text {
  color: var(--gold-color);
}

.custom-hr {
  border-top: 1px solid #ddd;
  width: 45%;
  margin: 2px auto 0;
}

/* --- التجاوب للشاشات المتوسطة والصغيرة --- */
@media (max-width: 991.98px) {
  .brand-divider, .vertical-separator {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-navbar {
    height: auto !important;
    padding: 10px 15px !important;
  }

  .site-logo {
    height: 65px !important;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    background-color: #ffffff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-gold-light);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    gap: 12px;
    align-items: center;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .social-icons-wrapper {
    gap: 15px 20px;
  }

  .social-img-crop {
    width: 52px;
    height: 52px;
  }
}