:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --primary-light: #4895ef;
  --secondary: #4cc9f0;
  --accent: #f72585;
  --success: #38b000;
  --dark: #14213d;
  --light: #f8f9fa;
  --gray: #adb5bd;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-dark: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: '', sans-serif;
  background-color: var(--light);
  color: var(--dark);
  scroll-behavior: smooth;
  line-height: 1.6;
}

/* === HEADER === */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.98);
  color: var(--dark);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

header.scrolled {
  padding: 1rem 5%;
  background-color: rgba(255, 255, 255, 0.98);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header img {
  height: 70px;
  transition: all 0.3s ease;
}

header.scrolled img {
  height: 50px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  color: var(--dark);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
  left: 0;
  right: auto;
}

nav a:hover {
  color: var(--primary);
}

.cta-button {
  background: var(--gradient);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--dark);
  font-size: 1.5rem;
  cursor: pointer;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  background-image: url('../images/4.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
  overflow: hidden;
  transition: background-image 1s ease-in-out;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 10%;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: white;
  margin-bottom: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.hero {
  position: relative;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: white;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5%;
  max-width: 1200px;
  margin: 0 auto;
}

/* العنوان */
.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.title-line {
  display: block;
  background: linear-gradient(to right, #fff, #4cc9f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
}

.title-line:first-child {
  animation-delay: 0.3s;
}

.title-line:last-child {
  animation-delay: 0.5s;
}

/* الوصف */
.hero-subtitle {
  font-size: 1.5rem;
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.subtitle-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
}

.subtitle-line:first-child {
  animation-delay: 0.7s;
}

.subtitle-line:last-child {
  animation-delay: 0.9s;
}

/* === FEATURES SECTION === */
.features {
  padding: 6rem 5%;
  background-color: white;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-title p {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1038;
  border-radius: 50%;
  color: #f2e27b;
  font-size: 2rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.feature-card p {
  color: var(--gray);
  font-size: 1rem;
}

/* قسم المشاريع الجارية */
.current-projects {
  padding: 6rem 5%;
  background-color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.projects-timeline {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.project-timeline-card {
  display: flex;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.project-timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.project-image-container {
  flex: 1;
  min-height: 300px;
  position: relative;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-timeline-card:hover .project-image {
  transform: scale(1.03);
}

.project-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  width: 80px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4361ee, #4cc9f0);
  border-radius: 3px;
}

.project-details {
  flex: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-details h3 {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  color: #0f172a;
}

.project-location {
  color: #64748b;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-description {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1.8rem;
}

.project-stats {
  display: flex;
  gap: 2rem;
  margin-top: auto;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

.cta-section {
  text-align: center;
  margin-top: 4rem;
}

.cta-section p {
  color: #475569;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.cta-button {
  background: linear-gradient(90deg, #4361ee, #4cc9f0);
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

/* التجاوبية */
@media (max-width: 992px) {
  .project-timeline-card {
    flex-direction: column;
  }

  .project-image-container {
    min-height: 250px;
  }
}

@media (max-width: 576px) {
  .project-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .project-details {
    padding: 1.5rem;
  }
}

/* بطاقات التواصل */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.contact-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
  position: relative;
}

.phone-card .card-icon {
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.whatsapp-card .card-icon {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.pulse {
  animation: pulse 2s infinite;
}

.pulse-delay {
  animation: pulse 2s infinite 0.5s;
}

.card-details h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.card-details a {
  color: white;
  font-size: 1.1rem;
  text-decoration: none;
  display: block;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
  display: inline-block;
}

.work-hours,
.response-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* الشبكات الاجتماعية */
.social-networks {
  text-align: center;
  margin-bottom: 3rem;
}

.social-networks p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px) scale(1.1);
  background: #4361ee;
}

.floating {
  animation: float 3s ease-in-out infinite;
}

.floating-delay {
  animation: float 3s ease-in-out infinite 0.5s;
}


/* التجاوبية */
@media (max-width: 768px) {
  .contact-glass {
    padding: 2rem;
  }

  .glowing-title {
    font-size: 2rem;
  }

  .contact-cards {
    grid-template-columns: 1fr;
  }
}

/* === FOOTER === */
footer {
  background-color: var(--dark);
  color: white;
  padding: 4rem 5% 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 50px;
}

.footer-logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
}

.footer-about p {
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-links h3::after,
.footer-contact h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: white;
}

.footer-contact p {
  color: var(--gray);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray);
  font-size: 0.9rem;
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.delay-4 {
  animation-delay: 0.8s;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem 5%;
  }

  nav {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 80px);
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  nav.active {
    right: 0;
  }

  nav a {
    margin: 0;
    font-size: 1.2rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    justify-content: center;
    text-align: center;
  }

  .hero-content {
    padding: 0 5%;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }
}

/* مؤشر التمرير */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  animation: fadeIn 1s forwards 1.5s;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid white;
  border-radius: 15px;
  position: relative;
  margin: 0 auto;
}

.wheel {
  width: 6px;
  height: 10px;
  background: white;
  border-radius: 3px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}

.arrow-down {
  width: 20px;
  height: 20px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
  margin: 10px auto 0;
  animation: scrollArrow 2s infinite;
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scrollWheel {

  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, 10px);
    opacity: 0.5;
  }
}

@keyframes scrollArrow {

  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
    opacity: 1;
  }

  50% {
    transform: rotate(45deg) translate(5px, 5px);
    opacity: 0.5;
  }
}

/* التجاوبية */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}





/* زر الرجوع للأعلى */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  /* تغيير من left إلى right */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 20px rgba(67, 97, 238, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 999;
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.back-to-top-btn:active {
  transform: scale(0.95);
}

/* التجاوبية */
@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    /* تغيير من left إلى right */
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
}

#main-nav a {
  display: inline-block;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease;
}

#main-nav.show a {
  opacity: 1;
  transform: translateY(0);
}

/* التأخير لكل رابط */
#main-nav.show a:nth-child(1) {
  transition-delay: 0.2s;
}

#main-nav.show a:nth-child(2) {
  transition-delay: 0.4s;
}

#main-nav.show a:nth-child(3) {
  transition-delay: 0.6s;
}

#main-nav.show a:nth-child(4) {
  transition-delay: 0.8s;
}

#main-nav.show a:nth-child(5) {
  transition-delay: 1s;
}

/* ===== تأثير الشعار عند التحميل ===== */
#logo {
  opacity: 0;
  transform: scale(0.5) rotate(-15deg);
  transition: all 0.8s ease;
}

#logo.show {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Optional: shine effect */
#logo::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  to {
    left: 150%;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 1s ease forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 1s ease forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 1s ease forwards;
}