/* contact.css v12 */
:root {
  --primary: #1E3A8A;
  --primary-dark: #1D2C51;
  --primary-light: #E6F1FF;
  --primary-mid: rgba(30,58,138,0.12);
  --foreground: #1f2937;
  --muted: #6b7280;
  --background: #fcfcfc;
  --card: #ffffff;
  --border: #e5e7eb;
  --secondary: #f3f4f6;
  --green: #059669;
  --green-light: #D1FAE5;
  --red: #dc2626;
  --red-light: #fef2f2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--primary-dark), #2563EB);
}

/* ─── Hero ───────────────────────────────────────────────── */
.contact-hero {
  background: linear-gradient(155deg, #0f1e42 0%, var(--primary) 55%, #1a4199 100%);
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 110%, rgba(37,99,235,0.2) 0%, transparent 65%);
  pointer-events: none;
}

.contact-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.contact-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 5px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.contact-hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.contact-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ─── Contact Channels ───────────────────────────────────── */
.contact-channels-section {
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}

.contact-channels-section .container {
  max-width: 1080px;
  margin: 0 auto;
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.channel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.channel-card:hover {
  border-color: #c7d7f5;
  box-shadow: 0 4px 16px rgba(30,58,138,0.07);
}

.channel-card-featured {
  border-color: #c7d7f5;
  background: linear-gradient(160deg, #f0f5ff 0%, #ffffff 60%);
}

.channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.channel-icon-featured {
  background: var(--primary);
}

.channel-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
  stroke-width: 1.75;
}

.channel-icon-featured svg {
  stroke: #fff;
}

.channel-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.channel-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-light);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  width: fit-content;
}

.channel-badge svg {
  stroke: var(--green);
  flex-shrink: 0;
}

/* ─── Contact Layout ─────────────────────────────────────── */
.contact-section {
  padding: 60px 24px 80px;
}

.contact-section .container {
  max-width: 1080px;
  margin: 0 auto;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ─── Form Panel ─────────────────────────────────────────── */
.contact-form-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 40px 40px 36px;
}

.form-panel-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.form-panel-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.form-panel-header p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

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

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

.form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
}

.form-label-optional {
  font-size: 12.5px;
  color: #9ca3af;
  font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14.5px;
  color: var(--foreground);
  background: var(--background);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}

.form-input.input-error,
.form-textarea.input-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

/* Select wrapper */
.select-wrapper {
  position: relative;
  display: block;
}

.select-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
}

/* Field errors */
.field-error {
  font-size: 12.5px;
  color: var(--red);
  display: none;
  align-items: center;
  gap: 5px;
}

.field-error.visible {
  display: flex;
}

/* Checkbox */
.form-consent {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  margin-top: 1px;
  flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input:checked ~ .checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.checkbox-text {
  font-size: 13.5px;
  color: #6b7280;
  line-height: 1.55;
}

.form-link {
  color: var(--primary);
  text-decoration: underline;
}

/* Submit button */
.form-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s, opacity 0.15s;
  margin-top: 4px;
}

.form-submit-btn:hover {
  background: var(--primary-dark);
}

.form-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-submit-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.btn-spinner {
  display: none;
  animation: spin 0.8s linear infinite;
}

.form-submit-btn.loading .btn-icon { display: none; }
.form-submit-btn.loading .btn-spinner { display: block; }

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

/* Success state */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px 36px;
}

.form-success.visible {
  display: flex;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.form-success-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--green);
  stroke-width: 2.2;
}

.form-success-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.form-success-body {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 360px;
  margin-bottom: 24px;
}

.form-success-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 10px 22px;
  border: 1.5px solid #c7d7f5;
  border-radius: 5px;
  transition: background 0.15s, border-color 0.15s;
}

.form-success-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* ─── Sidebar ────────────────────────────────────────────── */
.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Before you write */
.sidebar-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 22px 20px 8px;
}

.sidebar-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 4px;
}

.sidebar-section-body {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.12s;
  border-radius: 5px;
  margin: 0 -4px;
  padding-left: 8px;
  padding-right: 8px;
}

.sidebar-link:first-child {
  border-top: none;
}

.sidebar-link:hover {
  background: var(--secondary);
}

.sidebar-link-icon {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-link-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--primary);
  stroke-width: 1.75;
}

.sidebar-link-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-link-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link-desc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link-arrow {
  width: 14px;
  height: 14px;
  stroke: #d1d5db;
  flex-shrink: 0;
  transition: stroke 0.12s, transform 0.12s;
}

.sidebar-link:hover .sidebar-link-arrow {
  stroke: var(--primary);
  transform: translateX(2px);
}

/* Response times card */
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 20px 20px 16px;
}

.sidebar-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 14px;
}

.sidebar-card-title svg {
  width: 15px;
  height: 15px;
  stroke: #9ca3af;
  flex-shrink: 0;
}

.response-times {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.response-time-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.response-time-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.response-time-label {
  font-size: 13.5px;
  color: var(--muted);
}

.response-time-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .contact-channels {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .channel-card {
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
  }

  .channel-icon {
    margin-bottom: 0;
    margin-top: 2px;
  }

  .channel-body {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-info-panel {
    order: -1;
  }
}

@media (max-width: 640px) {
  .contact-hero { padding: 52px 20px 48px; }
  .contact-hero .container { padding-left: 0; padding-right: 0; }
  .contact-channels-section { padding: 24px 20px; }
  .contact-channels-section .container { padding-left: 0; padding-right: 0; }
  .contact-section { padding: 32px 20px 60px; }
  .contact-section .container { padding-left: 0; padding-right: 0; }
  .contact-form-panel { padding: 20px 20px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .form-panel-header { margin-bottom: 20px; padding-bottom: 16px; }
  .channel-card { padding: 14px; }
  .contact-info-panel { gap: 14px; }
  .sidebar-section { padding: 16px 14px 6px; }
  .sidebar-card { padding: 16px 14px 12px; }
  .form-group { margin-bottom: 14px; }
}
