/* ======================
   Contact Page Styles
   ====================== */

/* Container (assuming you have .container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }) */

/* Form section */
.contact-form-section {
  padding: 1rem 0;
  background: var(--bg-color);
}

.form-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 20px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--border-color);
  animation: fadeUp 0.9s ease-out;
}

.form-header {
  text-align: center;
  margin-bottom: 2.8rem;
}

.form-header h2 {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
}

.form-header p {
  color: var(--muted-text);
  font-size: 1.1rem;
}

/* Floating label form fields */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

.form-field {
  position: relative;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 1.75rem 1.1rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1.05rem;
  background: #fafafa;
  transition: all 0.25s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: white;
}

.form-field label {
  position: absolute;
  left: 1.1rem;
  top: 1.35rem;
  color: var(--muted-text);
  font-size: 1.05rem;
  pointer-events: none;
  transition: all 0.25s ease;
  transform-origin: left top;
}

.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 0.55rem;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

/* Gradient button */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.2rem;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-alt) 100%);
  color: white;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
  width: 100%;
  margin-top: 1.5rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
}

.btn-outline {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--accent);
  color: white;
}

/* Social icons */
.social-links {
  text-align: center;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  margin-top: 1.2rem;
}

.social-icons a {
  font-size: 1.8rem;
  color: var(--muted-text);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: var(--pruble);
  transform: translateY(-4px);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .contact-hero {
    padding: 4rem 0 6rem;
  }

  .contact-hero h1 {
    font-size: 2.6rem;
  }

  .form-wrapper {
    padding: 2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    padding: 0.95rem 1.8rem;
  }
}

/* ======================
   Pure CSS Flash Message
   ====================== */

.flash {
  display: block;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 1rem;
  margin: 1rem 0;
  opacity: 1;
  overflow: hidden;
  animation: flashShowHide 5s forwards;
}

/* Types */
.flash.success {
  background-color: #e6ffed;
  color: #1a7f37;
  border: 1px solid #a0f0b5;
}

.flash.error {
  background-color: #ffe6e6;
  color: #b71c1c;
  border: 1px solid #f5a3a3;
}

/* Animation: تظهر ثم تختفي تمامًا مع إزالة المساحة */
@keyframes flashShowHide {
  0% {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0 1.5rem;
  }
  10% {
    opacity: 1;
    max-height: 100px; /* تقديري يغطي الرسالة */
    margin: 1rem 0;
    padding: 1rem 1.5rem;
  }
  90% {
    opacity: 1;
    max-height: 100px;
    margin: 1rem 0;
    padding: 1rem 1.5rem;
  }
  100% {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0 1.5rem;
  }
}
