/* Small helper styles for the responsive nav */
/* Keeps dropdowns looking crisp and adds transitions */
:root {
  --transition-fast: 180ms;
  --transition-smooth: 300ms;
  --transition-slow: 500ms;
}

html {
  scroll-behavior: smooth;
}

/* Enhanced scroll animations and effects */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax background */
.parallax-bg {
  will-change: transform;
  backface-visibility: hidden;
}

/* Floating particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Hero section animations */
.hero-title {
  animation: slideInFromTop 1s ease-out;
}

.hero-subtitle {
  animation: slideInFromBottom 1s ease-out 0.2s both;
}

.hero-buttons {
  animation: slideInFromBottom 1s ease-out 0.4s both;
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-primary {
  color: #85D093;
}
.text-secondary {
  color: #FFC136;
}
.text-Easy {
    color: #1C3A77;
}
/* Product card animations */
.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Case study card animations */
.case-study-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.case-study-card:hover {
  transform: translateY(-5px);
}

.case-study-image {
  transition: transform 0.3s ease;
  overflow: hidden;
}

.case-study-card:hover .case-study-image {
  transform: scale(1.05);
}

/* Header always visible */
header {
  transition: none;
  transform: translateY(0) !important;
  position: relative;
  overflow: visible;
}

/* Scroll progress indicator in header */
#scroll-progress {
  background: linear-gradient(90deg, #2a9d8f, #e9c46a);
  box-shadow: 0 0 15px rgba(42, 157, 143, 0.4);
  z-index: 10;
  border-radius: 0 2px 2px 0;
  height: 3px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Back to top button */
#back-to-top {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

#back-to-top:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 8px 25px rgba(42, 157, 143, 0.3);
}

/* Enhanced button animations */
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Smooth section transitions */
section {
  transition: opacity 0.6s ease-in-out;
}

/* Loading animations for images */
img {
  transition: opacity 0.3s ease-in-out;
}

/* Active navigation link styling */
nav a.text-primary {
  position: relative;
  transition: all 0.3s ease;
}

nav a.text-primary::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #2a9d8f;
  border-radius: 1px;
}

/* Mobile active link styling */
#mobile-menu a.text-primary {
  background: rgba(42, 157, 143, 0.1);
  border-radius: 0.375rem;
  margin: -0.5rem;
  padding: 0.5rem;
}

/* Enhanced focus states */
a:focus,
button:focus {
  outline: 3px solid rgba(42, 157, 143, 0.15);
  outline-offset: 2px;
  transform: scale(1.02);
}

/* Smooth scroll behavior for all elements */
* {
  scroll-behavior: smooth;
}

/* Ensure dropdowns are not clipped */
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Make sure header dropdowns can extend beyond header */
header .relative {
  overflow: visible;
}

/* Enhanced About Us section */
#about {
  position: relative;
  z-index: 1;
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.03) 0%, rgba(233, 196, 106, 0.03) 100%);
  z-index: -1;
}

.about-feature-item {
  transition: all 0.3s ease;
}

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

.about-stats {
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating decoration elements */
.floating-element {
  animation: float-gentle 3s ease-in-out infinite;
}

.floating-element:nth-child(2) {
  animation-delay: 1s;
}

@keyframes float-gentle {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Contact section styling */
#contact {
  position: relative;
  z-index: 1;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.02) 0%, rgba(233, 196, 106, 0.02) 100%);
  z-index: -1;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42, 157, 143, 0.15);
}

.contact-form button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form button:hover {
  transform: translateY(-2px) scale(1.02);
}

/* Performance optimizations */
.product-card,
.case-study-card,
.parallax-bg,
.particle {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Products dropdown container */
.relative {
  position: relative;
}

#products-dropdown,
#mobile-products-list {
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease;
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

#products-dropdown {
  z-index: 9999;
  min-width: 16rem;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.75rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark #products-dropdown {
  background: #1f2937;
  border-color: #374151;
}

#products-dropdown.hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  visibility: hidden;
}

#mobile-products-list.hidden {
  opacity: 0;
  transform: translateY(-4px);
  height: 0;
  overflow: hidden;
}

#mobile-products-list {
  opacity: 1;
  transform: translateY(0);
}

/* Accessible focus outline */
a:focus,
button:focus {
  outline: 3px solid rgba(42, 157, 143, 0.15);
  outline-offset: 2px;
}

/* Small visual tweak so header space feels comfortable */
header {
  backdrop-filter: blur(6px);
}

/* Footer styles (scoped under .site-footer) */
.site-footer {
  background: linear-gradient(180deg, rgba(0, 48, 73, 0.95), rgba(42, 157, 143, 0.95));
  color: #ffffff;
  padding: 3rem 1rem;
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer .footer-section h5 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
}

.site-footer .footer-section h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.site-footer .footer-section p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #e9c46a;
  text-decoration: none;
}

/* Social media icons styling */
.site-footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
  text-decoration: none;
}

.site-footer .social-icons a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #e9c46a;
}

/* Footer bottom styling */
.site-footer .footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-footer {
    padding: 2rem 1rem;
  }

  .site-footer .grid {
    gap: 2rem;
  }

  .site-footer .footer-section {
    text-align: center;
  }

  .site-footer .social-icons {
    justify-content: center;
  }
}