/* Custom Styles */
body {
  overflow-x: hidden;
}

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

/* Header scroll effect */
#header {
  transition: all 0.3s ease;
}

#header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Language selector animation */
.language-selector:hover #langMenu {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active language button */
.lang-option:hover {
  background-color: #f3f4f6;
}

/* Form focus states */
input:focus,
textarea:focus {
  outline: none;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Button hover effects */
button,
.cta-button {
  transition: all 0.3s ease;
}

/* Mobile menu animation */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

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

/* Footer content fade-in when loaded from API */
.footer-content {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.footer-content.footer-loaded {
  opacity: 1;
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #e67e22;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background-color: #f39c12;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(230, 126, 34, 0.5);
}

.scroll-to-top-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(230, 126, 34, 0.4);
}

/* Responsive: smaller button on mobile */
@media (max-width: 640px) {
  .scroll-to-top-btn {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
  
  .scroll-to-top-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Quote Wizard Modal */
.wizard-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wizard-modal.hidden {
  display: none;
}

.wizard-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.wizard-container {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: wizardSlideIn 0.3s ease;
}

@keyframes wizardSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.wizard-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wizard-close-btn:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* Step Indicators */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  width: 80%;
  height: 2px;
  background-color: #e5e7eb;
  z-index: 0;
}

.wizard-step.active:not(:last-child)::after,
.wizard-step.completed:not(:last-child)::after {
  background-color: #e67e22;
}

.wizard-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
  background-color: #e67e22;
  color: white;
}

.wizard-step.completed .wizard-step-number {
  background-color: #10b981;
  color: white;
}

.wizard-step.completed .wizard-step-number::after {
  content: '✓';
  font-size: 20px;
}

.wizard-step-label {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  font-weight: 500;
}

.wizard-step.active .wizard-step-label {
  color: #e67e22;
  font-weight: 600;
}

/* Wizard Form */
.wizard-form {
  padding: 24px;
  text-align: left;
}

/* Validation error state for wizard required fields */
.validation-error-group {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
  border-radius: 0.375rem;
}

/* Validation error message below fields */
.validation-error-msg {
  display: block;
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

/* Service select when locked (portfolio flow) - keep enabled so value is submitted */
select.service-locked {
  background-color: #f3f4f6;
  cursor: not-allowed;
  color: #6b7280;
  pointer-events: none;
}

.wizard-step-content {
  display: none;
  animation: fadeIn 0.3s ease;
  text-align: left;
}

.wizard-step-content.active {
  display: block;
}

/* Navigation Buttons */
.wizard-navigation {
  display: flex;
  justify-content: space-between;
  padding: 24px;
  border-top: 1px solid #e5e7eb;
  gap: 12px;
}

.wizard-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 16px;
}

.wizard-btn-primary {
  background-color: #e67e22;
  color: white;
  margin-left: auto;
}

.wizard-btn-primary:hover {
  background-color: #f39c12;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.wizard-btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
}

.wizard-btn-secondary:hover {
  background-color: #e5e7eb;
}

.wizard-btn.hidden {
  display: none;
}

/* Responsive Wizard */
@media (max-width: 640px) {
  .wizard-container {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .wizard-steps {
    padding: 16px;
  }

  .wizard-step-label {
    font-size: 10px;
  }

  .wizard-step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .wizard-form {
    padding: 16px;
  }

  .wizard-navigation {
    padding: 16px;
    flex-direction: column;
  }

  .wizard-btn {
    width: 100%;
  }
}

/* Dynamic Content Loading Animation */
/* Ocultar elementos dinámicos completamente hasta que se carguen */
.dynamic-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, visibility 0s linear 0.5s;
}

/* Cuando los datos están cargados, mostrar con animación */
.dynamic-content.loaded {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, visibility 0s linear 0s;
}
