:root {
  --ink: #162128;
  --muted: #60717b;
  --line: #dde6e7;
  --paper: #ffffff;
  --soft: #f4f7f6;
  --gold: #f2c94c;
  --gold-strong: #d7a51a;
  --teal: #0f766e;
  --steel: #183941;
  --deep: #0d1d23;
  --copper: #b96f2d;
  --shadow: 0 24px 70px rgba(13, 29, 35, 0.15);
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body[dir="rtl"] {
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  line-height: 1.85;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid rgba(221, 230, 231, 0.82);
  box-shadow: 0 12px 36px rgba(13, 29, 35, 0.06);
  backdrop-filter: blur(16px);
}

main {
  padding-top: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--steel);
  font-weight: 900;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand span {
  font-size: 1.34rem;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.nav a {
  position: relative;
  padding: 10px 0;
}

.nav a::after {
  position: absolute;
  inset-inline-start: 0;
  bottom: 3px;
  width: 0;
  height: 2px;
  background: var(--gold-strong);
  content: "";
  transition: width 220ms ease;
}

.nav a:hover {
  color: var(--steel);
}

.nav a:hover::after {
  width: 100%;
}

.language-toggle,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.language-toggle {
  background: var(--paper);
  color: var(--steel);
}

.language-toggle:hover,
.button:hover {
  transform: translateY(-2px);
}

.language-toggle:hover {
  border-color: var(--gold-strong);
  box-shadow: 0 12px 28px rgba(215, 165, 26, 0.18);
}

.hero {
  position: relative;
  min-height: min(780px, calc(100vh - var(--header-height)));
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--deep);
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(13, 29, 35, 0.94), rgba(13, 29, 35, 0));
  content: "";
  z-index: -1;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-slides::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 29, 35, 0.92), rgba(13, 29, 35, 0.62), rgba(13, 29, 35, 0.18)),
    radial-gradient(circle at 70% 28%, rgba(242, 201, 76, 0.22), transparent 28%);
  content: "";
}

body[dir="rtl"] .hero-slides::after {
  background:
    linear-gradient(270deg, rgba(13, 29, 35, 0.94), rgba(13, 29, 35, 0.66), rgba(13, 29, 35, 0.18)),
    radial-gradient(circle at 30% 28%, rgba(242, 201, 76, 0.22), transparent 28%);
}

.hero-slide {
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.08);
  animation: heroFade 18s infinite;
}

.slide-one {
  background-image: url("assets/electrical-team.webp");
}

.slide-two {
  background-image: url("assets/panel.webp");
  animation-delay: 6s;
}

.slide-three {
  background-image: url("assets/electrician-worker.webp");
  animation-delay: 12s;
}

.hero-content {
  position: relative;
  width: min(100%, 820px);
  max-width: 820px;
  padding: clamp(92px, 16vh, 152px) clamp(20px, 6vw, 74px);
  color: white;
}

body[dir="rtl"] .hero-content {
  width: min(100%, 760px);
  margin-inline-start: auto;
  padding-inline: clamp(20px, 5vw, 54px);
  text-align: right;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

body[dir="rtl"] .eyebrow {
  font-size: 0.98rem;
  text-transform: none;
}

.eyebrow::before {
  width: 34px;
  height: 2px;
  background: currentColor;
  content: "";
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.8rem, 7vw, 5.55rem);
  line-height: 0.98;
  letter-spacing: 0;
}

body[dir="rtl"] h1 {
  max-width: 640px;
  font-size: clamp(2.05rem, 4.6vw, 3.9rem);
  font-weight: 900;
  line-height: 1.18;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

body[dir="rtl"] h2 {
  line-height: 1.25;
}

h3 {
  margin-bottom: 9px;
  font-size: 1.16rem;
}

.hero-copy {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: #172027;
  box-shadow: 0 18px 38px rgba(242, 201, 76, 0.24);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.button.primary:hover {
  background: #ffd94f;
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel {
  position: absolute;
  inset-inline-end: clamp(20px, 6vw, 72px);
  bottom: 34px;
  width: min(360px, calc(100% - 40px));
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: white;
  backdrop-filter: blur(16px);
}

.hero-panel span,
.hero-panel strong {
  display: block;
}

.hero-panel span {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

body[dir="rtl"] .hero-panel span {
  text-transform: none;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  position: relative;
  min-height: 138px;
  padding: 30px clamp(20px, 4vw, 48px);
  border-inline-end: 1px solid var(--line);
  overflow: hidden;
  transition: background 240ms ease, color 240ms ease;
}

.trust-strip div::after {
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transform: scaleX(0);
  transform-origin: left;
  content: "";
  transition: transform 240ms ease;
}

body[dir="rtl"] .trust-strip div::after {
  transform-origin: right;
}

.trust-strip div:hover {
  background: var(--steel);
  color: white;
}

.trust-strip div:hover::after {
  transform: scaleX(1);
}

.trust-strip div:last-child {
  border-inline-end: 0;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 7px;
  color: var(--steel);
  font-size: 1.12rem;
}

.trust-strip div:hover strong,
.trust-strip div:hover span {
  color: white;
}

.trust-strip span {
  color: var(--muted);
}

.section {
  padding: clamp(68px, 9vw, 122px) clamp(20px, 6vw, 74px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: start;
}

.about-section {
  background:
    linear-gradient(90deg, rgba(242, 201, 76, 0.08), transparent 42%),
    var(--paper);
}

body[dir="rtl"] .about-section {
  background:
    linear-gradient(270deg, rgba(242, 201, 76, 0.08), transparent 42%),
    var(--paper);
}

.copy-stack {
  color: var(--muted);
  font-size: 1.08rem;
}

.copy-stack p {
  margin-bottom: 18px;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 36px;
}

.section-heading p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.services-section {
  background: var(--soft);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-grid article {
  position: relative;
  min-height: 238px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid rgba(221, 230, 231, 0.92);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 29, 35, 0.05);
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease, background 240ms ease;
}

.service-grid article::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(242, 201, 76, 0.22), rgba(15, 118, 110, 0.18));
  opacity: 0;
  content: "";
  transition: opacity 240ms ease;
}

.service-grid article > * {
  position: relative;
}

.service-grid article:hover {
  transform: translateY(-8px);
  border-color: rgba(242, 201, 76, 0.8);
  box-shadow: var(--shadow);
}

.service-grid article:hover::before {
  opacity: 1;
}

.service-grid img {
  width: 38px;
  height: 38px;
  margin-bottom: 22px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(215, 165, 26, 0.18));
}

.service-grid p {
  color: var(--muted);
}

.projects {
  background: var(--paper);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.project-grid figure {
  position: relative;
  min-height: 420px;
  margin: 0;
  background: var(--deep);
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(13, 29, 35, 0.12);
  overflow: hidden;
}

.project-grid img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 650ms ease, filter 650ms ease;
}

.project-grid figure::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 29, 35, 0.9), rgba(13, 29, 35, 0.12) 62%, rgba(13, 29, 35, 0.02));
  content: "";
}

.project-grid figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  padding: 22px;
  color: white;
  transform: translateY(8px);
  transition: transform 320ms ease;
}

.project-grid figcaption strong,
.project-grid figcaption span {
  display: block;
}

.project-grid figcaption strong {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 1.08rem;
}

.project-grid figcaption span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
}

.project-grid figure:hover img {
  filter: saturate(1.16) contrast(1.04);
  transform: scale(1.1);
}

.project-grid figure:hover figcaption {
  transform: translateY(0);
}

.proof {
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  gap: clamp(34px, 7vw, 90px);
  background:
    linear-gradient(135deg, rgba(242, 201, 76, 0.1), transparent 34%),
    var(--steel);
  color: white;
}

.proof-list {
  display: grid;
  gap: 18px;
}

.proof-list div {
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.proof-list div:hover {
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(242, 201, 76, 0.46);
}

body[dir="rtl"] .proof-list div:hover {
  transform: translateX(-8px);
}

.proof-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 1.08rem;
}

.proof-list p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
}

.faq-section {
  background: var(--soft);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.faq-grid article {
  position: relative;
  min-height: 210px;
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 29, 35, 0.05);
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease, background 240ms ease;
}

.faq-grid article::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(242, 201, 76, 0.22), rgba(15, 118, 110, 0.14));
  opacity: 0;
  content: "";
  transition: opacity 240ms ease;
}

.faq-grid article::after {
  position: absolute;
  inset-inline-start: 26px;
  bottom: 22px;
  width: 42px;
  height: 3px;
  background: var(--gold-strong);
  border-radius: 999px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms ease;
}

body[dir="rtl"] .faq-grid article::after {
  transform-origin: right;
}

.faq-grid article > * {
  position: relative;
}

.faq-grid article:hover {
  transform: translateY(-8px);
  border-color: rgba(242, 201, 76, 0.82);
  background: #fffdf4;
  box-shadow: 0 24px 58px rgba(13, 29, 35, 0.14);
}

.faq-grid article:hover::before {
  opacity: 1;
}

.faq-grid article:hover::after {
  transform: scaleX(1);
}

.faq-grid article:hover h3 {
  color: var(--teal);
}

.faq-grid p {
  color: var(--muted);
}

.contact-band {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: clamp(26px, 6vw, 80px);
  padding: clamp(62px, 8vw, 106px) clamp(20px, 6vw, 74px);
  color: white;
  background:
    linear-gradient(90deg, rgba(13, 29, 35, 0.92), rgba(13, 29, 35, 0.74)),
    url("assets/contact-bg.webp") center / cover;
}

body[dir="rtl"] .contact-band {
  background:
    linear-gradient(270deg, rgba(13, 29, 35, 0.92), rgba(13, 29, 35, 0.74)),
    url("assets/contact-bg.webp") center / cover;
}

.contact-band p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 19px 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  background: rgba(242, 201, 76, 0.18);
  border-color: rgba(242, 201, 76, 0.7);
}

.contact-card span {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 900;
}

.contact-card strong {
  overflow-wrap: anywhere;
}

.phone-number {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] .phone-number,
body[dir="rtl"] .phone-number {
  display: block;
  width: fit-content;
  justify-self: start;
  margin-right: 0;
  margin-left: auto;
  text-align: right;
}

.site-footer {
  display: grid;
  gap: 20px;
  justify-items: center;
  padding: 46px 20px;
  background: #f8faf9;
  color: var(--muted);
  text-align: center;
}

.footer-brand img {
  width: 38px;
  height: 38px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: var(--steel);
  font-weight: 900;
}

.socials a:hover {
  color: var(--gold-strong);
}

[data-animate] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 680ms ease, transform 680ms ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroFade {
  0% {
    opacity: 0;
    transform: scale(1.08);
  }
  7%,
  31% {
    opacity: 1;
  }
  39%,
  100% {
    opacity: 0;
    transform: scale(1.01);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1040px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    position: relative;
    inset-inline-end: auto;
    bottom: auto;
    margin: 0 clamp(20px, 6vw, 74px) 34px;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  body[dir="rtl"] .nav {
    justify-content: flex-end;
  }

  .trust-strip,
  .split,
  .proof,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .faq-grid,
  .contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 14px;
    padding: 10px 16px;
  }

  .brand span {
    font-size: 1.12rem;
  }

  .language-toggle {
    min-height: 40px;
    padding: 8px 12px;
  }

  .hero {
    min-height: 710px;
  }

  .hero-content {
    padding: 92px 20px 32px;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.35rem);
  }

  .trust-strip,
  .service-grid,
  .project-grid,
  .faq-grid,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .trust-strip div {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-strip div:last-child {
    border-bottom: 0;
  }

  .project-grid figure,
  .project-grid img {
    min-height: 330px;
  }
}
