/* ══════════════════════════════════════════════════════════════
   AIPA Suite — Contact Page
   Split layout: illustration left, form right
   ══════════════════════════════════════════════════════════════ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Brand / Illustration Panel ── */
.contact-brand-panel {
  background: linear-gradient(160deg, #050d18 0%, #0f1f35 45%, #1e3a5f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.contact-brand-panel::before,
.contact-brand-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.contact-brand-panel::before {
  top: -20%; left: -15%; width: 65%; height: 65%;
  background: radial-gradient(circle, rgba(0,120,212,.12) 0%, transparent 70%);
}
.contact-brand-panel::after {
  bottom: -20%; right: -10%; width: 55%; height: 55%;
  background: radial-gradient(circle, rgba(56,167,255,.08) 0%, transparent 70%);
}

.contact-brand-content {
  position: relative; z-index: 1;
  text-align: center; width: 100%;
  max-width: 420px; padding: 0 20px;
  box-sizing: border-box;
}

.contact-brand-logo {
  display: block;
  height: 92px;
  width: auto;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,.35));
}

.contact-illustration {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 2.5rem;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,.2));
}

.contact-brand-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
  color: #fff;
}

.contact-brand-tagline {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin: 0;
}

/* ── Form Panel ── */
.contact-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem;
  background: #fff;
  position: relative;
}

.contact-form-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  animation: contactFadeIn .45s ease-out;
}
@keyframes contactFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.contact-lang-row {
  position: absolute;
  top: -8px; right: 0;
  display: flex; align-items: center; gap: 4px;
}

.contact-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-500, #6B7280);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color .15s;
}
.contact-back-link:hover {
  color: var(--primary, #0078D4);
}

.contact-form-header {
  margin-bottom: 1.75rem;
}
.contact-form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900, #111827);
  margin-bottom: .25rem;
  letter-spacing: -.02em;
}
.contact-form-header p {
  font-size: .875rem;
  color: var(--gray-500, #6B7280);
  line-height: 1.5;
  margin: 0;
}

/* ── Fields ── */
.contact-field {
  margin-bottom: 14px;
}
.contact-field label {
  display: block;
  font-size: .75rem;
  color: var(--gray-600, #4B5563);
  font-weight: 500;
  margin-bottom: 4px;
}
.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 9px 11px;
  background: #FFF;
  border: 1px solid var(--gray-300, #D1D5DB);
  border-radius: 6px;
  font-size: .85rem;
  color: var(--gray-900, #111827);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--primary, #0078D4);
  box-shadow: none;
}
.contact-field textarea {
  resize: none !important;
  min-height: 90px;
  max-height: 200px;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(0,0,0,.15) transparent !important;
}
.contact-field textarea::-webkit-scrollbar {
  width: 5px !important;
}
.contact-field textarea::-webkit-scrollbar-track {
  background: transparent !important;
}
.contact-field textarea::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.15) !important;
  border-radius: 4px !important;
}
.contact-field textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.25) !important;
}
.contact-field input.input-error,
.contact-field textarea.input-error {
  border-color: var(--red-500, #EF4444);
}
.contact-field input.input-error:focus,
.contact-field textarea.input-error:focus {
  box-shadow: none;
}

.field-error-msg {
  font-size: .72rem;
  color: var(--red-500, #EF4444);
  margin-top: 3px;
  min-height: 0;
}

/* ── Captcha ── */
.contact-captcha {
  margin: 16px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Submit Button ── */
.contact-btn {
  width: 100%;
  padding: 11px 16px;
  background: var(--primary, #0078D4);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.contact-btn:hover {
  background: var(--blue-600, #106EBE);
}
.contact-btn:active {
  transform: scale(.98);
}
.contact-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.contact-btn .spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: contactSpin .6s linear infinite;
}
.contact-btn.loading .btn-text { display: none; }
.contact-btn.loading .spinner { display: inline-block; }
@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

/* ── Error banner ── */
.contact-error {
  background: var(--red-50, #FEF2F2);
  color: var(--red-600, #DC2626);
  border: 1px solid var(--red-100, #FEE2E2);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: .8rem;
  margin-bottom: 14px;
  display: none;
}
.contact-error.visible { display: block; }

/* ── Success state ── */
.contact-success {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: contactFadeIn .45s ease-out;
}
.contact-success svg {
  display: block;
  margin: 0 auto;
}
.contact-success h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900, #111827);
  margin: 1.25rem 0 .5rem;
}
.contact-success p {
  font-size: .9rem;
  color: var(--gray-500, #6B7280);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.contact-success-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary, #0078D4);
  text-decoration: none;
  padding: 10px 28px;
  border-radius: 6px;
  transition: background .15s;
}
.contact-success-link:hover {
  background: var(--blue-600, #106EBE);
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-brand-panel {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .contact-illustration { max-width: 180px; margin-bottom: 1.5rem; }
  .contact-brand-content h1 { font-size: 1.3rem; }
  .contact-brand-tagline { display: none; }
  .contact-form-panel { padding: 2rem 1.25rem; }
}
@media (max-width: 480px) {
  .contact-form-panel { padding: 1.5rem 1rem; }
  .contact-brand-panel { padding: 1.5rem 1rem; }
  .contact-illustration { max-width: 140px; }
}
