/* ═══════════════════════════════════════
   HOME.CSS — HMC GROUP
═══════════════════════════════════════ */

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8,40,120,0.88) 40%, rgba(8,40,120,0.4));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px;
  max-width: 660px;
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.3s both;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.5s both;
}

.hero-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  max-width: 540px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.7s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.9s both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 80px;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ── NAVBAR TRANSPARENT ON HERO ── */
.navbar {
  background: rgba(255,255,255,0);
  border-bottom-color: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-md);
}

.navbar:not(.scrolled) .navbar-links a { color: rgba(255,255,255,0.85); }
.navbar:not(.scrolled) .navbar-links a:hover,
.navbar:not(.scrolled) .navbar-links a.active { color: var(--white); }
.navbar:not(.scrolled) .btn-lang {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.3);
}
.navbar:not(.scrolled) .btn-lang:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-primary-hero {
  background: rgba(255,255,255,0.15) !important;
  border: 1.5px solid rgba(255,255,255,0.4) !important;
}
.navbar.scrolled .btn-primary-hero {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
}

/* ── LOGO SWAP ── */
.navbar:not(.scrolled) .navbar-logo-img--color { display: none; }
.navbar:not(.scrolled) .navbar-logo-img--white { display: block; }
.navbar.scrolled .navbar-logo-img--color { display: block; }
.navbar.scrolled .navbar-logo-img--white { display: none; }

/* ── BTN PRIMARY NAVY ── */
.btn-primary-navy {
  display: inline-block;
  padding: 13px 28px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary-navy:hover {
  background: #0a3296;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── INTRO ── */
.intro-section {
  padding: 96px 80px 0;
  background: var(--white);
}

.intro-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-img {
  border-radius: var(--radius);
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.intro-text {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.85;
}

/* ── STATS STRIP ── */
.stats-strip {
  margin-top: 72px;
  background: var(--navy);
  border-radius: 16px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.stat-item {
  flex: 1;
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  transition: background 0.25s ease;
  cursor: default;
}

.stat-item:hover { background: rgba(255,255,255,0.06); }
.stat-item:hover .stat-num { color: var(--gold); }

.stat-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
  transition: color 0.3s ease;
  font-variant-numeric: tabular-nums;
}

.stat-text { font-size: 26px; }

.stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  background: rgba(216,160,48,0.25);
  margin: 28px 0;
  flex-shrink: 0;
}

/* ── ECOSYSTEM ── */
.ecosystem-section {
  padding: 96px 0;
  background: var(--off-white);
  overflow: hidden;
  position: relative;
}

.eco-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.eco-bg-c1 {
  width: 400px; height: 400px;
  border: 50px solid rgba(8,40,120,0.03);
  top: -120px; right: -80px;
}

.eco-bg-c2 {
  width: 260px; height: 260px;
  border: 40px solid rgba(216,160,48,0.04);
  top: 60%; right: 20px;
}

.eco-bg-c3 {
  width: 180px; height: 180px;
  border: 30px solid rgba(8,40,120,0.03);
  bottom: 40px; left: 60px;
}

.ecosystem-header {
  text-align: center;
  margin-bottom: 52px;
  padding: 0 80px;
  position: relative;
  z-index: 1;
}

.eco-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 1;
}

.eco-carousel {
  display: flex;
  flex-direction: row;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 16px 80px 24px;
  scrollbar-width: none;
  cursor: grab;
}

.eco-carousel:active { cursor: grabbing; }
.eco-carousel::-webkit-scrollbar { display: none; }

.eco-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  color: var(--navy);
}

.eco-nav:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.eco-prev { left: 20px; }
.eco-next { right: 20px; }

.eco-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  min-width: 260px;
  max-width: 260px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.eco-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.eco-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--navy);
}

.eco-card:hover::after { transform: scaleX(1); }

.eco-card-icon {
  width: 52px; height: 52px;
  background: var(--off-white);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.eco-card:hover .eco-card-icon {
  background: var(--navy);
  transform: translateY(-3px);
}

.eco-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  transition: filter 0.3s ease;
}

/* الكاروسيل — أيقونة بيضاء عند الهوفر */
.eco-card:hover .eco-card-icon img {
  filter: brightness(0) invert(1);
}

.eco-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.eco-card-text {
  font-size: 12px;
  color: var(--charcoal);
  line-height: 1.65;
}

.eco-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.eco-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(8,40,120,0.15);
  cursor: pointer;
  transition: var(--transition);
}

.eco-dot.active { background: var(--navy); transform: scale(1.3); }

/* ── JOURNEY ── */
.journey-section {
  padding: 96px 80px;
  background: var(--white);
}

.journey-header {
  text-align: center;
  margin-bottom: 72px;
}

.journey-header .section-sub { margin: 0 auto; }

.journey-timeline { position: relative; padding-bottom: 20px; }

.journey-line {
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: rgba(8,40,120,0.1);
  z-index: 0;
}

.journey-line-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
}

.journey-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease var(--delay), transform 0.5s ease var(--delay);
  cursor: default;
}

.journey-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.journey-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.35s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}

.journey-step:hover .journey-icon {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-8px) scale(1.08);
}

.journey-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  transition: filter 0.35s ease;
}

/* الجيرني — أيقونة ذهبية عند الهوفر */
.journey-step:hover .journey-icon img {
  filter: brightness(0) saturate(100%) invert(68%) sepia(55%) saturate(600%) hue-rotate(5deg) brightness(100%);
}

.journey-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--charcoal);
  text-align: center;
  max-width: 80px;
  line-height: 1.4;
  transition: color 0.25s ease;
}

.journey-step:hover .journey-label { color: var(--navy); }

/* ── WHY HMC ── */
.why-section {
  padding: 96px 80px;
  background: var(--off-white);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.why-img {
  border-radius: var(--radius);
  width: 100%;
  height: 600px;
  object-fit: cover;
  position: sticky;
  top: 100px;
}

.why-right .eyebrow { margin-bottom: 8px; }
.why-right .section-h2 { margin-bottom: 0; }
.why-accordion { margin-top: 36px; }

.acc-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  transition: border-left 0.3s ease, background 0.3s ease;
}

.acc-item:first-child { border-top: 1px solid var(--border); }

.acc-item.active {
  border-left: 3px solid var(--gold);
  background: rgba(8,40,120,0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
  transition: padding-left 0.3s ease;
}

.acc-item.active .acc-header { padding-left: 16px; }

.acc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--near-black);
  transition: color 0.25s;
}

.acc-item.active .acc-title { color: var(--navy); }
.acc-header:hover .acc-title { color: var(--navy); }

.acc-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.35s ease;
}

.acc-icon svg {
  width: 16px; height: 16px;
  color: var(--charcoal);
  transition: transform 0.35s ease, color 0.35s ease;
}

.acc-item.active .acc-icon {
  background: var(--navy);
  border-color: var(--navy);
}

.acc-item.active .acc-icon svg {
  color: var(--white);
  transform: rotate(180deg);
}

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.acc-item.active .acc-body {
  max-height: 120px;
  padding-bottom: 18px;
  padding-left: 16px;
}

.acc-body p {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.75;
}

/* ── PARTNERS ── */
.partners-section {
  padding: 72px 0;
  background: var(--off-white);
  overflow: hidden;
  position: relative;
}

.partners-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.partners-bg-c1 {
  width: 400px; height: 400px;
  border: 50px solid rgba(8,40,120,0.03);
  bottom: -160px; left: -100px;
}

.partners-bg-c2 {
  width: 240px; height: 240px;
  border: 40px solid rgba(216,160,48,0.04);
  top: -60px; right: 10%;
}

.partners-header {
  text-align: center;
  padding: 0 80px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.partners-header .section-sub {
  margin: 0 auto;
  max-width: 700px;
}

.partners-marquee-wrap {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.partners-marquee-wrap::before,
.partners-marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 1;
  pointer-events: none;
}

.partners-marquee-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--off-white), transparent);
}

.partners-marquee-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--off-white), transparent);
}

.partners-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.partner-logo {
  width: 220px;
  height: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}

.partner-logo:hover {
  border-color: var(--gold) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.partner-logo img {
  max-width: 160px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(30%);
  transition: filter 0.3s ease;
}

.partner-logo:hover img {
  filter: grayscale(0%);
}

/* ── NEWS ── */
.news-section {
  padding: 96px 80px;
  background: var(--off-white);
}

.news-header { margin-bottom: 48px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.news-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--navy);
}

.news-card-img {
  height: 240px;
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.news-card:hover .news-card-img img { transform: scale(1.04); }

.news-card-body {
  padding: 20px;
  background: var(--navy);
}

.news-tag {
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.news-cta { text-align: center; }

/* ── CAREERS + CONTACT ── */
.cta-split {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  background: linear-gradient(135deg, #002058 0%, #0F4C9C 100%);
  min-height: 360px;
  position: relative;
  overflow: hidden;
}

@keyframes ctaPulse {
  0%, 100% { transform: translateY(-50%) scale(1);    opacity: 1; }
  50%       { transform: translateY(-50%) scale(1.06); opacity: 0.7; }
}

@keyframes ctaPulse2 {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.08); opacity: 0.6; }
}

.cta-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cta-circle.c1 {
  width: 500px; height: 500px;
  top: -160px; left: -140px;
  border: 2px solid rgba(216,160,48,0.25);
  clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
  animation: ctaPulse2 6s ease-in-out infinite;
}

.cta-circle.c2 {
  width: 360px; height: 360px;
  bottom: -120px; right: 38%;
  border: 2px solid rgba(255,255,255,0.12);
  animation: ctaPulse2 8s ease-in-out infinite 1s;
}

.cta-circle.c3 {
  width: 700px; height: 700px;
  top: 50%; right: -200px;
  transform: translateY(-50%);
  border: 2px solid rgba(216,160,48,0.22);
  clip-path: polygon(0% 0%, 50% 0%, 50% 100%, 0% 100%);
  animation: ctaPulse 7s ease-in-out infinite 0.5s;
}

.cta-half {
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  transition: background 0.35s ease;
}

.cta-half:hover { background: rgba(255,255,255,0.04); }

.cta-divider {
  background: rgba(255,255,255,0.12);
  margin: 48px 0;
}

.cta-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.cta-text {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.75;
  max-width: 400px;
}

/* ===== RTL Ecosystem Carousel Fix ===== */

html[dir="rtl"] .eco-carousel {
    direction: rtl;
}

html[dir="rtl"] .eco-prev {
    right: 20px;
    left: auto;
}

html[dir="rtl"] .eco-next {
    left: 20px;
    right: auto;
}

html[dir="rtl"] .eco-card {
    text-align: right;
}

html[dir="rtl"] .eco-card::after {
    transform-origin: right;
}