/* Base document enhancements */
html {
  scroll-behavior: smooth;
}

/* Ensure the Persian font renders crisply */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}



/* Animated gradient background for Why section */
.why-gradient {
  background: linear-gradient(135deg, #1E40AF, #3B82F6, #10B981);
  background-size: 300% 300%;
  animation: whyGradientFlow 12s ease infinite;
}

@keyframes whyGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Flowing shine animation for feature pills */
.pill-animate {
  position: relative;
  overflow: hidden;
}

.pill-animate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  transform: translateX(-150%);
  animation: pillShine 3s ease-in-out infinite;
}

@keyframes pillShine {
  0% { transform: translateX(-150%); }
  60% { transform: translateX(150%); }
  100% { transform: translateX(150%); }
}

/* Subtle floating effect for pills */
.pill-float {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(0);
  animation: pillFloat 4.5s ease-in-out infinite alternate;
}

@keyframes pillFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Slight lift on hover/focus for better affordance */
.pill-float:hover,
.pill-float:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

/* Service cards hover effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  background-color: #3B82F6 !important;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}

.service-card:hover h3,
.service-card:hover p {
  color: white !important;
}

.service-card:hover .service-image {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fix contract image positioning */
.contract-image {
  object-position: center 10% !important;
}

/* Mobile: simulate hover on scroll for service cards */
@media (max-width: 640px) {
  .service-card.is-visible {
    background-color: #3B82F6 !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
  }
  .service-card.is-visible h3,
  .service-card.is-visible p {
    color: #ffffff !important;
  }
  .service-card.is-visible .service-image {
    background-color: rgba(255, 255, 255, 0.1) !important;
  }
}

/* Sweep animated buttons (hero) */
.btn-sweep {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  padding: 0.5rem 1.5rem; /* py-2 px-6 */
  border-radius: 0.5rem; /* rounded-lg */
  cursor: pointer;
  isolation: isolate;
}

.btn-sweep .btn-text {
  position: relative;
  z-index: 10;
  transition: color 0.5s ease;
  font-weight: 700;
}

.btn-sweep .sweep,
.btn-sweep .sweep2 {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 0;
}

/* left-to-right sweep */
.btn-sweep .sweep {
  left: 0;
  transform: rotate(-45deg) translateX(-130%);
}

/* right-to-left sweep */
.btn-sweep .sweep2 {
  right: 0;
  left: auto;
  transform: rotate(-45deg) translateX(130%);
}

.btn-sweep:hover .sweep,
.btn-sweep:hover .sweep2 {
  transform: rotate(0deg) translateX(0);
  opacity: 1;
}

/* Primary (blue) variant */
.btn-primary {
  border-color: #3B82F6;
  color: #3B82F6;
}

.btn-primary .sweep,
.btn-primary .sweep2 {
  background-color: #3B82F6;
}

.btn-primary:hover .btn-text { color: #ffffff; }

/* Accent (emerald/green) variant */
.btn-accent {
  border-color: #10B981;
  color: #10B981;
}

.btn-accent .sweep,
.btn-accent .sweep2 { background-color: #10B981; }

.btn-accent:hover .btn-text { color: #ffffff; }