/* ===== STILURI SPECIFICE PAGINII DE CONTACT ===== */

/* 1. LAYOUT PAGINĂ CONTACT */
.contact-main { 
  max-width: 850px; 
  margin: 40px auto; 
  padding: 20px; 
  flex-grow: 1;
  width: 100%;
}

.contact-intro {
  text-align: center;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}

.contact-intro h1 { 
  font-size: 1.8rem; 
  margin-bottom: 15px; 
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.contact-intro p { 
  color: #ccc; 
  margin-bottom: 0; 
  line-height: 1.6;
  font-size: 1rem;
}

/* STILUL CUTIEI FORMULARULUI */
.contact-form-section { 
  background: rgba(0, 0, 0, 0.92); 
  padding: 50px 45px; 
  border: 1px solid #333; 
  border-radius: 16px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
}

.field-group { 
  display: flex; 
  flex-direction: column; 
  gap: 45px; /* Mărit pentru a lăsa loc mesajelor de eroare */
}

/* 2. INPUT & TEXTAREA */
.input-wrap, .textarea-wrap { 
  position: relative; 
  width: 100%;
}

input, textarea { 
  width: 100%; 
  padding: 16px 14px; 
  border: 1px solid #444; 
  border-radius: 8px; 
  background: #000; 
  color: #fff; 
  outline: none; 
  font-size: 1rem;
  position: relative;
  z-index: 5;
  transition: all 0.2s ease;
}

textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
  padding: 16px 70px 16px 14px;
}

input:focus, textarea:focus { 
  border-color: #0088b3; 
  box-shadow: 0 0 10px rgba(0, 136, 179, 0.2);
}

/* Labels */
.input-wrap label, 
.textarea-wrap .textarea-label { 
  position: absolute; 
  left: 14px; 
  top: 50%; 
  transform: translateY(-50%);
  color: #888; 
  pointer-events: none; 
  transition: all 0.25s ease;
  z-index: 10;
  background: #000; 
  padding: 0 6px;
}

.textarea-wrap .textarea-label {
  top: 24px;
  transform: translateY(-50%);
}

.input-wrap.filled label, .input-wrap.focus label,
.textarea-wrap.filled .textarea-label, .textarea-wrap.focus .textarea-label { 
  top: 0 !important; 
  transform: translateY(-50%) scale(0.85) !important; 
  color: #00b7eb;
  font-weight: 600;
  left: 10px;
}

/* STELUȚĂ ROȘIE PENTRU CÂMPURI OBLIGATORII */
.input-wrap.required label::after,
.textarea-wrap.required .textarea-label::after {
  content: "*";
  color: #ff4d4f;
  margin-left: 4px;
}

/* EROARE INPUT */
.input-wrap.error input, 
.textarea-wrap.error textarea {
  border-color: #ff4d4f !important;
}

/* MESAJ DE EROARE OPTIMIZAT */
.field-error {
  color: #ff4d4f;
  font-size: 0.85rem;
  position: absolute; 
  top: calc(100% + 4px);
  left: 4px;
  width: 100%;
  white-space: normal; /* Permite textului să se întindă pe rânduri noi */
  line-height: 1.2;
  animation: errorFadeIn 0.3s ease-out forwards;
  z-index: 1;
}

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

.word-count { 
  position: absolute; 
  right: 14px; 
  bottom: 14px; 
  color: #666; 
  font-size: 0.85rem; 
  z-index: 15;
  font-weight: 700;
}
.word-count.zero { color: #ff4d4f; }

/* 3. BUTOANE */
.form-actions { 
  display: flex; 
  gap: 12px; 
  justify-content: flex-end; 
  margin-top: 25px;
}

.btn { 
  padding: 12px 24px; 
  border-radius: 6px; 
  border: none; 
  cursor: pointer; 
  font-weight: 700; 
  transition: all 0.2s;
  font-size: 1rem;
}

.btn-blue { background: #007bb3; color: white; }
.btn-grey { background: #333; color: #ccc; }
.btn:hover { opacity: 0.9; transform: translateY(-2px); }

.form-message { margin-top: 15px; font-weight: 600; text-align: center; min-height: 24px; }

/* 4. RESPONSIVE FIXES (MOBIL) */
@media (max-width: 767px) {
  .contact-main { 
    padding: 40px 25px; 
  }
  
  .contact-form-section {
    padding: 30px 20px; 
  }

  .contact-intro h1 { 
    font-size: 1.3rem;
  }
  
  .contact-intro p { 
    font-size: 0.9rem;
  }
  
  .field-group { 
    gap: 35px; /* Ajustat pentru mobil */
  }

  .field-error {
    font-size: 0.75rem;
  }

  .form-actions { 
    flex-direction: column-reverse;
    gap: 10px;
  }

  .btn {
    padding: 14px; 
  }
}
