/* ===========================
   Global Styles
   =========================== */

:root {
  --primary-color: #f57c00;
  --secondary-color: #1a73e8;
  --dark-color: #1a1a1a;
  --light-color: #f8f9fa;
  --text-color: #333;
  --border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: direction 0.3s ease;
}

/* Support for English Language */
html[lang='en'] body {
  font-family: 'Poppins', sans-serif;
}

html[lang='en'] {
  direction: ltr;
}

html[lang='ar'] {
  direction: rtl;
}

/* ===========================
   Navigation Bar
   =========================== */

.navbar {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  color: var(--primary-color) !important;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: var(--secondary-color) !important;
}

.navbar-nav .nav-link {
  color: #fff !important;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-bottom: 2px solid var(--primary-color);
}

/* ===========================
   Hero Section
   =========================== */

.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  background-attachment: fixed;
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  animation: heroFade 24s infinite;
}

.hero-slide-1 {
  background-image: url('../img/hero1.avif');
  animation-delay: 0s;
}
.hero-slide-2 {
  background-image: url('../img/hero2.avif');
  animation-delay: 6s;
}
.hero-slide-3 {
  background-image: url('../img/hero3.avif');
  animation-delay: 12s;
}
.hero-slide-4 {
  background-image: url('../img/hero4.avif');
  animation-delay: 18s;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: slideUp 1s ease-out;
}

.hero-phrase {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-phrase.is-fading {
  opacity: 0;
  transform: translateY(8px);
}

.hero-logo img {
  max-height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.hero-content h1 {
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.hero-content .lead {
  font-size: 1.8rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-content .h5 {
  font-size: 1.3rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
  margin-top: 2rem;
}

.hero-buttons .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-primary {
  background: var(--primary-color);
  border: none;
}

.hero-buttons .btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn-outline-light:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

/* ===========================
   Animations
   =========================== */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
  animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
  animation: fadeIn 1s ease-out 0.6s both;
}

@keyframes heroFade {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }
  5% {
    opacity: 1;
  }
  20% {
    opacity: 1;
    transform: scale(1.01);
  }
  25% {
    opacity: 0;
    transform: scale(1);
  }
  100% {
    opacity: 0;
  }
}

/* ===========================
   About Section
   =========================== */

#about {
  padding: 5rem 0;
}

#about h2 {
  color: var(--dark-color);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

#about h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.feature-box {
  padding: 1rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.feature-box i {
  font-size: 1.5rem;
}

.about-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 320px;
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(26, 115, 232, 0.1) 0%,
    rgba(245, 124, 0, 0.1) 100%
  );
  border-radius: var(--border-radius);
  overflow: hidden;
}

.about-image i {
  font-size: clamp(6rem, 10vw, 10rem);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ===========================
   Gallery Section
   =========================== */

#gallery {
  padding: 5rem 0;
  background: white;
}

#gallery h2 {
  color: var(--dark-color);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

#gallery h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 300px;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 115, 232, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  color: white;
  font-size: 2rem;
}

/* ===========================
   Services Section
   =========================== */

#services {
  padding: 5rem 0;
}

#services h2 {
  color: var(--dark-color);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

#services h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-top: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary-color);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(10deg);
}

.service-card h5 {
  color: var(--dark-color);
  font-weight: 700;
}

/* ===========================
   Contact Section
   =========================== */

#contact {
  padding: 5rem 0;
  background: white;
}

#contact h2 {
  color: var(--dark-color);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

#contact h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.contact-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
  background: var(--secondary-color);
  transform: scale(1.1);
}

.contact-card h5 {
  color: var(--dark-color);
  font-weight: 700;
}

/* ===========================
   Footer
   =========================== */

footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-top: 3px solid var(--primary-color);
}

footer a {
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--primary-color) !important;
  transform: scale(1.2);
}

/* Social Icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.social-icon:hover,
.social-icon:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transform: translateY(-2px) scale(1.08);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .lead {
    font-size: 1.2rem;
  }

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

  .hero-buttons .btn {
    width: 100%;
    margin-bottom: 1rem;
  }

  .gallery-item {
    height: 250px;
  }

  #about h2::after,
  #gallery h2::after,
  #services h2::after,
  #contact h2::after {
    right: 0;
    transform: none;
  }

  .service-card,
  .contact-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content .lead {
    font-size: 1rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .display-5 {
    font-size: 1.8rem;
  }

  .gallery-item {
    height: 200px;
  }
}

/* ===========================
   Utility Classes
   =========================== */

.opacity-25 {
  opacity: 0.25;
}

.text-md-start {
  text-align: start;
}

.text-md-end {
  text-align: end;
}

@media (max-width: 768px) {
  .text-md-start {
    text-align: center;
  }

  .text-md-end {
    text-align: center;
  }
}

/* ===========================
   Loading Spinner
   =========================== */

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* ===========================
   Smooth Transitions
   =========================== */

a,
button,
.btn {
  transition: all 0.3s ease;
}

/* ===========================
   Scrollbar Styling
   =========================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}
