/* MS CONSTRUCTION — Global Stylesheet (Bilingual AR + EN) */
/* Domain: msconstructing.com */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0a3d7a;
  --primary-dark: #072856;
  --primary-light: #1e5aa8;
  --accent: #00a8e8;
  --accent-glow: #00c6ff;
  --dark: #0a1628;
  --light: #f5f8fc;
  --gray: #6b7a8f;
  --gray-light: #e8edf3;
  --white: #ffffff;
  --shadow: 0 10px 40px rgba(10, 61, 122, 0.15);
  --shadow-lg: 0 20px 60px rgba(10, 61, 122, 0.25);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.7;
  overflow-x: hidden;
  /* Prevent text copy/select on the whole site */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
/* Allow text selection only inside form inputs (so users can type/edit) */
input, textarea, select {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}
/* Make images not draggable */
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
/* Still allow pointer events on logos and interactive images */
.logo img, .nav-cta img, a img, button img { pointer-events: auto; }
[dir="ltr"] {
  font-family: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
}

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

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(10, 61, 122, 0.08);
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* Logo image container - shows image if available, fallback to text mark */
.logo-img {
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -1px;
  box-shadow: 0 4px 15px rgba(10, 61, 122, 0.3);
  position: relative;
  overflow: hidden;
  background-image: url('../images/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
}
/* Fallback text (shown when image missing - the browser will show the span) */
.logo-img span {
  position: relative;
  z-index: 1;
}
/* When logo.png exists, hide the text fallback */
.logo-img.has-image span { display: none; }

.logo-text { line-height: 1.1; }
.logo-text small {
  display: block;
  font-size: 0.65rem;
  color: var(--gray);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Nav menu */
.nav-menu {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu a {
  position: relative;
  font-weight: 600;
  color: var(--dark);
  padding: 8px 0;
  transition: var(--transition);
  font-size: 0.98rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active { color: var(--primary); }
.nav-menu > li > a:hover::after,
.nav-menu > li > a.active::after { width: 100%; }

/* Dropdown */
.has-dropdown > a .caret {
  font-size: 0.7rem;
  transition: transform 0.3s;
}
.has-dropdown:hover > a .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 20px);
  right: 0;
  min-width: 260px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 15px 50px rgba(10, 61, 122, 0.15);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
  border: 1px solid var(--gray-light);
}
[dir="ltr"] .dropdown { right: auto; left: 0; }

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* bridge gap */
.has-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 20px;
}

.dropdown li { margin: 0; }
.dropdown a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 16px !important;
  border-radius: 10px;
  color: var(--dark) !important;
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}
.dropdown a::after { display: none !important; }
.dropdown a:hover {
  background: linear-gradient(135deg, rgba(10,61,122,0.08), rgba(0,168,232,0.08));
  color: var(--primary) !important;
  transform: translateX(-4px);
}
[dir="ltr"] .dropdown a:hover { transform: translateX(4px); }

.dropdown a .ico {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.dropdown a:nth-child(2) .ico { background: linear-gradient(135deg,#e74c3c,#ff6b4a); }

/* Language switcher */
.lang-switch {
  background: var(--light);
  border: 2px solid var(--gray-light);
  color: var(--primary) !important;
  padding: 7px 16px !important;
  border-radius: 30px;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.lang-switch::after { display: none !important; }
.lang-switch:hover {
  background: var(--primary);
  color: white !important;
  border-color: var(--primary);
}

/* Download Profile button */
.download-btn {
  background: linear-gradient(135deg, #16a085, #1abc9c) !important;
  color: white !important;
  padding: 9px 18px !important;
  border-radius: 30px !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(22, 160, 133, 0.25);
  transition: var(--transition);
}
.download-btn::after { display: none !important; }
.download-btn:hover {
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 160, 133, 0.4);
}
.download-btn i { font-size: 0.95rem; }

.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white !important;
  padding: 10px 24px !important;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(10, 61, 122, 0.25);
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 61, 122, 0.35);
  color: white !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 6px 20px rgba(10, 61, 122, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(10, 61, 122, 0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn-outline:hover {
  background: white;
  color: var(--primary);
  border-color: white;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  color: white;
  box-shadow: 0 6px 20px rgba(0, 168, 232, 0.35);
}
.btn-accent:hover { transform: translateY(-3px); }

/* ============ HERO (home) ============ */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 20px 60px;
}

/* Hero bg image overlay - will activate when image uploaded */
.hero[data-bg] {
  background-image:
    linear-gradient(135deg, rgba(7, 40, 86, 0.9) 0%, rgba(10, 61, 122, 0.85) 50%, rgba(30, 90, 168, 0.75) 100%),
    var(--hero-bg, none);
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0, 198, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 168, 232, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-content {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 198, 255, 0.4);
  color: var(--accent-glow);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: white;
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent-glow), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.stat-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent-glow);
  line-height: 1;
}
.stat-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  height: 500px;
}
.hero-visual .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 6s ease-in-out infinite;
}
.orb-1 {
  width: 300px; height: 300px;
  background: var(--accent);
  top: 10%; right: 10%;
  opacity: 0.4;
}
.orb-2 {
  width: 200px; height: 200px;
  background: var(--accent-glow);
  bottom: 15%; left: 5%;
  opacity: 0.3;
  animation-delay: 2s;
}

.hero-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: float 4s ease-in-out infinite;
  overflow: hidden;
}
.hero-card-img {
  height: 110px;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  position: relative;
  overflow: hidden;
}
.hero-card-img[style*="--hcard-img"] {
  background-image: var(--hcard-img);
  background-size: cover;
  background-position: center;
}
.hero-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,22,40,0.65) 100%);
}
.hero-card-body { padding: 18px 20px 20px; }
.hero-card .icon {
  position: absolute;
  bottom: -22px;
  right: 16px;
  z-index: 2;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  color: white;
}
[dir="ltr"] .hero-card .icon { right: auto; left: 16px; }
.hero-card h4 { font-size: 1.05rem; margin-bottom: 6px; margin-top: 8px; }
.hero-card p { font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.hero-card-body h4:first-child { margin-top: 0; }

.card-1 { top: 8%; right: 5%; width: 230px; }
.card-2 { top: 42%; left: 0%; width: 230px; animation-delay: 1.5s; }
.card-3 { bottom: 5%; right: 15%; width: 230px; animation-delay: 3s; }
[dir="ltr"] .card-1 { right: auto; left: 5%; }
[dir="ltr"] .card-3 { right: auto; left: 15%; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ============ SECTIONS ============ */
.section {
  padding: 100px 20px;
  position: relative;
}
.section-container {
  max-width: 1300px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 70px;
}
.section-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 18px;
  line-height: 1.2;
}
.section-desc {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

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

.service-card {
  background: white;
  border-radius: 20px;
  padding: 0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-light);
  box-shadow: 0 4px 20px rgba(10, 61, 122, 0.05);
  display: block;
}

/* Service card image header (shows if --card-image is set) */
.service-card-image {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0%, rgba(10,61,122,0.4) 100%),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
  z-index: 2;
}
.service-card-image[style*="--card-image"] {
  background-image: var(--card-image);
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.service-card:hover .service-card-image[style*="--card-image"] {
  transform: scale(1.08);
}
.service-card-image .ico-float {
  position: absolute;
  bottom: -25px;
  right: 24px;
  z-index: 3;
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
[dir="ltr"] .service-card-image .ico-float { right: auto; left: 24px; }

.service-card-body { padding: 36px 30px 30px; }

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: right;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 2rem;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 8px 20px rgba(10, 61, 122, 0.25);
}
.service-icon.fire { background: linear-gradient(135deg, #e74c3c, #ff6b4a); box-shadow: 0 8px 20px rgba(231, 76, 60, 0.25); }
.service-icon.electric { background: linear-gradient(135deg, #f39c12, #ffbe3d); box-shadow: 0 8px 20px rgba(243, 156, 18, 0.25); }
.service-icon.plumb { background: linear-gradient(135deg, var(--accent), var(--accent-glow)); box-shadow: 0 8px 20px rgba(0, 168, 232, 0.25); }
.service-icon.ductwork { background: linear-gradient(135deg, #16a085, #1abc9c); box-shadow: 0 8px 20px rgba(22, 160, 133, 0.25); }

.service-card h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 14px;
  font-weight: 800;
}

.service-card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.service-card .features {
  padding: 0;
  margin-bottom: 20px;
}
.service-card .features li {
  padding: 6px 0;
  color: var(--dark);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-card .features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 900;
  width: 20px;
  height: 20px;
  background: rgba(0, 168, 232, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.service-card .view-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.service-card:hover .view-more { color: var(--accent); }
.service-card .view-more i { transition: transform 0.3s; }
[dir="rtl"] .service-card:hover .view-more i { transform: translateX(-4px); }
[dir="ltr"] .service-card:hover .view-more i { transform: translateX(4px); }

/* ============ FOOTER ============ */
.footer {
  background: linear-gradient(135deg, var(--dark), var(--primary-dark));
  color: white;
  padding: 70px 20px 30px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 20px;
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.1rem;
}
.footer-socials a:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 22px;
  font-weight: 800;
  position: relative;
  padding-bottom: 12px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
[dir="rtl"] .footer-col h4::after { right: 0; }
[dir="ltr"] .footer-col h4::after { left: 0; }

.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
  font-size: 0.95rem;
}
[dir="rtl"] .footer-col ul a:hover { color: var(--accent-glow); padding-right: 8px; }
[dir="ltr"] .footer-col ul a:hover { color: var(--accent-glow); padding-left: 8px; }

.footer-contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}
.footer-contact-item .ico {
  color: var(--accent-glow);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* ============ ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ============ PAGE HEADER (inner pages) ============ */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 160px 20px 90px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
/* Background image support - CSS variable --page-bg sets the image */
.page-header.has-bg {
  background:
    linear-gradient(135deg, rgba(7, 40, 86, 0.88) 0%, rgba(10, 61, 122, 0.82) 100%),
    var(--page-bg, linear-gradient(135deg, var(--primary-dark), var(--primary)));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(0, 198, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(0, 168, 232, 0.15) 0%, transparent 50%);
}
.page-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-header-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}
.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 20px;
}
.page-header p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto;
}
.breadcrumb {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 20px;
  border-radius: 30px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}
.breadcrumb a { color: var(--accent-glow); }
.breadcrumb span { color: rgba(255,255,255,0.6); }

/* ============ GALLERY (service pages) ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(10,61,122,0.08);
}
/* Each gallery item gets its own gradient when no image */
.gallery-item.g2 { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.gallery-item.g3 { background: linear-gradient(135deg, #d35400, #f39c12); }
.gallery-item.g4 { background: linear-gradient(135deg, var(--accent), var(--accent-glow)); }
.gallery-item.g5 { background: linear-gradient(135deg, #16a085, #1abc9c); }
.gallery-item.g6 { background: linear-gradient(135deg, #8e44ad, #9b59b6); }
.gallery-item.g7 { background: linear-gradient(135deg, #2c3e50, #34495e); }

/* Image mode - set via style="--gallery-img:url('...')" */
.gallery-item[style*="--gallery-img"] {
  background-image: var(--gallery-img);
  background-size: cover;
  background-position: center;
}
/* Hide icon placeholder when real image is present */
.gallery-item[style*="--gallery-img"] .ico-placeholder { display: none; }

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%),
    linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.gallery-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.gallery-item:hover::before { opacity: 1; }

.gallery-item .ico-placeholder {
  font-size: 4rem;
  color: rgba(255,255,255,0.4);
}
.gallery-item .caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px;
  color: white;
  font-weight: 700;
  z-index: 3;
  transform: translateY(10px);
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover .caption {
  transform: translateY(0);
  opacity: 1;
}

/* Hero image for service pages */
.service-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
}
.service-hero-image {
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.service-hero-image[style*="--hero-img"] {
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
}
/* Hide placeholder icon when real hero image is set */
.service-hero-image[style*="--hero-img"] .big-ico { display: none; }
/* Dim overlay for text readability (if captions overlap) */
.service-hero-image[style*="--hero-img"]::before {
  background:
    linear-gradient(135deg, rgba(10,61,122,0.3) 0%, rgba(0,168,232,0.2) 100%),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
}
.service-hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%);
}
.service-hero-image .big-ico {
  font-size: 10rem;
  color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 2;
}
.service-hero-image.v2 { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.service-hero-image.v3 { background: linear-gradient(135deg, #d35400, #f39c12); }
.service-hero-image.v4 { background: linear-gradient(135deg, var(--accent), var(--accent-glow)); }
.service-hero-image.v5 { background: linear-gradient(135deg, #16a085, #1abc9c); }

.service-info-block h2 {
  font-size: 2.3rem;
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}
.service-info-block > p {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 1.05rem;
}
.service-info-block strong { color: var(--primary); }

.product-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}
.product-list .item {
  background: var(--light);
  padding: 14px 18px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
}
[dir="rtl"] .product-list .item { border-right: 3px solid var(--accent); }
[dir="ltr"] .product-list .item { border-left: 3px solid var(--accent); }
.product-list .item i { color: var(--accent); font-size: 1rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .nav-menu { gap: 1.2rem; }
}

@media (max-width: 968px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 400px; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 15px; }
  .stat-num { font-size: 1.8rem; }
  .service-hero { grid-template-columns: 1fr; gap: 30px; }
  .service-hero-image { aspect-ratio: 16/10; }
}

@media (max-width: 768px) {
  /* Navbar container tightening */
  .nav-container { padding: 0 18px; gap: 10px; height: 70px; }
  .navbar { height: 70px; }

  /* Logo smaller on mobile */
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo-img { width: 42px; height: 42px; font-size: 1rem; }
  .logo-text small { font-size: 0.55rem; letter-spacing: 1.5px; }

  /* Mobile menu — hidden by default, shown with .open */
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 25px;
    gap: 1rem;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    overflow-y: auto;
    transition: right 0.3s ease, left 0.3s ease;
    z-index: 999;
  }
  [dir="rtl"] .nav-menu { right: -100%; left: auto; }
  [dir="rtl"] .nav-menu.open { right: 0; }
  [dir="ltr"] .nav-menu { left: -100%; right: auto; }
  [dir="ltr"] .nav-menu.open { left: 0; }

  /* Overlay backdrop when menu open */
  .nav-menu.open::before {
    content: '';
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: -1;
  }

  .menu-toggle { display: flex; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Nav items full-width in mobile menu */
  .nav-menu > li { width: 100%; }
  .nav-menu > li > a {
    display: flex !important;
    width: 100%;
    padding: 12px 14px !important;
    border-radius: 10px;
    font-size: 1rem;
    justify-content: space-between;
    align-items: center;
  }
  .nav-menu > li > a:hover {
    background: linear-gradient(135deg, rgba(10,61,122,0.08), rgba(0,168,232,0.08));
  }
  .nav-menu > li > a::after { display: none !important; }

  /* Mobile dropdown */
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 6px 0 6px 12px;
    border: none;
    background: rgba(10,61,122,0.03);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
    width: 100%;
    min-width: unset;
    border-radius: 10px;
  }
  .has-dropdown.open .dropdown { max-height: 500px; padding: 8px; margin-top: 6px; }
  .has-dropdown::before { display: none; }
  .dropdown a { font-size: 0.9rem; padding: 10px 12px !important; }
  .dropdown a .ico { width: 32px; height: 32px; font-size: 0.8rem; }

  /* Download button + language switch full width */
  .download-btn, .lang-switch {
    width: 100%;
    justify-content: center;
    padding: 12px 18px !important;
    font-size: 0.95rem !important;
  }

  /* Sections */
  .footer-container { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 60px 18px; }
  .hero { padding: 100px 18px 50px; min-height: auto; }
  .hero-content { gap: 30px; }
  .page-header { padding: 120px 18px 60px; background-attachment: scroll !important; }
  .hero-visual { display: none; }
  .product-list { grid-template-columns: 1fr; }

  /* Hero stats tighter */
  .hero-stats { gap: 10px; padding-top: 24px; margin-top: 30px; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: 0.75rem; }

  /* Hero text */
  .hero-title { font-size: 1.8rem; margin-bottom: 18px; }
  .hero-desc { font-size: 1rem; margin-bottom: 26px; }
  .hero-badge { font-size: 0.75rem; padding: 6px 14px; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { padding: 12px 22px; font-size: 0.9rem; flex: 1; justify-content: center; min-width: 140px; }

  /* Buttons */
  .btn { padding: 12px 24px; font-size: 0.92rem; }

  /* Section titles smaller */
  .section-title { font-size: 1.6rem; }
  .section-desc { font-size: 0.95rem; }
  .section-header { margin-bottom: 40px; }

  /* Fix badge-float positioning (home about section) */
  .badge-float { padding: 14px 18px !important; }
  .badge-1, .badge-2 { right: 10px !important; left: auto !important; }
  .badge-2 { top: 20px !important; }
  .badge-1 { bottom: 20px !important; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; font-size: 0.8rem; }

  /* Contact page form */
  .contact-form, .contact-info { padding: 30px 20px !important; }
  .contact-info h2, .contact-form h2 { font-size: 1.4rem !important; }

  /* Project cards full width */
  .projects-grid { gap: 20px; }
  .project-image { height: 180px !important; }

  /* Gallery adapts */
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

  /* Partner chips */
  .partner-chip { padding: 16px 10px; font-size: 0.85rem; }
  .partners-grid { gap: 12px; }

  /* Service hero */
  .service-hero-image .big-ico { font-size: 5rem !important; }
  .service-info-block h2 { font-size: 1.6rem; }

  /* CTA box on home */
  .cta-content h2 { font-size: 1.5rem !important; }
  .cta-box { padding: 30px 20px !important; border-radius: 20px; }

  /* About page */
  .story-content h2 { font-size: 1.6rem !important; }
  .mvv-card { padding: 30px 22px !important; }
  .mvv-card .ico { width: 70px !important; height: 70px !important; font-size: 2rem !important; }
}

@media (max-width: 480px) {
  .nav-menu { width: 90%; }
  .logo-text small { display: none; }
  .hero-title { font-size: 1.5rem; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .page-header h1 { font-size: 1.6rem !important; }
  .page-header p { font-size: 0.95rem; }
  .breadcrumb { font-size: 0.78rem; padding: 6px 14px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--accent));
  border-radius: 5px;
}


/* ===== Logo (real image) ===== */
.logo-img{background-color:transparent !important;box-shadow:none !important;border-radius:0 !important;width:58px;height:58px;background-image:url('../images/logo.png') !important;background-size:contain;background-repeat:no-repeat;background-position:center}
.logo-img span{display:none !important}
.footer-brand .logo-img{background-image:url('../images/logo-white.png') !important}
@media(max-width:768px){.logo-img{width:46px;height:46px}}
