/* ===== CSS VARIABLES ===== */
:root {
  --navy: #1F3864;
  --navy-dark: #152848;
  --navy-light: #2a4a84;
  --orange: #2B6CB0;
  --orange-dark: #1E4D8C;
  --white: #ffffff;
  --gray-light: #f4f6f9;
  --gray: #666;
  --gray-dark: #333;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: 0.3s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.7;
}

[dir="rtl"] body,
[dir="rtl"] {
  font-family: 'Segoe UI', 'Arial', Tahoma, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 50px 0; }
.text-center { text-align: center; }
.text-white { color: var(--white); }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-title.light { color: var(--white); }

.section-sub {
  font-size: 1.05rem;
  color: var(--gray);
  margin-bottom: 48px;
  max-width: 650px;
}
[dir="rtl"] .section-sub { margin: 0 auto 48px; }
.section-sub.center { margin: 0 auto 48px; }

.divider {
  width: 56px;
  height: 4px;
  background: var(--orange);
  margin: 12px 0 36px;
  border-radius: 2px;
}
[dir="rtl"] .divider { margin: 12px auto 36px 0; }
.divider.center { margin: 12px auto 36px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-dark);
}

/* ===== HEADER / NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  font-weight: 500;
  color: var(--gray-dark);
  border-radius: 6px;
  transition: all var(--transition);
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  background: var(--gray-light);
}

.nav-cta .btn { padding: 10px 22px; font-size: 0.9rem; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-light);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  transition: all var(--transition);
}
.lang-toggle:hover { background: var(--navy); color: var(--white); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile menu */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/work_site.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
[dir="rtl"] .hero-content { margin-right: 0; }

.hero-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.15);
  margin-top: 60px;
}

.stat-item {
  background: rgba(31, 56, 100, 0.85);
  padding: 28px 20px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat-item:first-child { border-radius: var(--radius) 0 0 var(--radius); }
[dir="rtl"] .stat-item:first-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat-item:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
[dir="rtl"] .stat-item:last-child { border-radius: var(--radius) 0 0 var(--radius); }

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.8); }

/* ===== ABOUT STRIP ===== */
.about-strip {
  background: var(--gray-light);
  padding: 60px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p { margin-bottom: 16px; color: var(--gray); }
.about-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-image img { width: 100%; height: 360px; object-fit: cover; }

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.feature-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
}
.feature-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--orange);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.14);
}


.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ===== SERVICE DETAIL PAGE ===== */
.service-detail {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.service-detail-header {
  background: var(--navy);
  color: var(--white);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.service-detail-header .num {
  font-size: 3rem;
  font-weight: 800;
  opacity: 0.2;
  line-height: 1;
}
.service-detail-header h2 { font-size: 1.4rem; font-weight: 700; }
.service-detail-header p { font-size: 0.92rem; opacity: 0.8; margin-top: 4px; }
.service-detail-body { padding: 36px; }
.service-detail-body p { color: var(--gray); margin-bottom: 20px; }

.detail-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
.detail-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 12px;
}
.detail-col ul { display: flex; flex-direction: column; gap: 8px; }
.detail-col ul li {
  font-size: 0.9rem;
  color: var(--gray);
  padding-left: 16px;
  position: relative;
}
[dir="rtl"] .detail-col ul li { padding-left: 0; padding-right: 16px; }
.detail-col ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--navy);
  font-size: 0.8rem;
}
[dir="rtl"] .detail-col ul li::before { left: auto; right: 0; content: '←'; }

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform var(--transition);
}
.project-card:hover { transform: translateY(-4px); }

.project-img {
  position: relative;
  overflow: hidden;
  height: 230px;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-img img { transform: scale(1.06); }

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
[dir="rtl"] .project-badge { left: auto; right: 12px; }

.project-needs-review {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f59e0b;
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
[dir="rtl"] .project-needs-review { right: auto; left: 12px; }

.project-info { padding: 20px 22px; }
.project-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.project-info .project-type {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 10px;
}
.project-info .project-meta {
  font-size: 0.82rem;
  color: var(--orange);
  font-weight: 600;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: var(--navy);
  padding: 72px 0;
}
.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.cta-banner p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  font-size: 1.05rem;
}
.cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ===== CONTACT PAGE ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 28px; }

.contact-card {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 10px;
}
.contact-card p, .contact-card a {
  color: var(--gray-dark);
  font-size: 0.95rem;
  line-height: 1.6;
}
.contact-card a:hover { color: var(--orange); }

.contact-form-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.contact-form-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.contact-form-box .sub { color: var(--gray); margin-bottom: 28px; font-size: 0.95rem; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e4eb;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--gray-dark);
  transition: border-color var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 72px 0 56px;
  color: var(--white);
}
.page-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }

/* ===== CLIENTS ===== */
.clients-bg { background: var(--navy); padding: 56px 0; }
.clients-title {
  text-align: center;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 36px;
  opacity: 0.7;
}

.clients-scroll {
  overflow: hidden;
  position: relative;
}
.clients-track {
  display: flex;
  gap: 40px;
  animation: scroll-clients 30s linear infinite;
  width: max-content;
}
.client-name {
  white-space: nowrap;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
}
@keyframes scroll-clients {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== PARTNERS STRIP ===== */
.partners-strip {
  background: var(--white);
  border-top: 1px solid #e8ecf2;
  border-bottom: 1px solid #e8ecf2;
  padding: 0;
  overflow: hidden;
}

.partners-tabs {
  display: flex;
  border-bottom: 2px solid #e8ecf2;
}

.partners-tab {
  padding: 16px 32px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  white-space: nowrap;
}
.partners-tab.active {
  color: var(--navy);
  border-bottom-color: var(--orange);
}

.partners-row {
  display: none;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}
.partners-row.active { display: block; }

.partners-track {
  display: flex;
  gap: 24px;
  animation: scroll-partners 50s linear infinite;
  width: max-content;
}
.partners-row:hover .partners-track { animation-play-state: paused; }

.partner-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px 18px;
  min-width: 140px;
  max-width: 200px;
  height: 64px;
  border: 1.5px solid #cdd5e0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all var(--transition);
  cursor: default;
  overflow: hidden;
}
.partner-chip img {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.partner-chip:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(43,108,176,0.15);
  transform: translateY(-2px);
}

@keyframes scroll-partners {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== INSPECTION MODAL ===== */
.insp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,45,0.72);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.insp-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.insp-modal {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  transform: translateY(16px);
  transition: transform 0.25s ease;
}
.insp-overlay.open .insp-modal {
  transform: translateY(0);
}
.insp-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
[dir="rtl"] .insp-close { right: auto; left: 20px; }
.insp-close:hover { color: var(--navy); background: #f0f4f8; }
.insp-header { margin-bottom: 24px; }
.insp-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.insp-sub {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.5;
}
.insp-section { margin-bottom: 20px; }
.insp-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.insp-card {
  border: 1.5px solid #d1d9e6;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  transition: all 0.18s ease;
  background: #f8fafc;
  user-select: none;
}
.insp-card:hover {
  border-color: var(--orange);
  color: var(--navy);
  background: #edf2fb;
}
.insp-card.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}
.insp-select, .insp-textarea {
  width: 100%;
  border: 1.5px solid #d1d9e6;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--gray-dark);
  background: #f8fafc;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}
.insp-select:focus, .insp-textarea:focus { border-color: var(--orange); background: #fff; }
.insp-textarea { resize: vertical; }
.insp-modal .btn.insp-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  font-size: 1rem;
  border-radius: 8px;
}
.insp-note {
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  margin-top: 10px;
}

@media (max-width: 480px) {
  .insp-modal { padding: 28px 18px 22px; }
  .insp-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ===== FOOTER ===== */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img { height: 44px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.6); }

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    gap: 4px;
  }
  .nav-links.open + .nav-cta {
    display: block;
    padding: 0 24px 20px;
    background: var(--white);
  }

  .hero { min-height: 70vh; }
  .hero-stats { grid-template-columns: 1fr; }
  .stat-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .stat-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-features { grid-template-columns: 1fr; }
  .detail-cols { grid-template-columns: 1fr; gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section-pad { padding: 56px 0; }
  .page-hero h1 { font-size: 1.8rem; }

  .hero-buttons { flex-direction: column; align-items: flex-start; }

  .contact-form-box { padding: 24px; }
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
}
