  body {
    position: absolute; 
  inset: 0;
  background: linear-gradient(rgba(10,8,16,0.78), rgba(10,8,16,0.88)), 
              url("../images/nexus-rhedrin.jpg") center/cover no-repeat fixed; 
  z-index: -1;
  }
  /* Contact Form Wrapper - Main Container */
.contact-form-wrapper {
  /* Maximum width of the form container */
  max-width: 500px;
  /* Center the form horizontally */
  margin: 0 auto;
  margin-top: 60px;
  /* Add padding around the container */
  padding: 2rem;
  /* Light background color for the form area */
  background-color: #f9f9f9;
  /* Rounded corners for a modern look */
  border-radius: 8px;
  opacity: 0.85;
}

/* Heading Styling */
.contact-form-wrapper h2 {
  /* Center the heading */
  text-align: center;
  /* Add margin below the heading */
  margin-bottom: 1.5rem;
  /* Dark gray color for text */
  color: #333;
  /* Font size for the heading */
  font-size: 1.75rem;
  /* Remove default margins */
  margin-top: 0;
}

/* Form Container */
.contact-form {
  /* Display form elements with proper spacing */
  display: flex;
  /* Stack elements vertically */
  flex-direction: column;
  /* Add gap between form groups */
  gap: 1.5rem;
}

/* Form Group Container (wraps label and input) */
.form-group {
  /* Stack label and input vertically */
  display: flex;
  /* Stack child elements in a column */
  flex-direction: column;
  /* Add gap between label and input */
  gap: 0.5rem;
}

/* Form Label Styling */
.form-label {
  /* Font weight for emphasis */
  font-weight: 600;
  /* Dark text color for contrast */
  color: #333;
  /* Font size for readability */
  font-size: 0.95rem;
}

/* Required Indicator (asterisk) */
.required-indicator {
  /* Red color to indicate required field */
  color: #e74c3c;
  /* Add slight margin for spacing */
  margin-left: 0.25rem;
}

/* Character Count Helper Text */
.character-count {
  /* Smaller font size for helper text */
  font-size: 0.8rem;
  /* Gray color to differentiate from label */
  color: #7f8c8d;
  /* Normal font weight for helper text */
  font-weight: 400;
  /* Add left margin for indentation */
  margin-left: 0;
}

/* Input Field Styling (text and email inputs) */
.form-input {
  /* Remove default browser styling */
  appearance: none;
  /* Add padding inside the input */
  padding: 0.75rem;
  /* Add a border */
  border: 1px solid #bdc3c7;
  /* Rounded corners for inputs */
  border-radius: 4px;
  /* Font size for readability */
  font-size: 1rem;
  /* Dark text color */
  color: #333;
  /* Light background color */
  background-color: #ffffff;
  /* Smooth transition for focus effects */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  /* Font family inheritance */
  font-family: inherit;
}

/* Input Focus State - highlights when user clicks/focuses */
.form-input:focus {
  /* Remove default outline */
  outline: none;
  /* Blue border on focus for visual feedback */
  border-color: #3498db;
  /* Blue shadow on focus for emphasis */
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Textarea Specific Styling */
.form-textarea {
  /* Allow resizing but with a minimum size */
  resize: vertical;
  /* Minimum height for the textarea */
  min-height: 150px;
  /* Prevent resizing larger than needed */
  max-height: 400px;
  /* Set a comfortable line height for text */
  line-height: 1.5;
}

/* Character Information Container */
.character-info {
  /* Display at the end of the form group */
  display: flex;
  /* Align items to the right */
  justify-content: flex-end;
}

/* Character Counter Display */
.character-counter {
  /* Small font size for counter */
  font-size: 0.8rem;
  /* Gray color for subtle display */
  color: #7f8c8d;
}

/* Form Error Message Styling */
.form-error {
  /* Red color to indicate an error */
  color: #e74c3c;
  /* Small font size for error text */
  font-size: 0.8rem;
  /* Hide by default (only show when there's an error) */
  display: none;
  /* Add slight spacing */
  margin-top: 0.25rem;
}

/* Show error message when the field is invalid and has been touched */
.form-input:invalid:not(:placeholder-shown) ~ .form-error {
  /* Display the error message */
  display: block;
}

/* Submit Button Styling */
.submit-button {
  /* Remove default button styling */
  appearance: none;
  /* Blue background color for the button */
  background-color: #3498db;
  /* White text color for contrast */
  color: #ffffff;
  /* Add padding inside the button */
  padding: 0.75rem 2rem;
  /* Font size for readability */
  font-size: 1rem;
  /* Font weight for emphasis */
  font-weight: 600;
  /* Rounded corners for the button */
  border-radius: 4px;
  /* Remove default border */
  border: none;
  /* Cursor changes to pointer on hover when enabled */
  cursor: pointer;
  /* Smooth transition for hover and disabled effects */
  transition: background-color 0.3s ease, opacity 0.3s ease;
  /* Font family inheritance */
  font-family: inherit;
  /* Add some vertical spacing above the button */
  margin-top: 0.5rem;
}

/* Submit Button Hover State (when enabled) */
.submit-button:not(:disabled):hover {
  /* Slightly darker blue on hover */
  background-color: #2980b9;
}

/* Submit Button Active/Pressed State (when enabled) */
.submit-button:not(:disabled):active {
  /* Even darker blue when clicked */
  background-color: #1a5276;
}

/* Submit Button Disabled State */
.submit-button:disabled {
  /* Gray background when disabled */
  background-color: #bdc3c7;
  /* Slightly transparent to show disabled state */
  opacity: 0.6;
  /* Cursor changes to "not allowed" when disabled */
  cursor: not-allowed;
}

/* Submit Button Focus State for Accessibility */
.submit-button:focus {
  /* Remove default outline */
  outline: none;
  /* Add a visible focus ring using box-shadow */
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

/* Success Message Styling */
.success-message {
  /* Green background color for success message */
  background-color: #d5f4e6;
  /* Dark green text color */
  color: #27ae60;
  /* Add padding inside the message */
  padding: 1rem;
  /* Rounded corners for the message */
  border-radius: 4px;
  /* Center the text */
  text-align: center;
  /* Font weight for emphasis */
  font-weight: 500;
  /* Add border for visual emphasis */
  border: 1px solid #27ae60;
}

/* Responsive Design for Tablets and Smaller Screens */
@media (max-width: 879px) {
  /* Reduce padding on smaller screens */
  .contact-form-wrapper {
    padding: 1.5rem;
    /* Reduce margin */
    margin: 1rem;
  }

  /* Reduce heading size on smaller screens */
  .contact-form-wrapper h2 {
    font-size: 1.5rem;
  }

  /* Reduce gap between form groups on mobile */
  .contact-form {
    gap: 1rem;
  }
}

/* Responsive Design for Mobile Devices */
@media (max-width: 480px) {
  /* Further reduce padding on very small screens */
  .contact-form-wrapper {
    padding: 1rem;
    /* Remove box shadow on mobile for cleaner look */
    box-shadow: none;
  }

  /* Make textarea smaller on mobile */
  .form-textarea {
    min-height: 120px;
  }

  /* Make heading smaller on mobile */
  .contact-form-wrapper h2 {
    font-size: 1.25rem;
  }
}
