  html {
  scroll-behavior: smooth;
}
:root {
  --color-white: #ffffff;
  --color-black: #355f86;
  --color-black-dark: #0056a7;
  --color-h2: #ffffff;
  --color-primary: #449fdb;
  --color-primary-dark: #b1ddfa;
  --color-primary-light: #eecf46;
  --color-muted: #cacaca;
  --color-bg-light: rgb(235, 235, 235);
  --color-gray-900: #333333;
  --color-accent-light: #ffe5e5;
  --color-dot: #1a243f;
  --color-dark-maroon: #310000;
  --nav-color: #161e29;
  --cards: #ececec;
  /* Transparent variants defined once here 
     so you can use var() without rgba() wrappers! */
  --color-dark-maroon-faded: #31000040; /* 40 at the end is ~25% opacity */
  --color-black-faded: #0000008c;       /* ~55% opacity for your panels */
  --color-white-subtle: #ffffff0f;      /* ~6% opacity */
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0; 
    box-sizing: border-box;
} 

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}



.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation link sizing and stroke */
nav a {
  color: var(--color-white);
  text-decoration: none;
  display: inline-block;
  padding: 18px 28px;
  font-size: 20px;
  font-weight: normal;
  border-radius: 0px;
  position: relative;
  overflow: hidden;
  transition: color 180ms ease;
  margin: 0 2px;
}

/* modern underline grow animation (red) */
nav a::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 0%;
  height: 3px;
  background-color: var(--color-primary); /* Mitsubishi-like red */
  transform: translateX(-50%);
  transition: width 260ms cubic-bezier(.2,.9,.2,1);
  z-index: 0;
}

nav a:hover::before { width: 84%; }

nav a:hover { color: var(--color-primary); cursor: pointer; }



body {
    font-family: 'Cairo', sans-serif;
    scroll-behavior: smooth;
background-color: var(--color-black-dark); /* Matches your dark theme! 🌑 */
    padding-top: 50px;
}

a {
    text-decoration: none;
    color: var(--color-black);
}

/* Navbar */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 96px; /* increased navbar height */

  transition: background-color 160ms ease, box-shadow 160ms ease, transform 200ms ease;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        order: 2;
        margin-left: 15px;
    }

    nav ul {
      position: fixed;
      top: -100vh;
      left: 0;
      width: 100%;
      height: auto;
      background: var(--color-black); /* solid black mobile menu */
      flex-direction: column;
      padding: 120px 20px 15px;
      transition: top 0.28s ease;
      box-shadow: 0 4px 12px rgba(var(--black-rgb),0.2);
    }


    nav ul.active {
        top: 0;
    }

    nav {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        height: 80px;
        z-index: 1001;
    }




    nav ul li {
        margin: 5px 0;
        text-align: right;
    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 8px;
        font-size: 18px;
    }
}

/* 1. The Container - This is your "Stage" 🎭 */
.left-logo-container {
    position: fixed;
    top: 10px;
    right: 10px;

    display: flex;
    
    /* 🚩 Change these to move the logo anywhere! */
    align-items: center;    /* center, flex-start (top), flex-end (bottom) */
    justify-content: center; /* center, flex-start (left), flex-end (right) */
    
    z-index: 1100;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. The Logo - Big starting size 🦅 */
.corner-logo.right {
    position: relative !important; /* Overrides the fixed position below */
    height: 220px; 
    width: auto;
    top: auto !important; /* Clears the 48px you had before */
    right: auto !important;
    transform: none !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4));
}

/* 3. SCROLLED STATE - Snaps into the bar ⚡ */
nav.nav-scrolled .left-logo-container {
    height: 96px;         /* Match nav height */
    align-items: center;  /* Vertical center in nav */
    justify-content: flex-end; /* Move to the right */
    top: -3px;
    padding-right: 10px;  /* Space from edge */
}

nav.nav-scrolled .left-logo-container .corner-logo.right {
    height: 70px;         /* Shrink! 🤏 */
    filter: drop-shadow(0 0 0px transparent);
}

/* 📱 Mobile - Keep it clean */
@media (max-width: 768px) {
    .left-logo-container {
        justify-content: center; /* Center on mobile start */
        
    }
    .corner-logo.right {
        height: 120px;
    }
    nav.nav-scrolled .left-logo-container {
        height: 80px;
        justify-content: flex-end;
        padding-right: 15px;
    }
    nav.nav-scrolled .left-logo-container .corner-logo.right {
        height: 70px;
    }
}

/* Navbar state when the page is scrolled */
nav.nav-scrolled {
    /* 1. We use your variable + the blur ✨ */
    background: var(--nav-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* 2. To make it transparent without breaking things, we use this: */
    background-color: color-mix(in srgb, var(--nav-color), transparent 20%);

    /* 3. Your shadow stays 100% solid! 🌑 */
    box-shadow: 0 6px 18px var(--color-gray-900);
    animation: rollDown 220ms ease both;
}
 
 

@keyframes rollDown {
    from {
        transform: translateY(-12px);
        opacity: 0.95;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0; /* reset margins; layout is controlled by flex and row-reverse */
}

nav ul li {
    cursor: pointer;
    font-weight: bold;
}



/* Corner logos (fit inside nav) */
.corner-logo {
  position: fixed; /* keep fixed so they stay with nav */
  top: 48px; /* vertically centered inside desktop nav (nav height: 96px) */
  transform: translateY(-50%);
  height: 70px; /* enforce equal heights */
  width: auto;
  z-index: 1100;
  pointer-events: none;
}
.corner-logo.right { right: 20px; }

/* Desktop: center nav buttons horizontally */
/* 🖥️ Desktop: Give the nav container plenty of room */
@media (min-width: 769px) {
  nav ul {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    
    /* 🚀 Increase this width to give items more 'runway' */
    width: 70%; 
    max-width: 1200px; /* Prevents it from hitting the corner logos on ultra-wide screens */
    
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 45px; /* More space between each link 🌈 */
  }

  /* Ensure the links themselves don't wrap to a new line */
  nav ul li {
    white-space: nowrap;
  }
}

/* 1. Hide it by default (Desktop) 🖥️ */
.nav-mobile-title {
    display: none;
    color: var(--color-white);
    font-size: 20px;
    font-weight: bold;
    font-family: 'Cairo', sans-serif;
    pointer-events: none; /* So it doesn't block clicks */
    z-index: 1002;
}

bold {

    font-size: 24px; color: #2570d3;
}
/* 2. Show and Center it on Mobile 📱 */
@media (max-width: 768px) {
    .nav-mobile-title {
        display: block;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); /* Perfectly centered! 🎯 */
        white-space: nowrap;
    }

    /* Change color to black if the nav turns white on scroll/active */
    nav.nav-scrolled .nav-mobile-title,
    nav ul.active ~ .nav-mobile-title {
        color: var(--color-black);
    }
}

/* Mobile adjustments: smaller corner logos and put them near the hamburger */
@media (max-width: 768px) {




  /* center the burger horizontally and vertically inside the nav */
  .hamburger {
    display: flex;
    position: fixed;
    left: 10%;

    transform: translateX(-50%);
    margin-left: 0;
    z-index: 1200;
    order: 0;
  }

  /* make the hamburger bars black on white nav */
  .hamburger span { background-color: var(--color-muted); }

  /* mobile menu background should be white with black links */
  nav ul { 
    /* استخدمنا rgba لإضافة شفافية (0.8) بدلاً من الألوان المصمتة */
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.5) 0%, 
        rgba(33, 33, 33, 0.8) 100%
    ); 
    backdrop-filter: blur(50px); /* إضافة تأثير الضبابية خلف القائمة */
}
  nav ul li a { color: var(--color-white) !important; }


}



/* Sections */
section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    overflow: hidden;
}

@media (max-width: 768px) {
    section {
        padding: 60px 15px;
    }
}

@keyframes focusIn {
  0% {
    filter: blur(20px);
    transform: scale(1.1);
  }
  100% {
    filter: blur(0px);
    transform: scale(1);
  }
}
 
/* 1. The starting state (Hidden) */  
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px) scale(0.95); /* Pushed down and slightly smaller */
  filter: blur(5px); /* Adds that 'Intro Panel' focus effect */
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1); /* Ultra smooth ease-out */
  will-change: transform, opacity;
}

/* 2. The finished state (Visible) */
.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

#section2 {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: flex-end;   /* panel at the bottom */
  padding: 40px 20px;
  overflow: hidden;
    
}

/* 🖼️ This layer handles ONLY the background image and the blur */
#section2::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Moves the image 20% from the left instead of center */
/* Change 'top' to a negative value like -50px or -10% to move it up further */
background: url('images/background.jpeg') 50% center / cover no-repeat fixed;
  z-index: -1; /* Keep it behind everything */
  
  /* 🪄 Apply the animation ONLY to this layer */
  animation: focusIn 0.8s ease-out forwards;
}

/* 🌑 Your existing dark gradient overlay (keep this as ::before) */
#section2::before {
  content: "";
  position: absolute;
  inset: 0;

  z-index: 0; /* Sits on top of the image but behind the text */
  pointer-events: none;
}
.intro-panel {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  padding: 36px 34px;
background: var(--color-black-faded); 
  border: 1px solid var(--color-white-subtle);
  box-shadow: 0 14px 40px var(--color-black-faded);
  border-radius: 14px;
  text-align: center;
  color: var(--color-white); /* keep text white */
  overflow: hidden;
  animation: fadeUp 3s cubic-bezier(.2,.9,.2,1) both;
  backdrop-filter: blur(3px); /* optional glass effect */
  margin-bottom: 50px;
}


.intro-panel::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* attach to bottom */
  width: 100%;  /* full width */
  height: 8px;  /* stripe height */
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark)); /* gradient left → right */
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}


.intro-panel h1 {
  font-size: 32px;
  margin: 0 0 12px 0;
  color: var(--color-primary); /* red title */
  line-height: 1.2;
}

.intro-panel p {
  font-size: 17px;
  margin: 0;
  line-height: 1.9;
  color: var(--color-white);
}



.intro-panel .cta-buttons {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.btn.primary { background: var(--color-primary); color: var(--color-white); box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.18); }
.btn.primary:hover { transform: translateY(-3px); }
.btn.secondary { 
    background: transparent;          /* 👻 Makes it see-through */
    color: var(--color-white);        /* ⚪ Makes the text white */
    border: 2px solid var(--color-white); /* 🎨 Adds the white stroke/border */
    box-shadow: none;                 /* 🚫 Optional: removes the shadow for a cleaner look */
    transition: all 0.3s ease;        /* ✨ Smooth transition for the hover effect */
}

/* Let's add a cool hover effect so users know it's clickable! */
.btn.secondary:hover { 
    background: var(--color-white);   /* ⚪ Fills with white on hover */
    color: var(--color-black);        /* ⚫ Text turns black so it's readable */
    transform: translateY(-3px);      /* 🚀 Keeps your nice "pop" animation */
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
  .intro-panel { padding: 20px; }
  .intro-panel h1 { font-size: 22px; }
  .intro-panel p { font-size: 15px; }
}



/* Third section - خدماتنا */
/* Section padding reduced */
#section3 {
    background-color: var(--color-white);
    padding: 40px 0px; /* less space on top and bottom */
    text-align: center;
}


h2 {
  color: var(--color-black);
  font-size: 36px;
  margin-bottom: 30px;
}

/* Grid layout - staggered */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* center items inside */
    gap: 20px;
    width: 70%; /* your reduced width */
    margin: 0 auto; /* center the container horizontally */
    align-items: stretch;
}


/* Each service card */
.service-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 320px; /* fixed card width to mimic the previous 3-column grid */
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

/* Info overlay */
.service-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(var(--black-rgb),0.4);
    color: var(--color-white);
    padding: 15px;
    text-align: center;
}

.service-info h3 {
    margin: 0 0 5px;
    font-size: 20px;
}

.service-info p {
    font-size: 14px;
    margin: 0;
}

/* Hover effect */
.service-card:hover img {
    transform: scale(1.1);
}

.service-card:hover .service-info {
    background: rgba(var(--black-rgb),0.6);
}

/* Responsive - keep fixed card size and enable horizontal scroll on small screens */
@media (max-width: 992px) {
  .service-card {
    flex: 0 0 320px;
    width: 320px; /* keep fixed width */
  }
}


@media (max-width: 768px) {
  /* Phone view: stack services vertically, one per row */
  .services-grid {
    overflow-x: visible; /* disable horizontal scrolling on phones */
    flex-wrap: wrap;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
  }

  .service-card {
    flex: 0 0 auto;
    width: min(320px, 92%); /* fixed visual size but never larger than viewport */
    max-width: 100%;
    margin: 0 auto;
    scroll-snap-align: none; /* disable snapping for vertical list */
  }
}


/* Fourth section - stats */
#section4 {
  position: relative;
  min-height: 60vh; /* match section6's baseline height */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  text-align: center;
  overflow: hidden;
  padding: 40px 20px; /* same vertical padding as section6 */
  background: url('images/background-section.jpg') center/cover no-repeat;

}

#section4 h2 {
color: var(--color-h2)
}

#section4::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('images/background-section.jpg') center/cover no-repeat;
  filter: blur(6px); /* 👈 This actually blurs only the image */
  transform: scale(1.1); /* avoids visible edges from blur */
  z-index: 0;
}

/* color overlay on top of blurred image */
#section4::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--black-rgb), 0.55);
  opacity: 0.7;
  z-index: 1;
}

#section4 .overlay {
  display: none; /* Not needed now since we used ::before */
}

#section4 .content {
  position: relative;
  z-index: 2;
}

#section4 .stats {
  display: flex;
  gap: 10rem;
  justify-content: center;
  margin: 0; /* remove extra top margin so height aligns with padding */
  flex-wrap: wrap; /* ⬅ makes it responsive on small screens */
}

#section4 .stat {
  font-size: 1.5rem;
}

#section4 .counter {
  font-size: 3rem;
  font-weight: bold;
  display: block;
}


.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 36px;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 24px;
}

.fa-solid {
  font-size: 32px; /* make all solid icons larger */
}

/* Fifth section - معرض الصور (Carousel) */
#section5 {
  background: linear-gradient(to top, var(--color-muted), var(--color-white));
  padding: 60px 0;
  text-align: center;
}

/* Carousel styles */
/* --- MAIN CAROUSEL CONTAINER --- */
.carousel {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 0;
  overflow: hidden; /* Keeps the zoom-in effect from causing scrollbars */
}

.carousel-viewport {
  overflow: visible;
  perspective: 1000px;
}

.carousel-track {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* 50% padding allows the first/last slides to hit the center! 🎯 */
  padding: 60px 50%; 
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}


/* --- SLIDES --- */
.slide {
  flex: 0 0 280px; 
  height: 460px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  position: relative;
  cursor: pointer; /* Finger cursor is back! 👆 */
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
  opacity: 0.3;
  transform: scale(0.8);
}

.slide.active-focus {
  opacity: 1;
  transform: scale(1.15);
  z-index: 5;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide:hover {
  opacity: 0.6;
}

.slide.active-focus:hover {
  opacity: 1;
}

/* --- TACTICAL NAVIGATION BUTTONS 🥷 --- */
.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none; /* Allows clicking through the empty middle space */
  z-index: 10;
  padding: 0 30px;
}

.carousel-prev, .carousel-next {
  pointer-events: auto; /* Buttons stay clickable */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark */
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px); /* Modern Glass Effect ✨ */
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.carousel-prev:hover, .carousel-next:hover {
  background: #c5a059; /* Gold accent color 🏆 */
  color: #000;
  transform: scale(1.1);
}

/* --- MOBILE OPTIMIZATION 📱 --- */
@media (max-width: 768px) {
  .carousel-track {
    gap: 20px;
    padding: 40px 15%; /* Less padding so user sees more on small screens */
  }

  .slide {
    flex: 0 0 75vw; 
    height: 400px;
  }

  .slide.active-focus {
    transform: scale(1.05); /* Smaller zoom for mobile safety */
  }

  .carousel-prev, .carousel-next {
    width: 40px;
    height: 40px;
  }
  
  .carousel-controls {
    padding: 0 15px;
  }
}
.section5-container {
  width: 100%;
  position: relative;
}

.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.about_us {
  background: linear-gradient(to top, var(--color-muted), var(--color-black-faded));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--color-black); /* default text black */
  text-align: center;
  position: relative;
  overflow: visible;
  padding: 60px 20px;
}


.about_us h2 {
  font-size: 40px;
  color: var(--color-h2);
  font-weight: bold;
}
.about_us img {

  height: 500px; /* higher than before */
  object-fit: cover; /* crop/fit nicely */
  border-radius: 12px; /* optional: rounded corners for image */
  margin-bottom: 18px; /* spacing from content */
}
.about_us p {
  
    color: var(--color-white); /* ⚪ Swapping to white for max contrast */
    font-size: 18px;           /* 📏 Slightly larger for better readability */
    line-height: 1.8;          /* ↔️ Giving the Arabic text some "breathing room" */
    max-width: 800px;          /* 🛡️ Prevents lines from getting too long */
    margin: 20px auto;         /* 🎯 Centers the text block */
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.7); /* 🕶️ Subtle shadow for extra "pop" */
}

#about_us2 {
background: linear-gradient(to top, var(--color-muted), var(--color-white));
}

#about_us2 h2 {
color: var(--color-black);
}
#about_us2 p {
    color: var(--color-black);
    text-shadow: 0px 2px 4px rgba(143, 139, 139, 0.7);
}
#about_us2 img {
  height: 720px;    /* make image fill card height */
  width: 500px; /* higher than before */
  object-fit: cover; /* crop/fit nicely */
  border-radius: 12px; /* optional: rounded corners for image */
  margin-bottom: 18px; /* spacing from content */
}

@media (max-width: 768px) {
    /* 📸 Fix for the first section images */
    .about_us img {
        width: 100%;      /* Fill the screen width ↔️ */
        height: 400px;    /* Fixed height to ensure cropping works */
        object-fit: cover; 
        object-position: top; /* 🎯 Focus on the top of the image */
        border-radius: 12px;
    }

    /* 📸 Fix for the second section images (#about_us2) */
    #about_us2 img {
        width: 100%;      /* Force it to stay inside the phone screen */
        height: 450px;    /* A bit taller for the SWAT section */
        object-fit: cover;
        object-position: top; /* 🎯 Focus on the top of the image */
        border-radius: 12px;
    }

    /* 📝 Shrink the heading so it fits on one line */
    .about_us h2, #about_us2 h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    /* ✍️ Optional: Make paragraph text slightly smaller for mobile */
    .about_us p, #about_us2 p {
        font-size: 16px;
        padding: 0 10px;
    }
}

/* Sixth Section - ما نقدمه / خدماتنا */
/* Sixth Section - ما نقدمه / خدماتنا */
#section6 {
  background: linear-gradient(to top, var(--color-muted), var(--color-black-faded));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--color-black); /* default text black */
  text-align: center;
  position: relative;
  overflow: visible;
  padding: 60px 20px;
}

/* Sixth Section - اهدافنا / Cards */
#section6 h2 {
  font-size: 42px;
  margin-bottom: 60px;
  color: var(--color-h2);
  font-weight: bold;
}

/* Grid layout for cards */
.services-list {
  /* 1. Change grid to flex */
  display: flex;
  /* 2. Allow items to wrap to the next line */
  flex-wrap: wrap;
  /* 3. This centers the 5th item (and all others)! 🥳 */
  justify-content: center; 
  
  gap: 24px 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Individual card */
.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  
  /* 4. Give the items a flexible width instead of grid tracks */
  flex: 1 1 280px; 
  /* 5. Set a max-width so the 5th item doesn't get too wide */
  max-width: 380px; 

  background: var(--cards);
  border-radius: 16px;
  padding: 40px 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-align: center;
  min-height: 400px;
}

#section5 img {
  width: 100%;       /* make image fill card width */
  max-height: 500px; /* higher than before */
  object-fit: cover; /* crop/fit nicely */
  border-radius: 12px; /* optional: rounded corners for image */
  margin-bottom: 18px; /* spacing from content */
}
@media (max-width: 992px) {
  #section5 .service-item {
    width: 100%;
  }
}
/* Service images in section6 */
.service-item img {
  width: 100%;       /* make image fill card width */
  max-height: 220px; /* higher than before */
  object-fit: cover; /* crop/fit nicely */
  border-radius: 12px; /* optional: rounded corners for image */
  margin-bottom: 18px; /* spacing from content */
}


.service-item:hover {
  transform: translateY(-8px);
  /* You can even use a hex code directly here if it's a one-off! */
  box-shadow: 0 12px 28px #00000040; 
}

/* Icon styling */
.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 18px;
  color: var(--color-white);
  transition: transform 0.28s ease, background 0.28s ease;
}

.service-item:hover .service-icon {
  transform: scale(1.15) rotate(8deg);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
}

/* Title & description */
.service-content h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--color-black);
  font-weight: bold;
}

.service-content p {
  font-size: 16px;
  color: var(--color-gray-900);
  line-height: 1.7;
}

/* Animations */
.service-item {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease forwards;
}
.service-item:nth-child(1) { animation-delay: 0.08s; }
.service-item:nth-child(2) { animation-delay: 0.16s; }
.service-item:nth-child(3) { animation-delay: 0.24s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Responsive adjustments */
@media (max-width: 992px) {
  .services-list {
    gap: 20px 24px;
  }
}

@media (max-width: 768px) {
  #section6 h2 {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .service-item {
    padding: 20px 16px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
    margin-bottom: 14px;
  }

  .service-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .service-content p {
    font-size: 14px;
    line-height: 1.6;
  }
}
/* Target the video inside #section6 */
#section6 video {
    display: block;
    width: 100%;           /* Full width on small screens */
    max-height: 720px;      /* Limits size on big screens so it's not "too big" */
    margin: 0px auto;     /* Centers it and adds space around it */
    border-radius: 15px;   /* Gives it nice rounded corners 🛡️ */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Makes it pop! */
}
#section5 video {
    display: block;
    width: 100%;           /* Full width on small screens */
    max-width: 600px;      /* Limits size on big screens so it's not "too big" */
    margin: 0px auto;     /* Centers it and adds space around it */
    border-radius: 15px;   /* Gives it nice rounded corners 🛡️ */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Makes it pop! */
}
/* Section 7 - Map full screen with overlay panel */
#section7 {
  position: relative;
  width: 100%;
  height: 100vh; /* full viewport height */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 0;
}

.section7-map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact panel */
.contact-panel {
  position: absolute;
  top: 20%;
  right: 60px; /* desktop position */
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8); /* أبيض بـ شفافية 80% ⚪ */

  color: var(--color-black);
  max-width: 450px;
  width: 100%;
  padding: 50px 30px;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(var(--black-rgb),0.25);
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
  animation: fadeUp 0.9s cubic-bezier(.2,.9,.2,1) both;
}

.contact-panel h2 {
  font-size: 32px;
  margin-bottom: 0px;
  color: var(--color-black);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover; /*  هذا يضمن أن الفيديو يغطي المساحة بالكامل بدون تشويه */
    display: block;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 18px;
}

.info-item i {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--color-black);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .contact-panel {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    max-width: 90%;
    margin: 10px auto 0 auto;
    padding: 10px 10px;
  }

  .contact-info {
    gap: 15px;
  }

  .info-item i {
    font-size: 28px;
  }

  .contact-panel h2 {
    font-size: 24px;
  }
}


/* Responsive - remove separators on small screens */
@media (max-width: 768px) {
  #section6 {
    padding: 60px 15px;
  }

  .why-grid {
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 100%;
  }

  .why-item {
    max-width: 100%;
    padding: 0 15px;
  }

  .why-item p {
    font-size: 14px;
    line-height: 1.5;
  }

  .separator {
    display: none;
  }
}



/* Responsive adjustments */
@media (max-width: 992px) {

  #section2 {
  background-size: cover;
}

  .client-card {
    width: 300px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .client-card {
    width: calc(50% - 20px);
    height: 180px;
  }
}

@media (max-width: 480px) {
  .client-card {
    width: 100%;
    height: 160px;
  }
}



/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 20px;
    }



    nav a {
        font-size: 20px;
        padding: 6px 10px;
    }

    .services-table {
        flex-direction: column;
        align-items: center;
    }

    #section4 {
        flex-direction: column;
    }
}


.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 70%;
  margin: 0 auto;
}
 
.client-card {
  border-radius: 15px;
  overflow: hidden;
  width: 320px;
  height: 320px;
  display: flex;
  flex-direction: column;  /* 👈 Stack items vertically */
  align-items: center;     
  justify-content: center; 
  padding: 20px;           
  box-sizing: border-box;  
  background: #fff;        /* Added background so the card is visible */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Let the image take up most of the space */
.client-card img {
  max-width: 100%;
  max-height: 70%;         /* 👈 Leave room for the link below */
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  margin-bottom: 15px;     /* 👈 Space between image and link */
  transition: all 0.3s ease;
}
.client-link {
  text-decoration: none;
  color: #007bff;          /* Change to your brand color */
  font-weight: bold;
  font-size: 14px;
  opacity: 0;              /* 👈 Hidden by default for a "reveal" effect */
  transition: opacity 0.3s ease;
}
.client-card:hover .client-link {
  opacity: 1; /* Show link on hover */
}
/* Reveal the link and brighten the image on hover */
.client-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.client-card:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.why-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* change from center to flex-start */
  gap: 60px;
  position: relative;
}


.why-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 250px;
}

.why-number {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 15px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.why-number:hover {
  transform: scale(1.3);
  background-color: var(--color-black);
}

.why-item h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.why-item p {
  font-size: 16px;
  line-height: 1.6;
}

/* Separator lines between items */
.separator {
  width: 2px;
  height: 100px;
  background-color: rgba(255,255,255,0.3);
  margin: 0 15px;
}


@media (max-width: 768px) {

  .why-grid {
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 100%;
  }

  .why-item {
    max-width: 100%;
    padding: 0 15px;
  }

  .why-item p {
    font-size: 14px;
    line-height: 1.5;
  }

  .separator {
    display: none;
  }
}