.exam-panel h2 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.exam-panel p {
    font-size: 14px;
    margin-bottom: 15px;
}

.exam-panel span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    background: red;
    color: var(--color-white);
    font-weight: bold;
    font-size: 14px;
}

.exam-panel span[style] { /* "غير متاح" badge */
    background: #aaa;
    color: #fff;
}

/* التنسيق العام لكل الأزرار (الحالة الافتراضية: متاح) */
.exam-panel .status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: #e74c3c; /* أخضر جميل للمتاح مثلاً ✅ */
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* تنسيق خاص لزر "غير متاح" أو "قريباً" */
/* نستخدم .gray لأن الكود عندك يضيف هذا الكلاس في حال عدم الإتاحة */
.exam-panel .status-badge.gray {
    background-color: gray; /* أحمر صارخ لغير المتاح 🔴 */
    color: #ffffff;
}

.exam-container {
    display: grid; /* Switched from flex to grid 🏁 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    max-width: 1200px; /* Limits the total width so it doesn't stretch too far */
    margin: 0 auto; /* Centers the whole grid on the page */
    gap: 30px;
    padding: 20px;
}

.exam-panel {
    background: #f5f5f5;
    color: var(--color-black);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 14px 40px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    width: 100%; /* Change from 600px to 100% to fill the grid column! 📏 */
}

.exam-panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.exam-panel.disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* Mobile: stack panels in 1 column 📱 */
@media (max-width: 768px) {
    .exam-container {
        grid-template-columns: 1fr;
    }
    .exam-panel {
        width: 100%; 
    }
}
/* On larger screens, force exactly 2 columns ✌️ */
@media (min-width: 992px) {
    .exam-container {
        grid-template-columns: repeat(2, 1fr); 
    }
}

.exam-description {
  margin-bottom: 25px;
  line-height: 1.8;
}

.exam-question {
  text-align: right;
  margin-bottom: 25px;
}

.question-text {
  font-weight: 700;
  margin-bottom: 12px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-option {
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
}

.question-separator {
  border: 0;
  border-top: 1px solid var(--color-white-subtle);
  margin: 20px 0;
}

/* ===== EXAM PAGE RESET ===== */

body {
    background: linear-gradient(to bottom, var(--color-black), #d9d9d9);
    color: #fff;
}

/* main container */
#exam-start {
    display: block;
    padding-top: 90px;
}

/* keep content centered but NOT stacked */
.intro-panel {
    max-width: 900px;
    margin: 0 auto;
    padding: 25px;
    background: transparent;
}

/* questions layout */
.exam-question {
    margin-bottom: 20px;
}

/* answers stay vertical like before */
.answers {
    display: block;
    margin-top: 10px;
}

.answer-option {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

/* separator */
.question-separator {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 25px 0;
}

/* submit button area */
.cta-buttons {
    text-align: center;
    margin-top: 30px;
}




/* The "Starts in" label */
.countdown-label {
    background: #ffa500 !important;
    color: #fff !important;
    font-size: 12px !important;
    padding: 2px 10px !important;
    border-radius: 8px 8px 0 0 !important;
    margin-bottom: 0 !important;
}

/* Keeping your exact wrapper spacing 📍 */
.countdown-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 0px;      
    margin-bottom: -35px; 
    z-index: 5;
    position: relative;
}

/* Keeping your original shape/padding, just changing colors and font 📟 */
.countdown {
    display: inline-block;
    padding: 5px 15px;
    font-family: 'Orbitron', sans-serif; /* Digital font */
    font-size: 18px;
    font-weight: bold;
    color: #ff0000;           /* Red numbers 🔴 */
    background-color: #000;   /* Black background ⚫ */
    border-radius: 0 0 8px 8px; /* Your original rounded bottom */
    min-width: 100px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}




.action-btn {
    display: inline-block;
    padding: 10px 25px;
    margin: 5px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}



/* Yellow/Gold for Login */
.login-style {
    background-color: #f1c40f; 
    color: #000;
}

/* Blue for Signup */
.signup-style {
    background-color: #007bff;
    color: white;
}

/* Green for Profile */
.profile-style {
    background-color: #28a745;
    color: white;
}

/* Red for Logout */
.logout-style {
    background-color: #dc3545;
    color: white;
}

.action-btn:hover {
    opacity: 0.8;
    transform: scale(1.05); /* Just a little pop effect! */
}











  html {
  scroll-behavior: smooth;
}
:root {
  --color-white: #ffffff;
  --color-black: #181716;
  --color-black-dark: #000000;
  --color-h2: #ffffff;
  --color-primary: #2570d3;
  --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: #5f5f5f;
  --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: 0px;
}

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: -5px;
    padding-right: 10px;  /* Space from edge */
}

nav.nav-scrolled .left-logo-container .corner-logo.right {
    height: 60px;         /* 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: 50px;
    }
}

/* 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-white);
    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: 0px;
    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: 0px; /* 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;
    
}

/* 🖼️ Background & blur layer */
#section2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-url) 70% -50px / cover no-repeat fixed;
  z-index: -1;
  animation: focusIn 0.8s ease-out forwards;
}



/* 🌑 Your existing dark gradient overlay (keep this as ::before) */
#section2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-black) 0%, var(--color-dark-maroon-faded) 60%);
  z-index: 0; /* Sits on top of the image but behind the text */
  pointer-events: none;
}

/* Mobile background adjustment 📱 */
@media (max-width: 768px) {
    #section2::after {
        /* Replace 'center' with '70% 20%' or any values to move it! */
        /* First value is Left/Right (X), second is Top/Bottom (Y) */
        background-position: right 50% !important; 
        
        /* Optional: If the image looks too small on mobile, increase this */
        background-size: 280% !important; 
    }
}
.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(8px); /* 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 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  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;
  background: var(--cards);
  border-radius: 16px; /* rounded corners */
  padding: 40px 25px; /* increase padding for more internal space */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-align: center;

  box-shadow: none; /* shadow hidden by default */
  min-height: 400px; /* increase from 180px to desired height */
}

#section5 .service-item {
  display: flex;
  flex-direction: column; /* Keep content stacked vertically */
  align-items: center;    /* Centers text/images inside the card */
  background: transparent;
  width: 50%;             /* Your chosen width */
  margin: 0 auto;         /* THE MAGIC LINE: Centers the card itself */

  border-radius: 12px;
  padding: 40px;          /* Adjusted from your previous huge values */
  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;
    }
}


.success {
    color: #28a745; /* bright green */
    font-weight: bold;
}


.footer-vid-wrapper {
    width: 100%;
    background-color: rgb(0, 0, 0);
    display: flex;
    justify-content: center; /* Center video horizontally */
    padding: 20px 0;         /* Optional spacing top/bottom */
}

/* Video styles */
.footer-vid {
    width: 100%;     /* Full width on mobile */
    height: auto;    /* Maintain aspect ratio */
    display: block;
    border: none;    /* Ensures no weird borders */
}

/* Mobile view */
@media screen and (max-width: 767px) {
    .footer-vid {
        width: 100%;      /* Always fill screen width */
        max-width: 100%;  /* Remove desktop max width */
    }
}



/* --- New Side-by-Side Section --- */
#section5-alt {
  background: linear-gradient(to top, var(--color-muted), var(--color-white));
  padding: 80px 20px;
  text-align: center;
}

#section5-alt h1 {
  margin-bottom: 40px;

}


#section5-alt-video {
    background: black;
    text-align: center;
    height: 300px;        /* desired section height */
    overflow: hidden;     /* cuts anything taller */
    display: flex;        /* allow flex control */
    justify-content: center;
    align-items: center;
}

.side-by-side-content {
  display: flex;
  align-items: center; /* Vertically centers text with image 🎯 */
  justify-content: center;
  gap: 50px;           /* Space between image and text */
  max-width: 1200px;
  margin: 0 auto;
}

#video-side-text {
    max-width: none;
}
#video-side-text p {
    color: #ffffff;
}

/* 📸 Image Box */
.side-image {
  flex: 1; /* Takes up 50% width */
}

.side-image img {
  width: 100%;
  max-height: 800px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* 📝 Text Box */
.side-text {
  flex: 1; /* Takes up 50% width */
  text-align: start;
}

.side-text p {
  color: var(--color-black);
  font-size: 18px;
  line-height: 1.8;
  margin: 0;
}

/* --- Mobile Fix 📱 --- */
@media (max-width: 768px) {
  .side-by-side-content {
    flex-direction: column; /* Stacks them on top of each other on phones */
    gap: 30px;
  }
  
  .side-text {
    text-align: center; /* Centers text for better mobile look */
  }
  
}

#sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 📏 This keeps all boxes in the same row the same height */
    align-items: stretch; 
    width: 100%;
}

/* This targets the <section id="section5"> or whatever is the direct child of the grid */
#sections-grid > section {
    height: 100%;       /* Force the section to fill the grid height */
    display: flex;      /* Turn the section into a flex container */
    flex-direction: column;
    justify-content: flex-start; /* 🔝 PIN CONTENT TO TOP */
}

#sections-grid .service-item {
    flex-grow: 1;       /* 🚀 This forces the background/item to fill the remaining space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 🔝 KEEP INTERNAL CONTENT AT TOP */
    align-items: center;
    width: 100%;
    padding: 40px;
}

/* 📱 Mobile Fix: Keep them stacked */
@media (max-width: 1024px) {
    #sections-grid {
        grid-template-columns: 1fr;
    }
}

/* Add this after your .service-item styles */
.service-content strong {
    color: var(--color-black); /* Or use #181716 */
    display: inline-block;
    margin-bottom: 8px;
}

.separator {
    height: 50px;
    min-height: 50px; /* Force it to keep its height */
    width: 100%;
    display: block;    /* Ensure it acts like a block element */
    clear: both;       /* Clear any floating elements */
}

#btn-red-pill {
    /* 🔴 The Colors */
    margin-top: 20px;

    color: #ff0000;                        /* 🍎 Bright red text */
    border: 2px solid #ff0000;             /* 🎨 Matching red border */
    
    /* 💊 The Shape */
    border-radius: 50px;                   /* 🪄 This makes the sides totally round! */
    
    /* ✨ Aesthetics & Smoothness */
    padding: 10px 25px;                    /* 📏 Gives it some breathing room */
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;             /* ⛸️ Smooth hover animation */
    font-weight: bold;
}

/* 🔥 The Hover Effect */
#btn-red-pill:hover {
    background: #ff0000;                   /* 🔴 Fills with red on hover */
    color: #ffffff;                        /* ⚪ Text turns white for contrast */
    transform: translateY(-3px);           /* 🚀 That nice little "pop" upward */
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3); /* 🌟 Adds a soft red glow */
}

/* Scroll Down Button */
#section2 .scroll-down {
    position: absolute;
    bottom: 20px; /* distance from bottom */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: white;
    text-decoration: none;
    animation: bounce 2s infinite;
    z-index: 10;
    transition: color 0.3s;
}

#section2 .scroll-down:hover {
    color: #ffd700; /* optional hover color */
}

/* Bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.map-container {
  position: relative;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  #section7 {
    height: auto; /* 🔴 remove full screen lock */
    display: block;
  }

  .section7-map-wrapper {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .contact-panel {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 90%;
    margin: 20px auto;
    padding: 20px;
  }

  .map-container {
    position: relative;
    height: 400px;
  }

  .map-container iframe {
    position: relative; /* 🔴 THIS FIXES IT */
    height: 100%;
  }
}