:root {
  --wims-blue: #0B1F3A;
  --wims-blue-2: #122a4f;
  --wims-orange: #C03628;
  --wims-orange-dark: #9b2a1f;
  --wims-yellow: #EBB041;
  --wims-grey: #EAE8E5;
  --wims-grey-2: #d8d6d2;
  --wims-text: #1a2233;
  --wims-muted: #5b6577;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  color: var(--wims-text);
  background: #fff;
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--wims-blue);
}

[dir="rtl"] body {
  font-family: 'Cairo', 'Open Sans', system-ui, sans-serif;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  font-family: 'Tajawal', 'Montserrat', system-ui, sans-serif;
}

a { color: var(--wims-orange); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--wims-orange-dark); }

/* ===== Navbar ===== */
.wims-navbar {
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid rgba(11,31,58,0.08);
  padding: 0.6rem 0;
  transition: box-shadow .2s ease;
}
.wims-navbar.scrolled { box-shadow: 0 6px 24px rgba(11,31,58,0.08); }
.wims-navbar .navbar-collapse { visibility: visible !important; }
@media (min-width: 992px) {
  .wims-navbar .navbar-collapse { display: flex !important; flex-basis: auto; }
}

.wims-navbar .navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--wims-blue) !important;
  letter-spacing: 0.02em;
}
.wims-navbar .navbar-brand img { height: 52px; width: auto; max-width: 220px; object-fit: contain; }

.wims-navbar .nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--wims-blue) !important;
  font-size: 0.95rem;
  padding: 0.6rem 1rem !important;
  position: relative;
}
.wims-navbar .nav-link::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0.35rem;
  height: 2px; background: var(--wims-orange);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.wims-navbar .nav-link:hover::after,
.wims-navbar .nav-link.active::after { transform: scaleX(1); }

.lang-toggle {
  border: 1.5px solid var(--wims-blue);
  color: var(--wims-blue);
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: all .2s ease;
}
.lang-toggle:hover { background: var(--wims-blue); color: #fff; }

/* ===== Buttons ===== */
.btn-wims-primary {
  background: var(--wims-orange);
  border: 2px solid var(--wims-orange);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  transition: all .2s ease;
}
.btn-wims-primary:hover { background: var(--wims-orange-dark); border-color: var(--wims-orange-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(192,54,40,0.35); }

.btn-wims-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  transition: all .2s ease;
}
.btn-wims-outline:hover { background: #fff; color: var(--wims-blue); }

.btn-wims-dark {
  background: var(--wims-blue);
  border: 2px solid var(--wims-blue);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  transition: all .2s ease;
}
.btn-wims-dark:hover { background: var(--wims-blue-2); border-color: var(--wims-blue-2); color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11,31,58,0.82) 0%, rgba(11,31,58,0.62) 50%, rgba(192,54,40,0.45) 100%),
    url('/images/well-integrity.jpg') center/cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 30%, rgba(235,176,65,0.22), transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding: 6rem 0; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--wims-yellow); }
.hero .lead-headline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--wims-yellow);
  margin-bottom: 1rem;
}
.hero .sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin-bottom: 2rem;
}
.hero-bar {
  width: 64px; height: 4px;
  background: var(--wims-orange);
  margin-bottom: 1.5rem;
}
[dir="rtl"] .hero-bar { margin-left: auto; }

/* Page header (inner pages) */
.page-header {
  position: relative;
  padding: 7rem 0 4rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11,31,58,0.92), rgba(11,31,58,0.82)),
    url('https://images.pexels.com/photos/3855962/pexels-photo-3855962.jpeg?auto=compress&cs=tinysrgb&w=1920') center/cover no-repeat;
}
.page-header h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: .5rem; }
.page-header .breadcrumb-line { color: rgba(255,255,255,0.75); font-family: 'Montserrat', sans-serif; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; }

/* ===== Sections ===== */
section { padding: 5rem 0; }
.section-eyebrow {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--wims-orange);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
.section-divider {
  width: 56px; height: 3px; background: var(--wims-orange);
  margin: 0 0 2rem;
}
[dir="rtl"] .section-divider { margin-left: auto; }
.text-center .section-divider { margin-left: auto; margin-right: auto; }

.bg-light-grey { background: var(--wims-grey); }
.bg-blue { background: var(--wims-blue); color: #fff; }
.bg-blue h1, .bg-blue h2, .bg-blue h3 { color: #fff; }

/* ===== Service Cards ===== */
.service-card {
  background: #fff;
  border: 1px solid rgba(11,31,58,0.08);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  height: 100%;
  text-align: center;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--wims-orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11,31,58,0.12);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(244,123,32,0.1);
  color: var(--wims-orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  transition: all .25s ease;
}
.service-card:hover .service-icon { background: var(--wims-orange); color: #fff; }
.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.service-card p { color: var(--wims-muted); font-size: 0.95rem; margin: 0; }

/* ===== Service Detail Block ===== */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(11,31,58,0.08);
}
.service-block:last-child { border-bottom: none; }
.service-block.reverse { direction: rtl; }
.service-block.reverse > * { direction: ltr; }
[dir="rtl"] .service-block.reverse { direction: ltr; }
[dir="rtl"] .service-block.reverse > * { direction: rtl; }

.service-block img {
  width: 100%; height: 360px; object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(11,31,58,0.15);
}
.service-block .badge-num {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--wims-orange);
  font-size: 0.9rem;
  letter-spacing: .15em;
  margin-bottom: .5rem;
}
.service-block h2 { font-size: 2rem; margin-bottom: 1rem; }
.service-block ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.service-block ul li {
  padding: 0.6rem 0 0.6rem 1.75rem;
  position: relative;
  border-bottom: 1px dashed rgba(11,31,58,0.12);
  color: var(--wims-text);
}
.service-block ul li::before {
  content: "\f061"; /* fa arrow-right */
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; color: var(--wims-orange);
  font-size: 0.85rem; top: 0.85rem;
}
[dir="rtl"] .service-block ul li { padding: 0.6rem 1.75rem 0.6rem 0; }
[dir="rtl"] .service-block ul li::before { left: auto; right: 0; transform: scaleX(-1); }

@media (max-width: 768px) {
  .service-block { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 0; }
  .service-block img { height: 240px; }
}

/* ===== Why Choose Us ===== */
.why-card {
  display: flex; gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border-left: 4px solid var(--wims-orange);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(11,31,58,0.06);
  height: 100%;
  transition: transform .2s ease;
}
[dir="rtl"] .why-card { border-left: none; border-right: 4px solid var(--wims-orange); }
.why-card:hover { transform: translateY(-3px); }
.why-card .why-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  background: var(--wims-blue);
  color: var(--wims-orange);
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font-size: 1.2rem;
}
.why-card h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.why-card p { color: var(--wims-muted); margin: 0; font-size: 0.92rem; }

/* ===== About / Values ===== */
.value-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: rgba(192,54,40,0.08);
  color: var(--wims-blue);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.3rem 0.4rem 0.3rem 0;
}
.value-pill i { color: var(--wims-orange); }

.mv-card {
  background: #fff;
  border: 1px solid rgba(11,31,58,0.08);
  border-radius: 8px;
  padding: 2rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.mv-card .mv-icon {
  width: 56px; height: 56px;
  background: var(--wims-blue); color: var(--wims-orange);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 1.4rem; margin-bottom: 1rem;
}
.mv-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.mv-card p { color: var(--wims-muted); margin: 0; }

/* ===== CTA Strip ===== */
.cta-strip {
  background:
    linear-gradient(135deg, rgba(11,31,58,0.92), rgba(11,31,58,0.85)),
    url('https://images.pexels.com/photos/2480807/pexels-photo-2480807.jpeg?auto=compress&cs=tinysrgb&w=1920') center/cover no-repeat;
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.cta-strip h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.5rem; }

/* ===== Counters ===== */
.counter-card {
  text-align: center;
  padding: 1.5rem;
}
.counter-card .num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--wims-orange);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}
.counter-card .label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ===== Contact ===== */
.contact-card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  border: 1px solid rgba(11,31,58,0.08);
  height: 100%;
  text-align: center;
  transition: all .2s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11,31,58,0.10); }
.contact-card .ic {
  width: 64px; height: 64px;
  background: var(--wims-blue); color: var(--wims-orange);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.contact-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.contact-card a { color: var(--wims-text); font-weight: 600; word-break: break-word; }
.contact-card a:hover { color: var(--wims-orange); }

.form-control, .form-select {
  border: 1.5px solid rgba(11,31,58,0.15);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  font-family: 'Open Sans', sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color: var(--wims-orange);
  box-shadow: 0 0 0 0.18rem rgba(192,54,40,0.18);
}
.form-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--wims-blue);
  font-size: 0.92rem;
  letter-spacing: .02em;
}

/* ===== Footer ===== */
.wims-footer {
  background: #081429;
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 1.25rem;
}
.wims-footer h5 {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 1rem;
}
.wims-footer a { color: rgba(255,255,255,0.75); }
.wims-footer a:hover { color: var(--wims-orange); }
.wims-footer ul { list-style: none; padding: 0; margin: 0; }
.wims-footer ul li { padding: 0.3rem 0; font-size: 0.95rem; }
.footer-brand img { height: 84px; width: auto; max-width: 280px; margin-bottom: 1rem; object-fit: contain; background: var(--wims-grey); padding: 12px 18px; border-radius: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1rem; margin-top: 2.5rem;
  font-size: 0.88rem; color: rgba(255,255,255,0.55);
}

/* ===== Animations ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* RTL fixes */
[dir="rtl"] .navbar-nav { padding-right: 0; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
[dir="rtl"] .ms-3 { margin-left: 0 !important; margin-right: 1rem !important; }
[dir="rtl"] .text-start { text-align: right !important; }
[dir="rtl"] .text-end { text-align: left !important; }

/* Hide emergent badge from interfering with footer on small screens */
@media (max-width: 768px) {
  .hero { min-height: 80vh; }
  section { padding: 3.5rem 0; }
}
