/* ============================================
   صيانة للسباكة والكهربة — Plumbing & Electrical
   Mobile-first, bilingual (EN/AR), production CSS
   ============================================ */

:root {
  --primary: #0a2a6b;
  --primary-dark: #061a45;
  --primary-light: #1a4a9e;
  --accent: #f5c518;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
  --text: #1a1a1a;
  --text-muted: #555;
  --bg: #ffffff;
  --bg-light: #f7f9fc;
  --bg-section: #eef3f9;
  --border: #e2e8f0;
  --shadow: 0 4px 16px rgba(10, 42, 107, 0.08);
  --shadow-lg: 0 8px 32px rgba(10, 42, 107, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1200px;
  --header-h: 70px;
  --topbar-h: 36px;
  --font: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, .btn { cursor: pointer; border: none; font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Top Info Bar ---------- */
.top-bar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 12px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.top-bar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.top-bar-left span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.top-bar-left svg { width: 14px; height: 14px; flex-shrink: 0; }
.lang-switch {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
}
.lang-switch a, .lang-switch button {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.7;
}
.lang-switch a.active, .lang-switch button.active,
.lang-switch a:hover, .lang-switch button:hover {
  opacity: 1;
  text-decoration: underline;
}
.lang-switch .sep { opacity: 0.5; }

/* ---------- Main Header ---------- */
.main-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.brand-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.brand-logo .drop {
  width: 18px;
  height: 22px;
  background: #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
.brand-logo .bolt {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 10px;
  height: 14px;
  background: var(--accent);
  clip-path: polygon(40% 0%, 100% 0%, 60% 45%, 100% 45%, 20% 100%, 45% 55%, 0% 55%);
}
.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-call {
  background: var(--primary);
  color: #fff;
}
.btn-call:hover { background: var(--primary-light); }
.btn-wa {
  background: var(--whatsapp);
  color: #fff;
}
.btn-wa:hover { background: var(--whatsapp-dark); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.menu-toggle svg { width: 24px; height: 24px; }

/* Nav */
.nav {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}
.nav ul {
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 0;
}
.nav a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover, .nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 32px 0 40px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.hero-content h2 {
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}
.hero-content .subtitle {
  font-size: clamp(15px, 3.5vw, 20px);
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.95;
}
.hero-content .subtitle span { color: var(--accent); }
.hero-content .tagline {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 18px;
}
.trust-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.trust-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255,255,255,0.2);
}
.hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 380px;
}

/* ---------- Sections ---------- */
.section {
  padding: 48px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-title h2 {
  font-size: clamp(22px, 4vw, 30px);
  color: var(--primary);
  font-weight: 700;
}
.section-title p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 600px;
  margin: 8px auto 0;
}

/* Service cards */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.service-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.service-card-body {
  padding: 0;
}
.service-label {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.service-label svg { width: 18px; height: 18px; flex-shrink: 0; }
.service-desc {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Trust strip */
.trust-strip {
  background: var(--bg-section);
  padding: 28px 0;
}
.trust-strip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: center;
}
.trust-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.trust-strip-item svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}
.trust-strip-item span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* About / Contact split */
.split-section {
  padding: 48px 0;
  background: var(--bg);
}
.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.about-block h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-block p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}
.about-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.stat-badge {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-badge svg { width: 16px; height: 16px; }
.split-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split-img img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.contact-block {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}
.contact-block h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 14px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}
.contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.map-preview {
  margin-top: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 160px;
  background: #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.map-link:hover { text-decoration: underline; }

/* Why choose / features */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.feature-card svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
  margin: 0 auto 12px;
}
.feature-card h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Areas */
.areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.area-tag {
  background: var(--bg-section);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 36px 0;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(20px, 4vw, 28px);
  margin-bottom: 8px;
}
.cta-band p {
  opacity: 0.9;
  margin-bottom: 18px;
  font-size: 15px;
}
.cta-band .hero-btns {
  justify-content: center;
}

/* ---------- Services page specific ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 36px 0;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(24px, 5vw, 34px);
  margin-bottom: 8px;
}
.page-hero p {
  opacity: 0.9;
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

.service-category {
  margin-bottom: 40px;
}
.service-category h2 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.service-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
}
.service-list-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Contact form ---------- */
.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 42, 107, 0.12);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
}
.form-submit:hover { background: var(--primary-light); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 40px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 28px;
}
.footer-brand h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.footer-brand p {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 12px;
}
.footer-info p {
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0.9;
}
.footer-info svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.8;
}
.footer-nav h4,
.footer-areas h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--accent);
}
.footer-nav ul { display: flex; flex-direction: column; gap: 6px; }
.footer-nav a {
  font-size: 13px;
  opacity: 0.85;
}
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-areas ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.footer-areas li {
  font-size: 12px;
  opacity: 0.85;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  opacity: 0.75;
}
.footer-lang a {
  color: #fff;
  opacity: 0.7;
  margin: 0 4px;
}
.footer-lang a.active, .footer-lang a:hover { opacity: 1; }

/* Developer credit — absolute bottom */
.dev-credit {
  background: #030d22;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  text-align: center;
  padding: 10px 16px;
  line-height: 1.5;
}
.dev-credit a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
}
.dev-credit a:hover { color: #fff; }

/* ---------- RTL ---------- */
[dir="rtl"] .brand { flex-direction: row-reverse; }
[dir="rtl"] .header-actions { flex-direction: row-reverse; }
[dir="rtl"] .trust-item { flex-direction: row-reverse; }
[dir="rtl"] .service-label { flex-direction: row-reverse; }
[dir="rtl"] .contact-item { flex-direction: row-reverse; }
[dir="rtl"] .footer-info p { flex-direction: row-reverse; }
[dir="rtl"] .about-block h3 { flex-direction: row-reverse; }
[dir="rtl"] .stat-badge { flex-direction: row-reverse; }
[dir="rtl"] .service-list-item { flex-direction: row-reverse; }
[dir="rtl"] .hero-btns { flex-direction: row-reverse; }
[dir="rtl"] .top-bar-left { flex-direction: row-reverse; }
[dir="rtl"] body { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }

/* Hide/show language content */
html[data-lang="en"] .ar-only { display: none !important; }
html[data-lang="ar"] .en-only { display: none !important; }
html:not([data-lang]) .ar-only { display: none !important; }

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ---------- TABLET ---------- */
@media (min-width: 600px) {
  .container { padding: 0 24px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .trust-strip-grid { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .service-list { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-items { grid-template-columns: repeat(4, 1fr); }
  .split-grid { grid-template-columns: 1fr 1fr; }
  .hero-image img { max-height: 420px; }
}

/* ---------- DESKTOP ---------- */
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }
  .services-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .service-card img { height: 130px; }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
  .split-grid { grid-template-columns: 1.1fr 0.9fr 1fr; }
  .split-img img { height: 280px; }
  .header-inner { padding: 12px 0; }
  .brand-logo { width: 52px; height: 52px; }
  .menu-toggle { display: none; }
  .nav ul { gap: 8px; }
}

@media (min-width: 1100px) {
  .services-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- MOBILE NAV ---------- */
@media (max-width: 767px) {
  .menu-toggle { display: flex; }
  .header-actions .btn span { display: none; }
  .header-actions .btn { padding: 10px 12px; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav.open { display: block; }
  .nav ul {
    flex-direction: column;
    padding: 8px 0;
  }
  .nav a {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
  }
  .main-header { position: relative; }
  .main-header.sticky-fix {
    position: sticky;
  }
  .top-bar .container {
    font-size: 11px;
    gap: 4px;
  }
  .top-bar-left span:nth-child(2),
  .top-bar-left span:nth-child(3) {
    display: none;
  }
  .brand-text h1 { font-size: 13px; }
  .brand-text p { font-size: 10px; }
  .brand-logo { width: 40px; height: 40px; }
  .hero { padding: 24px 0 32px; }
  .section { padding: 36px 0; }
}

/* Very small screens */
@media (max-width: 360px) {
  .btn { padding: 9px 12px; font-size: 12px; }
  .header-actions { gap: 4px; }
  .brand-text h1 { font-size: 12px; }
}

/* Print */
@media print {
  .top-bar, .main-header, .nav, .cta-band, .dev-credit { display: none; }
}