/* ===== Custom Styles for Galvarent ===== */

/* Smooth scrolling */
html, 
body {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #e83f31;
  border-radius: 4px;
}

/* Selection color */
::selection {
  background: #e83f31;
  color: white;
}

/* Header styles */
#header {
  background: #000000;
}

#header.scrolled {
  background: #000000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Touch targets for mobile */
@media (max-width: 768px) {
  .nav-link, 
  #mobile-menu a {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #e83f31;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Header logo filter for visibility on dark backgrounds */
.header-logo {
  filter: brightness(0) invert(1);
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease both;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Car cards hover */
.car-card {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.car-card:hover {
  transform: translateY(-4px);
}

/* Feature cards stagger */
.feature-card,
.service-card,
.step-card {
  opacity: 0;
  transform: translateY(20px);
}

.feature-card.visible,
.service-card.visible,
.step-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Stagger delays */
.feature-card:nth-child(1).visible,
.service-card:nth-child(1).visible,
.step-card:nth-child(1).visible { transition-delay: 0s; }
.feature-card:nth-child(2).visible,
.service-card:nth-child(2).visible,
.step-card:nth-child(2).visible { transition-delay: 0.1s; }
.feature-card:nth-child(3).visible,
.service-card:nth-child(3).visible,
.step-card:nth-child(3).visible { transition-delay: 0.2s; }
.feature-card:nth-child(4).visible,
.service-card:nth-child(4).visible,
.step-card:nth-child(4).visible { transition-delay: 0.3s; }
.feature-card:nth-child(5).visible,
.service-card:nth-child(5).visible { transition-delay: 0.4s; }
.service-card:nth-child(6).visible { transition-delay: 0.5s; }

/* Form focus glow and mobile zoom fix */
input, 
select, 
textarea {
  font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(232, 63, 49, 0.1);
}

/* WhatsApp button pulse */
#whatsapp-float {
  animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
}

/* Mobile menu animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#mobile-menu.open {
  max-height: 400px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .car-card:hover {
    transform: none;
  }
}
