:root {
  /* --- PALETTE --- */
  
  /* Base Colors */
  --color-white:     #ffffff;
  --color-offwhite:  #ffffff;
  --color-grey:      #cccccc;
  --color-black:     #000000;

  --color-vividblue: #89a2c4;
  --color-navyblue:  #001C65;
  --color-darkblue:  #102040;
  
  --color-lightgold: #ddc9a2;
  --color-gold:      #c9a86a;
  --color-darkgold:  #9F6902;
  --color-gold-rgb: 201, 168, 106;
  
  --color-button: rgba(15, 23, 42, 0.7);
  --color-text-footer: rgba(255, 255, 255, 0.65);

  /* UI Elements */
  --color-header-bg: rgba(10, 30, 80, 0.7);
  --color-border: #e5e7eb;
  --color-border-dark: rgba(148, 163, 184, 0.4);
  

  /* --- SPACING SCALE --- */
  --space-2xs: 0.25rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  
  /* --- TYPOGRAPHY & SHAPES --- */
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 10px;
  
  /* --- SHADOWS --- */
  --shadow-soft:       0 10px 10px rgba(20, 20, 20, 0.2);
  --shadow-card:       0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* This kills the ghost white space */
  width: 100%;        /* Ensures body doesn't expand beyond viewport */
}

/* Global */
body {
  font-family: var(--font-main);
  background: var(--color-white);
  color: var(--color-black);
  line-height: 1.6;
  scroll-behavior: smooth;
  font-weight: 300;
}

/* Headings & body text */
h1, h2, h3, h4 {
  text-transform: uppercase;
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.14em;
  color: var(--color-navyblue);
  font-weight: 300;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

p {
  margin: 0 0 var(--space-sm);
  font-size: 0.95rem;
}

/* Links */
a {
  color: var(--color-gold);
   text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: var(--color-lightgold);
}

/* Small meta text */
.section-tagline,
.project-meta,
.note {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--color-darkgold);
}

/* Layout primitives */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.section:first-of-type {
  border-top: none;
}

.section-header {
  margin-bottom: var(--space-lg);
}

.section-header.center {
  text-align: center;
}

/* Generic grid */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.grid > * {
  flex: 1 1 min(440px, 100%);
  display: flex;
  flex-direction: column;
}

.bottom-align {
  justify-content: flex-end;
}

/* HEADER / NAV */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

/* Update the site title typography */
.site-title a {
  font-family: "EB Garamond", "Garamond", serif;
  font-size: 1.35rem;        /* Slightly larger as Garamond is naturally small */
  letter-spacing: 0.35em;    /* Wide spacing */
  text-transform: uppercase;
  font-weight: 500;          /* Bold */
  color: var(--color-gold);
  text-decoration: none;
}

/* Remove the boxed/button border effect */
.site-title--boxed a {
  padding: 0;
  border-radius: 0;
  border: none;
}
.nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.nav a {
  color: var(--color-lightgold);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.2rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.2s ease-out;
}

.nav a:hover {
  color: var(--color-gold);
}

.nav a:hover::after {
  width: 100%;
}

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--color-gold-rgb), 0.8);
  background: linear-gradient(
    135deg,
    rgba(var(--color-gold-rgb), 0.1),
    rgba(248, 210, 138, 0.1)
  );
  color: var(--color-gold);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
/*  box-shadow: var(--shadow-soft), inset 0 0 0 rgba(0, 0, 0, 0); */
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, filter 0.15s ease-out;
}

.btn-primary:hover {
  color: var(--color-gold);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft), inset 0 0 0 rgba(0, 0, 0, 0);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft), inset 0 0 0 rgba(0, 0, 0, 0);

}


.card {
/*backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-grey);
 background: linear-gradient(
    135deg,
    var(--color-vividblue) 0%,
    var(--color-navyblue) 100%    );
 */

  background: var(--color-vividblue);
  border-radius: 14px;
  padding: var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
}

.card2 {
/*backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
   background: var(--color-white);*/
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-grey);

  border-radius: 14px;
  padding: var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
}

.card h3 {
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.card2 h3 {
  text-transform: uppercase;
  color: var(--color-darkblue);
  margin-bottom: var(--space-sm);
}

.card p,
.card ul {
  margin-top: 0;
  margin-bottom: var(--space-xs);
  color: var(--color-white);
}

.card2 p,
.card2 ul {
  margin-top: 0;
  margin-bottom: var(--space-xs);
  color: var(--color-darkblue);
}

.card ul {
  padding-left: 1.1rem;
}

.card2 ul {
  padding-left: 1.1rem;
}

/* Contact */
.contact-details p {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

/* PAGE WRAPPER + CANVAS */
#page-root {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  background: transparent;
}

/* Hero Background definition */
#network-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw; /* Hard stop at viewport width */
  display: block;
  z-index: 0;
  pointer-events: none;
  /* background-color: var(--color-navyblue); */
  background: linear-gradient(to bottom, var(--color-navyblue), var(--color-darkblue)); 
  transition: background 1.8s ease; 
}

/* HERO SECTION */
.section.hero {
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: center;
  border-top: none;
  background: transparent;
}

.section.hero .section-tagline,
.section-tagline p,
.section.hero li  {
  color: var(--color-white);
}

.section.hero,
.section.hero p,
.section.hero h1,
.section.hero h2
{
  color: var(--color-white);
}
.section-tagline,
 {
  color: var(--color-lightgold);
}
.section.hero a {
  text-decoration-color: rgba(229, 231, 235, 0.4);
}

.section.hero a:hover {
  text-decoration-color: rgba(249, 250, 251, 0.9);
}

/* Project images inside cards */
.card2 img.project-image {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin-top: auto;
  aspect-ratio: 16 / 9;
}

/* CONSULTATION / FORM SECTIONS */
#consultation-form.section {
  background: var(--color-white);
}

#consultation-form .card {
  background: var(--color-white);
 
}

/* Form Layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md) 2.5rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.35rem;
  display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--color-navyblue);
  padding: 1rem;
}

/* Full-width group (textarea) */
.form-group-full {
  grid-column: 1 / -1;
  margin-top: var(--space-lg);
}

.form-group-full label {
  margin-bottom: 0.65rem;
}

#description {
  padding: var(--space-xs) var(--space-sm);
  min-height: 240px;
  resize: vertical;
}

.form-actions {
  margin-top: 3rem;
  margin-bottom: 3rem;
  text-align: center;
}

/* Map */
 .map-frame,
 .map-frameGR {
  width: 100%;
  height: 380px;
  overflow: hidden;
  /* box-shadow: var(--shadow-soft);  Consolidated */
  border-radius: 14px;
  border: 1px solid var(--color-navyblue);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-frameGR iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(100%) opacity(0.85);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group-full {
    grid-column: 1 / -1;
  }

  .form-actions {
    margin-top: 2.25rem;
  }
}

/* --- MOBILE NAVIGATION --- */
/* 1. Hamburger Button (Hidden on Desktop) */
.mobile-toggle {
  display: none; /* Hidden by default */
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 6px;
  z-index: 1100;
}

.mobile-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-gold);
  transition: 0.3s;
}

/* 2. Media Query for Mobile & Tablets (max-width 960px) */
@media (max-width: 960px) {
  .mobile-toggle {
    display: flex; /* Show the button */
  }

  /* Hide the nav list by default on mobile */
  .nav {
    display: none; 
    position: absolute;
    top: 100%; /* Push it right below the header */
    left: 0;
    width: 100%;
    background-color: var(--color-header-bg); /* Use the dark semi-transparent bg */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
/*  border-bottom: 1px solid var(--color-border-dark); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); */
  }

  /* The class that JS will add when clicked */
  .nav.is-open {
    display: flex;
  }

  /* Style links for touch targets */
  .nav a {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
  }
  
  /* Remove the hover underline animation on mobile (it looks messy) */
  .nav a::after {
    display: none;
  }
}

/* Active state for navigation */
.nav a.active {
  color: var(--color-gold) !important;
  font-weight: 500;
}

/* Ensure the underline stays visible for the active page */
.nav a.active::after {
  width: 100%;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-sm) 0 var(--space-md);
  background: var(--color-darkblue); 
 /* background: linear-gradient(to bottom, var(--color-darkblue), var(--color-darkblue)); */
  color: var(--color-text-footer);
}

.site-footer .grid {
  margin-bottom: 2rem;
  text-align: left;
}

.site-footer h4 {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  color: var(--color-text-footer);
}

.site-footer a {
  text-decoration: none;
  transition: color 0.2s;
  color: var(--color-white)
}

.site-footer a:hover {
  text-decoration: underline;
  color: var(--color-gold)
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
}

/* 1. Base Text Arabic & UI (Matches 'Inter') */
:lang(ar) body, 
:lang(ar) p, 
:lang(ar) a, 
:lang(ar) .nav,
:lang(ar) .button,
:lang(ar) h1, 
:lang(ar) h2, 
:lang(ar) h3, 
:lang(ar) .section-header p,
:lang(ar) blockquote {
 font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

:lang(ar) .site-title a {
  font-family: "EB Garamond", "Garamond", serif !important;
}

.method-diagram {
  margin: 3rem 0;
  text-align: center;
}

.method-diagram img {
  max-width: 100%;
  height: auto;
  background: transparent;
}

.method-diagram figcaption {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.75;
}