﻿:root {
  --bg: #07090d;
  --panel: #0f131a;
  --text: #f1f4f8;
  --muted: #c9d1dd;
  --accent: #f15a29;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Barlow", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, #1f2734 0%, transparent 30%),
    radial-gradient(circle at 80% 5%, #1a212d 0%, transparent 25%),
    linear-gradient(130deg, #0a0d13 0%, #07090d 45%, #111722 100%);
}

body.rtl {
  font-family: "Cairo", sans-serif;
}

.page-shell {
  width: min(90vw, 1480px);
  margin: 0 auto;
  padding: 108px 0 24px;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(110deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 1480px);
  z-index: 50;
}

.top-logo {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.desktop-nav a {
  color: #e8edf5;
  text-decoration: none;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.desktop-nav a:hover {
  color: #ffffff;
}

.hero-wrap {
  position: relative;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 74vh;
  overflow: hidden;
}

.hero {
  min-height: 74vh;
  position: relative;
  background:
    linear-gradient(rgba(6, 9, 14, 0.65), rgba(6, 9, 14, 0.85)),
    url("assets/energypower.webp") center/cover no-repeat;
}

.hero-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
}

.hero-logo {
  height: 52px;
  filter: brightness(0) invert(1);
}

.hero-stack-logo {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  width: min(28vw, 360px);
  opacity: 0.16;
  filter: brightness(0) invert(1);
  pointer-events: none;
  z-index: 1;
}

.menu-btn {
  background: transparent;
  border: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-btn span {
  width: 18px;
  height: 2px;
  background: #fff;
  opacity: 0.9;
}

.hero-content {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -42%);
  text-align: center;
  width: min(92%, 760px);
  z-index: 3;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 6.4rem);
  line-height: 0.95;
  font-weight: 800;
}

.sub {
  margin: 16px auto 0;
  max-width: 640px;
  color: #d8dde5;
  letter-spacing: 0.08em;
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  text-transform: uppercase;
}

.side-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(280px, 80vw);
  background: rgba(8, 10, 14, 0.96);
  backdrop-filter: blur(4px);
  border-left: 1px solid rgba(255,255,255,0.12);
  display: none;
  align-content: center;
  gap: 16px;
  padding: 0 30px;
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.side-panel.open {
  transform: translateX(0);
}

.side-panel a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

.content-section {
  margin-top: 16px;
  padding: 42px 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(12, 16, 24, 0.92), rgba(8, 11, 17, 0.92));
}

.subpage-back-wrap {
  margin-bottom: 20px;
}

.subpage-back-btn {
  margin-top: 0;
}

.section-head {
  margin-bottom: 26px;
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #9fb3cc;
}

.content-section h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  letter-spacing: 0.06em;
}

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

.about-grid p {
  margin: 0;
  color: #d7deea;
  line-height: 1.75;
}

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

.service-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(14, 19, 29, 0.75);
}

.service-image {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.service-image-1 {
  background-image:
    linear-gradient(rgba(8, 12, 18, 0.28), rgba(8, 12, 18, 0.64)),
    url("https://images.unsplash.com/photo-1473341304170-971dccb5ac1e?auto=format&fit=crop&w=1200&q=80");
}

.service-image-2 {
  background-image:
    linear-gradient(rgba(8, 12, 18, 0.28), rgba(8, 12, 18, 0.64)),
    url("https://images.unsplash.com/photo-1466611653911-95081537e5b7?auto=format&fit=crop&w=1200&q=80");
}

.service-image-3 {
  background-image:
    linear-gradient(rgba(8, 12, 18, 0.28), rgba(8, 12, 18, 0.64)),
    url("https://images.unsplash.com/photo-1494412574643-ff11b0a5c1c3?auto=format&fit=crop&w=1200&q=80");
}

.service-image-4 {
  background-image:
    linear-gradient(rgba(8, 12, 18, 0.28), rgba(8, 12, 18, 0.64)),
    url("https://images.unsplash.com/photo-1513828583688-c52646db42da?auto=format&fit=crop&w=1200&q=80");
}

.service-image-5 {
  background-image:
    linear-gradient(rgba(8, 12, 18, 0.28), rgba(8, 12, 18, 0.64)),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1200&q=80");
}

.service-image-6 {
  background-image:
    linear-gradient(rgba(8, 12, 18, 0.28), rgba(8, 12, 18, 0.64)),
    url("https://images.unsplash.com/photo-1553413077-190dd305871c?auto=format&fit=crop&w=1200&q=80");
}

.service-card h3 {
  margin: 14px 14px 8px;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.service-card p {
  margin: 0 14px 16px;
  color: #d4dbe7;
  line-height: 1.6;
}

.contact {
  text-align: center;
}

.contact-copy {
  margin: 0;
  color: #d4dbe7;
}

.contact-phone {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.contact-phone:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-footer {
  margin-top: 18px;
  padding: 28px 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, rgba(10, 14, 22, 0.94), rgba(7, 10, 16, 0.94));
  text-align: center;
}

.site-footer-copy,
.site-footer-rights {
  margin: 0;
  color: #d7deea;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.site-footer-logo {
  display: block;
  width: min(220px, 55vw);
  margin: 14px auto;
  height: auto;
}

@media (max-width: 768px) {
  .page-shell {
    width: 94vw;
    padding: 92px 0 12px;
  }

  .topbar {
    padding: 0 10px;
    height: 64px;
    top: 8px;
    width: 94vw;
  }

  .top-logo {
    height: 42px;
  }

  .desktop-nav {
    gap: 10px;
  }

  .desktop-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .menu-btn {
    display: none;
  }

  .side-panel {
    display: none;
  }

  .hero-wrap,
  .hero {
    min-height: 70vh;
  }

  .hero-content {
    top: 72%;
    transform: translate(-50%, -35%);
  }

  .hero-stack-logo {
    width: min(44vw, 250px);
    top: 30%;
  }

  .content-section {
    padding: 28px 14px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact layout enhancement */
.contact-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.contact-item {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 21, 31, 0.76);
}

.contact-item-wide {
  grid-column: 1 / -1;
}

.contact-item h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b8c7d9;
}

.contact-item p {
  margin: 0;
  line-height: 1.6;
  color: #edf2fa;
}

.contact-link {
  color: #ffffff;
  text-decoration: none;
  word-break: break-word;
}

.contact-links-stack {
  display: grid;
  gap: 6px;
}

.person-card {
  display: grid;
  gap: 12px;
}

.person-card h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #edf3fb;
}

.person-role {
  margin: 0;
  color: #9fb3cc;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}

.person-details {
  display: grid;
  gap: 10px;
}

.person-detail {
  margin: 0;
  display: grid;
  gap: 4px;
}

.person-detail-label {
  color: #b8c7d9;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-actions .contact-phone {
  margin-top: 0;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Other services + admin */
.other-services-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.other-service-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(13, 19, 29, 0.86);
  overflow: hidden;
  cursor: pointer;
}

.other-service-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
}

.other-service-card h3 {
  margin: 10px 12px 4px;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.other-service-card p {
  margin: 0 12px 12px;
  color: #c9d3e3;
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-panel {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 15, 23, 0.82);
  padding: 14px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-head h3 {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.admin-toggle,
.admin-publish {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 0.08em;
}

.admin-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: #dce6f5;
  font-size: 0.9rem;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 14, 22, 0.9);
  color: #fff;
}

.service-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 5, 10, 0.78);
  display: grid;
  place-items: center;
  padding: 16px;
}
.service-modal[hidden] {
  display: none;
}


.service-modal-card {
  width: min(680px, 100%);
  background: #0d131d;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 14px;
  position: relative;
}

.service-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.service-modal-card img {
  width: 100%;
  max-height: 70vh;
  height: auto;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
  display: block;
}

.service-modal-card h3 {
  margin: 12px 0 8px;
  letter-spacing: 0.05em;
}

.service-modal-card p {
  margin: 0;
  color: #d4deee;
  line-height: 1.65;
}

@media (max-width: 768px) {
  .other-services-list {
    grid-template-columns: 1fr;
  }

  .admin-head {
    flex-direction: column;
    align-items: flex-start;
  }
}



.other-services-actions {
  margin-top: 16px;
  text-align: center;
}

.admin-page {
  margin-top: 12px;
}

.admin-auth-wrap {
  max-width: 520px;
  margin: 0 auto;
}

.admin-auth-form {
  margin-top: 18px;
}

.admin-docs-form {
  margin-top: 8px;
}

.admin-doc-links {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-doc-item {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-doc-links .contact-phone {
  margin-top: 0;
}

.admin-list-head {
  margin-top: 26px;
}

.admin-services-list {
  display: grid;
  gap: 12px;
}

.admin-service-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(13, 19, 29, 0.82);
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 12px;
  align-items: stretch;
  padding: 10px;
}

.admin-service-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.admin-service-copy h3 {
  margin: 0 0 8px;
}

.admin-service-copy p {
  margin: 0;
  color: #d4deee;
  line-height: 1.5;
}

.admin-delete {
  border: 1px solid rgba(255, 116, 116, 0.65);
  background: rgba(130, 30, 30, 0.2);
  color: #ffd6d6;
  padding: 8px 10px;
  cursor: pointer;
  align-self: start;
}

.admin-delete:hover {
  background: rgba(160, 38, 38, 0.35);
}

@media (max-width: 768px) {
  .admin-service-item {
    grid-template-columns: 1fr;
  }
}

.location-page {
  margin-top: 12px;
}

.map-wrap {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  background: rgba(8, 12, 20, 0.8);
}

.map-wrap iframe {
  width: 100%;
  height: min(64vh, 560px);
  border: 0;
  display: block;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  gap: 6px;
}

.lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #f2f6fb;
  padding: 6px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.16);
}

body.rtl {
  direction: rtl;
}

body.rtl .desktop-nav {
  direction: rtl;
}

body.rtl .hero-content,
body.rtl .contact,
body.rtl .section-head {
  text-align: center;
}

body.rtl .about-grid,
body.rtl .contact-grid,
body.rtl .admin-form,
body.rtl .admin-service-copy {
  text-align: right;
}

body.rtl .contact-link {
  direction: ltr;
  unicode-bidi: plaintext;
}

@media (max-width: 768px) {
  .topbar-right {
    gap: 8px;
  }

  .lang-btn {
    padding: 5px 7px;
    font-size: 0.65rem;
  }
}

.firebase-status {
  margin: -10px 0 16px;
  color: #adc2da;
  font-size: 0.88rem;
}

.contact-phone.location-cta {
  border-color: #6fc3ff;
  background: linear-gradient(135deg, rgba(43, 126, 190, 0.35), rgba(14, 50, 82, 0.35));
  box-shadow: 0 0 0 1px rgba(111, 195, 255, 0.25) inset;
  font-size: 0.95rem;
}

.contact-phone.location-cta:hover {
  background: linear-gradient(135deg, rgba(67, 155, 224, 0.45), rgba(18, 62, 99, 0.45));
}


.location-highlight {
  margin-top: 16px;
  border: 1px solid rgba(111, 195, 255, 0.38);
  background: linear-gradient(140deg, rgba(19, 42, 68, 0.55), rgba(8, 21, 37, 0.65));
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.location-highlight-copy h3 {
  margin: 0 0 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1rem;
}

.location-highlight-copy p {
  margin: 0;
  color: #d8e8f8;
  line-height: 1.5;
}

.location-highlight-btn {
  margin-top: 0;
  white-space: nowrap;
  border-color: #6fc3ff;
  background: linear-gradient(135deg, rgba(43, 126, 190, 0.35), rgba(14, 50, 82, 0.35));
}

.location-highlight-btn:hover {
  background: linear-gradient(135deg, rgba(67, 155, 224, 0.45), rgba(18, 62, 99, 0.45));
}

@media (max-width: 768px) {
  .location-highlight {
    flex-direction: column;
    align-items: flex-start;
  }

  .location-highlight-btn {
    width: 100%;
    text-align: center;
  }
}

.cv-page {
  margin-top: 12px;
}

.cv-hero {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 18% 20%, rgba(241, 90, 41, 0.16), transparent 44%),
    radial-gradient(circle at 85% 30%, rgba(74, 132, 195, 0.15), transparent 40%),
    linear-gradient(155deg, rgba(14, 20, 30, 0.98), rgba(8, 12, 20, 0.98));
  padding: 18px;
}

.cv-copy {
  max-width: 780px;
}

.cv-facts {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cv-fact-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 17, 27, 0.9);
  padding: 14px;
}

.cv-fact-label {
  margin: 0 0 6px;
  color: #a8bfd9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.cv-fact-value {
  margin: 0;
  color: #f1f5fb;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.cv-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cv-actions .contact-phone {
  margin-top: 0;
}

.cv-preview-wrap {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  background: rgba(8, 12, 20, 0.8);
}

.cv-preview-wrap iframe {
  width: 100%;
  height: min(74vh, 900px);
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  .cv-facts {
    grid-template-columns: 1fr;
  }

  .cv-actions {
    flex-direction: column;
  }

  .cv-actions .contact-phone {
    width: 100%;
    text-align: center;
  }
}
