body::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: #f5f5f5;
  border-radius: 10px;
}

body::-webkit-scrollbar {
  width: 10px;
  background-color: #f5f5f5;
}

body::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-image: -webkit-gradient(
    linear,
    left bottom,
    left top,
    color-stop(0.33, var(--color-primary)),
    /*color-stop(0.5, #004d6d),*/ color-stop(0.66, var(--color-primary))
  );
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

/* Main form container */
.acfe-form {
  font-family: 'JosefinSans', sans-serif;
  width: 100%;
  /*max-width: 600px;*/
  margin: 0 auto;
  /*padding: 2rem;*/
  /*background: linear-gradient(135deg, rgba(2, 42, 41, 0.1) 0%, rgba(170, 167, 152, 0.05) 100%);*/
  /*background: #ffffff30;
  border-radius: 16px;
  border: 1px solid var(--form-border);
  backdrop-filter: blur(10px);
  box-shadow: 
      0 20px 25px -5px rgba(2, 42, 41, 0.1),
      0 10px 10px -5px rgba(2, 42, 41, 0.04);*/
}

/* Form fields wrapper */
.acf-fields.acf-form-fields.-top {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* Individual field styling */
.acf-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

/* Hidden validation field */
.acf-field[data-name="_validate_email"] {
  display: none !important;
}

/* Label styling */
.acf-label {
  margin-bottom: 0;
}

.acf-label label {
  font-family: 'JosefinSans', sans-serif !important;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  text-transform: capitalize;
  margin-bottom: 0.5rem;
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input wrapper */
.acf-input {
  position: relative;
}

.acf-input-wrap {
  position: relative;
}

.acf-fields > .acf-field{
  padding: 0 !important;
  border: none !important;
  gap: .15em !important;
}
.acf-field .acf-label, .acf-field .acf-label label{
  margin-bottom: 0 !important;
}

.acf-input .acf-input-wrap, .acf-field .acf-label{
  padding: .25em;
}

/* Base input styling */
.acf-input input[type="text"],
.acf-input input[type="email"],
.acf-input textarea {
  font-family: 'JosefinSans', sans-serif;
  width: 100%;
  line-height: 1.5 !important;
  padding: 1rem 1.25rem;
  background: var(--input-bg);
  border: 2px solid var(--form-border);
  border-radius: 12px;
  color: var(--primary-color);
  font-size: 1.1rem !important;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
  backdrop-filter: blur(5px);
  resize: none;
}

/* Textarea specific styling */
.acf-input textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* Input focus states */
.acf-input input[type="text"]:focus,
.acf-input input[type="email"]:focus,
.acf-input textarea:focus {
  border-color: var(--accent-color);
  background: var(--input-bg);
  box-shadow: 
      0 0 0 4px var(--form-focus),
      0 4px 12px rgba(165, 106, 36, 0.15);
  transform: translateY(-1px);
}

/* Placeholder styling */
.acf-input input::placeholder,
.acf-input textarea::placeholder {
  color: var(--secondary-color);
  font-weight: 300;
  opacity: 0.8;
}

/* Input hover states */
.acf-input input[type="text"]:hover,
.acf-input input[type="email"]:hover,
.acf-input textarea:hover {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.6667);
}

/* Form submit section */
.acf-form-submit {
  margin-top: 2rem;
  text-align: center;
  position: relative;
}

/* Submit button styling */
.acf-form-submit .acf-button {
  font-family: 'JosefinSans', sans-serif;
  background: var(--accent-color);
  color: var(--text-white);
  border: 2px solid var(--accent-color);
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 180px;
  box-shadow: 
      0 8px 15px rgba(165, 106, 36, 0.3),
      0 4px 6px rgba(165, 106, 36, 0.1);
}

/* Button hover effect */
.acf-form-submit .acf-button:hover {
  background: var(--primary-color);
  border-color: var(--accent-color);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 
      0 12px 20px rgba(165, 106, 36, 0.4),
      0 6px 8px rgba(2, 42, 41, 0.15);
}

/* Button active state */
.acf-form-submit .acf-button:active {
  transform: translateY(0);
  box-shadow: 
      0 4px 8px rgba(165, 106, 36, 0.3),
      0 2px 4px rgba(2, 42, 41, 0.1);
}

/* Button focus state */
.acf-form-submit .acf-button:focus {
  outline: none;
  box-shadow: 
      0 0 0 4px rgba(165, 106, 36, 0.3),
      0 8px 15px rgba(165, 106, 36, 0.3);
}

/* Loading spinner */
.acf-spinner {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
}

.acf-spinner.is-active {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--form-border);
  border-top: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: acf-spin 1s linear infinite;
}

@keyframes acf-spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Error states */
.acf-field.acf-error .acf-input input,
.acf-field.acf-error .acf-input textarea {
  border-color: var(--error-color);
  background: var(--input-bg);
}

.acf-field.acf-error .acf-label label {
  color: var(--error-color);
}

.acf-error-message {
  font-family: 'JosefinSans', sans-serif;
  color: var(--error-color);
  font-size: 0.875rem;
  font-weight: 400;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--error-color);
}
.acf-error-message .acf-icon:before{
  top: 2px;
  position: relative;
}

/* Success states */
.acf-field.acf-success .acf-input input,
.acf-field.acf-success .acf-input textarea {
  border-color: var(--success-color);
  background: rgba(39, 174, 96, 0.05);
}

/* Responsive design */
@media (max-width: 768px) {
  .acfe-form {
      padding: 1.5rem;
      margin: 1rem;
      border-radius: 12px;
  }
  
  .acf-input input[type="text"],
  .acf-input input[type="email"],
  .acf-input textarea {
      padding: 0.875rem 1rem;
      font-size: 0.95rem;
  }
  
  .acf-form-submit .acf-button {
      padding: 0.875rem 2rem;
      font-size: 1rem;
      min-width: 160px;
  }
  
  .acf-label label {
      font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .acfe-form {
      padding: 1.25rem;
      margin: 0.5rem;
  }
  
  .acf-fields.acf-form-fields.-top {
      gap: 1.25rem;
  }
  
  .acf-form-submit .acf-button {
      width: 100%;
      padding: 1rem;
  }
}

/* Focus-within enhancement for better accessibility */
.acf-field:focus-within .acf-label label {
  color: var(--accent-color);
  transform: translateY(-1px);
}

/* Smooth animations for form interactions */
.acfe-form * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for textarea */
.acf-input textarea::-webkit-scrollbar {
  width: 6px;
}

.acf-input textarea::-webkit-scrollbar-track {
  background: rgba(170, 167, 152, 0.1);
  border-radius: 3px;
}

.acf-input textarea::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

.acf-input textarea::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}