/* ================================================
   GLOBAL.CSS
   المتغيرات + الخطوط + الهيدر + الفوتر + المشترك
   ================================================ */


/* ================================================
   متغيرات الألوان
   ================================================ */
:root {
  --hmc-brand-primary:        #2F4738;
  --hmc-brand-primary-hover:  #3A5645;
  --hmc-brand-primary-active: #244333;

  --hmc-brand-accent:         #8C2E6E;
  --hmc-brand-accent-hover:   #A03B7E;
  --hmc-brand-accent-active:  #73255C;

  --hmc-brand-bg:     #F8F9F8;
  --hmc-brand-border: #E2EAE6;
  --hmc-brand-text:   #1E1E1E;

  --hmc-shadow-sm:     0 4px 12px rgba(0,0,0,.04);
  --hmc-shadow:        0 6px 16px rgba(47,71,56,0.18);
  --hmc-shadow-strong: 0 10px 26px rgba(47,71,56,0.24);
}


/* ================================================
   الخطوط
   ================================================ */
@font-face {
  font-family: 'Janna';
  src: url('../fonts/Janna-LT-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}


/* ================================================
   RESET + BASE
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: var(--hmc-brand-bg);
  color: var(--hmc-brand-text);
  font-family: 'Manrope', sans-serif;
  padding: 0 4px;
}

html[lang="ar"] body {
  overflow-x: hidden;
}

body, h1, h2, h3, h4, h5, h6, p, a, li, span, button {
  font-family: 'Manrope', sans-serif;
}


/* ================================================
   HEADER
   ================================================ */
.main-header {
  background: var(--hmc-brand-primary);
  box-shadow: var(--hmc-shadow-sm);
  border-radius: 10px 10px 0 0;
  position: relative;
}

.header-container {
  max-width: 100%;
  padding: 6px 40px;
  margin: 0 auto;
  padding: 6px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* اللوغو */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo img {
  height: 54px;
  width: auto;
  display: block;
}

/* الناف */
.nav-menu {
  display: flex;
  align-items: center;
}

.main-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.main-nav > li {
  position: relative;
}

.main-nav > li > a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-nav > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--hmc-brand-accent);
  transition: width 0.3s ease;
}

.main-nav > li > a:hover {
  color: var(--hmc-brand-accent);
}

.main-nav > li > a:hover::after {
  width: 100%;
}

/* زر HMC Portal */
.header-btn {
  background: var(--hmc-brand-accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin-left: 24px;
  display: inline-block;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.lang-switch {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 7px 14px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: inline-block;
  margin-left: auto;
  margin-right: 0;
}

.lang-switch:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

.lang-switch + .header-btn {
  margin-left: 8px;
}

.header-btn:hover {
  background: var(--hmc-brand-accent-hover);
  transform: translateY(-1px);
}


/* ================================================
   زر الهامبرغر
   ================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s ease;
  flex-shrink: 0;
  z-index: 1100;
  position: relative;
}

.hamburger:hover {
  background: rgba(255,255,255,0.1);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* أنيميشن X لما يفتح */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ================================================
   PAGE BANNER
   ================================================ */
.page-banner {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  overflow: hidden;
  margin: 24px 20px 40px;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 32px;
}

.banner-content h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.banner-content p {
  font-size: 0.95rem;
  opacity: 0.9;
}


/* ================================================
   عناصر مشتركة
   ================================================ */
.section-underline {
  width: 110px;
  height: 4px;
  border-radius: 999px;
  background: var(--hmc-brand-accent);
  margin-bottom: 28px;
}

.card-hmc {
  background: #fff;
  border: 1px solid var(--hmc-brand-border);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  padding: 1.5rem;
}

.btn-accent {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 10px;
  background: var(--hmc-brand-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--hmc-shadow);
  transition: background 0.25s ease;
}

.btn-accent:hover {
  background: var(--hmc-brand-accent-hover);
}

/* الأيقونات - مشترك بين الصفحات */
.service-icon {
  width: 28px;
  height: 28px;
  padding: 12px;
  background: rgba(140,46,110,0.08);
  border-radius: 12px;
  margin-bottom: 16px;
  display: inline-block;
  transition: background 0.3s ease;
  box-sizing: content-box;
}

.service-card:hover .service-icon {
  background: rgba(140,46,110,0.2);
}

.serve-icon-placeholder {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(47,71,56,0.08);
  border-radius: 12px;
}

.serve-icon-placeholder img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.serve-card-accent .serve-icon-placeholder {
  background: rgba(140,46,110,0.10);
}


/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--hmc-brand-primary);
  color: #ffffff;
  margin-top: 70px;
  border-radius: 24px 24px 0 0;
}

.footer-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 52px 40px 0;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 60px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* اللوغو */
.footer-brand img {
  width: 240px;
  height: auto;
  margin-bottom: 16px;
  display: block;
}

.footer-brand p {
  margin: 0;
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* الكولومز */
.footer-col h4 {
  margin: 0 0 20px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: var(--hmc-brand-accent);
  border-radius: 2px;
}

/* روابط سريعة — عمودين */
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 100px 100px;
  gap: 8px 0;
}

.footer-col ul li {
  padding: 6px 0;
}

.footer-col ul li:nth-child(odd) {
  padding-right: 20px;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.footer-col ul li:nth-child(even) {
  padding-left: 20px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.footer-col ul li a:hover {
  color: #ffffff;
}

/* معلومات التواصل */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-contact-item i {
  color: #ffffff;
  font-size: 0.85rem;
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
}

/* الكوبيرايت */
.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}


/* ================================================
   ANIMATIONS
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.serve-card {
  opacity: 1 !important;
  transform: none !important;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }


/* ================================================
   BACK TO TOP
   ================================================ */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: var(--hmc-brand-primary);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  z-index: 999;
  transition: background 0.25s ease;
}

#backToTop:hover {
  background: var(--hmc-brand-primary-hover);
}