/* ========================================
   Hassan Swing Pool Services - Custom CSS
   ======================================== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #0c4a6e;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #075985;
}

/* Page loader */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #082f49;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-wave {
  display: flex;
  gap: 6px;
  align-items: end;
}
.loader-wave span {
  width: 6px;
  height: 20px;
  background: #f59e0b;
  border-radius: 3px;
  animation: wave 1s ease-in-out infinite;
}
.loader-wave span:nth-child(2) { animation-delay: 0.1s; }
.loader-wave span:nth-child(3) { animation-delay: 0.2s; }
.loader-wave span:nth-child(4) { animation-delay: 0.3s; }
.loader-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { height: 20px; }
  50% { height: 40px; }
}

/* Navbar transitions */
.navbar-scrolled {
  background: rgba(8, 47, 73, 0.98) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Hero parallax */
.hero-parallax {
  will-change: transform;
}

/* Card hover effects */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Project card overlay */
.project-card .project-overlay {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.project-card:hover img {
  transform: scale(1.1);
}

/* Team card */
.team-card:hover .team-social {
  opacity: 1;
  transform: translateY(0);
}
.team-social {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

/* Testimonial slider */
.testimonial-card {
  transition: all 0.4s ease;
}

/* Process step connector */
.process-step::after {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 2px;
  background: linear-gradient(90deg, #f59e0b 50%, #e2e8f0 50%);
  background-size: 12px 2px;
}
.process-step:last-child::after {
  display: none;
}

@media (max-width: 768px) {
  .process-step::after {
    display: none;
  }
}

/* Stats counter */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* Image skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #0ea5e9, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating animation */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Pulse glow */
.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 15px rgba(245, 158, 11, 0); }
}

/* Blog card hover */
.blog-card:hover .blog-image img {
  transform: scale(1.08);
}
.blog-card .blog-image img {
  transition: transform 0.5s ease;
}

/* Pricing card */
.pricing-card {
  transition: all 0.4s ease;
}
.pricing-card:hover {
  transform: translateY(-8px);
}
.pricing-card.featured {
  border: 2px solid #f59e0b;
}

/* Input focus */
.form-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* FAQ accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-answer {
  max-height: 500px;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-icon {
  transition: transform 0.3s ease;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* WhatsApp button pulse */
.whatsapp-btn {
  animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Section divider */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #f59e0b);
  border-radius: 2px;
}

/* Background patterns */
.bg-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(14, 165, 233, 0.08) 1px, transparent 0);
  background-size: 40px 40px;
}

/* AOS override for reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
