/* Custom styles for CB Home Improvements */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Modal animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out;
}

/* Hide scrollbar when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Custom focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2d4a3e;
  box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.1);
}

/* Button hover transition */
button,
a {
  transition: all 0.2s ease;
}

/* Service card hover effect */
.service-card:hover img {
  transform: scale(1.05);
}

/* Testimonial slider styles */
.testimonial-slide {
  transition: opacity 0.3s ease;
}

/* Header shadow on scroll */
header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

/* Hero gradient overlay for better text readability */
.hero-overlay {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    transparent 100%
  );
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown) {
  border-color: #2d4a3e;
}

/* Loading state for submit button */
button[type="submit"].loading {
  opacity: 0.7;
  cursor: not-allowed;
}

button[type="submit"].loading::after {
  content: "...";
  animation: dots 1s infinite;
}

@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60%, 100% { content: "..."; }
}
