footer {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

:root {
  --error-color: #dc3545;
  --success-color: #28a745;
  --error-border-width: 1.5px;
}

.footer-bg {
  position: absolute;
  top: -20%;
  left: 0;
  transform: rotate(180deg);
}

.footer-header {
  width: 100%;
  padding: 25em 1.5em 0 1.5em;
  display: flex;
  justify-content: space-between;
}

.footer-header h1 {
  color: var(--color-text);
  text-transform: uppercase;
  font-family: var(--font-secondary);
  font-size: 9vw;
  margin: 0;
}

.footer-sub-header {
  width: 100%;
  padding: 0 1.5em 1em 1.5em;
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-text);
  margin-bottom: 10em;
}

.footer-sub-header h2 {
  color: var(--color-text);
  text-transform: uppercase;
  font-family: var(--font-secondary);
  font-size: 1.5vw;
  letter-spacing: 0.025em;
  margin: 0;
}

.footer-ctas {
  width: 100%;
  padding: 0.5em 1.5em;
  display: flex;
  justify-content: space-between;
  color: var(--color-text);
}

.footer-cta-icon {
  display: inline-block;
  padding: 1em 1.125em 0.75em 1.125em;
  background: rgba(255, 255, 255, 0.125);
  border-radius: 12px;
  transition: 0.5s;
  cursor: pointer;
}

.footer-cta-icon:hover {
  background: rgba(255, 255, 255, 0.175);
}

.footer-cta-icon ion-icon {
  font-size: 20px;
  transition: 0.3s;
}

.footer-cta-icon:hover ion-icon {
  color: #ff6b00;
}

.footer-copyright {
  width: 100%;
  padding: 0.5em 1.5em 2em 1.5em;
  display: flex;
  justify-content: space-between;
}

.footer-copyright p {
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

  .footer-form {
  width: 100%;
  padding: 0 1.5em;
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

.form-col:nth-child(1) {
  flex: 4;
  width: 100%;
  padding: 0.75em;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-col:nth-child(2) {
  position: relative;
  flex: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to right, #fc002d, #ff6b00);
  border-radius: 8px;
  min-height: 100px;
}

.submit-btn button {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  padding: 2em 3em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-btn button:hover {
  transform: scale(1.02);
}

.submit-btn button:active {
  transform: scale(0.98);
}

.submit-btn h3 {
  font-family: var(--font-secondary);
  font-size: 3vw;
  color: var(--color-text);
  text-transform: uppercase;
  margin: 0;
  pointer-events: none;
  position: relative;
  z-index: 2;
}

.submit-btn button::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;
}

.submit-btn button:hover::before {
  left: 100%;
}

.submit-btn button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.submit-btn button:disabled::before {
  display: none;
}

.submit-btn button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Loading state */
.submit-btn button.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.submit-btn button.loading h3::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Success state */
.submit-btn button.success {
  background: linear-gradient(to right, #28a745, #20c997) !important;
}

.submit-btn button.success h3::after {
  content: ' ✓';
  animation: none;
  border: none;
}

.form-row {
  display: flex;
  gap: 0.75em;
  flex-wrap: wrap;
}

input,
textarea {
  flex: 1;
  border: none;
  outline: none;
  text-transform: uppercase;
  padding: 1em 1em;
  border-radius: 6px;
  transition: border 0.3s, background 0.3s;
  outline: 1.5px solid var(--color-text-secondary);
  background: var(--color-text-secondary);
  font-size: 1rem;
  font-family: inherit;
  color: #222;
}

input::placeholder,
textarea::placeholder {
  color: #666;
  text-transform: none;
}

input:focus,
textarea:focus {
  outline: 2px solid #ff6b00;
  background: #fff;
}

/* Form Validation Styles */
.form-row input.error-field,
.form-row textarea.error-field {
  outline: 1.5px solid #dc3545;
}

.form-row input.success-field,
.form-row textarea.success-field {
  outline: 1.5px solid #28a745;
}


.error-container {
  min-height: 20px; /* Reserve space to prevent layout shift */
}

#contact-form .error-message {
  margin-top: 5px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  font-weight: 400;
  text-transform: none;
}

#contact-form .error-message span {
  color: #dc3545;
}

#contact-form .error-message i {
  color: #dc3545;
  margin-right: 5px;
}




/* Responsive */

@media (max-width: 900px) {
  .footer-sub-header h2 {
    font-size: 3vw;
  }

  .footer-bg {
    top: 0%;
  }

  .footer-header {
    padding: 20em 1.5em 0 1.5em;
  }

  .footer-form {
    flex-direction: column;
  }

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

  .submit-btn {
    padding: 0;
    min-height: 80px;
  }

  .submit-btn button {
    padding: 1.5em 2em;
  }

  .submit-btn h3 {
    font-size: 5vw;
  }

  .footer-copyright {
    padding: 0.5em 1.5em 15em 1.5em;
  }
}

.form-field-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
