/* Baghdad Solar — shared stylesheet, RTL handled via [dir="rtl"] overrides */

:root {
  --sun: #e8792c;
  --sun-dark: #c85f1a;
  --gold: #f2a93c;
  --navy: #1b2438;
  --navy-soft: #2c3752;
  --cream: #fbf6ee;
  --cream-dim: #f2e9d8;
  --ink: #221b12;
  --line: rgba(27, 36, 56, 0.1);
  --shadow: 0 20px 50px -20px rgba(27, 36, 56, 0.35);
  --radius: 14px;
  --serif: "Fraunces", "Georgia", serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --arabic-display: "Cairo", sans-serif;
  --arabic-body: "Tajawal", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir="rtl"] body {
  font-family: var(--arabic-body);
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  font-family: var(--arabic-display);
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun-dark);
  margin-bottom: 14px;
}

[dir="rtl"] .eyebrow {
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--sun);
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head p {
  color: var(--navy-soft);
  font-size: 1.05rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--sun);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(232, 121, 44, 0.65);
}

.btn-primary:hover {
  background: var(--sun-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.btn-dark:hover {
  background: var(--navy-soft);
  transform: translateY(-2px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
}

[dir="rtl"] .brand {
  font-family: var(--arabic-display);
}

.brand .mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--navy-soft);
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--sun-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.phone-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  direction: ltr;
}

.phone-chip svg {
  width: 16px;
  height: 16px;
  color: var(--sun);
}

.lang-switch {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
}

.lang-switch:hover {
  background: var(--navy);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hero */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(115deg, rgba(20, 26, 43, 0.92) 25%, rgba(20, 26, 43, 0.55) 60%, rgba(232, 121, 44, 0.35) 100%), url("images/hero-solar-panels-sky.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(242, 169, 60, 0.25), transparent 45%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 90px;
  padding-bottom: 90px;
}

.hero-inner {
  max-width: 700px;
}

.hero .eyebrow {
  color: var(--gold);
}

.hero .eyebrow::before {
  background: var(--gold);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
}

.hero .lede {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.hero-stats div strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold);
}

[dir="rtl"] .hero-stats div strong {
  font-family: var(--arabic-display);
}

.hero-stats div span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.sun-badge {
  position: absolute;
  bottom: 48px;
  inset-inline-end: 48px;
  width: 128px;
  height: 128px;
  z-index: 1;
  opacity: 0.9;
}

@media (max-width: 780px) {
  .sun-badge {
    display: none;
  }
}

/* Services */

.services {
  padding: 100px 0;
  background: var(--cream);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.service-card.featured {
  background: var(--navy);
  color: #fff;
}

.service-card.featured h3,
.service-card.featured .eyebrow {
  color: #fff;
}

.service-card.featured p {
  color: rgba(255, 255, 255, 0.78);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--cream-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card.featured .service-icon {
  background: rgba(255, 255, 255, 0.12);
}

.service-icon svg {
  width: 26px;
  height: 26px;
  color: var(--sun);
}

.service-card.featured .service-icon svg {
  color: var(--gold);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.94rem;
  color: var(--navy-soft);
  margin-bottom: 0;
}

.card-tag {
  position: absolute;
  top: -12px;
  inset-inline-start: 26px;
  background: var(--sun);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Why us */

.why-us {
  padding: 100px 0;
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.why-us::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 90% 10%, rgba(242, 169, 60, 0.14), transparent 40%),
    radial-gradient(circle at 5% 90%, rgba(232, 121, 44, 0.14), transparent 40%);
}

.why-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.why-us .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.why-us .section-head h2 {
  color: #fff;
}

.why-list {
  display: grid;
  gap: 20px;
}

.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.why-item .num {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--gold);
  flex-shrink: 0;
  width: 34px;
}

[dir="rtl"] .why-item .num {
  font-family: var(--arabic-display);
}

.why-item h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.why-item p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Gallery */

.gallery {
  padding: 100px 0;
}

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

.gallery-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
}

.gallery-grid figure:first-child {
  grid-row: span 2;
  aspect-ratio: 3 / 5.4;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.06);
}

.gallery-grid figcaption {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  padding: 18px 16px 14px;
  background: linear-gradient(0deg, rgba(20, 26, 43, 0.85), transparent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Contact */

.contact {
  padding: 100px 0;
  background: var(--cream-dim);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}

.contact-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.contact-row {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact-row:last-of-type {
  border-bottom: none;
}

.contact-row .ico {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--cream-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-row .ico svg {
  width: 20px;
  height: 20px;
  color: var(--sun);
}

.contact-row h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.contact-row p,
.contact-row a.value {
  color: var(--navy-soft);
  font-size: 0.94rem;
  margin-bottom: 0;
}

.contact-row a.value {
  font-weight: 700;
  color: var(--navy);
  direction: ltr;
  display: inline-block;
}

.contact-ctas {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.contact-ctas .btn {
  color: #fff;
}

.btn-whatsapp {
  background: #25d366;
}

.btn-whatsapp:hover {
  background: #1ebe5b;
  transform: translateY(-2px);
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 340px;
  border: 1px solid var(--line);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 28px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand {
  font-family: var(--serif);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

[dir="rtl"] .footer-brand {
  font-family: var(--arabic-display);
}

.footer-brand + p {
  max-width: 320px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-links h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

[dir="rtl"] .footer-links h4 {
  letter-spacing: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  font-size: 0.82rem;
}

/* Responsive */

@media (max-width: 980px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid figure:first-child {
    grid-row: span 1;
    aspect-ratio: 3 / 4;
  }

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

@media (max-width: 720px) {
  .main-nav,
  .phone-chip {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header.open .main-nav {
    display: flex;
    position: absolute;
    top: 78px;
    inset-inline: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line);
  }

  .site-header.open .main-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

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

  .hero-stats {
    gap: 28px;
  }

  .contact-card {
    padding: 28px;
  }
}
