/* Custom CSS for Akça Teknik Website */

/* Brand Logos Infinite Scrolling Animation */
@keyframes scroll-infinite {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-scroll-infinite {
  animation: scroll-infinite 15s linear infinite;
  width: calc(200% + 4rem); /* Double width for seamless loop */
}

.logos-container {
  width: 100%;
}

.logos-scroll:hover {
  animation-play-state: paused;
}

/* Responsive logo scrolling */
@media (max-width: 768px) {
  .animate-scroll-infinite {
    animation-duration: 12s; /* Faster on mobile */
  }

  .logos-scroll .space-x-16 > * + * {
    margin-left: 3rem; /* Less space on mobile */
  }
}

/* Simple dot pattern for hero background */
.hero-dots {
  background-image: radial-gradient(circle, #3b82f6 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Hero Carousel Styles */
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
  position: relative;
  opacity: 1;
}

.carousel-dot.active {
  background-color: white !important;
  transform: scale(1.2);
}

#hero-carousel {
  position: relative;
  height: 384px; /* h-96 equivalent */
}

/* Carousel fade effect */
@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.carousel-slide.active {
  animation: fadeSlide 0.8s ease-out;
}

/* Carousel navigation hover effects */
.carousel-dot:hover {
  background-color: white !important;
  transform: scale(1.1);
}

#prev-slide:hover,
#next-slide:hover {
  background-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-50%) scale(1.1);
}

/* Auto-play pause on hover */
#hero-carousel:hover .carousel-slide {
  animation-play-state: paused;
}

/* Mobile carousel optimization */
@media (max-width: 768px) {
  #hero-carousel {
    height: 280px;
  }

  .carousel-slide img {
    height: 280px;
  }

  #prev-slide,
  #next-slide {
    padding: 8px;
    font-size: 14px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}

/* Pulse Animation for Floating Buttons */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.pulse-animation {
  animation: pulse 2s infinite;
}

/* WhatsApp Button Pulse */
@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.whatsapp-btn {
  animation: whatsapp-pulse 2s infinite;
}

/* Call Button Pulse */
@keyframes call-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.call-btn {
  animation: call-pulse 2s infinite;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Service Card Hover Effects */
.service-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.service-card:hover {
  border-color: #3b82f6;
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button Animations */
.btn-animate {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-animate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-animate:hover::before {
  left: 100%;
}

/* Hero Section Animations */
.hero-fade-in {
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Reveal Animation */
.section-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Card Stagger Animation */
.card-stagger {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.card-stagger.animate {
  opacity: 1;
  transform: translateY(0);
}

.card-stagger:nth-child(1) {
  transition-delay: 0.1s;
}
.card-stagger:nth-child(2) {
  transition-delay: 0.2s;
}
.card-stagger:nth-child(3) {
  transition-delay: 0.3s;
}
.card-stagger:nth-child(4) {
  transition-delay: 0.4s;
}
.card-stagger:nth-child(5) {
  transition-delay: 0.5s;
}

/* Custom Gradient Backgrounds */
.gradient-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Loading Animation for Images */
.img-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mobile Optimization */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .card-mobile {
    margin-bottom: 1.5rem;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .bg-gray-50 {
    background-color: white;
  }

  .text-gray-600 {
    color: #000;
  }

  .shadow-lg {
    box-shadow: 0 0 0 2px #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .pulse-animation,
  .whatsapp-btn,
  .call-btn {
    animation: none;
  }

  .hover-lift:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {
  .fixed,
  .whatsapp-btn,
  .call-btn {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Text Selection */
::selection {
  background-color: #3b82f6;
  color: white;
}

::-moz-selection {
  background-color: #3b82f6;
  color: white;
}
