/* Enhanced AAHO-style Form Styling */
.membership-form-container {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  padding: 0;
  background: #ffffff;
  border-radius: 12px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

#afsf-form {
  width: 100%;
  background: #ffffff;
}

/* Enhanced Step Indicator */
.step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 35px 40px 25px;
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  border-bottom: 1px solid #e1e8ed;
  position: relative;
}

.step-indicator::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2c5aa0, #4a90e2);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 140px;
  transition: all 0.3s ease;
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  right: -50%;
  width: 100%;
  height: 3px;
  background: #e1e8ed;
  z-index: 1;
  transition: all 0.3s ease;
}

.step-item.active::after {
  background: linear-gradient(90deg, #2c5aa0, #4a90e2);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e1e8ed;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-item.active .step-number {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(44, 90, 160, 0.4);
  transform: scale(1.1);
}

.step-item.completed .step-number {
  background: #28a745;
  color: #ffffff;
}

.step-title {
  font-size: 13px;
  color: #666666;
  text-align: center;
  font-weight: 500;
  line-height: 1.3;
  transition: color 0.3s ease;
  max-width: 120px;
}

.step-item.active .step-title {
  color: #2c5aa0;
  font-weight: 600;
}

.step-item.completed .step-title {
  color: #28a745;
}

/* Enhanced Form Header */
#afsf-form::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #2c5aa0, #4a90e2, #6bb6ff);
  border-radius: 0;
}

/* Enhanced Step Styling */
#afsf-form .step {
  display: none;
  padding: 50px 40px;
  animation: fadeInUp 0.5s ease-out;
  position: relative;
  z-index: 1;
}

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

#afsf-form .step.active {
  display: block;
}

/* Enhanced Step Headers */
#afsf-form h3 {
  color: #2c5aa0;
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 3px solid #e8f0f8;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  position: relative;
}

#afsf-form h3::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #2c5aa0, #4a90e2);
  border-radius: 2px;
}

#afsf-form h4 {
  color: #2c5aa0;
  margin-bottom: 25px;
  font-size: 20px;
  font-weight: 600;
}

/* Enhanced Field Labels */
.field-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
  font-size: 15px;
  position: relative;
}

/* Enhanced Field Groups */
.field-group {
  flex: 1;
  margin-bottom: 15px;
  position: relative;
}

.field-group.full-width {
  flex: 1 1 100%;
}

/* Enhanced Form Rows */
.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
}

/* Enhanced Input Fields */
#afsf-form input,
#afsf-form select,
#afsf-form textarea {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 0;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  background: #ffffff;
  color: #333333;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#afsf-form input:focus,
#afsf-form select:focus,
#afsf-form textarea:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.15);
  transform: translateY(-1px);
}

#afsf-form input::placeholder,
#afsf-form textarea::placeholder {
  color: #999999;
  font-style: italic;
}

#afsf-form textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* Enhanced Select Styling */
#afsf-form select {
  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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 50px;
}

/* Enhanced Error styling */
#afsf-form input.error,
#afsf-form select.error,
#afsf-form textarea.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}

/* Enhanced Gender Selection */
.gender-selection {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 12px;
  background: #f8fafc;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  min-width: 80px;
  font-size: 14px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.radio-label::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(44, 90, 160, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.radio-label:hover::before {
  left: 100%;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 24px;
  height: 24px;
  border: 3px solid #e1e8ed;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 12px;
  background: #ffffff;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #2c5aa0;
  background: #2c5aa0;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.2);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
}

.radio-label:hover {
  border-color: #2c5aa0;
  background: #f0f4f8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced Checkbox Styling */
#afsf-form input[type="checkbox"] {
  display: none;
}

/* Custom checkbox styling */
.checkbox-custom {
  width: 24px;
  height: 24px;
  border: 3px solid #e1e8ed;
  border-radius: 6px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin-right: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  background: #ffffff;
}

/* Remove any other ::after or ::before rules for .checkbox-custom that add a tick */
.checkbox-custom::after {
  /* Only show tick when checked, so leave this empty */
  content: "";
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 15px;
  color: #333333;
  transition: all 0.3s ease;
}

.checkbox-label:hover .checkbox-custom {
  border-color: #2c5aa0;
  transform: scale(1.05);
}

/* Enhanced Consent Label */
.consent-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 15px;
  color: #333333;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 2px solid #e1e8ed;
  transition: all 0.3s ease;
}

.consent-label .checkbox-custom {
  width: 24px;
  height: 24px;
  border: 3px solid #e1e8ed;
  border-radius: 6px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin-right: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  background: #ffffff;
}

.consent-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #2c5aa0;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.2);
}

.consent-label:hover .checkbox-custom {
  border-color: #2c5aa0;
  transform: scale(1.05);
}

.consent-text {
  font-size: 15px !important;
}

.consent-label:hover {
  border-color: #2c5aa0;
  background: #f0f4f8;
  transform: translateY(-1px);
}

.consent-label a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.consent-label a:hover {
  border-bottom-color: #2c5aa0;
}

/* Enhanced Declaration Section */
.declaration-section {
  background: #f8fafc;
  padding: 30px;
  border-radius: 12px;
  border: 2px solid #e1e8ed;
  margin-bottom: 30px;
}

.declaration-section .form-row {
  margin-bottom: 20px;
}

.declaration-section label {
  font-size: 15px;
  line-height: 1.6;
  color: #333333;
  padding: 15px 0;
}

.declaration-section label.declaration-checkbox {
  font-size: 15px;
  line-height: 1.6;
  color: #333333;
  padding: 16px 24px;
  border-radius: 10px;
  border: 2px solid #e1e8ed;
  background: #f8fafc;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .declaration-section label.declaration-checkbox {
    padding: 12px 10px;
    font-size: 13px;
    border-radius: 7px;
  }
}

/* Enhanced Contribution Info */
.contribution-info {
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #e1e8ed;
  margin-bottom: 30px;
}

.contribution-info h4 {
  color: #2c5aa0;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.contribution-info p {
  color: #666666;
  line-height: 1.6;
  margin: 0;
}

/* Enhanced Payment Info */
.payment-info {
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #e1e8ed;
  margin-bottom: 30px;
}

.payment-info h4 {
  color: #2c5aa0;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.payment-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.payment-info li {
  padding: 8px 0;
  color: #666666;
  position: relative;
  padding-left: 25px;
}

.payment-info li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

/* Enhanced Step Description */
.step-description {
  text-align: center;
  color: #666666;
  font-size: 14px;
  font-style: italic;
  margin-bottom: 30px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #2c5aa0;
}

/* Enhanced Form Buttons */
.form-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e8f0f8;
}

#afsf-form .next,
#afsf-form button[type="submit"] {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #ffffff;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

/* Disabled submit button styles */
#afsf-form button[type="submit"]:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

#afsf-form button[type="submit"]:disabled:hover {
  background: #cccccc;
  color: #666666;
  transform: none;
  box-shadow: none;
}

#afsf-form button[type="submit"]:disabled::before {
  display: none;
}

#afsf-form .next::before,
#afsf-form button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

#afsf-form .next:hover::before,
#afsf-form button[type="submit"]:hover::before {
  left: 100%;
}

#afsf-form .next:hover,
#afsf-form button[type="submit"]:hover {
  background: linear-gradient(135deg, #1e4a8a 0%, #2c5aa0 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

#afsf-form .prev {
  background: #ffffff;
  color: #666666;
  border: 2px solid #e1e8ed;
  padding: 16px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#afsf-form .prev:hover {
  border-color: #2c5aa0;
  color: #2c5aa0;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced Progress Container */
.progress-container {
  height: 6px;
  background: #e1e8ed;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 40px;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2c5aa0, #4a90e2, #6bb6ff);
  border-radius: 3px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .membership-form-container {
    margin: 20px 10px;
    box-shadow: none;
  }

  .step-indicator {
    padding: 20px 15px 15px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .step-item {
    max-width: 80px;
    min-width: 60px;
  }

  .step-item:not(:last-child)::after {
    display: none;
  }

  .step-title {
    font-size: 10px;
  }

  #afsf-form .step {
    padding: 25px 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .gender-selection {
    flex-direction: column;
    gap: 10px;
  }

  .form-buttons {
    flex-direction: column;
    gap: 15px;
  }

  #afsf-form .next,
  #afsf-form .prev,
  #afsf-form button[type="submit"] {
    width: 100%;
    margin-right: 0;
  }

  .declaration-section,
  .contribution-info,
  .payment-info {
    padding: 20px;
  }

  #afsf-form h3 {
    font-size: 20px;
  }

  .radio-label {
    min-width: 0;
    padding: 8px 8px;
    font-size: 13px;
    border-radius: 7px;
  }
}

@media (max-width: 600px) {
  .radio-label {
    width: 50% !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 8px 4px !important;
    font-size: 13px !important;
    border-radius: 7px !important;
    box-sizing: border-box !important;
  }
}

/* Signature field styling */
#afsf-form input[name="signature"] {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 18px;
}

/* Date field styling */
#afsf-form input[type="date"] {
  font-family: inherit;
}

/* Select dropdown styling */
#afsf-form select {
  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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  padding-right: 40px;
}

/* Success message styling */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

/* Loading state */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Form validation messages */
.validation-message {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.validation-message.show {
  display: block;
}

/* Rights Holders Section */
.rights-holder-section {
  margin-bottom: 40px;
}

.rights-holder-section h4 {
  color: #2c5aa0;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.add-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.add-button:hover {
  border-color: #2c5aa0;
  background: #f8fafc;
}

.add-icon {
  width: 20px;
  height: 20px;
  background: #2c5aa0;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
}

.add-text {
  color: #2c5aa0;
  font-weight: 500;
  font-size: 16px;
}

.rights-holder-form {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
  margin-bottom: 20px;
}

.remove-btn {
  background: #e74c3c;
  color: #ffffff;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.remove-btn:hover {
  background: #c0392b;
}

.child-form {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
  margin-bottom: 20px;
  position: relative;
}

.child-form .remove-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  margin-top: 0;
}

/* Enhanced Package Comparison Styles */
.package-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  margin-bottom: 40px;
}

.package-card {
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 16px;
  padding: 35px;
  transition: all 0.4s ease;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.package-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2c5aa0, #4a90e2);
}

.package-card:hover {
  border-color: #2c5aa0;
  box-shadow: 0 8px 32px rgba(44, 90, 160, 0.15);
  transform: translateY(-4px);
}

.package-card.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.package-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 2px solid #e8f0f8;
}

.package-header h4 {
  color: #2c5aa0;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.package-pricing {
  margin-bottom: 30px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.pricing-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
}

.pricing-label {
  font-weight: 600;
  color: #666666;
  font-size: 15px;
}

.pricing-amount {
  font-weight: 700;
  color: #2c5aa0;
  font-size: 18px;
}

.package-radio {
  display: flex;
  align-items: center;
  margin-left: 20px;
  cursor: pointer;
}

.package-radio input[type="radio"] {
  display: none;
}

.package-radio .radio-custom {
  width: 24px;
  height: 24px;
  border: 3px solid #e1e8ed;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #ffffff;
}

.package-radio input[type="radio"]:checked + .radio-custom {
  border-color: #2c5aa0;
  background: #2c5aa0;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.2);
}

.package-radio input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
}

.package-features {
  margin-top: 25px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  padding: 12px 0;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  margin: 0 -12px 15px -12px;
}

.feature-icon {
  color: #28a745;
  font-weight: bold;
  font-size: 18px;
  margin-right: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(40, 167, 69, 0.3);
}

.feature-text {
  color: #333333;
  font-size: 15px;
  line-height: 1.5;
  flex: 1;
  font-weight: 500;
}

/* Responsive adjustments for package comparison */
@media (max-width: 768px) {
  .package-comparison {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .package-card {
    padding: 20px;
  }

  .package-header h4 {
    font-size: 20px;
  }

  .pricing-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .package-radio {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Field Icon Styles */
.field-icon {
  color: #2c5aa0;
  font-weight: bold;
  margin-right: 8px;
  font-size: 14px;
}

.field-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #333333;
  margin-bottom: 8px;
  font-size: 14px;
}

/* --- MEDICAL STATEMENT STEP IMPROVED LAYOUT --- */
.medical-question {
  margin-bottom: 32px;
  padding: 18px 18px 12px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  border-radius: 14px;
  border: 2px solid #e1e8ed;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.04);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.question-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}
.question-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.13);
  border: 2px solid #fff;
}
.question-text {
  font-weight: 600;
  color: #333;
  font-size: 16px;
  margin-right: 8px;
  flex: 1 1 auto;
  line-height: 1.3;
}
.yes-no-options.small-inline {
  display: inline-flex !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
  align-items: center;
}
.yes-no-options.small-inline .yes-no-option {
  flex: 0 0 auto !important;
}
.yes-no-options.small-inline .yes-no-custom {
  padding: 5px 16px !important;
  font-size: 14px !important;
  border-radius: 7px !important;
  min-width: 0 !important;
  width: auto !important;
}
.explanation-field {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px dashed #e1e8ed;
  animation: slideDown 0.3s ease-out;
}
.improved-explanation {
  background: #f0f4f8;
  border: 1.5px solid #b3c6e0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 0;
  margin-bottom: 0;
  box-shadow: 0 1px 4px rgba(44, 90, 160, 0.05);
}
.explanation-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: 14px;
  display: block;
}
.explanation-field input[type="text"] {
  width: 100%;
  padding: 10px 10px;
  border: 2px solid #e1e8ed;
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
  color: #333;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.explanation-field input[type="text"]:focus {
  border-color: #2c5aa0;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.13);
}
@media (max-width: 600px) {
  .medical-question {
    padding: 10px 4px 8px 4px !important;
    border-radius: 8px !important;
  }
  .question-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .question-badge {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
    margin-bottom: 2px;
  }
  .question-text {
    font-size: 13px !important;
    margin-right: 0 !important;
    margin-bottom: 2px;
  }
  .yes-no-options.small-inline {
    gap: 8px !important;
    justify-content: flex-start;
  }
  .yes-no-options.small-inline .yes-no-custom {
    padding: 5px 10px !important;
    font-size: 13px !important;
  }
  .explanation-field {
    margin-top: 8px !important;
    padding-top: 8px !important;
  }
  .improved-explanation {
    padding: 8px 6px !important;
    border-radius: 7px !important;
    font-size: 12px !important;
  }
  .explanation-label {
    font-size: 12px !important;
    margin-bottom: 4px !important;
  }
  .explanation-field input[type="text"] {
    font-size: 12px !important;
    padding: 8px 6px !important;
    border-radius: 6px !important;
  }
}
/* --- END MEDICAL STATEMENT STEP IMPROVED LAYOUT --- */

/* --- MEDICAL STATEMENT TABLE LAYOUT --- */
.medical-statement-table {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 32px auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.medical-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding: 18px 0;
}
.medical-question-cell {
  flex: 2 1 0;
  font-size: 16px;
  color: #222;
  font-weight: 500;
  padding-right: 18px;
}
.medical-yesno-cell {
  flex: 0 0 80px;
  display: flex;
  justify-content: center;
}
.medical-yesno {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.medical-yesno input[type="radio"] {
  display: none;
}
.medical-yesno span {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  background: #f0f4f8;
  color: #2c5aa0;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid #e1e8ed;
  transition: all 0.2s;
  min-width: 48px;
  text-align: center;
}
.medical-yesno input[type="radio"]:checked + span {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #fff;
  border-color: #2c5aa0;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.13);
}
.medical-yesno:hover span {
  border-color: #4a90e2;
  background: #e8f0f8;
  color: #2c5aa0;
}
.medical-explanation-row {
  display: flex;
  background: #f8fafc;
  border-radius: 0 0 10px 10px;
  margin-bottom: 0;
}
.medical-explanation-cell {
  flex: 1 1 100%;
  padding: 12px 18px 18px 18px;
}
.medical-explanation-cell label {
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: 14px;
  display: block;
}
.medical-explanation-cell input[type="text"] {
  width: 100%;
  padding: 10px 10px;
  border: 2px solid #e1e8ed;
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
  color: #333;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
@media (max-width: 700px) {
  .medical-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
  }
  .medical-question-cell {
    font-size: 14px;
    padding-right: 0;
    margin-bottom: 6px;
  }
  .medical-yesno-cell {
    justify-content: flex-start;
    margin-bottom: 4px;
  }
  .medical-explanation-cell {
    padding: 10px 6px 12px 6px;
    border-radius: 8px;
    font-size: 12px;
  }
  .medical-explanation-cell label {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .medical-explanation-cell input[type="text"] {
    font-size: 12px;
    padding: 8px 6px;
    border-radius: 6px;
  }
}
/* --- END MEDICAL STATEMENT TABLE LAYOUT --- */

/* Signature & Summary Styles */
.summary-subtitle {
  color: #2c5aa0;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 25px;
  text-align: center;
}

.summary-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.summary-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #e8f0f8;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-weight: 500;
  color: #666666;
  font-size: 14px;
  flex: 1;
  margin-right: 15px;
}

.summary-value {
  font-weight: 600;
  color: #333333;
  font-size: 14px;
  text-align: right;
  flex: 1;
}

/* Payment Overview Table */
.payment-overview {
  margin-bottom: 30px;
}

.payment-overview h4 {
  color: #2c5aa0;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.payment-table {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.payment-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  background: #f8fafc;
  border-bottom: 1px solid #e1e8ed;
}

.payment-header .payment-col {
  padding: 15px 12px;
  font-weight: 600;
  color: #2c5aa0;
  font-size: 14px;
  text-align: center;
  border-right: 1px solid #e1e8ed;
}

.payment-header .payment-col:last-child {
  border-right: none;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.payment-row .payment-col {
  padding: 15px 12px;
  font-weight: 500;
  color: #333333;
  font-size: 14px;
  text-align: center;
  border-right: 1px solid #e1e8ed;
  border-bottom: 1px solid #e1e8ed;
}

.payment-row .payment-col:last-child {
  border-right: none;
}

.payment-row .payment-col:last-child {
  border-bottom: none;
}

/* Authorization Section */
.authorization-section {
  margin-bottom: 30px;
  padding: 25px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
}

.declaration-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 14px;
  color: #333333;
}

.declaration-checkbox input[type="checkbox"] {
  display: none;
}

.declaration-checkbox .checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #e1e8ed;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin-right: 12px;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.declaration-checkbox:hover .checkbox-custom {
  border-color: #2c5aa0;
}

.declaration-checkbox a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 500;
}

.declaration-checkbox a:hover {
  text-decoration: underline;
}

/* Responsive adjustments for summary */
@media (max-width: 768px) {
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .summary-item {
    flex-direction: column;
    gap: 5px;
  }

  .summary-label {
    margin-right: 0;
    text-align: left;
  }

  .summary-value {
    text-align: left;
  }

  .payment-header,
  .payment-row {
    grid-template-columns: 1fr;
  }

  .payment-header .payment-col,
  .payment-row .payment-col {
    border-right: none;
    border-bottom: 1px solid #e1e8ed;
    text-align: left;
    padding: 10px 15px;
  }

  .payment-header .payment-col:last-child,
  .payment-row .payment-col:last-child {
    border-bottom: none;
  }
}

/* Add IDs Step Styles */
.member-name {
  text-align: center;
  font-weight: 600;
  color: #333333;
  font-size: 16px;
  margin-bottom: 25px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e1e8ed;
}

.document-type-selection {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.document-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.document-option input[type="radio"] {
  display: none;
}

.document-custom {
  display: inline-block;
  padding: 12px 24px;
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  color: #666666;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}

.document-option input[type="radio"]:checked + .document-custom {
  background: #2c5aa0;
  border-color: #2c5aa0;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.2);
}

.document-option:hover .document-custom {
  border-color: #2c5aa0;
  color: #2c5aa0;
}

.document-option input[type="radio"]:checked:hover + .document-custom {
  background: #1e4a8a;
  color: #ffffff;
}

/* File Upload Styles */
.upload-section {
  margin-top: 20px;
}

.file-upload-container {
  position: relative;
  margin-top: 10px;
}

.file-upload {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  background: #f8fafc;
  border: 2px dashed #e1e8ed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 60px;
}

.file-upload-label:hover {
  border-color: #2c5aa0;
  background: #f0f4f8;
}

.upload-icon {
  font-size: 20px;
  color: #666666;
}

.upload-text {
  color: #666666;
  font-size: 14px;
  font-weight: 500;
}

.upload-preview {
  margin-top: 10px;
  display: none;
}

.upload-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  border: 1px solid #e1e8ed;
}

/* Additional Button Styles */
.save-btn {
  background: #2c5aa0;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.save-btn:hover {
  background: #1e4a8a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
}

.skip-btn {
  background: #8b4513;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.skip-btn:hover {
  background: #6b3410;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

/* Responsive adjustments for Add IDs step */
@media (max-width: 768px) {
  .document-type-selection {
    flex-direction: column;
    gap: 10px;
  }

  .document-custom {
    min-width: auto;
    padding: 10px 20px;
  }

  .form-buttons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .save-btn,
  .skip-btn {
    margin-right: 0;
    flex: 1;
    min-width: 120px;
  }
}

/* Enhanced Summary Styles */
.summary-subtitle {
  color: #2c5aa0;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-section {
  margin-bottom: 35px;
  padding: 30px;
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  border-radius: 16px;
  border: 2px solid #e1e8ed;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
}

.summary-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid #e8f0f8;
  transition: all 0.3s ease;
}

.summary-item:hover {
  background: rgba(44, 90, 160, 0.05);
  border-radius: 8px;
  padding: 15px;
  margin: 0 -15px;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-weight: 600;
  color: #666666;
  font-size: 15px;
  flex: 1;
  margin-right: 20px;
}

.summary-value {
  font-weight: 700;
  color: #333333;
  font-size: 15px;
  text-align: right;
  flex: 1;
}

/* Enhanced Payment Overview Table */
.payment-overview {
  margin-bottom: 35px;
}

.payment-overview h4 {
  color: #2c5aa0;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-table {
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.payment-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  border-bottom: 2px solid #e1e8ed;
}

.payment-header .payment-col {
  padding: 20px 15px;
  font-weight: 700;
  color: #2c5aa0;
  font-size: 15px;
  text-align: center;
  border-right: 1px solid #e1e8ed;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-header .payment-col:last-child {
  border-right: none;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.payment-row .payment-col {
  padding: 20px 15px;
  font-weight: 600;
  color: #333333;
  font-size: 16px;
  text-align: center;
  border-right: 1px solid #e1e8ed;
  border-bottom: 1px solid #e1e8ed;
  transition: all 0.3s ease;
}

.payment-row .payment-col:hover {
  background: #f8fafc;
}

.payment-row .payment-col:last-child {
  border-right: none;
}

.payment-row .payment-col:last-child {
  border-bottom: none;
}

/* Enhanced Authorization Section */
.authorization-section {
  margin-bottom: 35px;
  padding: 30px;
  background: linear-gradient(135deg, #f8fafc 0%, #e8f0f8 100%);
  border-radius: 16px;
  border: 2px solid #e1e8ed;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.declaration-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 16px;
  color: #333333;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 2px solid #e1e8ed;
  transition: all 0.3s ease;
}

.declaration-checkbox:hover {
  border-color: #2c5aa0;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.declaration-checkbox input[type="checkbox"] {
  display: none;
}

.declaration-checkbox .checkbox-custom {
  width: 26px;
  height: 26px;
  border: 3px solid #e1e8ed;
  border-radius: 8px;
  display: inline-block;
  position: relative;
  cursor: pointer;
  margin-right: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  background: #ffffff;
}

.declaration-checkbox:hover .checkbox-custom {
  border-color: #2c5aa0;
  transform: scale(1.05);
}

.declaration-checkbox a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.declaration-checkbox a:hover {
  border-bottom-color: #2c5aa0;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .membership-form-container {
    margin: 20px auto;
    border-radius: 8px;
  }

  .step-indicator {
    padding: 25px 20px 20px;
  }

  .step-item {
    max-width: 100px;
  }

  .step-item:not(:last-child)::after {
    top: 18px;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 14px;
    margin-bottom: 8px;
  }

  .step-title {
    font-size: 11px;
    max-width: 80px;
  }

  #afsf-form .step {
    padding: 30px 20px;
  }

  #afsf-form h3 {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .gender-selection {
    flex-direction: column;
    gap: 10px;
  }

  .radio-label {
    min-width: auto;
    padding: 12px 15px;
  }

  .form-buttons {
    flex-direction: column;
    gap: 15px;
  }

  #afsf-form .next,
  #afsf-form .prev,
  #afsf-form button[type="submit"] {
    width: 100%;
    margin: 0;
  }

  .package-comparison {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .package-card {
    padding: 25px;
  }

  .yes-no-options {
    flex-direction: column;
    gap: 15px;
  }

  .yes-no-custom {
    min-width: auto;
    padding: 12px 20px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .summary-item {
    flex-direction: column;
    gap: 8px;
  }

  .summary-label {
    margin-right: 0;
    text-align: left;
  }

  .summary-value {
    text-align: left;
  }

  .payment-header,
  .payment-row {
    grid-template-columns: 1fr;
  }

  .payment-header .payment-col,
  .payment-row .payment-col {
    border-right: none;
    border-bottom: 1px solid #e1e8ed;
    text-align: left;
    padding: 15px;
  }

  .payment-header .payment-col:last-child,
  .payment-row .payment-col:last-child {
    border-bottom: none;
  }

  .document-type-selection {
    flex-direction: column;
    gap: 15px;
  }

  .document-custom {
    min-width: auto;
    padding: 12px 20px;
  }

  .save-btn,
  .skip-btn {
    margin-right: 0;
    flex: 1;
    min-width: auto;
  }
}

/* Enhanced Loading States */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Enhanced Success/Error Messages */
.success-message {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  padding: 15px 20px;
  border-radius: 10px;
  border: 2px solid #c3e6cb;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
  animation: slideInDown 0.5s ease-out;
}

.error-message {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  padding: 15px 20px;
  border-radius: 10px;
  border: 2px solid #f5c6cb;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
  animation: slideInDown 0.5s ease-out;
}

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

/* Enhanced Focus States */
#afsf-form input:focus,
#afsf-form select:focus,
#afsf-form textarea:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.15);
  transform: translateY(-1px);
}

/* Enhanced Hover Effects */
.field-group:hover {
  transform: translateY(-1px);
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Enhanced Print Styles */
@media print {
  .membership-form-container {
    box-shadow: none;
    border: 1px solid #000;
  }

  .form-buttons {
    display: none;
  }

  .step-indicator {
    display: none;
  }
}

/* Enhanced Date Picker Styling */
.date-picker {
  position: relative;
  cursor: pointer;
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #333333;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.date-picker::before {
  content: "📅";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #666666;
  pointer-events: none;
  transition: color 0.3s ease;
}

.date-picker:hover::before {
  color: #2c5aa0;
}

.date-picker:focus::before {
  color: #2c5aa0;
}

.date-picker:hover {
  border-color: #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.date-picker:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.date-picker::placeholder {
  color: #999999;
  font-style: italic;
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid #e1e8ed;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

.flatpickr-calendar.open {
  animation: fadeInUp 0.3s ease-out;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: #e1e8ed;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
  border-top-color: #e1e8ed;
}

.flatpickr-months {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #ffffff;
  padding: 12px 0;
}

.flatpickr-month {
  color: #ffffff;
}

.flatpickr-current-month {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.flatpickr-monthDropdown-months {
  background: transparent;
  color: #ffffff;
  border: none;
  font-weight: 600;
}

.flatpickr-monthDropdown-months option {
  background: #ffffff;
  color: #333333;
}

.flatpickr-weekdays {
  background: #f8fafc;
  border-bottom: 1px solid #e1e8ed;
}

.flatpickr-weekday {
  color: #666666;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 0;
}

.flatpickr-days {
  background: #ffffff;
}

.flatpickr-day {
  border-radius: 6px;
  margin: 2px;
  color: #333333;
  font-weight: 500;
  transition: all 0.2s ease;
}

.flatpickr-day:hover {
  background: #e8f0f8;
  color: #2c5aa0;
}

.flatpickr-day.selected {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
}

.flatpickr-day.today {
  background: #4a90e2;
  color: #ffffff;
  font-weight: 600;
}

.flatpickr-day.disabled {
  color: #cccccc;
  background: transparent;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #cccccc;
}

/* Enhanced Phone Input Styling */
.phone-input {
  position: relative;
  background: #ffffff;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #333333;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.phone-input::after {
  content: "📞";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #666666;
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 1;
}

.phone-input:hover::after {
  color: #2c5aa0;
}

.phone-input:focus::after {
  color: #2c5aa0;
}

.phone-input:hover {
  border-color: #4a90e2;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.phone-input:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.phone-input::placeholder {
  color: #999999;
  font-style: italic;
}

/* Intl Tel Input Custom Styling */
.iti {
  width: 100% !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: block !important;
  position: relative !important;
}

.iti__flag-container {
  border-radius: 6px 0 0 6px;
  background: #f8fafc;
  border: 2px solid #e1e8ed;
  border-right: none;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.iti:hover .iti__flag-container {
  border-color: #4a90e2;
  background: #e8f0f8;
}

.iti--focus .iti__flag-container {
  border-color: #2c5aa0;
  background: #e8f0f8;
}

.iti__selected-flag {
  padding: 12px 16px;
  background: transparent;
  border-radius: 6px 0 0 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.iti__selected-flag:hover {
  background: #e8f0f8;
}

.iti__arrow {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #666666;
  margin-left: 6px;
  transition: all 0.3s ease;
}

.iti:hover .iti__arrow {
  border-top-color: #2c5aa0;
}

.iti__country-list {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid #e1e8ed;
  max-height: 200px;
  overflow-y: auto;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  z-index: 9999;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
}

.iti__country {
  padding: 12px 16px;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.iti__country:hover {
  background: #e8f0f8;
  color: #2c5aa0;
}

.iti__country.iti__highlight {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #ffffff;
}

.iti__country-name {
  font-weight: 500;
  color: inherit;
}

.iti__dial-code {
  color: #666666;
  font-weight: 400;
}

.iti__highlight .iti__dial-code {
  color: rgba(255, 255, 255, 0.8);
}

.iti__flag {
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Phone input field adjustments */
.iti__tel-input {
  border: none !important;
  background: transparent !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  color: #333333 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  outline: none !important;
  border-radius: 0 8px 8px 0 !important;
}

.iti__tel-input:focus {
  outline: none;
  box-shadow: none;
}

/* Hide phone icon when Intl Tel Input is active */
.iti .phone-input::after {
  display: none;
}

/* Ensure proper form layout with phone input */
.field-group .iti {
  width: 100%;
  display: block;
}

.field-group .iti__flag-container {
  height: 100%;
  display: flex;
  align-items: center;
}

/* Fix for phone input in form rows */
.form-row .field-group .iti {
  flex: 1;
}

/* Error state for phone input */
.phone-input.error,
.iti__tel-input.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.phone-input.error:focus,
.iti__tel-input.error:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .flatpickr-calendar {
    width: 280px;
    font-size: 14px;
  }

  .flatpickr-day {
    height: 32px;
    line-height: 32px;
    font-size: 13px;
  }

  .iti__country-list {
    width: 280px;
    max-height: 180px;
  }

  .iti__country {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Loading states */
.date-picker.loading,
.phone-input.loading {
  opacity: 0.7;
  pointer-events: none;
}

.date-picker.loading::after,
.phone-input.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #e1e8ed;
  border-top: 2px solid #2c5aa0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Accessibility improvements */
.date-picker:focus-visible,
.phone-input:focus-visible {
  outline: 2px solid #2c5aa0;
  outline-offset: 2px;
}

.flatpickr-calendar:focus-within {
  outline: 2px solid #2c5aa0;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .date-picker,
  .phone-input {
    border-width: 3px;
  }

  .flatpickr-day.selected {
    border: 2px solid #000000;
  }

  .iti__flag-container {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .date-picker,
  .phone-input,
  .flatpickr-day,
  .iti__country {
    transition: none;
  }

  .flatpickr-calendar.open {
    animation: none;
  }
}

/* Select2 Custom Styling for AAHO Design - COMPLETELY REWRITTEN */
.select2-container {
  width: 100% !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  position: relative !important;
  z-index: 1;
}

/* Match exact form input styling */
.select2-container--default .select2-selection--single {
  background: #ffffff !important;
  border: 2px solid #e1e8ed !important;
  border-radius: 8px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  position: relative !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Hover state */
.select2-container--default .select2-selection--single:hover {
  border-color: #4a90e2 !important;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15) !important;
}

/* Focus state */
.select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: #2c5aa0 !important;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.15) !important;
  outline: none !important;
}

/* Text rendering */
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #333333 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  line-height: 1.4 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-right: 40px !important;
}

/* Placeholder styling */
.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #999999 !important;
  font-style: italic !important;
}

/* Arrow styling */
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 100% !important;
  width: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  right: 8px !important;
  top: 0 !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__arrow::after {
  content: "▼" !important;
  font-size: 12px !important;
  color: #666666 !important;
  transition: all 0.3s ease !important;
}

.select2-container--default.select2-container--open
  .select2-selection--single
  .select2-selection__arrow::after {
  transform: rotate(180deg) !important;
  color: #2c5aa0 !important;
}

/* Clear button */
.select2-container--default
  .select2-selection--single
  .select2-selection__clear {
  color: #999999 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  margin-right: 30px !important;
  transition: color 0.3s ease !important;
  position: absolute !important;
  right: 35px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: pointer !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__clear:hover {
  color: #dc3545 !important;
}

/* Dropdown styling */
.select2-dropdown {
  background: #ffffff !important;
  border: 2px solid #e1e8ed !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden !important;
  z-index: 999999 !important;
  margin-top: 4px !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Search field in dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 2px solid #e1e8ed !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  color: #333333 !important;
  background: #f8fafc !important;
  transition: all 0.3s ease !important;
  margin: 8px !important;
  width: calc(100% - 16px) !important;
  box-sizing: border-box !important;
}

.select2-container--default
  .select2-search--dropdown
  .select2-search__field:focus {
  outline: none !important;
  border-color: #2c5aa0 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1) !important;
}

/* Dropdown options */
.select2-container--default .select2-results__option {
  padding: 12px 16px !important;
  font-size: 15px !important;
  color: #333333 !important;
  transition: all 0.2s ease !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
}

.select2-container--default .select2-results__option:hover {
  background: #e8f0f8 !important;
  color: #2c5aa0 !important;
}

.select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2) !important;
  color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background: #f0f8ff !important;
  color: #2c5aa0 !important;
  font-weight: 600 !important;
}

.select2-container--default
  .select2-results__option[aria-selected="true"]:hover {
  background: #e8f0f8 !important;
  color: #2c5aa0 !important;
}

/* Loading state */
.select2-container--default
  .select2-selection--single.select2-selection--loading {
  opacity: 0.7 !important;
  pointer-events: none !important;
}

.select2-container--default
  .select2-selection--single.select2-selection--loading::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  right: 40px !important;
  transform: translateY(-50%) !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid #e1e8ed !important;
  border-top: 2px solid #2c5aa0 !important;
  border-radius: 50% !important;
  animation: spin 1s linear infinite !important;
}

/* Error state */
.select2-container--default .select2-selection--single.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15) !important;
}

.select2-container--default .select2-selection--single.error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2) !important;
}

/* CRITICAL Z-INDEX FIXES */
.select2-container--open {
  z-index: 999999 !important;
}

.select2-container--open .select2-dropdown {
  z-index: 999999 !important;
}

.select2-container--open .select2-results__options {
  z-index: 999999 !important;
}

/* Ensure dropdown appears above everything */
.select2-dropdown {
  z-index: 999999 !important;
  position: absolute !important;
}

/* Fix for step containers */
.step .select2-container--open {
  z-index: 999999 !important;
}

/* Fix for form rows */
.form-row .field-group .select2-container--open {
  z-index: 999999 !important;
}

/* Ensure proper stacking context */
.membership-form-container {
  position: relative;
  z-index: 1;
}

#afsf-form .step {
  position: relative;
  z-index: 1;
}

/* Force highest z-index for open dropdowns */
.select2-container--open,
.select2-container--open .select2-dropdown,
.select2-container--open .select2-results__options {
  z-index: 999999 !important;
  position: relative !important;
}

/* Fix for any potential overflow issues */
.select2-container {
  overflow: visible !important;
}

.select2-container--open {
  overflow: visible !important;
}

/* Ensure form elements don't interfere with dropdown */
.form-row {
  position: relative;
  z-index: 1;
}

.field-group {
  position: relative;
  z-index: 1;
}

/* Force highest z-index for open dropdowns */
.select2-container--open,
.select2-container--open .select2-dropdown,
.select2-container--open .select2-results__options {
  z-index: 999999 !important;
  position: relative !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .select2-container--default .select2-selection--single {
    height: 44px !important;
  }

  .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }

  .select2-container--default .select2-results__option {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }

  .select2-dropdown {
    max-height: 200px !important;
  }
}

/* Accessibility improvements */
.select2-container--default .select2-selection--single:focus-visible {
  outline: 2px solid #2c5aa0 !important;
  outline-offset: 2px !important;
}

.select2-dropdown:focus-within {
  outline: 2px solid #2c5aa0 !important;
  outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .select2-container--default .select2-selection--single {
    border-width: 3px !important;
  }

  .select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    border: 2px solid #000000 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .select2-container--default .select2-selection--single,
  .select2-container--default .select2-results__option,
  .select2-container--default
    .select2-selection--single
    .select2-selection__arrow::after {
    transition: none !important;
  }
}

/* Ensure Select2 matches other form elements exactly */
.field-group .select2-container {
  margin-bottom: 0 !important;
}

.field-group .select2-container--default .select2-selection--single {
  height: 48px !important;
  border: 2px solid #e1e8ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

/* Match the exact styling of other form inputs */
#afsf-form .select2-container--default .select2-selection--single {
  border: 2px solid #e1e8ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
}

#afsf-form .select2-container--default .select2-selection--single:hover {
  border-color: #4a90e2 !important;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15) !important;
}

#afsf-form
  .select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: #2c5aa0 !important;
  box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.15) !important;
  outline: none !important;
}

#afsf-form
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #333333 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  line-height: 1.4 !important;
}

#afsf-form
  .select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #999999 !important;
  font-style: italic !important;
}

/* Additional Select2 styling to match form elements exactly */
.select2-container {
  margin-bottom: 0 !important;
}

/* Ensure Select2 has the same spacing as other form elements */
.form-row .field-group .select2-container {
  flex: 1 !important;
  margin-bottom: 0 !important;
}

/* Match the exact height and padding of other form inputs */
#afsf-form .select2-container--default .select2-selection--single {
  height: 48px !important;
  padding: 0 !important;
  border: 2px solid #e1e8ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

/* Ensure the dropdown arrow is positioned correctly */
#afsf-form
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Ensure the text is positioned correctly */
#afsf-form
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  padding: 12px 16px !important;
  padding-right: 40px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
}

/* Ensure the clear button is positioned correctly */
#afsf-form
  .select2-container--default
  .select2-selection--single
  .select2-selection__clear {
  position: absolute !important;
  right: 35px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 16px !important;
  color: #999999 !important;
  cursor: pointer !important;
  transition: color 0.3s ease !important;
}

#afsf-form
  .select2-container--default
  .select2-selection--single
  .select2-selection__clear:hover {
  color: #dc3545 !important;
}

/* Ensure the dropdown matches the form styling */
#afsf-form .select2-dropdown {
  border: 2px solid #e1e8ed !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  margin-top: 4px !important;
  background: #ffffff !important;
  z-index: 999999 !important;
  position: absolute !important;
}

/* Fix z-index for all Select2 dropdowns */
.select2-dropdown {
  z-index: 999999 !important;
  position: absolute !important;
}

.select2-container--open .select2-dropdown {
  z-index: 999999 !important;
}

/* Ensure Select2 container has proper positioning */
.select2-container {
  position: relative !important;
  z-index: 1;
}

.select2-container--open {
  z-index: 999999 !important;
}

/* Fix positioning for form rows with Select2 */
.form-row .field-group .select2-container {
  position: relative !important;
  z-index: 1;
}

.form-row .field-group .select2-container--open {
  z-index: 999999 !important;
}

/* Ensure dropdown appears above all other elements */
.select2-results__options {
  z-index: 999999 !important;
}

/* Fix for step containers */
.step .select2-container--open {
  z-index: 999999 !important;
}

/* Additional z-index fixes */
.select2-container--default .select2-selection--single {
  position: relative;
  z-index: 1;
}

.select2-container--default.select2-container--open .select2-selection--single {
  z-index: 999999 !important;
}

/* Ensure proper stacking context for form elements */
.membership-form-container {
  position: relative;
  z-index: 1;
}

#afsf-form .step {
  position: relative;
  z-index: 1;
}

/* Force dropdown to appear above everything */
.select2-container--open {
  z-index: 999999 !important;
}

.select2-container--open .select2-dropdown {
  z-index: 999999 !important;
}

/* Ensure dropdown is positioned correctly */
.select2-dropdown {
  position: absolute !important;
  z-index: 999999 !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Fix for any potential overflow issues */
.select2-container {
  overflow: visible !important;
}

.select2-container--open {
  overflow: visible !important;
}

/* Ensure form elements don't interfere with dropdown */
.form-row {
  position: relative;
  z-index: 1;
}

.field-group {
  position: relative;
  z-index: 1;
}

/* Force highest z-index for open dropdowns */
.select2-container--open,
.select2-container--open .select2-dropdown,
.select2-container--open .select2-results__options {
  z-index: 999999 !important;
  position: relative !important;
}

/* Medical Statement Step Improvements */
.medical-question-numbered {
  position: relative;
  padding-left: 48px;
}
.question-badge {
  position: absolute;
  left: 18px;
  top: 30px;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.15);
  z-index: 2;
}
.improved-explanation {
  background: #f0f4f8;
  border: 1.5px solid #b3c6e0;
  border-radius: 8px;
  padding: 18px 20px;
  margin-top: 18px;
  margin-bottom: 0;
  box-shadow: 0 1px 4px rgba(44, 90, 160, 0.05);
}
.question-divider {
  border: none;
  border-top: 1.5px dashed #e1e8ed;
  margin: 0 0 30px 0;
}
@media (max-width: 768px) {
  .medical-question-numbered {
    padding-left: 0;
  }
  .question-badge {
    position: static;
    margin-bottom: 10px;
    margin-left: 0;
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  .medical-question {
    padding: 15px;
  }
  .improved-explanation {
    padding: 12px 10px;
  }
  .question-divider {
    margin-bottom: 18px;
  }
}

/* --- STRONG MOBILE RESPONSIVENESS FIX --- */
@media (max-width: 600px) {
  .membership-form-container {
    max-width: 100vw !important;
    padding: 0 2vw !important;
    margin: 0 !important;
    border-radius: 6px !important;
  }
  #afsf-form .step {
    padding: 10px 0 !important;
  }
  .form-row {
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 10px !important;
    width: 100% !important;
  }
  .field-group {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
  }
  .field-label {
    font-size: 13px !important;
    margin-bottom: 4px !important;
  }
  #afsf-form input,
  #afsf-form select,
  #afsf-form textarea {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 15px !important;
    padding: 10px 8px !important;
    border-radius: 7px !important;
    margin-bottom: 0 !important;
  }
  .form-buttons {
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 18px !important;
    padding-top: 10px !important;
    border-top: 1px solid #e8f0f8 !important;
    width: 100% !important;
  }
  #afsf-form .next,
  #afsf-form .prev,
  #afsf-form button[type="submit"] {
    width: 100% !important;
    margin: 0 !important;
    font-size: 15px !important;
    padding: 12px 0 !important;
    border-radius: 7px !important;
  }
  .package-comparison,
  .summary-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .package-card,
  .summary-section {
    padding: 10px !important;
    border-radius: 10px !important;
  }
  .medical-question {
    padding: 8px !important;
    border-radius: 8px !important;
  }
  .yes-no-options {
    flex-direction: column !important;
    gap: 6px !important;
  }
  .yes-no-custom {
    padding: 8px 0 !important;
    min-width: 80px !important;
    font-size: 13px !important;
    border-radius: 7px !important;
  }
  .explanation-field {
    margin-top: 10px !important;
    padding-top: 10px !important;
  }
  .improved-explanation {
    padding: 8px 6px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
  }
  .save-btn,
  .skip-btn {
    width: 100% !important;
    min-width: 80px !important;
    font-size: 14px !important;
    padding: 10px 0 !important;
    border-radius: 7px !important;
  }
  .declaration-section,
  .contribution-info,
  .payment-info,
  .authorization-section {
    padding: 10px !important;
    border-radius: 8px !important;
  }
  .declaration-checkbox,
  .consent-label {
    font-size: 12px !important;
    padding: 10px !important;
    border-radius: 7px !important;
  }
  .step-description {
    font-size: 12px !important;
    margin-bottom: 10px !important;
    padding: 6px !important;
    border-radius: 6px !important;
  }
  .rights-holder-section h4 {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }
  .add-button {
    padding: 8px 0 !important;
    border-radius: 7px !important;
    font-size: 13px !important;
  }
  .child-form,
  .rights-holder-form {
    padding: 8px !important;
    border-radius: 7px !important;
  }
  .remove-btn {
    font-size: 12px !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
  }
  /* Ensure select2 dropdowns are not clipped */
  .select2-container--open .select2-dropdown {
    left: 0 !important;
    right: 0 !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    width: 100vw !important;
    position: fixed !important;
    top: auto !important;
    z-index: 999999 !important;
  }
  .select2-container {
    width: 100% !important;
    min-width: 0 !important;
  }
  /* Fix modal overflow */
  .modal,
  .modal-overlay {
    max-width: 100vw !important;
    max-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .gender-selection {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .radio-label {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
    padding: 12px 8px !important;
    font-size: 15px !important;
    border-radius: 7px !important;
  }
  .radio-custom {
    margin-right: 12px !important;
  }
  .step-indicator {
    flex-wrap: wrap !important;
    gap: 0 !important;
    padding: 10px 0 0 0 !important;
    justify-content: flex-start !important;
  }
  .step-item {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    min-width: 25% !important;
    box-sizing: border-box !important;
    margin-bottom: 10px !important;
  }
  .step-title {
    font-size: 10px !important;
    max-width: 100% !important;
    word-break: break-word !important;
  }
}

@media (max-width: 600px) {
  /* ...existing mobile rules... */
  .gender-selection {
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: space-between !important;
  }
  .radio-label {
    width: 50% !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 12px 8px !important;
    font-size: 15px !important;
    border-radius: 7px !important;
    box-sizing: border-box !important;
  }
}

/* --- INLINE YES/NO BUTTONS FOR MEDICAL STEP --- */
.yes-no-options.small-inline {
  display: inline-flex !important;
  gap: 10px !important;
  margin-bottom: 0 !important;
  align-items: center;
}
.yes-no-options.small-inline .yes-no-option {
  flex: 0 0 auto !important;
}
.yes-no-options.small-inline .yes-no-custom {
  padding: 6px 18px !important;
  font-size: 15px !important;
  border-radius: 7px !important;
  min-width: 0 !important;
  width: auto !important;
}
@media (max-width: 600px) {
  .yes-no-options.small-inline {
    gap: 8px !important;
  }
  .yes-no-options.small-inline .yes-no-custom {
    padding: 6px 12px !important;
    font-size: 14px !important;
  }
}
/* --- END INLINE YES/NO BUTTONS --- */

/* Fix margin and alignment for checkboxes in consent and declaration sections */
#afsf-form input[type="checkbox"],
.medical-checkbox {
  margin-right: 12px;
  margin-top: 0;
  vertical-align: middle;
}

.consent-label,
.declaration-section label,
.yes-no-option {
  align-items: center !important;
  display: flex !important;
}

/* Optionally, reduce padding for consent/declaration labels for tighter look */
.consent-label,
.declaration-section label {
  padding-top: 10px;
  padding-bottom: 10px;
}

.yes-no-toggle {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
}
.yes-no-toggle .yes-no-option {
  flex: 1 1 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  transition: none;
}
.yes-no-toggle .yes-no-option input[type="radio"] {
  display: none;
}
.yes-no-toggle .yes-no-option .checkbox-custom {
  display: none;
}
.yes-no-toggle .yes-no-option .yes-no-custom {
  display: block;
  width: 100%;
  padding: 14px 0;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #e1e8ed;
  background: #f8fafc;
  color: #2c5aa0;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}
.yes-no-toggle
  .yes-no-option
  input[type="radio"]:checked
  + .checkbox-custom
  + .yes-no-custom,
.yes-no-toggle .yes-no-option input[type="radio"]:checked + .yes-no-custom {
  background: linear-gradient(135deg, #2c5aa0, #4a90e2);
  color: #fff;
  border-color: #2c5aa0;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.08);
}
.yes-no-toggle .yes-no-option .yes-no-custom:hover {
  border-color: #2c5aa0;
  background: #e8f0fa;
  color: #2c5aa0;
}
.medical-explanation {
  margin-top: 12px;
  padding: 16px 18px;
  background: #eaf3fb;
  border: 1.5px solid #b3c6e0;
  border-radius: 8px;
  font-size: 15px;
  color: #2c5aa0;
  box-shadow: 0 1px 4px rgba(44, 90, 160, 0.05);
}
