/* ==========================================================================
   AL MAHARAT AL ALAMIYA - CORPORATE STYLESHEET
   Palette derived from Brand Identity: Deep Burgundy (#681C2E), Steel (#4A4E54)
   ========================================================================== */

:root {
  --primary: #681C2E;       /* Brand Burgundy */
  --primary-dark: #4A111F;
  --secondary: #2B2E33;     /* Architectural Charcoal */
  --steel: #5A5E66;         /* Brushed Steel Grey */
  --light-bg: #F8F9FA;
  --white: #FFFFFF;
  --border: #E2E5E9;
  --text-main: #22252A;
  --text-muted: #5C626B;
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.65;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1220px;
  margin: 0 auto;
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--secondary);
  color: #D6D9DE;
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a:hover {
  color: var(--white);
}

/* Navigation Header */
header,
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 108px;
  padding: 8px 0;
  gap: 14px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-link img,
.logo-img {
  height: 90px;
  max-height: 94px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.logo-text .ar {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  white-space: nowrap;
}

.logo-text .en {
  font-size: clamp(0.95rem, 1.35vw, 1.25rem);
  font-weight: 900;
  color: var(--secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

nav {
  min-width: 0;
}

nav ul {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
}

nav ul li {
  white-space: nowrap;
}

nav ul li a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--secondary);
  transition: var(--transition);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: inline-block;
}

nav ul li a.btn {
  padding: 9px 16px;
  font-size: 0.88rem;
  border-bottom: none;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

nav ul li a.btn:hover {
  border-bottom: none;
}

.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-outline-dark {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--white);
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: none;
  font-size: 1.6rem;
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(43, 46, 51, 0.94), rgba(104, 28, 46, 0.90)),
              url('assets/hero-bg.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 105px 0 95px;
}

.hero-content {
  max-width: 780px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 1.15rem;
  color: #EAECEF;
  margin-bottom: 32px;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Page Header Banner (Subpages) */
.page-header {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--white);
  padding: 64px 0;
}

.page-header h1 {
  font-size: 2.3rem;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 1.1rem;
  color: #E2E5E9;
  max-width: 720px;
}

/* Trust Strip */
.trust-strip {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.trust-item {
  background: var(--white);
  padding: 24px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.trust-item h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.trust-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Sections & Grids */
.section {
  padding: 75px 0;
}

.section-alt {
  background-color: var(--light-bg);
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 50px;
}

.section-header .subtitle {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-header .authenticity-note {
  margin-top: 10px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--secondary);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 32px;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 30px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  border-color: var(--primary);
}

.card-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.card h3 {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.check-list {
  margin-top: 16px;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.check-list li::before {
  content: "▪";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

/* Project Showcase Category Filter Tabs */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 9px 18px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.showcase-card[hidden] {
  display: none;
}

/* Folder-Wise Project Showcase Grid */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.showcase-card {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--light-bg);
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--light-bg);
  display: block;
  transition: var(--transition);
}

.showcase-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.showcase-card:hover img {
  transform: scale(1.04);
}

/* Showcase Click-to-View & Zoom Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal[hidden] {
  display: none;
}

.lightbox-stage {
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.lightbox-stage img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease, max-width 0.2s ease, max-height 0.2s ease;
  cursor: zoom-in;
  display: block;
}

.lightbox-stage img.zoomed {
  max-width: none;
  max-height: none;
  width: 175%;
  cursor: zoom-out;
}

.lightbox-controls {
  position: fixed;
  top: 18px;
  right: 22px;
  display: flex;
  gap: 10px;
  z-index: 2010;
}

.lightbox-btn {
  background: var(--white);
  color: var(--secondary);
  border: none;
  padding: 9px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: var(--primary);
  color: var(--white);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  color: var(--secondary);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 2010;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: var(--primary);
  color: var(--white);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

@media (max-width: 768px) {
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }
}

/* Client Directory Table */
.client-table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th {
  background-color: var(--secondary);
  color: var(--white);
  font-weight: 600;
}

tr:hover td {
  background-color: var(--light-bg);
}

/* Contact Form */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* CTA Banner */
.cta-banner {
  background-color: var(--primary);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: 2rem;
  margin-bottom: 14px;
}

.cta-banner p {
  max-width: 650px;
  margin: 0 auto 28px;
  color: #F2D8DE;
}

/* Footer */
footer {
  background-color: var(--secondary);
  color: #CFD4DC;
  padding: 65px 0 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
  margin-bottom: 45px;
}

footer h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 4px;
}

footer ul li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

footer ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px;
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
  }

  nav ul li {
    white-space: normal;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-wrapper {
    min-height: 76px;
  }

  .logo-link img,
  .logo-img {
    height: 58px;
    max-height: 62px;
  }
}