/* =========================================================================
   NAHJ LIBYA — Main Stylesheet
   Premium corporate identity for a construction / infrastructure company.
   Palette: deep navy + charcoal + warm gold accent + white.
   ========================================================================= */

:root {
  --navy-900: #0a1620;
  --navy-800: #0e2033;
  --navy-700: #142c45;
  --navy-600: #1c3b5a;
  --charcoal: #21262b;
  --gold: #c9a13b;
  --gold-light: #e0c775;
  --gold-dark: #a3801f;
  --off-white: #f6f5f2;
  --gray-100: #eef0f2;
  --gray-400: #8f98a3;
  --gray-600: #5b6470;
  --success: #3f8f5f;
  --font-en: 'Poppins', 'Segoe UI', sans-serif;
  --font-ar: 'Tajawal', 'Cairo', sans-serif;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-soft: 0 10px 30px rgba(10, 22, 32, 0.08);
  --shadow-strong: 0 20px 45px rgba(10, 22, 32, 0.25);
  --transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  color: var(--charcoal);
  background: var(--off-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.lang-ar {
  font-family: var(--font-ar);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

.lang-ar h1, .lang-ar h2, .lang-ar h3, .lang-ar h4, .lang-ar h5, .lang-ar h6 {
  font-weight: 800;
  letter-spacing: 0;
}

a { text-decoration: none; color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-900);
  padding: 10px 18px;
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus { left: 10px; top: 10px; }

.section { padding: 90px 0; }
.section-sm { padding: 60px 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 14px;
}
.section-eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--gold);
  display: inline-block;
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  margin-bottom: 18px;
}

.section-subtitle {
  color: var(--gray-600);
  max-width: 680px;
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; padding: 0.75rem 1.6rem; transition: var(--transition); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: none;
  color: var(--navy-900);
}
.btn-gold:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); }

.btn-outline-light-custom {
  border: 1.5px solid rgba(255,255,255,0.55);
  color: #fff;
  background: transparent;
}
.btn-outline-light-custom:hover { background: #fff; color: var(--navy-900); }

.btn-outline-gold {
  border: 1.5px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--navy-900); }

.btn-navy {
  background: var(--navy-800);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-900); color: var(--gold-light); transform: translateY(-2px); }

/* ---------------------------------------------------------------------
   Header / Navbar
   ------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(10, 22, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}

.navbar { padding: 14px 0; }

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: #fff; font-size: 1.05rem; letter-spacing: 0.03em; }
.brand-text small { color: var(--gray-400); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.82);
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  position: relative;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--gold-light); }

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.navbar-toggler { border: none; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(10,16,22,0.55), rgba(10,16,22,0.85)),
              url('../images/projects/hero-construction.svg') center/cover no-repeat;
  background-color: var(--navy-900);
  color: #fff;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(10,22,32,0.92) 0%, rgba(10,22,32,0.55) 55%, rgba(10,22,32,0.85) 100%);
  z-index: -1;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  background-image: linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(201,161,59,0.5);
  color: var(--gold-light);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.18;
  max-width: 820px;
}

.hero p.lead {
  color: rgba(255,255,255,0.82);
  font-size: 1.15rem;
  max-width: 620px;
  margin-top: 22px;
}

.hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 1.4rem;
  animation: bounceDown 2.2s infinite;
}
@keyframes bounceDown { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  padding: 160px 0 90px;
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  color: #fff;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p { color: rgba(255,255,255,0.78); max-width: 640px; font-size: 1.05rem; }
.breadcrumb-custom { color: var(--gold-light); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 16px; }

/* ---------------------------------------------------------------------
   Intro section
   ------------------------------------------------------------------- */
.intro-section { background: #fff; }
.intro-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  position: relative;
}
.intro-media img { width: 100%; display: block; height: 100%; object-fit: cover; }
.intro-media-badge {
  position: absolute;
  bottom: -22px;
  inset-inline-start: -22px;
  background: var(--navy-900);
  color: #fff;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  border-inline-start: 4px solid var(--gold);
}
.intro-media-badge strong { font-size: 1.6rem; color: var(--gold-light); display: block; }
.intro-media-badge span { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* ---------------------------------------------------------------------
   Sector cards
   ------------------------------------------------------------------- */
.sectors-section { background: var(--gray-100); }

.sector-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  height: 100%;
  border: 1px solid rgba(10,22,32,0.06);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.sector-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: var(--transition);
}
.sector-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}
.sector-card:hover::before { transform: scaleY(1); }

.sector-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: var(--transition);
}
.sector-card:hover .sector-icon {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  color: var(--navy-900);
}

.sector-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.sector-card p { color: var(--gray-600); font-size: 0.94rem; margin: 0; }

/* ---------------------------------------------------------------------
   Stats
   ------------------------------------------------------------------- */
.stats-section {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  color: #fff;
  position: relative;
}
.stat-item { text-align: center; padding: 20px 10px; }
.stat-value {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--gold-light);
  display: block;
  font-family: var(--font-en);
}
.stat-label { color: rgba(255,255,255,0.78); font-size: 0.95rem; margin-top: 6px; }
.stat-divider { border-inline-start: 1px solid rgba(255,255,255,0.14); }

/* ---------------------------------------------------------------------
   Project cards
   ------------------------------------------------------------------- */
.project-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  border: 1px solid rgba(10,22,32,0.06);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-strong); }

.project-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
}
.project-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.project-card:hover .project-card-media img { transform: scale(1.07); }

.category-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: rgba(10,22,32,0.85);
  color: var(--gold-light);
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 30px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.project-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.project-card-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.project-location { color: var(--gray-600); font-size: 0.86rem; margin-bottom: 10px; }
.project-location i { color: var(--gold-dark); }
.project-desc { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 18px; flex-grow: 1; }

.progress-wrap { margin-bottom: 14px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--navy-800);
  font-weight: 600;
  margin-bottom: 6px;
}
.progress-track {
  height: 8px;
  background: var(--gray-100);
  border-radius: 30px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 30px;
  width: 0;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-fill.is-complete { background: linear-gradient(90deg, #2f6b47, var(--success)); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 30px;
  background: rgba(63,143,95,0.12);
  color: var(--success);
  margin-bottom: 16px;
}
.status-pill.in-progress { background: rgba(201,161,59,0.14); color: var(--gold-dark); }

.project-card .btn { align-self: flex-start; }

/* ---------------------------------------------------------------------
   Vision section
   ------------------------------------------------------------------- */
.vision-section {
  background: url('../images/projects/vision-bg.svg') center/cover fixed;
  position: relative;
  color: #fff;
}
.vision-section::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(10,22,32,0.93), rgba(10,22,32,0.75));
}
.vision-section .container { position: relative; z-index: 1; }
.vision-section h2 { color: #fff; }
.vision-text { font-size: 1.3rem; line-height: 1.9; max-width: 850px; color: rgba(255,255,255,0.9); font-weight: 300; }
.lang-ar .vision-text { font-weight: 500; }

/* ---------------------------------------------------------------------
   Infrastructure visual band
   ------------------------------------------------------------------- */
.infra-band {
  background: var(--navy-900);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.infra-icons { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; }
.infra-icons .infra-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.06);
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 0.92rem;
  border: 1px solid rgba(255,255,255,0.08);
}
.infra-icons .infra-item i { color: var(--gold-light); font-size: 1.1rem; }

/* ---------------------------------------------------------------------
   CTA band
   ------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--gold-dark), var(--gold));
  color: var(--navy-900);
  text-align: center;
  padding: 70px 0;
}
.cta-band h2 { color: var(--navy-900); margin-bottom: 26px; }
.cta-band .btn-navy { margin: 0 8px; }

/* ---------------------------------------------------------------------
   Timeline (About page)
   ------------------------------------------------------------------- */
.timeline { position: relative; padding-inline-start: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 10px;
  top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(201,161,59,0.15));
}
.timeline-item { position: relative; padding-bottom: 42px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  inset-inline-start: -34px;
  top: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy-900);
  border: 3px solid var(--gold);
}
.timeline-item h3 { font-size: 1.2rem; margin-bottom: 8px; }
.timeline-item p { color: var(--gray-600); }

/* ---------------------------------------------------------------------
   Contact page
   ------------------------------------------------------------------- */
.contact-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 40px;
}
.contact-info-card {
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  height: 100%;
}
.contact-info-card h3 { color: #fff; }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.contact-info-item i { color: var(--gold-light); font-size: 1.2rem; margin-top: 3px; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid #dfe3e7;
  padding: 0.75rem 1rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(201,161,59,0.15);
}
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--navy-800); }

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding: 70px 0 24px; }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.footer-brand strong { color: #fff; display: block; }
.footer-full-name { font-size: 0.72rem; color: var(--gray-400); }
.footer-text { font-size: 0.9rem; line-height: 1.7; max-width: 340px; }
.footer-heading { color: #fff; font-size: 0.95rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--gold-light); padding-inline-start: 4px; }
.contact-list li { display: flex; gap: 8px; align-items: center; }
.social-placeholders { display: flex; gap: 12px; margin-top: 20px; }
.social-placeholders a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: var(--transition);
}
.social-placeholders a:hover { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.footer-divider { border-color: rgba(255,255,255,0.12); margin: 40px 0 24px; }
.footer-bottom { text-align: center; font-size: 0.85rem; color: var(--gray-400); }

.back-to-top {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-900);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-strong);
  z-index: 1000;
  cursor: pointer;
  transition: var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--gold-dark); color: #fff; }

/* ---------------------------------------------------------------------
   Animations (fade / slide-up on scroll)
   ------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------------------------------------------------------------------
   Placeholder image styling (for missing project photos)
   ------------------------------------------------------------------- */
.img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: rgba(255,255,255,0.35);
  font-size: 2.2rem;
}

/* ---------------------------------------------------------------------
   Alerts (contact form)
   ------------------------------------------------------------------- */
.alert-nahj-success { background: rgba(63,143,95,0.1); border: 1px solid rgba(63,143,95,0.35); color: #2b6b45; border-radius: var(--radius-md); }
.alert-nahj-error { background: rgba(190,64,64,0.08); border: 1px solid rgba(190,64,64,0.3); color: #a83c3c; border-radius: var(--radius-md); }

/* ---------------------------------------------------------------------
   Responsive tweaks
   ------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .site-header { background: rgba(10,22,32,0.97); }
  .navbar-collapse { padding-top: 16px; }
  .intro-media-badge { position: static; margin-top: -16px; display: inline-block; }
}

@media (max-width: 767.98px) {
  .section { padding: 60px 0; }
  .hero { min-height: 100vh; text-align: start; }
  .stat-divider { border-inline-start: none; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 20px; }
}

@media (max-width: 425px) {
  .contact-card, .contact-info-card { padding: 26px; }
}
