/* ============================================
   IBDAA ADVANCED CONTRACTING - STYLESHEET
   Modern, Professional Portfolio Website
   ============================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
  /* Primary Colors - Gold Theme */
  --primary: #c4a052;
  --primary-light: #d4b872;
  --primary-dark: #9a7b3a;
  --primary-rgb: 196, 160, 82;

  /* Secondary Colors - Green Accent */
  --secondary: #1a5a3a;
  --secondary-light: #2a7a4a;
  --secondary-dark: #0f3d28;

  /* Background Colors - Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f6f3;
  --bg-tertiary: #f0ede8;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-strong: rgba(255, 255, 255, 0.95);

  /* Text Colors - Light Mode */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #6a6a6a;
  --text-muted: #8a8a8a;

  /* Border & Shadow - Light Mode */
  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --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-glow: 0 0 30px rgba(196, 160, 82, 0.3);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  --gradient-hero: linear-gradient(
    135deg,
    #1a1a1a 0%,
    #2a2a2a 50%,
    #1a1a1a 100%
  );
  --gradient-overlay: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );

  /* Typography */
  --font-primary-en: "Inter", "Outfit", sans-serif;
  --font-primary-ar: "Cairo", "Tajawal", sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* Spacing */
  --section-padding: 100px;
  --container-max: 1280px;
  --header-height: 80px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 50%;
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-glass: rgba(20, 20, 20, 0.85);
  --bg-glass-strong: rgba(15, 15, 15, 0.95);

  --text-primary: #f5f5f5;
  --text-secondary: #c5c5c5;
  --text-tertiary: #a5a5a5;
  --text-muted: #757575;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);

  --primary-light: #e4c872;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-primary-en);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
}

/* Arabic Font */
[dir="rtl"] body {
  font-family: var(--font-primary-ar);
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
  font-family: var(--font-primary-ar);
}

/* Selection */
::selection {
  background: var(--primary);
  color: #fff;
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

/* Lists */
ul,
ol {
  list-style: none;
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

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

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.header.scrolled {
  height: 70px;
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  z-index: 100;
}

.logo-img {
  height: 55px;
  width: auto;
  transition: transform var(--transition-base);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

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

.nav-link {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  position: relative;
  transition: all var(--transition-fast);
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition-base);
}

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

.nav-link.active::before,
.nav-link:hover::before {
  transform: translateX(-50%) scaleX(1);
}

/* Nav Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Language Toggle */
.lang-toggle {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.lang-toggle:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--primary);
  transform: rotate(15deg) scale(1.1);
}

[data-theme="dark"] .theme-toggle i::before {
  content: "\f185"; /* sun icon */
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 100;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
}

.hamburger::before {
  transform: translateY(-7px);
}

.hamburger::after {
  transform: translateY(7px);
}

.menu-toggle.active .hamburger {
  background: transparent;
}

.menu-toggle.active .hamburger::before {
  transform: rotate(45deg);
}

.menu-toggle.active .hamburger::after {
  transform: rotate(-45deg);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("images/hero_golden_city.png") center/cover no-repeat;
  opacity: 0.15;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
}

.hero-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 80%,
      rgba(var(--primary-rgb), 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(var(--primary-rgb), 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 255, 255, 0.02) 0%,
      transparent 30%
    );
  animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -20px) scale(1.02);
  }
  50% {
    transform: translate(-10px, 10px) scale(0.98);
  }
  75% {
    transform: translate(15px, 15px) scale(1.01);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 900px;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.15);
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  border-radius: var(--radius-xl);
  margin-bottom: 30px;
  animation: fadeInDown 1s ease forwards;
}

.hero-badge i {
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Hero Title */
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.5; /* Increased for Arabic glyphs */
  padding: 10px 0; /* Prevent vertical clipping */
  margin-bottom: 15px; /* Adjusted to account for padding */
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

/* Hero Tagline */
.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto 40px;
  animation: fadeInUp 1s ease 0.4s forwards;
  opacity: 0;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.6s forwards;
  opacity: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.btn-primary {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(var(--primary-rgb), 0.4);
}

.btn-primary i {
  transition: transform var(--transition-base);
}

.btn-primary:hover i {
  transform: translateX(5px);
}

[dir="rtl"] .btn-primary:hover i {
  transform: translateX(-5px);
}

.btn-outline {
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== SECTIONS ==================== */
.section {
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
  transition: background-color var(--transition-base);
}

.section:nth-child(even) {
  background: var(--bg-secondary);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-badge {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== ABOUT SECTION ==================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

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

.about-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-image-wrapper:hover .about-img {
  transform: scale(1.05);
}

.about-experience {
  position: absolute;
  bottom: 30px;
  right: 30px;
  padding: 24px 32px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

[dir="rtl"] .about-experience {
  right: auto;
  left: 30px;
}

.exp-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.exp-text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
}

.about-text {
  padding: 20px 0;
}

.about-description,
.about-description-2 {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-features {
  display: flex;
  gap: 24px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.about-feature:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.about-feature i {
  font-size: 20px;
  color: var(--primary);
  transition: color var(--transition-fast);
}

.about-feature:hover i {
  color: #fff;
}

/* ==================== VISION & MISSION ==================== */
.vision-mission {
  background: var(--bg-secondary);
}

.vm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.vm-card {
  padding: 50px 40px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.vm-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

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

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

.vm-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.vm-card:hover .vm-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1) rotate(5deg);
}

.vm-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.vm-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== SERVICES SECTION ==================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  padding: 40px 30px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.service-card:hover {
  background: var(--bg-primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

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

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.service-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==================== PROJECTS SECTION ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
}

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

.project-card.show {
  display: block;
  animation: fadeInScale 0.5s ease forwards;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.project-image {
  width: 100%;
  height: 100%;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    transparent 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-zoom {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-full);
  transform: scale(0);
  transition: all var(--transition-bounce);
}

.project-card:hover .project-zoom {
  transform: scale(1);
}

.project-zoom:hover {
  background: #fff;
  color: var(--primary);
}

/* Load More Button */
.projects-load-more {
  text-align: center;
  margin-top: 50px;
}

.load-more-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.load-more-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==================== ACHIEVEMENTS SECTION ==================== */
.achievements {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.achievements::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 10% 90%,
      rgba(var(--primary-rgb), 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 10%,
      rgba(var(--primary-rgb), 0.1) 0%,
      transparent 40%
    );
}

.achievements .section-badge,
.achievements .section-title {
  color: var(--primary-light);
}

.achievements .section-title {
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
  z-index: 1;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-10px);
  box-shadow: var(--shadow-glow);
}

.stat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.2);
  border-radius: var(--radius-full);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  display: inline;
}

.stat-suffix {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: inline;
}

.stat-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
}

/* ==================== WHY CHOOSE US ==================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.why-card {
  padding: 40px 30px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.why-card:hover {
  background: var(--bg-primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.why-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.why-card:hover .why-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1) rotate(-5deg);
}

.why-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.why-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==================== CERTIFICATIONS ==================== */
.certifications {
  background: var(--bg-secondary);
}

.cert-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.cert-card {
  padding: 40px 50px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 2px solid rgba(var(--primary-rgb), 0.2);
  transition: all var(--transition-base);
}

.cert-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
}

.cert-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-full);
}

.cert-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cert-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.cert-note {
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
}

/* ==================== CLIENTS SECTION ==================== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.client-card {
  padding: 30px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.client-card:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.client-card i {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
  transition: color var(--transition-fast);
}

.client-card:hover i {
  color: #fff;
}

.client-card span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  justify-content: center;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 30px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.contact-card:hover,
.contact-card:active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.contact-card.whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

.contact-card.instagram:hover {
  background: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
  border-color: #dc2743;
  color: #fff;
}

.contact-card.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.contact-card:hover .contact-icon,
.contact-card:hover .contact-title,
.contact-card:hover .contact-info {
  color: inherit;
}

.contact-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  transition: all var(--transition-base);
}

.contact-card:hover .contact-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.1) rotate(10deg);
}

.contact-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-info {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--gradient-hero);
  padding: 60px 0 30px;
  color: #fff;
}

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

.footer-logo {
  height: 60px;
  margin-bottom: 20px;
}

.footer-tagline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 300px;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary);
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 10px;
}

[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 10px;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.footer-contact i {
  color: var(--primary);
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.footer-social a:focus {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  opacity: 1 !important;
  text-decoration: none;
  color: #fff !important;
}

@media (hover: hover) {
  .footer-social a:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    opacity: 1 !important;
    transform: translateY(-5px);
    color: #fff !important;
  }
}

.footer-social a:active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  opacity: 1 !important;
  transform: scale(0.95); /* Press effect for touch */
  color: #fff !important;
}

.footer-social a i {
  transition: color 0.3s ease;
}

.footer-social a:hover i,
.footer-social a:active i,
.footer-social a:focus i {
  color: #fff !important;
  opacity: 1 !important;
}

.footer-bottom {
  padding-top: 30px;
  text-align: center;
}

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

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

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

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--primary);
}

/* ==================== SCROLL TO TOP ==================== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
}

[dir="rtl"] .scroll-top {
  right: auto;
  left: 30px;
}

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

.scroll-top:hover {
  transform: translateY(-5px);
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
  transition:
    opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.reveal-left {
  transform: translateX(-40px);
}

.reveal.reveal-right {
  transform: translateX(40px);
}

.reveal.reveal-zoom {
  transform: scale(0.9);
}

/* Active States */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal.reveal-left.active,
.reveal.reveal-right.active {
  transform: translateX(0);
}

.reveal.reveal-zoom.active {
  transform: scale(1);
}

/* Staggered Delays */
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ==================== MODERN KEYFRAME ANIMATIONS ==================== */

/* Float Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Badge Pulse/Glow */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(196, 160, 82, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(196, 160, 82, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(196, 160, 82, 0);
  }
}

/* Hero Content Entrance */
.hero-content > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-content .hero-badge {
  animation-delay: 0.1s;
}
.hero-content .hero-title {
  animation-delay: 0.3s;
}
.hero-content .hero-tagline {
  animation-delay: 0.5s;
}
.hero-content .hero-cta {
  animation-delay: 0.7s;
}

/* ==================== ENHANCED HOVER EFFECTS ==================== */

.service-card,
.why-card,
.vm-card,
.client-card,
.contact-card {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Mobile-Safe Hover: Only apply on devices that support hover */
@media (hover: hover) {
  .service-card:hover,
  .why-card:hover,
  .vm-card:hover,
  .client-card:hover,
  .contact-card:hover {
    transform: translateY(-8px);
    box-shadow:
      0 15px 30px rgba(0, 0, 0, 0.1),
      0 5px 15px rgba(0, 0, 0, 0.05); /* Premium shadow */
  }

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

/* Project Card Hover - Gentle Zoom Base */
.project-card .project-image img {
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button Shine Effect */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: none;
}

.btn-primary:hover::after {
  animation: shine 0.75s ease;
}

@keyframes shine {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}

/* ==================== ADVANCED ANIMATIONS (LEVEL 2) ==================== */

/* 1. Cinematic Text Reveal */
.reveal-text-mask {
  overflow: hidden;
  display: block; /* or inline-block depending on context */
}

.reveal-text-mask span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-text-mask.active span {
  transform: translateY(0);
}

/* 2. Image Curtain Reveal */
.reveal-curtain {
  position: relative;
  overflow: hidden;
}

.reveal-curtain img {
  opacity: 0;
  transition: opacity 0.1s delay 0.5s;
}

.reveal-curtain::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1);
}

.reveal-curtain.active::after {
  animation: curtainSweep 1.2s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

.reveal-curtain.active img {
  opacity: 1;
}

@keyframes curtainSweep {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }
  45% {
    transform: scaleX(1);
    transform-origin: left;
  }
  55% {
    transform: scaleX(1);
    transform-origin: right;
  }
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

/* 3. Magnetic Button Base */
.btn-magnetic {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* "will-change" is impactful here, handled in JS potentially or simple CSS hover */
}

/* 4. Shimmer Text */
.shimmer-text {
  background: linear-gradient(
    to right,
    #bd9f67 0%,
    #e8d1a1 20%,
    #bd9f67 40%,
    #bd9f67 100%
  );
  background-size: 200% auto;
  color: #000; /* Fallback */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
  display: inline-block;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

/* 5. Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  z-index: 99999;
  will-change: transform;
  /* Removed transition to allow instant update from JS */
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-glass-strong);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 80px 40px;
    transition: right var(--transition-base);
    box-shadow: var(--shadow-xl);
  }

  [dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
  }

  .nav-links.active {
    right: 0;
  }

  [dir="rtl"] .nav-links.active {
    left: 0;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 15px 25px;
  }

  .menu-toggle {
    display: flex;
  }

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

  .about-img {
    height: 400px;
  }

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

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

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

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

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

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

  .footer-brand {
    grid-column: span 2;
    text-align: center;
  }

  .footer-tagline {
    margin: 0 auto;
  }

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

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
    --header-height: 70px;
  }

  .logo-img {
    height: 45px;
  }

  .hero-content {
    padding: 100px 20px 60px;
  }

  .hero-cta {
    flex-direction: column;
  }

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

  .section-header {
    margin-bottom: 40px;
  }

  .about-features {
    flex-direction: column;
  }

  .about-feature {
    justify-content: center;
  }

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

  /* Fix Mobile Card Heights & Layouts */
  .service-card,
  .project-card,
  .why-card,
  .contact-card,
  .stat-card {
    height: auto !important; /* Prevent fixed height stretching */
    min-height: 200px;
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

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

  .stat-number {
    font-size: 2.2rem;
  }

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

  .cert-grid {
    flex-direction: column;
    align-items: center;
  }

  .cert-card {
    width: 100%;
    max-width: 300px;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-contact p {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .lightbox-prev,
  .lightbox-next {
    /* distinct click targets for mobile */
    display: flex;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5); /* Stronger contrast */
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-badge {
    padding: 10px 16px;
    font-size: 12px;
  }

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

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

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

  .nav-controls {
    gap: 8px;
  }

  .lang-toggle {
    padding: 6px 12px;
    font-size: 12px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }
}

/* Print Styles */
@media print {
  .header,
  .hero-scroll,
  .scroll-top,
  .lightbox,
  .nav-controls {
    display: none !important;
  }

  .hero {
    min-height: 0;
    padding: 50px 0;
  }

  .section {
    padding: 30px 0;
  }
}
/* Tablet-Specific Footer Fix (iPad Pro / Air) */
@media (min-width: 768px) and (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
  }

  /* Force brand to span full width and center content */
  .footer-brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
  }

  .footer-logo {
    margin-bottom: 15px;
  }

  .footer-tagline {
    max-width: 80%;
    margin: 0 auto;
    font-size: 1.05rem;
  }

  /* Ensure links and contact sections are balanced */
  .footer-links,
  .footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links ul {
    align-items: center;
  }

  .footer-contact p {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }
}
