/* =============================================================
   VextaLearn — Contact Page
   Scope: .ct-* prefix. Reuses .vxt-page-hero from legal-pages.css
   and existing design tokens from main.css (--primary, --card-bg,
   --border, --radius, --shadow, --font-display, --font-body, etc).
   ============================================================= */

.ct-section {
  padding: 56px 0 96px;
}

.ct-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 991.98px) {
  .ct-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Form card ─────────────────────────────────────────────── */
.ct-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
}

@media (max-width: 575.98px) {
  .ct-card { padding: 28px 20px; }
}

.ct-card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.ct-card__hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 28px;
}

.ct-field { margin-bottom: 20px; }

.ct-field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ct-field__input,
.ct-field__textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.ct-field__textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

.ct-field__input::placeholder,
.ct-field__textarea::placeholder { color: var(--text-muted); }

.ct-field__input:focus,
.ct-field__textarea:focus {
  outline: none;
  background: var(--card-bg);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-a12, rgba(109,40,217,0.12));
}

/* Invalid state — only applied after a real validation attempt,
   never on pristine/untouched fields (see contact.js). */
.ct-field.is-invalid .ct-field__input,
.ct-field.is-invalid .ct-field__textarea {
  border-color: var(--danger);
  background: rgba(239,68,68,0.04);
}
.ct-field.is-invalid .ct-field__input:focus,
.ct-field.is-invalid .ct-field__textarea:focus {
  box-shadow: 0 0 0 4px rgba(239,68,68,0.12);
}

.ct-field__error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 7px;
}
.ct-field.is-invalid .ct-field__error { display: flex; }

.ct-field__foot {
  display: flex;
  justify-content: flex-end;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.ct-field__foot.is-near-limit { color: var(--warning); font-weight: 600; }

.ct-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  margin-top: 4px;
}

.ct-submit__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ct-spin 0.7s linear infinite;
}
.ct-submit.is-loading .ct-submit__spinner { display: inline-block; }
.ct-submit.is-loading .ct-submit__label { opacity: 0.85; }
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* ── Inline success state (replaces the form on send) ───────── */
.ct-success {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 12px 0;
}
.ct-success.is-visible { display: flex; animation: ct-rise 0.35s ease both; }
@keyframes ct-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ct-success__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--secondary-light);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.ct-success__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.ct-success__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 22px;
}

.ct-success__reset {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.ct-success__reset:hover { text-decoration: underline; }

/* ── Sidebar: contact channels ───────────────────────────────── */
.ct-channels { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }

.ct-channel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.ct-channel:hover { border-color: var(--primary); transform: translateY(-2px); }

.ct-channel__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.ct-channel__icon--email { background: var(--primary-a10, rgba(109,40,217,0.1)); color: var(--primary); }
.ct-channel__icon--whatsapp { background: rgba(37,211,102,0.1); color: #25D366; }
.ct-channel__icon--location { background: rgba(245,158,11,0.1); color: var(--accent); }

.ct-channel__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.ct-channel__value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Quick answers ────────────────────────────────────────────── */
.ct-faq__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.ct-faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: hidden;
}

.ct-faq__item + .ct-faq__item { border-top: 1px solid var(--border); }

.ct-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.ct-faq__q i { color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
.ct-faq__q[aria-expanded="true"] i { transform: rotate(180deg); color: var(--primary); }

.ct-faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.ct-faq__a p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
