/* ===== ENHANCED CONTACT QUESTIONNAIRE DESIGN ===== */

/* Questionnaire Container */
.questionnaire {
  background: var(--bg-900);
  position: relative;
  overflow: hidden;
}

.questionnaire::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(217, 119, 6, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.questionnaire-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Enhanced Form Card */
.questionnaire-form {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.questionnaire-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #d97706, #f59e0b);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.questionnaire-form:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Form Sections */
.form-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  transition: all 0.3s ease;
}

.form-section:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(245, 158, 11, 0.2);
}

.form-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #f59e0b, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-section:hover::before {
  opacity: 1;
}

/* Form Section Title */
.form-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.form-section-title::before {
  content: '';
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Form Labels */
.form-label {
  display: block;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  position: relative;
}

.form-label::after {
  content: '*';
  color: #f59e0b;
  margin-right: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-group input[required] ~ label::after,
.form-group textarea[required] ~ label::after,
.form-group select[required] ~ label::after {
  opacity: 1;
}

/* Form Inputs */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-family: 'Heebo', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
  transform: translateY(-2px);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

/* Form Textarea */
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  font-family: 'Heebo', sans-serif;
}

/* Form Select */
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23f59e0b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: left 1rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Checkbox and Radio Styles */
.checkbox-group,
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.checkbox-item::before,
.radio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.checkbox-item:hover,
.radio-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.checkbox-item:hover::before,
.radio-item:hover::before {
  opacity: 1;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #f59e0b;
  position: relative;
  z-index: 2;
}

.checkbox-item input[type="checkbox"]:checked,
.radio-item input[type="radio"]:checked {
  background-color: #f59e0b;
  border-color: #f59e0b;
}

.checkbox-item:has(input[type="checkbox"]:checked),
.radio-item:has(input[type="radio"]:checked) {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.checkbox-label,
.radio-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 2;
  font-weight: 500;
}

/* Submit Section */
.form-submit-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  background: rgba(245, 158, 11, 0.03);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.1);
}

/* Form Note */
.form-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  text-align: center;
}

/* Enhanced Button */
.questionnaire-form .btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000000;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1.25rem 3rem;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.questionnaire-form .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.questionnaire-form .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.5);
}

.questionnaire-form .btn:hover::before {
  left: 100%;
}

.questionnaire-form .btn:active {
  transform: translateY(-1px);
}

.btn-icon {
  margin-left: 0.5rem;
  font-size: 1.2rem;
}

/* Form Validation States */
.form-input:invalid:not(:placeholder-shown),
.form-select:invalid:not([value=""]),
.form-textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

.form-input:valid:not(:placeholder-shown),
.form-select:valid:not([value=""]),
.form-textarea:valid:not(:placeholder-shown) {
  border-color: #10b981;
}

/* Loading State */
.form-submitting {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.form-submitting::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 24px;
  z-index: 10;
}

/* Success/Error Messages */
.form-success,
.form-error {
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  text-align: center;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-success {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  color: #10b981;
}

.form-error {
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid #ef4444;
  color: #ef4444;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .questionnaire-form {
    padding: 2rem;
  }
  
  .form-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .checkbox-group,
  .radio-group {
    grid-template-columns: 1fr;
  }
  
  .form-section-title {
    font-size: 1.25rem;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  
  .questionnaire-form .btn {
    font-size: 1rem;
    padding: 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .questionnaire-form {
    padding: 1.5rem;
  }
  
  .form-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .form-section-title {
    font-size: 1.1rem;
  }
  
  .form-submit-section {
    padding: 1.5rem;
  }
}

/* Enhanced Visual Effects */
.questionnaire-form .card-content {
  position: relative;
  z-index: 2;
}

.questionnaire-form::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}

/* Custom Checkbox and Radio Enhancement */
.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.checkbox-item input[type="checkbox"]:checked,
.radio-item input[type="radio"]:checked {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.radio-item input[type="radio"] {
  border-radius: 50%;
}

/* Progress Indicator */
.form-section-title {
  position: relative;
  padding-right: 3rem;
}

.form-section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animation on Scroll */
@media (prefers-reduced-motion: no-preference) {
  .form-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
  }
  
  .form-section:nth-child(1) { animation-delay: 0.1s; }
  .form-section:nth-child(2) { animation-delay: 0.2s; }
  .form-section:nth-child(3) { animation-delay: 0.3s; }
  .form-section:nth-child(4) { animation-delay: 0.4s; }
  .form-section:nth-child(5) { animation-delay: 0.5s; }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .form-section,
  .questionnaire-form,
  .questionnaire-form::before {
    animation: none;
  }
  
  .questionnaire-form:hover {
    transform: none;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    transform: none;
  }
}
