.hero-section {
  background-image: linear-gradient(
      rgba(156, 175, 199, 0.5),
      rgba(156, 175, 199, 0.5)
    ),
    url("../assets/images/hero/hero-background-development-maroc.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

.hero-section > div {
  position: relative;
  z-index: 2;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.back-to-top.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

header {
  transition: all 0.3s ease;
}

header.header-scrolled {
  background-color: white !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

header.header-scrolled .text-white {
  color: #1f2937 !important;
}

header.header-scrolled nav a {
  color: #374151 !important;
}

header.header-scrolled nav a:hover {
  color: #2563eb !important;
}

.service-card {
  transition: all 0.3s ease-in-out;
  border: 1px solid transparent;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
}

.service-card img {
  height: 200px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.6s ease;
}

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

/* Team card animations */
.team-member-card {
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.team-member-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(59, 130, 246, 0.7) 0%,
    rgba(59, 130, 246, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.team-member-card:hover::before {
  opacity: 0.3;
}

/* Client logos animation */
.client-logo {
  transition: all 0.3s ease;
  filter: grayscale(100%);
  opacity: 0.7;
}

.client-logo:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.1);
}

/* Navigation link transitions */
nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.text-blue-600::after {
  width: 100%;
}

/* Form input animations */
.form-input {
  transition: all 0.3s ease-in-out;
}

.form-input:focus {
  transform: translateY(-2px);
}

.submit-button {
  position: relative;
  overflow: hidden;
}

.submit-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
}

.submit-button:hover::after {
  left: 100%;
}

/* CTA button animation */
.cta-button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: height 0.3s ease;
  z-index: -1;
}

.cta-button:hover::before {
  height: 100%;
}

/* Testimonial avatar animation */
.testimonial-avatar {
  transition: all 0.3s ease;
}

.testimonial-avatar:hover {
  transform: scale(1.1) rotate(5deg);
  border-color: #3b82f6;
}

/* Counter animation */
.counter {
  display: inline-block;
  position: relative;
}

/* Contact info item animation */
.contact-item {
  transition: transform 0.3s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

/* Mobile Navigation */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #0a2463;
  cursor: pointer;
  z-index: 20;
}

.mobile-nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: white;
  padding: 80px 20px 30px;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 10;
  overflow-y: auto;
}

.mobile-nav-menu.active {
  right: 0;
}

.mobile-nav-menu ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-menu li a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 18px;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Additional responsive styles */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  header nav {
    display: none;
  }

  .hero-section {
    height: 60vh !important;
  }

  .hero-section h1 {
    font-size: 28px !important;
  }

  .contact-info {
    padding-left: 0;
  }

  .service-card img {
    height: 180px;
  }

  .team-member-card img {
    height: 200px;
  }
}

@media (max-width: 640px) {
  .hero-section {
    height: 50vh !important;
    padding-top: 30px;
    text-align: center;
  }

  section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  h2 {
    font-size: 24px !important;
  }

  .service-card,
  .team-member-card {
    margin-bottom: 20px;
  }

  .service-card img {
    height: 160px;
  }

  .contact-form button {
    width: 100%;
  }

  .back-to-top {
    bottom: 10px;
    right: 10px;
  }
}

/* Form responsiveness */
@media (max-width: 768px) {
  .form-input,
  .submit-button {
    font-size: 16px;
    /* Larger touch targets on mobile */
  }

  .contact-form .submit-button {
    width: 100%;
  }
}

/* Spacing adjustments for mobile */
@media (max-width: 640px) {
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .py-16 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  .gap-8 {
    gap: 16px !important;
  }
}

/* Global transitions */
* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
