/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image: url(/images/txtu.png);
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  color: #2d3748;
}

.app {
  background-image: url(/images/bak.png);
  background-size: 30%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 80px; /* Adjust this value based on your header height */
}

/* Background styles */
.app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #5309a5; /* Orange background color */
 /* background-image: url('/images/');*/
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
}

/* Header styles */
.header {
  font-size: small;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: fixed; /* Change from relative to fixed */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* Ensure header stays above other content */
  background-color: rgba(103, 0, 163, 0.95); /* Add semi-transparent background */
  backdrop-filter: blur(8px); /* Add blur effect for better readability */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
  transition: all 0.3s ease; /* Smooth transition for scroll effects */
}

.header-buttons {
  display: flex;
  gap: 0.5rem;
}

.header-button {
  padding: 0.5rem;
}

.partner-button, .driver-button {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.partner-button {
  background-color: #4CAF50; /* Green */
  color: white;
  border: 2px solid #4CAF50;
}
.partner-button:hover {
  background-color: #45a049; /* Darker green on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.driver-button {
  background-color: #9C27B0; /* Purple */
  color: white;
  border: 2px solid #9C27B0;
}
.driver-button:hover {
  background-color: #8e24aa; /* Darker purple on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.logo-container {
  position: left;
  right: 2rem;
  top: 1rem;
}

.logo {
  height: 40px;
}

/* Hero section styles */
.hero-section {
  padding: 6rem 2rem;
  position: relative;
  overflow: visible; /* Changed from hidden to visible */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 70%;
  left: 50%;
  width: 800px; /* Set a fixed width */
  height: 800px; /* Set a fixed height */
  transform: translate(-50%, -50%);

  background-size: contain; /* Keep original aspect ratio */

  pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    text-align: center; /* Changed from right to center */
    z-index: 2;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: -150px;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

.hero-title {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center; /* Added to ensure centering */
}

.hero-subtitle {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center; /* Added to ensure centering */
}

.hero-description {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: center; /* Added to ensure centering */
}

.app-download {
    display: flex;
    justify-content: center; /* Already centered */
    gap: 1rem;
    margin-top: 2rem;
}

.app-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #000000;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.app-button:hover {
  background-color: #555;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-button:active {
  transform: translateY(0);
}

.app-button img {
  height: 30px;
}

.app-button span {
  font-size: 0.9rem;
}

/* Services section styles */
.services-section {
  padding: 4rem 2rem;
  background-color: rgb(255, 255, 255);
  border-radius: 30px 30px 0 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
}

.section-description {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #666;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: min-content;
    width: 90%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: none;
    background-image: 
        linear-gradient(135deg, rgba(191, 26, 198, 0.05) 0%, rgba(83, 9, 165, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235309a5' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    border-radius: 20px;
    box-shadow: 
        0 10px 30px -5px rgba(83, 9, 165, 0.1),
        0 2px 8px -3px rgba(83, 9, 165, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(191, 26, 198, 0.1) 0%,
        rgba(83, 9, 165, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
    z-index: 2;
    border-radius: 20px;
    transition: all 0.4s ease;
}

.service-card > * {
    position: relative;
    z-index: 3;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #5309a5 0%, #bf1ac6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.service-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    margin: 1.5rem 0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: rgba(83, 9, 165, 0.03);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain */
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem; /* Add some padding around the image */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px -10px rgba(83, 9, 165, 0.2),
        0 10px 20px -5px rgba(83, 9, 165, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover::after {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.98) 100%
    );
}

.service-card:hover .service-image {
    transform: scale(1.02);
}

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

.service-button {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #5309a5 0%, #bf1ac6 100%);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(191, 26, 198, 0.2);
}

.service-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(191, 26, 198, 0.3);
    background: linear-gradient(135deg, #5f0abc 0%, #d01bd6 100%);
}

.service-card p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.05rem;
    margin: 1rem 0;
}

/* Cities section styles */
.cities-section {
  padding: 4rem 2rem;
  background-color: #f5f5f5;
}

/* Join section styles */
.join-section {
  padding: 4rem 2rem;
  background-color: white;
}

.join-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Changed from 400px to 280px */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Added padding */
}

.join-card {
    width: 100%;
    max-width: 100%;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Add minimum height to ensure consistent layout */
}

.join-card > * {
    margin-bottom: 1rem;
}

.join-button {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: #bf1ac6;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .join-card {
        min-height: 180px; /* Slightly smaller on mobile */
    }

    .join-button {
        bottom: 1rem;
        right: 1rem;
    }
}

/* FAQ section styles */
.faq-section {
  background: var(--background-light);
  padding: 5rem 2rem;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem;
  font-size: 1.1rem;
  background: white;
  color: var(--text-color);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background: var(--background-light);
}

.faq-answer {
  padding: 1rem;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-question::after {
  content: '-';
}

.more-questions {
  text-align: center;
  margin-top: 2rem;
}

.faq-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #bf1ac6;
  text-decoration: none;
  font-weight: bold;
}

/* Footer styles */
.footer {
  text-align: center;
  align-items: center;
  background-color: #333;
  color: white;
  padding: 2rem;
  margin-top: auto;
}

.footer-content {
  align-items: center;
  flex-direction: column;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.footer-logo img {
  height: 40px;
  
}

.footer-links {
  text-align: center;
  align-items: center;
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  filter: brightness(0) invert(1);
}
.dialog {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
}

.dialog-content {
  background: white;
  margin: 15vh auto;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transform: translateY(0);
  animation: slideIn 0.3s ease;
}

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

.close {
  float: right;
  font-size: 30px;
  cursor: pointer;
  color: red;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-icon {
  color: white;
  text-decoration: none;
}

.footer-copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Optional: Add shadow when scrolling */
.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.98);
}

/* Responsive styles */
@media (max-width: 768px) {
  /* Add/update these meta viewport rules in your HTML head section first */
  /*<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">*/

  .app {
    padding-top: 60px; /* Reduced padding for mobile */
  }

  .hero-section {
    padding: 2rem 1rem;
    min-height: auto;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-image {
    order: 1;
    width: 80%; /* Increased width for better visibility */
    margin: -20px auto -100px; /* Adjusted margins */
    transform: scale(1); /* Reset transform */
  }

  .hero-image img {
    max-height: 400px; /* Reduced height */
    transform: scale(1); /* Reset transform */
  }

  .services-section {
    padding-top: 120px; /* Reduced padding */
    margin-top: -50px; /* Adjusted margin */
  }

  .service-card {
    width: 100%; /* Full width on mobile */
    padding: 1.5rem;
  }

  .app-download {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .app-button {
    width: 80%; /* Wider buttons on mobile */
    justify-content: center;
  }

  /* Fix header for mobile */
  .header {
    padding: 0.5rem 1rem;
  }

  .header-buttons {
    gap: 0.5rem;
  }

  .header-button {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
  }

  /* Improve swiper for mobile */
  .services-swiper {
    padding: 1rem 0;
  }

  .swiper-slide {
    padding: 0 0.5rem;
  }
}

/* Add specific adjustments for very small screens */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-image {
    width: 90%;
  }

  .service-card {
    padding: 1rem;
  }
}

/* Swiper styles */
.services-swiper {
    width: 100%;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex; /* Make sure they're visible on desktop */
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important; /* Force hide on mobile */
    }
}

.swiper-pagination-bullet {
    background: var(--primary-color);
}

.swiper-pagination-bullet-active {
    background: var(--secondary-color);
}

:root {
    --primary-color: #5309a5;
    --secondary-color: #bf1ac6;
    --accent-color: #4CAF50;
    --text-color: #2d3748;
    --background-light: #f8fafc;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --font-family: 'Tajawal', sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
}

.map-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.morocco-map {
    width: 100%;
    height: auto;
}

.city-dot {
    cursor: pointer;
    transition: r 0.3s ease;
}

.city-dot:hover {
    r: 10;
}

.city-label {
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    fill: #333;
    font-weight: bold;
    transition: opacity 0.3s ease;
}
