/* ========================================
   MOTHALATH - Triangle Design for Engineering
   Premium Corporate Website Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  --primary: #0d6b3f;
  --primary-dark: #094d2d;
  --primary-light: #14a85e;
  --primary-glow: rgba(13, 107, 63, 0.15);
  --secondary: #1a1a2e;
  --accent: #c9a84c;
  --accent-light: #e0c76e;
  --text-dark: #1a1a2e;
  --text-medium: #4a4a5a;
  --text-light: #7a7a8a;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-cream: #fafaf7;
  --bg-dark: #0a0a1a;
  --border-light: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-green: 0 8px 30px rgba(13, 107, 63, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-ar: 'IBM Plex Sans Arabic', sans-serif;
  --font-en: 'Montserrat', sans-serif;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-ar);
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.ltr {
  font-family: var(--font-en);
  direction: ltr;
  text-align: left;
}

body.rtl {
  direction: rtl;
  text-align: right;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Utility Classes ---- */
.section-padding {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title .overline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  position: relative;
  padding: 0 20px;
}

.section-title .overline::before,
.section-title .overline::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.section-title .overline::before {
  right: -35px;
}

.section-title .overline::after {
  left: -35px;
}

body.ltr .section-title .overline::before {
  left: -35px;
}

body.ltr .section-title .overline::after {
  right: -35px;
}

.section-title h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-title p {
  font-size: 1.05rem;
  color: var(--text-medium);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Scroll Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.ltr .reveal-left {
  transform: translateX(-50px);
}

body.rtl .reveal-left {
  transform: translateX(50px);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.rtl .reveal-right {
  transform: translateX(-50px);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── Triangle Background Pattern ── */
.triangle-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.03;
  z-index: 0;
}

.triangle-pattern::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(60deg, transparent 48%, var(--primary) 48%, var(--primary) 52%, transparent 52%),
    linear-gradient(-60deg, transparent 48%, var(--primary) 48%, var(--primary) 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, var(--primary) 48%, var(--primary) 52%, transparent 52%);
  background-size: 80px 70px;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  padding: 16px 0;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1001;
}

.nav-logo-img {
  max-height: 54px;
  width: auto;
  transition: var(--transition);
  /* The logo is white initially over the dark hero background */
  filter: brightness(0) invert(1);
}

.navbar.scrolled .nav-logo-img {
  /* Turn the logo black when the navbar becomes white */
  filter: brightness(0);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.navbar.scrolled .nav-links a {
  color: var(--text-dark);
}

.navbar.scrolled .nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1001;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.navbar.scrolled .lang-switch {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.lang-switch .globe-icon {
  width: 16px;
  height: 16px;
}

.nav-cta {
  padding: 10px 24px;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-xl);
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2.5px;
  background: white;
  border-radius: 3px;
  transition: var(--transition);
}

.navbar.scrolled .mobile-toggle span {
  background: var(--text-dark);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav Logo Text */
.nav-logo-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-logo-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-logo-sub {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: var(--transition);
  white-space: nowrap;
}

.navbar.scrolled .nav-logo-name {
  color: var(--text-dark);
}

.navbar.scrolled .nav-logo-sub {
  color: var(--text-light);
}

/* English (LTR) specific: Stack logo text in two lines */
body.ltr .nav-logo-text {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

body.ltr .nav-logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  margin-top: -2px;
}

/* ========================================
   CERTIFICATIONS GALLERY
   ======================================== */
.certs-section {
  background: var(--bg-light);
  overflow: hidden;
}

.certs-slider-container {
  position: relative;
  padding: 0;
  margin-top: 40px;
}

.certs-gallery, .portfolio-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 20px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.certs-gallery::-webkit-scrollbar, .portfolio-grid::-webkit-scrollbar {
  display: none;
}

.cert-img-card {
  flex: 0 0 100%;
  max-width: 100%;
  scroll-snap-align: center;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .cert-img-card {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (max-width: 600px) {
  .cert-img-card {
    flex: 0 0 100%;
  }
}


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

.cert-img-card img {
  width: 100%;
  height: 500px;
  object-fit: contain;
  background: #fdfdfd;
  display: block;
  transition: var(--transition);
}

.cert-img-card:hover img {
  transform: scale(1.03);
}

.cert-label {
  display: block;
  padding: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  background: var(--bg-white);
  border-top: 2px solid var(--primary);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30; /* Ensure it's above the gallery and overlays */
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.slider-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
  left: 15px;
}

.slider-btn.next {
  right: 15px;
}

body.rtl .slider-btn.prev {
  left: auto;
  right: 15px;
  transform: translateY(-50%) rotate(180deg);
}

body.rtl .slider-btn.prev:hover {
  transform: translateY(-50%) rotate(180deg) scale(1.1);
}

body.rtl .slider-btn.next {
  right: auto;
  left: 15px;
  transform: translateY(-50%) rotate(180deg);
}

body.rtl .slider-btn.next:hover {
  transform: translateY(-50%) rotate(180deg) scale(1.1);
}


/* ========================================
   MAP SECTION
   ======================================== */
.map-section {
  background: var(--bg-white);
}

.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  line-height: 0;
}

.map-wrapper iframe {
  width: 100%;
  height: 480px;
  border: 0;
  display: block;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a2e1a 0%, #0d6b3f 40%, #094d2d 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 168, 76, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(13, 107, 63, 0.2) 0%, transparent 50%);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to top, var(--bg-white), transparent);
  z-index: 2;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-shapes .triangle {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0.05;
}

.hero-bg-shapes .triangle:nth-child(1) {
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-bottom: 260px solid white;
  top: 10%;
  right: 10%;
  animation: float 8s ease-in-out infinite;
}

.hero-bg-shapes .triangle:nth-child(2) {
  border-left: 100px solid transparent;
  border-right: 100px solid transparent;
  border-bottom: 173px solid var(--accent);
  bottom: 20%;
  left: 5%;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-bg-shapes .triangle:nth-child(3) {
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 104px solid white;
  top: 50%;
  right: 30%;
  animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(3deg);
  }
}

.hero .container {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 60px;
  padding-top: 100px;
  padding-bottom: 60px;
  max-width: 1600px;
}

body.rtl .hero .container,
body.ltr .hero .container {
  margin: 0 auto;
}

@media (max-width: 768px) {
  body.rtl .hero .container, body.ltr .hero .container {
    margin: 0 auto;
  }
}

.hero-content {
  flex: 1;
  max-width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: white;
  line-height: 1.25;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-xl);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
  min-width: 220px;
}

.btn-secondary:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.hero-buttons .btn-primary {
  min-width: 220px;
  justify-content: center;
}



.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  justify-content: center;
  width: 100%;
  max-width: 800px;
}

.hero-stat h3 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  font-family: var(--font-en);
}

.hero-stat p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.hero-visual {
  flex: 0.8;
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-wrapper img {
  width: 100%;
  max-width: 400px;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

.hero-float-card {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 20px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  animation: float 4s ease-in-out infinite;
}

body.rtl .hero-float-card {
  right: auto;
  left: -20px;
}

.hero-float-card .card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
}

.hero-float-card .card-text h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
}

.hero-float-card .card-text p {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
  position: relative;
  background: var(--bg-white);
}

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

.about-image {
  position: relative;
}

.about-image-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image-main img {
  width: 100%;
  height: auto;
}

.about-experience-badge {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-green);
}

.about-experience-badge h3 {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: var(--font-en);
}

.about-experience-badge p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.about-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.about-content .about-text {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.9;
  margin-bottom: 30px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.about-feature:hover {
  background: var(--primary-glow);
  transform: translateX(-4px);
}

body.ltr .about-feature:hover {
  transform: translateX(4px);
}

.about-feature .feature-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.about-feature span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

/* ── Vision / Mission / Goals ── */
.vmg-section {
  background: var(--bg-light);
  position: relative;
}

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

.vmg-card {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.vmg-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: var(--transition);
}

.vmg-card:hover::before {
  transform: scaleX(1);
}

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

.vmg-card .vmg-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: white;
}

.vmg-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.vmg-card p {
  font-size: 0.92rem;
  color: var(--text-medium);
  line-height: 1.8;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
  position: relative;
  background: var(--bg-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: right;
  transition: var(--transition);
}

body.ltr .service-card::after {
  transform-origin: left;
}

.service-card:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

body.ltr .service-card:hover::after {
  transform-origin: right;
}

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

.service-card .service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-glow), rgba(13, 107, 63, 0.05));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: white;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.7;
}

/* ========================================
   PORTFOLIO / PROJECTS SECTION
   ======================================== */
.portfolio {
  background: var(--bg-light);
  position: relative;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-medium);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.portfolio-slider-container {
  position: relative;
  padding: 0;
}

/* .portfolio-grid now shares styles with .certs-gallery above */

.portfolio-item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.portfolio-item img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 26, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: var(--transition);
}

.portfolio-overlay h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.portfolio-overlay .tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(201, 168, 76, 0.2);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ========================================
   VALUES SECTION
   ======================================== */
.values-section {
  background: linear-gradient(135deg, #0a2e1a 0%, #0d6b3f 50%, #094d2d 100%);
  position: relative;
  overflow: hidden;
}

.values-section .section-title h2,
.values-section .section-title p,
.values-section .section-title .overline {
  color: white;
}

.values-section .section-title .overline::before,
.values-section .section-title .overline::after {
  background: var(--accent);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.value-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  transition: var(--transition);
}

.value-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-6px);
}

.value-card .value-icon {
  width: 60px;
  height: 60px;
  background: rgba(201, 168, 76, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.value-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

/* ========================================
   PARTNERS SECTION
   ======================================== */
.partners {
  background: var(--bg-white);
  position: relative;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.partner-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  transition: var(--transition);
  min-height: 160px;
}

.partner-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.partner-card .partner-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
}

.partner-logo {
  height: 64px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  transition: var(--transition);
  mix-blend-mode: multiply;
}

.partner-card:hover .partner-logo {
  transform: scale(1.08);
}

.partner-logo.logo-lg {
  height: 95px;
  max-width: 180px;
}

.partner-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.5;
}

/* Zoom Indicator for Galleries */
.cert-img-card, .portfolio-item {
  position: relative;
  overflow: hidden;
}

.zoom-indicator {
  display: none !important; /* Hidden as requested to be replaced by text */
}

.zoom-text {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 4px;
  opacity: 0.9;
}

.cert-label {
  display: flex;
  flex-direction: column;
  padding: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  background: var(--bg-white);
  border-top: 2px solid var(--primary);
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.cert-label .zoom-text {
  color: var(--text-light);
  font-weight: 400;
}


/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
  background: var(--bg-light);
  position: relative;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  transition: var(--transition);
  height: 100%;
}

.contact-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.contact-item .contact-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.contact-item p,
.contact-item a {
  font-size: 0.92rem;
  color: var(--text-medium);
  line-height: 1.6;
}

.contact-item a:hover {
  color: var(--primary);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 60px 0 0;
}

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

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo-img {
  max-height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

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

.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-right: 4px;
}

body.ltr .footer-col ul li a:hover {
  padding-right: 0;
  padding-left: 4px;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom .cr-number {
  font-family: var(--font-en);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  animation: pulse-whatsapp 2s ease-in-out infinite;
}

body.rtl .whatsapp-float {
  right: 30px;
}

body.ltr .whatsapp-float {
  left: 30px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: white;
}

@keyframes pulse-whatsapp {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }

  50% {
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6);
  }
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 105px;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-green);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 998;
}

body.rtl .back-to-top {
  right: 37px;
}

body.ltr .back-to-top {
  left: 37px;
}

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

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
  .hero .container {
    flex-direction: column;
    text-align: start;
    align-items: flex-start;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-desc {
    margin: 0 0 36px 0;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-stats {
    justify-content: flex-start;
  }

  .hero-visual {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .vmg-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    z-index: 1000;
  }



  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.2rem;
    color: white !important;
    padding: 12px 30px;
  }

  .nav-logo-img {
    max-height: 32px;
  }

  .nav-logo-name {
    font-size: 0.78rem;
  }

  .nav-logo-sub {
    font-size: 0.52rem;
  }


  .nav-cta {
    display: none;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-buttons,
  .hero-stats {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto 36px;
  }

  .portfolio-grid, .certs-gallery {
    gap: 16px;
  }

  .portfolio-item img {
    height: 380px;
  }

  .cert-img-card img {
    height: 320px;
  }

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

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

  .about-features {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

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

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

  .map-wrapper iframe {
    height: 320px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Prevent horizontal overflow bugs on mobile Safari */
  .reveal-left,
  .reveal-right {
    transform: translateY(30px) !important;
  }

  .reveal-left.visible,
  .reveal-right.visible {
    transform: translateY(0) !important;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
  }

  .hero-stat {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    max-width: 280px;
    min-width: 0;
  }
  .values-grid {
    grid-template-columns: 1fr;
  }

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

  .portfolio-filters {
    gap: 6px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}


/* ========================================
   CERTIFICATIONS SECTION
   ======================================== */
.certs-section {
  background: var(--bg-light);
  position: relative;
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: start;
}

.cert-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.cert-badge-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}

.cert-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.cert-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  font-family: var(--font-en);
}

.cert-desc {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.6;
}

.cert-card--barcode {
  grid-column: span 1;
}

.location-barcode {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 10px auto 12px;
  border-radius: var(--radius-sm);
  display: block;
}

/* ========================================
   LIGHTBOX MODAL
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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