/* ==========================================================================
   Ideal Construction — Design System
   ========================================================================== */

:root {
  --maroon-900: #4a1219;
  --maroon-700: #6f1b28;
  --maroon-600: #7f1e2d;
  --maroon-500: #8f2536;
  --maroon-50: #fbeef0;

  --grey-900: #23252a;
  --grey-700: #4b4f56;
  --grey-500: #797d84;
  --grey-300: #c7c9cd;
  --grey-100: #eef0f2;
  --grey-50: #f7f8f9;

  --white: #ffffff;

  --font-heading: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(35, 37, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(35, 37, 42, 0.08);
  --shadow-lg: 0 20px 48px rgba(35, 37, 42, 0.12);

  --container: 1240px;
  --header-h: 84px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--grey-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--grey-900);
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { color: var(--grey-700); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--grey-50);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon-600);
  margin-bottom: 14px;
}

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

.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
}

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

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn--primary {
  background: var(--maroon-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: var(--maroon-700);
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  background: transparent;
  border-color: var(--grey-300);
  color: var(--grey-900);
}

.btn--outline:hover {
  border-color: var(--maroon-600);
  color: var(--maroon-600);
}

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
  backdrop-filter: blur(4px);
}

.btn--ghost-light:hover {
  background: var(--white);
  color: var(--maroon-700);
  border-color: var(--white);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------------------------
   Header
   -------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--grey-100);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* The header is itself a flex container, so the bar would otherwise
     shrink-to-fit its contents and center instead of spanning the row. */
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  height: 46px;
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(0, 0, 0, 0.25));
  transition: filter 0.35s ease;
}

.site-header.is-scrolled .brand img {
  filter: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
}

.nav > a {
  padding: 10px 16px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-header.is-scrolled .nav > a {
  color: var(--grey-700);
}

.nav > a:hover,
.nav > a.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.site-header.is-scrolled .nav > a:hover,
.site-header.is-scrolled .nav > a.is-active {
  background: var(--maroon-50);
  color: var(--maroon-600);
}

.nav.is-open > a {
  color: var(--grey-700) !important;
}

.nav.is-open > a:hover,
.nav.is-open > a.is-active {
  background: var(--maroon-50) !important;
  color: var(--maroon-600) !important;
}

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

/* Drawer-only actions — rendered inside the mobile nav, hidden on desktop
   where the same links live in the header bar. */
.nav-drawer-actions {
  display: none;
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: rgba(18, 18, 22, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-scrim.is-visible {
  opacity: 1;
  visibility: visible;
}

body.nav-lock {
  overflow: hidden;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: -8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}

.site-header.is-scrolled .nav-toggle span,
.site-header.nav-is-open .nav-toggle span {
  background: var(--grey-900);
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Opening the drawer settles the bar into its solid state, so the logo and
   hamburger stay legible against the white panel below them. */
.site-header.nav-is-open {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--grey-100);
}

.site-header.nav-is-open .brand img {
  filter: none;
}

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */

.hero,
.page-hero {
  position: relative;
  background: linear-gradient(150deg, var(--grey-900) 0%, var(--maroon-900) 120%);
  color: var(--white);
  overflow: hidden;
}

/* Bottom padding has to clear the stats card's -64px overlap on top of the
   gap it leaves below the hero content. */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  padding-bottom: 128px;
}

@media (max-width: 860px) {
  .hero { padding-bottom: 120px; }
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(143, 37, 54, 0.4), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(121, 125, 132, 0.28), transparent 50%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 64px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(35, 37, 42, 0.55), transparent 40%);
}

.hero .container,
.page-hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 760px;
}

.hero-content .eyebrow {
  color: #e8b3bd;
}

.hero-content h1 {
  color: var(--white);
  margin-bottom: 22px;
}

.hero-content h1 em {
  display: block;
  font-style: normal;
  background: linear-gradient(100deg, #f3c8cf, var(--white) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 36px;
}

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

.page-hero {
  padding: calc(var(--header-h) + 76px) 0 80px;
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
  margin-top: 16px;
  font-size: 1.05rem;
}

/* Floating glass stat card overlapping the hero's bottom edge */
.hero-stats-wrap {
  position: relative;
  z-index: 5;
  margin-top: -64px;
}

.hero-stats-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.hero-stat-item {
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid var(--grey-100);
}

.hero-stat-item:last-child {
  border-right: none;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--maroon-600);
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--grey-700);
  font-weight: 500;
}

/* Infinite services marquee */
.marquee {
  overflow: hidden;
  background: var(--grey-50);
  border-bottom: 1px solid var(--grey-100);
  padding: 22px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 110s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--grey-500);
  white-space: nowrap;
  padding: 0 28px;
}

.marquee-item::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--maroon-500);
  margin-left: 28px;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

@media (max-width: 860px) {
  .hero-stats-card { grid-template-columns: repeat(2, 1fr); }
  .hero-stat-item { border-right: none; border-bottom: 1px solid var(--grey-100); }
  .hero-stat-item:nth-child(odd) { border-inline-end: 1px solid var(--grey-100); }
  .hero-stat-item:nth-child(n + 3) { border-bottom: none; }
}

@media (max-width: 480px) {
  .hero-stats-card { grid-template-columns: 1fr; }
  .hero-stat-item:nth-child(odd) { border-inline-end: none; }
  .hero-stat-item:nth-child(n + 3) { border-bottom: 1px solid var(--grey-100); }
  .hero-stat-item:last-child { border-bottom: none; }
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------
   Grids & Cards
   -------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 28px;
}

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

.card {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--maroon-50);
  color: var(--maroon-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--maroon-600);
  transition: gap 0.2s ease;
}

.card-link:hover {
  gap: 10px;
}

.card-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Service category card on Services page */
.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-100);
}

.category-card .card-icon {
  margin-bottom: 22px;
}

.category-card h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.category-card > p {
  margin-bottom: 22px;
}

.service-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-pill,
.service-pill:visited {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--grey-50);
  color: var(--grey-700);
  border: 1px solid var(--grey-100);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.service-pill:hover {
  background: var(--maroon-50);
  color: var(--maroon-600);
  border-color: var(--maroon-50);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

/* Four achievement cards in a row (About page) — keep longer figures such as
   "QAR 200M+" on one line. */
.grid--4 > .card .stat-number {
  font-size: clamp(1.7rem, 2.4vw, 2.1rem);
  line-height: 1.25;
}

.stat-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------
   Image placeholders
   -------------------------------------------------------------------- */

.img-placeholder {
  position: relative;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--grey-900) 0%, var(--maroon-900) 130%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  min-height: 220px;
  isolation: isolate;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 22px);
}

.img-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.14), transparent 55%);
}

.img-placeholder svg {
  width: 22px;
  height: 22px;
  padding: 15px;
  box-sizing: content-box;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  opacity: 0.95;
}

.img-placeholder-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.img-placeholder-content span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* --------------------------------------------------------------------
   Two column feature layout
   -------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
}

.split-list-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.check-badge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--maroon-50);
  color: var(--maroon-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.check-badge svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------- */

.cta-band {
  background: linear-gradient(135deg, var(--maroon-700), var(--maroon-900));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: var(--white);
  margin-bottom: 10px;
}

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

.cta-band .btn--primary {
  background: var(--white);
  color: var(--maroon-700);
}

.cta-band .btn--primary:hover {
  background: var(--grey-50);
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */

.site-footer {
  background: var(--grey-900);
  color: rgba(255, 255, 255, 0.7);
  padding: 72px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 40px;
  width: auto;
  margin-bottom: 18px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  max-width: 320px;
}

.footer-heading {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

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

.footer-contact-item {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-contact-link:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-contact-link:hover svg {
  color: var(--maroon-400, #a8384c);
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--maroon-500);
}

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

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.social-icons a:hover {
  background: var(--maroon-600);
}

.social-icons svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--maroon-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 400;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------- */

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--grey-900);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-100);
  background: var(--grey-50);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--grey-900);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--maroon-500);
  background: var(--white);
}

.form-control.is-invalid {
  border-color: #c0392b;
}

.field-error {
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

.field-error.is-visible {
  display: block;
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.form-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: #ecf9f0;
  color: #1e7b3c;
  font-size: 0.9rem;
  margin-bottom: 24px;
  display: none;
}

.form-note.is-visible {
  display: flex;
}

.form-note svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.form-note--error {
  background: #fdecea;
  color: #c0392b;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Map card */
.map-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--grey-100);
}

.map-card iframe {
  display: block;
}

.map-card-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--maroon-600);
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.2s ease, gap 0.2s ease;
}

.map-card-cta:hover {
  background: var(--maroon-700);
  gap: 16px;
}

.map-card-cta svg:first-child {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.map-card-cta span {
  flex: 1;
}

.map-card-cta svg:last-child {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Contact quick cards */
.contact-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.contact-card .card-icon {
  margin-bottom: 0;
}

.contact-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.contact-card p, .contact-card a {
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Projects gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-item .img-placeholder {
  min-height: 260px;
  border-radius: var(--radius-md);
  transition: transform 0.4s ease;
}

.gallery-item:hover .img-placeholder {
  transform: scale(1.03);
}

.gallery-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover .gallery-photo {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.gallery-tag {
  position: absolute;
  inset: auto 0 0 0;
  padding: 36px 20px 16px;
  background: linear-gradient(to top, rgba(35, 37, 42, 0.82), rgba(35, 37, 42, 0));
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gallery-tag strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.gallery-tag span {
  font-size: 0.82rem;
  opacity: 0.9;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* A real photo shown at (or below) its native size, so a low-resolution
   source image is never stretched/upscaled and blurred. */
.photo-natural {
  position: relative;
  display: inline-block;
  max-width: 380px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.photo-natural img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 860px) {
  .photo-natural { max-width: 320px; }
}

/* Small branded logo badge overlaid on a corner of a photo */
.gallery-caption {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-700);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 22, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  max-width: 800px;
  width: 100%;
}

.lightbox-inner img {
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
}

.lightbox-inner .img-placeholder {
  min-height: 420px;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-prev svg {
  transform: rotate(90deg);
}

.lightbox-next {
  right: 20px;
}

.lightbox-next svg {
  transform: rotate(-90deg);
}

@media (max-width: 640px) {
  .lightbox { padding: 20px; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 16px; right: 16px; }
}

/* --------------------------------------------------------------------
   Projects page — summary, filters, project cards
   -------------------------------------------------------------------- */

.project-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.project-summary > div {
  background: var(--maroon-50);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: center;
}

.project-summary strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--maroon-600);
}

.project-summary span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-700);
}

.project-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}

.project-filters[hidden] { display: none; }

.project-showing {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-500);
  white-space: nowrap;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-group {
  grid-column: 1 / -1;
  font-size: 1.35rem;
  margin: 12px 0 -6px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--maroon-50);
  position: relative;
}

.project-group::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 56px;
  height: 2px;
  background: var(--maroon-600);
}

.project-group:first-child { margin-top: 0; }
.project-group[hidden] { display: none; }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card[hidden] { display: none; }

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--grey-100);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-media img { transform: scale(1.05); }

.project-code,
.project-photos {
  position: absolute;
  bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-code {
  inset-inline-start: 14px;
  background: var(--maroon-600);
  color: var(--white);
}

.project-photos {
  inset-inline-end: 14px;
  background: rgba(35, 37, 42, 0.72);
  color: var(--white);
  backdrop-filter: blur(4px);
}

.project-body {
  padding: 20px 24px 24px;
}

.project-body h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.project-units {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--maroon-600);
}

.project-stats {
  display: flex;
  gap: 28px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--grey-100);
}

.project-stats dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
}

.project-stats dd {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--grey-900);
}

.project-year {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--maroon-700);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.project-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.project-value-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
}

.project-value strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--maroon-600);
}

.project-owner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--grey-50);
  border-radius: var(--radius-sm);
}

.project-owner-mono {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon-600);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
}

.project-owner-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
  line-height: 1.3;
}

.project-owner strong {
  font-size: 0.92rem;
  color: var(--grey-900);
}

.project-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--grey-500);
  font-weight: 600;
}

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

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-filters { grid-template-columns: 1fr; }
  .project-showing { white-space: normal; }
  .project-summary { gap: 10px; }
  .project-summary > div { padding: 16px 10px; }
  .project-summary strong { font-size: 1.7rem; }
}

/* --------------------------------------------------------------------
   Process steps (service page)
   -------------------------------------------------------------------- */

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

.process-step {
  position: relative;
  padding: 28px 24px;
  background: var(--grey-50);
  border-radius: var(--radius-md);
}

.process-step-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--maroon-500);
  opacity: 0.4;
  margin-bottom: 14px;
}

.process-step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------
   Scroll reveal animation
   -------------------------------------------------------------------- */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

[data-animate]:nth-child(1) { transition-delay: 0s; }
[data-animate]:nth-child(2) { transition-delay: 0.08s; }
[data-animate]:nth-child(3) { transition-delay: 0.16s; }
[data-animate]:nth-child(4) { transition-delay: 0.24s; }
[data-animate]:nth-child(5) { transition-delay: 0.32s; }
[data-animate]:nth-child(n+6) { transition-delay: 0.4s; }

/* --------------------------------------------------------------------
   Floating call button
   -------------------------------------------------------------------- */

.floating-call {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--maroon-600);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.25s ease, visibility 0.3s ease, background 0.25s ease;
}

.floating-call.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.floating-call:hover {
  background: var(--maroon-700);
  transform: translateY(-2px);
}

.floating-call svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}

.floating-call::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--maroon-500);
  opacity: 0.55;
  animation: pulseRing 2.4s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.92); opacity: 0.55; }
  100% { transform: scale(1.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-call::before { animation: none; }
}

@media (max-width: 560px) {
  .floating-call { width: 48px; height: 48px; bottom: 20px; left: 20px; }
  .back-to-top { bottom: 20px; right: 20px; }
}

/* --------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------- */

.text-center { text-align: center; }

/* --------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 74px; }

  .section { padding: 64px 0; }

  .nav-toggle { display: flex; flex-shrink: 0; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease,
      visibility 0.25s ease;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Links fade in one after another as the panel lands. */
  .nav > a,
  .nav-drawer-actions {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav.is-open > a,
  .nav.is-open .nav-drawer-actions {
    opacity: 1;
    transform: none;
  }

  .nav.is-open > a:nth-child(1) { transition-delay: 0.06s; }
  .nav.is-open > a:nth-child(2) { transition-delay: 0.1s; }
  .nav.is-open > a:nth-child(3) { transition-delay: 0.14s; }
  .nav.is-open > a:nth-child(4) { transition-delay: 0.18s; }
  .nav.is-open > a:nth-child(5) { transition-delay: 0.22s; }
  .nav.is-open .nav-drawer-actions { transition-delay: 0.26s; }

  .nav > a {
    padding: 14px 12px;
    border-radius: var(--radius-sm);
  }

  .brand img { height: 50px; }

  /* Mobile bar carries the logo, the language switch and the hamburger.
     The call-to-action moves into the drawer, where there is room for it. */
  .header-actions .btn--primary { display: none; }

  .header-actions { gap: 10px; }

  .lang-switch {
    padding: 8px 14px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .nav-drawer-actions {
    display: grid;
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--grey-100);
  }

  .nav-drawer-actions .btn--primary {
    width: 100%;
    justify-content: center;
  }

  .split { grid-template-columns: 1fr; gap: 36px; }
  .grid--2 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .process-steps { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px; flex-direction: column; text-align: center; justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* --------------------------------------------------------------------
   Language switcher
   -------------------------------------------------------------------- */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-switch svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.site-header.is-scrolled .lang-switch,
.site-header.nav-is-open .lang-switch {
  border-color: var(--grey-300);
  color: var(--grey-700);
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.16);
}

.site-header.is-scrolled .lang-switch:hover,
.site-header.nav-is-open .lang-switch:hover {
  background: var(--maroon-50);
  border-color: var(--maroon-500);
  color: var(--maroon-600);
}

/* Narrow phones: drop the label so the pill never crowds the logo. */
@media (max-width: 380px) {
  .lang-switch {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .lang-switch span { display: none; }
}

@media (max-width: 560px) {
  .lang-switch { padding: 8px 14px; font-size: 0.8rem; }
}

/* --------------------------------------------------------------------
   RTL (Arabic) support
   -------------------------------------------------------------------- */

:root[dir="rtl"],
html[dir="rtl"] body {
  --font-heading: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
}

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

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
  font-family: var(--font-heading);
  font-weight: 700;
}

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

/* Arrows point the opposite way to match reading direction */
[dir="rtl"] .btn svg,
[dir="rtl"] .card-link svg,
[dir="rtl"] .map-card-cta svg:last-child,
[dir="rtl"] .breadcrumb svg {
  transform: scaleX(-1);
}

[dir="rtl"] .floating-call {
  left: auto;
  right: 28px;
}

[dir="rtl"] .back-to-top {
  right: auto;
  left: 28px;
}

@media (max-width: 560px) {
  [dir="rtl"] .floating-call { left: auto; right: 20px; }
  [dir="rtl"] .back-to-top { right: auto; left: 20px; }
}

[dir="rtl"] .marquee-track {
  animation-direction: reverse;
}

[dir="rtl"] .marquee-item::after {
  margin-left: 0;
  margin-right: 28px;
}

@media (min-width: 861px) {
  [dir="rtl"] .hero-stat-item {
    border-right: none;
    border-left: 1px solid var(--grey-100);
  }

  [dir="rtl"] .hero-stat-item:last-child {
    border-left: none;
  }
}

[dir="rtl"] .contact-card,
[dir="rtl"] .footer-contact-item,
[dir="rtl"] .split-list-item {
  text-align: right;
}
