/* CONTACT PAGE - MAIN LAYOUT */

/*
 * .contact-container
 * Establishes a full-height flexible container to center the content.
 * It uses padding consistent with other pages like 'projects.html'.
 */
.contact-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 2rem;
}

/*
 * .contact-content
 * Defines the main content area with a max-width for readability.
 * The fadeInUp animation provides a smooth entrance effect.
 */
.contact-content {
  max-width: 650px;
  width: 100%;
  text-align: left;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

/* CONTACT INTRODUCTION */

.contact-intro {
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.contact-intro p {
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/*
 * .subtitle
 * Styles the introductory paragraph below the main title.
 */
.subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out 0.4s forwards;
  opacity: 0;
}

/*
 * .email-link
 * Inherits from home.css but ensures it stands out in the context of the paragraph.
 */
.subtitle .email-link {
  color: var(--accent-orange);
  text-decoration: none;
  position: relative;
  transition: all var(--transition-fast);
}

.subtitle .email-link::after {
  background-color: var(--accent-orange);
}

.subtitle .email-link:hover {
  background-color: rgba(238, 142, 78, 0.1);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}

/* CONTACT FORM STYLES */

/*
 * .contact-form
 * Provides spacing for the form element.
 * The animation delay ensures it appears after the title and text.
 */
.contact-form {
  width: 100%;
  margin-top: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

/*
 * .form-group
 * A container for a label and its corresponding input field.
 * Manages vertical spacing between form fields.
 */
.form-group {
  margin-bottom: 1.5rem;
}

/*
 * .form-group label
 * Styles for the text labels of each input field.
 */
.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/*
 * .form-group input, .form-group textarea
 * General styling for all text-based input fields and the textarea.
 * Creates a consistent, modern, and minimalist look.
 */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: "Georgia", serif;
  font-size: 1rem;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.3);
  /* Slightly transparent white */
  border: 1px solid rgba(90, 108, 125, 0.2);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

/* Remove default browser appearance */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(238, 142, 78, 0.2);
}

/* Specific styling for the textarea */
.form-group textarea {
  resize: vertical;
  /* Allow users to resize the textarea vertically */
  min-height: 120px;
}

/* SUBMIT BUTTON */

.form-actions {
  margin-top: 3rem;
  display: flex;
  justify-content: flex-start;
}

.submit-btn {
  position: relative;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid rgba(90, 108, 125, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: "Georgia", serif;
  overflow: hidden;
  z-index: 1;
}

.btn-text {
  position: relative;
  z-index: 2;
  transition: color var(--transition-smooth);
}

.btn-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(238, 142, 78, 0.1) 0%,
    rgba(238, 142, 78, 0.2) 50%,
    rgba(238, 142, 78, 0.1) 100%
  );
  transform: translateX(-100%);
  transition: transform var(--transition-smooth);
  z-index: 1;
}

/* SUBMIT BUTTON HOVER EFFECTS */

.submit-btn:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 4px 12px rgba(238, 142, 78, 0.15);
  transform: translateY(-2px);
}

.submit-btn:hover .btn-background {
  transform: translateX(0);
}

.submit-btn:hover .btn-text {
  color: var(--text-primary);
}

/* SUBMIT BUTTON ACTIVE STATE */

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(238, 142, 78, 0.2);
}

/* LOADING STATE */

.submit-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.submit-btn.loading .btn-background {
  transform: translateX(0);
  animation: pulse 2s infinite;
}

/* ALTERNATIVE CONTACT METHODS */

.contact-alternatives {
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.contact-alternatives h3 {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-smooth);
  position: relative;
}

.contact-method:hover {
  background: rgba(238, 142, 78, 0.05);
  transform: translateX(5px);
}

.contact-method::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-orange);
  border-radius: 2px;
  transform: scaleY(0);
  transition: transform var(--transition-smooth);
}

.contact-method:hover::before {
  transform: scaleY(1);
}

.method-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  min-width: 80px;
  font-weight: 500;
}

.method-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: color var(--transition-fast);
  position: relative;
}

.method-link:hover {
  color: var(--accent-orange);
}

.method-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-orange);
  transition: width var(--transition-fast);
}

.method-link:hover::after {
  width: 100%;
}

/* EMAIL LINK STYLING */

.email-link {
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
}

.email-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(238, 142, 78, 0.1);
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
}

.email-link:hover {
  color: var(--accent-orange);
}

.email-link:hover::before {
  opacity: 1;
}

/* RESPONSIVE DESIGN */

@media (max-width: 768px) {
  .contact-container {
    padding: 2rem 1rem;
  }

  .contact-content {
    max-width: 100%;
  }

  .title {
    font-size: 2.5rem;
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
  }

  .subtitle {
    font-size: 1rem;
  }
}
