/* ── Contact Page ───────────────────────────────────────────────────── */

/* ── Two-column layout: form left, sidebar right ────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ════════════════════════════════════════════════════════════════════
   FORM WRAPPER
   ════════════════════════════════════════════════════════════════════ */
.form-wrap {
  background: #fff;
  border: 1px solid #e3eef7;
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(30, 68, 111, 0.06);
  padding: 44px 48px;
}

.form-heading {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: 0;
  line-height: 1.1;
}

.form-subheading {
  margin: 0 0 32px;
  color: #6b8aaa;
  font-size: 16px;
  line-height: 1.5;
}

/* ── Grid layout inside the form ────────────────────────────────────── */
#demo-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

/* ── Labels ─────────────────────────────────────────────────────────── */
.form-group label {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-group label .required-star {
  color: #e05252;
  margin-left: 2px;
}

/* ── Inputs, Selects, Textareas ─────────────────────────────────────── */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #d0e3f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: #f8fbfe;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aec4d6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.14);
  background: #fff;
}

.form-group input.is-error,
.form-group select.is-error,
.form-group textarea.is-error {
  border-color: #e05252;
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.10);
  background: #fff;
}

/* Custom select arrow */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23577596' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* ── Field-level error messages ─────────────────────────────────────── */
.field-error {
  color: #e05252;
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
  display: block;
  line-height: 1.3;
}

/* ── Divider between field sections ─────────────────────────────────── */
.form-divider {
  height: 1px;
  background: #e8f0f8;
  border: none;
  margin: 4px 0;
}

/* ── Submit button ──────────────────────────────────────────────────── */
.form-submit {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  border: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  transition: background 0.18s, transform 0.1s, box-shadow 0.18s;
  box-shadow: 0 6px 20px rgba(30, 68, 111, 0.22);
}

.form-submit:hover:not(:disabled) {
  background: #060d4f;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.28);
}

.form-submit:active:not(:disabled) {
  transform: scale(0.985);
}

.form-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Loading spinner ────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Privacy note below button ──────────────────────────────────────── */
.form-note {
  margin: 0;
  color: #8aabC2;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.form-note a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Error banner (submission failure) ──────────────────────────────── */
.form-error-banner {
  color: #c0392b;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 18px;
  background: #fff5f5;
  border: 1px solid #facccc;
  border-radius: 10px;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════════
   SUCCESS STATE
   ════════════════════════════════════════════════════════════════════ */

/* Ensure [hidden] attribute always wins over display:flex/grid rules */
[hidden] { display: none !important; }

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 32px;
  gap: 18px;
  min-height: 320px;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #12baf8 0%, #8b35ef 55%, #ff4b78 100%);
  color: #fff;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 6px 24px rgba(26, 154, 82, 0.18);
}

.form-success h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1.15;
}

.form-success p {
  margin: 0;
  color: #5b7897;
  font-size: 17px;
  max-width: 380px;
  line-height: 1.65;
}

/* ════════════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════════════ */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Contact info card ──────────────────────────────────────────────── */
.contact-info-card {
  background: #fff;
  border: 1px solid #e3eef7;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(30, 68, 111, 0.06);
  padding: 28px 28px 24px;
}

.contact-info-card h3 {
  margin: 0 0 20px;
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1a84bc;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}

.contact-link:hover {
  color: var(--navy);
}

.contact-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #edf6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.contact-link:hover .contact-icon-wrap {
  background: #d8edf9;
}

.contact-info-card > p {
  margin: 0;
  color: #7a97b3;
  font-size: 14px;
  line-height: 1.65;
  border-top: 1px solid #edf4fb;
  padding-top: 16px;
}

/* ── Topics card ────────────────────────────────────────────────────── */
.contact-topics-card {
  background: #f5faff;
  border: 1px solid #daeaf8;
  border-radius: 20px;
  padding: 26px 28px;
}

.contact-topics-card h3 {
  margin: 0 0 16px;
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-topics-card .bullet-list {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.contact-topics-card .bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4d6e8a;
  font-size: 15px;
  line-height: 1.5;
}

.contact-topics-card .bullet-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 7px;
  flex-shrink: 0;
}

/* ── Trust stats card ───────────────────────────────────────────────── */
.trust-card {
  background: var(--brand-gradient);
  border-radius: 20px;
  padding: 26px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  text-align: center;
  border: none;
  box-shadow: 0 8px 28px rgba(20, 60, 110, 0.28);
}

.trust-stat {
  padding: 0 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.trust-stat:last-child {
  border-right: none;
}

.trust-stat strong {
  display: block;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.trust-stat span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.trust-card--checklist {
  grid-template-columns: 1fr;
  text-align: left;
  padding: 26px;
}

.trust-card--checklist .trust-stat {
  padding: 0 0 16px;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.trust-card--checklist .trust-stat:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.trust-card--checklist .trust-stat strong {
  font-size: 20px;
}

.trust-card--checklist .trust-stat span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .contact-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
  }

  .contact-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .trust-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .form-wrap {
    padding: 28px 20px;
  }

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

  .contact-sidebar {
    grid-template-columns: 1fr;
  }

  .trust-card {
    grid-column: auto;
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-stat strong {
    font-size: 22px;
  }
}
