/* 
===============================================
  Al-Dammam Engineering - Premium Stylesheet
  Fortexa / ROV / Biltech Inspired
===============================================
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --c-primary: #1b3c6b;
  --c-primary-light: #2c538c;
  --c-primary-dark: #122849;
  
  --c-accent: #feb300;
  --c-accent-light: #ffc433;
  --c-accent-dark: #dca000;
  
  /* Neutral Colors */
  --c-white: #ffffff;
  --c-bg: #faf8f5;
  --c-gray-100: #f1f0ed;
  --c-gray-200: #e2e0dc;
  --c-gray-400: #94a3b8;
  --c-gray-600: #55657b;
  --c-gray-800: #233148;
  --c-black: #0f172a;
  
  /* Typography */
  --font-en: 'Inter', sans-serif;
  --font-ar: 'Cairo', sans-serif;
  
  /* Layout */
  --container-width: 1350px;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
  
  /* Transitions */
  --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ================== GLOBAL ================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-en);
  scroll-behavior: smooth;
  color: var(--c-gray-800);
  background-color: var(--c-bg);
  font-size: 16px;
}

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

body {
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

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

ul, ol {
  list-style: none;
}

/* ================== TYPOGRAPHY ================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--c-primary-dark);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.8rem, 5vw, 5rem); }
h2 { font-size: clamp(2.2rem, 3.5vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2vw, 2rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.5rem); }

.tagline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-gray-600);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2.5rem;
}
[dir="rtl"] .tagline {
  padding-left: 0;
  padding-right: 2.5rem;
}

.tagline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1.5rem;
  height: 2px;
  background-color: var(--c-primary);
  transform: translateY(-50%);
}
[dir="rtl"] .tagline::before {
  left: auto;
  right: 0;
}

p {
  color: var(--c-gray-600);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

/* ================== LAYOUT ================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 7rem 0;
  position: relative;
}

.section-bg-white {
  background-color: var(--c-white);
}

.section-bg-dark {
  background-color: var(--c-primary-dark);
  color: var(--c-white);
  background-image: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
}
.section-bg-dark h2, .section-bg-dark h3, .section-bg-dark p {
  color: var(--c-white);
}

/* Flex */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* Grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

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

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

@media (max-width: 991px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* ================== BUTTONS ================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 0.6rem;
}

.btn-primary {
  background-color: var(--c-primary);
  color: var(--c-white);
}
.btn-primary:hover {
  background-color: var(--c-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--c-accent);
  color: var(--c-primary-dark);
  font-weight: 700;
}
.btn-accent:hover {
  background-color: var(--c-accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.btn-outline:hover {
  background-color: var(--c-primary);
  color: var(--c-white);
}

.btn-ghost {
  background: transparent;
  color: var(--c-white);
  border: none;
  padding-left: 0;
  font-weight: 600;
}
.btn-ghost:hover {
  color: var(--c-accent);
}


/* ================== NAVBAR ================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  transition: var(--transition);
}

/* Transparent navbar on hero pages - Now dark text for visibility on the white wrapper background */
.navbar.transparent {
  background: transparent;
}
.navbar.transparent .nav-link,
.navbar.transparent .brand-text,
.navbar.transparent .hamburger i {
  color: var(--c-primary-dark);
}
.navbar.transparent .lang-switch {
  border-color: var(--c-gray-200);
  color: var(--c-primary-dark);
}

/* Scrolled / inner page navbar */
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
}
.navbar.scrolled .nav-link,
.navbar.scrolled .brand-text,
.navbar.scrolled .hamburger i {
  color: var(--c-primary-dark);
}
.navbar.scrolled .lang-switch {
  border-color: var(--c-gray-200);
  color: var(--c-primary-dark);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.brand-text {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.15;
  color: var(--c-primary-dark);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-weight: 500;
  color: var(--c-primary-dark);
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--c-accent);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1.2rem;
  border: 1.5px solid var(--c-gray-200);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
}
.lang-switch:hover {
  background-color: var(--c-primary);
  color: var(--c-white) !important;
  border-color: var(--c-primary);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--c-primary-dark);
  cursor: pointer;
}

@media (max-width: 991px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--c-white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    gap: 2rem;
  }
  [dir="rtl"] .nav-menu {
    right: auto;
    left: -100%;
  }
  .nav-menu.active { right: 0; }
  [dir="rtl"] .nav-menu.active { left: 0; }
  .nav-menu .nav-link { color: var(--c-primary-dark) !important; font-size: 1.1rem; }
  .hamburger { display: block; }
}


/* ================== HERO - FORTEXA FRAMED STYLE ================== */
.hero-wrapper {
  background-color: var(--c-bg);
  padding: 1.2rem 1.2rem 0 1.2rem;
  padding-top: calc(70px + 1.2rem); /* navbar height + padding */
  position: relative;
  overflow: hidden; /* Ensure background doesn't bleed */
}

/* Background image with grayscale filter applied only to this layer */
.hero-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/header-bg.webp');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: grayscale(1) brightness(1.1);
  z-index: 0;
}

/* Subtle overlay to fade the background, placed above the image but below content */
.hero-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(250, 248, 245, 0.95);
  z-index: 1;
}

.hero-frame {
  position: relative;
  z-index: 2;
}

.hero {
  position: relative;
  min-height: 85vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.2) 100%);
  z-index: 1;
}
[dir="rtl"] .hero-overlay {
  background: linear-gradient(-160deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.2) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 5rem 4rem;
}

.hero-content {
  max-width: 700px;
  color: var(--c-white);
}

.hero-content h1 {
  color: var(--c-white);
  margin-bottom: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: capitalize;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 550px;
  line-height: 1.5;
}

.hero-content .tagline {
  color: rgba(255,255,255,0.7);
}
.hero-content .tagline::before {
  background-color: var(--c-accent);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Stats Bar — sits at bottom of hero inside the rounded frame */
.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-around;
  padding: 2.5rem 4rem;
  background: rgba(18, 40, 73, 0.7);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-number {
  color: var(--c-accent);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .hero-wrapper {
    padding: 0.6rem 0.6rem 0 0.6rem;
    padding-top: calc(60px + 0.6rem);
  }
  .hero { min-height: 70vh; }
  .hero-inner { padding: 3rem 2rem; }
  .hero-stats { padding: 1.5rem 1rem; flex-wrap: wrap; gap: 1rem; }
  .stat-item { width: 45%; }
  .stat-number { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}


/* ================== FEATURE BLOCK ================== */
.feature-block {
  display: flex;
  align-items: center;
  gap: 5rem;
}

@media (max-width: 991px) {
  .feature-block { flex-direction: column; gap: 3rem; }
}

.feature-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.feature-image-wrapper img {
  width: 100%;
  height: 550px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.feature-image-wrapper:hover img {
  transform: scale(1.03);
}

.experience-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--c-primary);
  color: var(--c-white);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-align: center;
  border-top-left-radius: var(--radius-xl);
}
[dir="rtl"] .experience-badge {
  right: auto;
  left: 0;
  border-top-left-radius: 0;
  border-top-right-radius: var(--radius-xl);
}
.experience-badge .years {
  font-size: 3.5rem;
  line-height: 1;
  color: var(--c-accent);
  margin-bottom: 0.3rem;
}

.feature-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-primary-dark);
}
.feature-list i {
  color: var(--c-accent);
  font-size: 1.3rem;
}


/* ================== SERVICE CARDS ================== */
.service-card {
  background-color: var(--c-white);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--c-gray-100);
}

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

.service-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
[dir="rtl"] .service-card::after {
  transform-origin: right;
}
.service-card:hover::after {
  transform: scaleX(1);
}

.service-icon {
  width: 65px;
  height: 65px;
  background-color: var(--c-gray-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--c-primary);
  margin-bottom: 2rem;
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background-color: var(--c-primary);
  color: var(--c-white);
}

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


/* ================== PROJECT CARDS ================== */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 1.1 / 1; /* Slightly taller than square for better content fit in columns */
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  color: var(--c-white);
  transition: var(--transition);
}

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

.project-title {
  color: var(--c-white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.project-category {
  color: var(--c-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.project-overlay p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
}


/* ================== CTA SECTION ================== */
.cta-mega {
  background-image: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
  padding: 5rem;
  text-align: center;
  color: var(--c-white);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.cta-mega h2 {
  color: var(--c-white);
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 1.5rem;
}

.cta-mega p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  max-width: 650px;
  margin: 0 auto 3rem auto;
}

.cta-circle-bg {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 179, 0, 0.12) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}
[dir="rtl"] .cta-circle-bg {
  right: auto;
  left: -10%;
}
.cta-content {
  position: relative;
  z-index: 1;
}


/* ================== FOOTER ================== */
.footer {
  background-color: var(--c-black);
  color: rgba(255,255,255,0.65);
  padding: 6rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

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

.footer-brand .brand-logo {
  height: 55px;
  filter: brightness(0) invert(1);
}
.footer-brand .brand-text {
  color: var(--c-white);
}

.footer-brand p {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}
.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
  transition: var(--transition);
}
.footer-socials a:hover {
  background-color: var(--c-accent);
  color: var(--c-primary-dark);
}

.footer-title {
  color: var(--c-white);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a {
  transition: var(--transition);
  font-size: 0.95rem;
}
.footer-links a:hover {
  color: var(--c-accent);
  padding-left: 5px;
}
[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 5px;
}

.footer-contact li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.footer-contact i {
  color: var(--c-accent);
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}


/* ================== ANIMATIONS ================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}


/* ================== PAGE HEADER (inner pages) ================== */
.page-header {
  padding: 10rem 0 6rem 0; /* Reduced top padding as it now has the wrapper margin */
  background-color: var(--c-primary-dark);
  text-align: center;
  color: var(--c-white);
  background-image: linear-gradient(135deg, rgba(18, 40, 73, 0.9), rgba(27, 60, 107, 0.8));
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header.header-about { background-image: linear-gradient(135deg, rgba(18, 40, 73, 0.92), rgba(27, 60, 107, 0.92)), url('../images/header-about.webp'); }
.page-header.header-services { background-image: linear-gradient(135deg, rgba(18, 40, 73, 0.92), rgba(27, 60, 107, 0.92)), url('../images/header-services.webp'); }
.page-header.header-projects { background-image: linear-gradient(135deg, rgba(18, 40, 73, 0.92), rgba(27, 60, 107, 0.92)), url('../images/header-projects.webp'); }
.page-header.header-contact { background-image: linear-gradient(135deg, rgba(18, 40, 73, 0.92), rgba(27, 60, 107, 0.92)), url('../images/header-contact.webp'); }
.page-header h1 {
  margin-bottom: 1.5rem;
  color: var(--c-white);
}
.page-header p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  margin-left: auto;
  margin-right: auto;
}
.page-header .tagline {
  color: var(--c-accent);
}
.page-header .tagline::before {
  background-color: var(--c-accent);
}

