/* ═══════════════════════════════════════════════════════
   E-Life Electrical — Contact Page  (contact.css)
   Extends shared styles.css tokens only.
   ═══════════════════════════════════════════════════════ */

/* ── PAGE HERO ───────────────────────────────────────── */
.pg-hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding-top: var(--hdr-h);
  overflow: hidden;
}
.pg-hero__bg { position: absolute; inset: 0; z-index: 0; }
.pg-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.pg-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(10,12,20,.9) 0%, rgba(10,12,20,.72) 55%, rgba(10,12,20,.5) 100%);
}
.pg-hero__body { position: relative; z-index: 2; padding-block: 3rem 3.5rem; }

.breadcrumb ol  { display: flex; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.bc-link        { font-size: .8125rem; font-weight: 500; color: rgba(255,255,255,.5); transition: color var(--ease); }
.bc-link:hover  { color: var(--amber); }
.bc-link:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
.bc-sep         { color: rgba(255,255,255,.3); font-size: .8rem; }
.breadcrumb [aria-current="page"] { font-size: .8125rem; color: rgba(255,255,255,.55); }

.pg-hero__h1 {
  font-family: var(--fnt-display);
  font-size: clamp(2rem, 5vw + .5rem, 3.25rem);
  font-weight: 800; line-height: 1.08;
  color: var(--white); letter-spacing: -.025em; margin-bottom: 1rem;
}
.pg-hero__sub {
  font-size: clamp(.9375rem, 1.5vw + .25rem, 1.0625rem);
  color: rgba(255,255,255,.68); line-height: 1.75; max-width: 560px;
}

/* ════════════════════════════════════════════════════════
   CONTACT LAYOUT
════════════════════════════════════════════════════════ */
.contact-section { padding-block: 4.5rem 5.5rem; background: var(--off); }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

/* ════════════════════════════════════════════════════════
   FORM PANEL
════════════════════════════════════════════════════════ */
.form-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  min-height: 480px;
}

/* ── PROGRESS BAR ──────────────────────────────────── */
.progress-wrap { margin-bottom: 2.25rem; }

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: .875rem;
}
.progress-bar__fill {
  height: 100%;
  background: var(--amber);
  border-radius: 999px;
  transition: width 400ms cubic-bezier(.4,0,.2,1);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.progress-step {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  background: var(--border);
  color: var(--muted);
  transition: background var(--ease), color var(--ease);
}
.progress-step.is-done {
  background: var(--amber);
  color: var(--ink);
}
.progress-step.is-active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 0 0 3px rgba(232,160,32,.3);
}

.progress-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

/* ── STEP LAYOUT ───────────────────────────────────── */
.form-step { animation: stepIn 260ms ease both; }
.form-step.is-hidden { display: none; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .form-step { animation: none; }
}

.step-header {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.step-num {
  font-family: var(--fnt-display);
  font-size: 2rem; font-weight: 800;
  color: var(--amber);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2ch;
}
.step-title {
  font-family: var(--fnt-display);
  font-size: 1.4375rem; font-weight: 700;
  color: var(--ink); line-height: 1.2;
  margin-bottom: .25rem;
}
.step-sub { font-size: .9rem; color: var(--muted); line-height: 1.5; }

/* ── FIELDS ────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1.25rem; }
.field-group:last-of-type { margin-bottom: 0; }

.field-label {
  font-size: .875rem; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: .4rem;
}
.field-optional { font-weight: 400; color: var(--muted); font-size: .8125rem; }
.req { color: var(--amber); }

.field-input {
  width: 100%;
  padding: .7rem 1rem;
  font-family: var(--fnt-body); font-size: .9375rem;
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  min-height: 46px;
  transition: border-color var(--ease), box-shadow var(--ease);
  appearance: none;
}
.field-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,160,32,.18);
}
.field-input.has-error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.field-select-wrap { position: relative; }
.field-select { padding-right: 2.5rem; cursor: pointer; }
.field-select-icon {
  position: absolute; right: .875rem; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--muted);
}

.field-textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

.field-error {
  font-size: .8125rem; font-weight: 500; color: #DC2626;
  min-height: 1.2em; display: block;
}

/* ── RADIO CARDS ───────────────────────────────────── */
.radio-group { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }

.radio-card { cursor: pointer; }
.radio-card input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.radio-card__inner {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .9rem; font-weight: 600; color: var(--muted);
  background: var(--white);
  transition: border-color var(--ease), color var(--ease), background var(--ease), box-shadow var(--ease);
  user-select: none;
  min-height: 44px;
}
.radio-card input:checked + .radio-card__inner {
  border-color: var(--amber);
  color: var(--ink);
  background: var(--amber-pale);
  box-shadow: 0 0 0 3px rgba(232,160,32,.15);
}
.radio-card input:focus-visible + .radio-card__inner {
  outline: 2px solid var(--amber); outline-offset: 2px;
}
.radio-card:hover .radio-card__inner { border-color: var(--ink-light); color: var(--ink); }

/* ── CONSENT ───────────────────────────────────────── */
.consent-label {
  display: flex; align-items: flex-start; gap: .75rem; cursor: pointer;
}
.consent-check {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.consent-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 1.5px solid var(--border); border-radius: 4px;
  background: var(--white); margin-top: .15rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--ease), background var(--ease);
}
.consent-box::after {
  content: '';
  width: 5px; height: 9px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--ease);
}
.consent-check:checked ~ .consent-box {
  background: var(--amber); border-color: var(--amber);
}
.consent-check:checked ~ .consent-box::after { opacity: 1; }
.consent-check:focus-visible ~ .consent-box {
  outline: 2px solid var(--amber); outline-offset: 2px;
}
.consent-text { font-size: .9375rem; color: var(--ink-light); line-height: 1.55; }

/* ── STEP ACTIONS ──────────────────────────────────── */
.step-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: .875rem; margin-top: 2rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.step-actions--end { justify-content: flex-end; }

/* ── REVIEW CARD ───────────────────────────────────── */
.review-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 1rem;
}
.review-row {
  display: flex; gap: .75rem;
  padding: .75rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.review-row:last-child { border-bottom: none; }
.review-row--col { flex-direction: column; gap: .3rem; }
.review-divider { height: 4px; background: var(--off); }
.review-label {
  font-size: .8125rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  min-width: 100px; flex-shrink: 0;
  padding-top: .1em;
}
.review-val { font-size: .9375rem; color: var(--ink); line-height: 1.55; word-break: break-word; }
.review-edit-hint { font-size: .8125rem; color: var(--muted); margin-bottom: 0; font-style: italic; }

/* ── SUCCESS STATE ─────────────────────────────────── */
.form-success {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 2rem 1rem;
  gap: 1.25rem;
  animation: stepIn 400ms ease both;
}
.form-success.is-hidden { display: none; }
.success-icon svg { width: 72px; height: 72px; }
.success-title {
  font-family: var(--fnt-display);
  font-size: 1.5rem; font-weight: 800;
  color: var(--ink); line-height: 1.2;
}
.success-body {
  font-size: 1rem; color: var(--ink-light); line-height: 1.75;
  max-width: 420px;
}
.success-link { color: var(--amber); font-weight: 600; }
.success-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════ */
.contact-sidebar {
  display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: calc(var(--hdr-h) + 1.5rem);
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
}
.sidebar-card--dark {
  background: var(--ink);
  border-color: var(--ink);
}

.sidebar-card__title {
  font-family: var(--fnt-display);
  font-size: .9375rem; font-weight: 700;
  color: var(--ink); margin-bottom: 1rem;
}
.sidebar-card__title--light { color: var(--white); }

/* Phone link */
.sidebar-phone {
  display: flex; align-items: center; gap: .875rem;
  color: var(--ink); text-decoration: none;
  transition: color var(--ease);
}
.sidebar-phone:hover { color: var(--amber); }
.sidebar-phone:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.sidebar-phone__icon {
  width: 44px; height: 44px; min-width: 44px;
  background: var(--amber-pale); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber);
}
.sidebar-phone strong { display: block; font-size: 1.125rem; font-weight: 700; }
.sidebar-phone small  { display: block; font-size: .8rem; color: var(--muted); }

/* Email row */
.sidebar-contact-row {
  display: flex; align-items: center; gap: .6rem;
  font-size: .9375rem; color: var(--ink-light);
  transition: color var(--ease);
}
.sidebar-contact-row:hover { color: var(--amber); }
.sidebar-contact-row:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
.sidebar-contact-row svg { color: var(--amber); flex-shrink: 0; }

/* Address */
.sidebar-addr {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .9375rem; color: var(--ink-light); line-height: 1.65;
}
.sidebar-addr svg { color: var(--amber); flex-shrink: 0; margin-top: .2em; }

/* Why list */
.sidebar-why { display: flex; flex-direction: column; gap: .6rem; }
.sidebar-why__item {
  display: flex; align-items: flex-start; gap: .55rem;
  font-size: .875rem; color: rgba(255,255,255,.72); line-height: 1.5;
}
.sidebar-why__item svg { color: var(--amber); flex-shrink: 0; margin-top: .15em; }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .sidebar-card--dark { grid-column: span 2; }
}

@media (max-width: 768px) {
  .form-panel { padding: 1.75rem 1.25rem; }
  .contact-sidebar { grid-template-columns: 1fr; }
  .sidebar-card--dark { grid-column: auto; }
  .radio-group { gap: .5rem; }
  .step-actions { flex-wrap: wrap; }
  .step-actions .btn-primary { flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
  .step-actions { flex-direction: column-reverse; }
  .step-actions .btn-outline-dark,
  .step-actions .btn-primary { width: 100%; justify-content: center; }
  .step-actions--end { flex-direction: column; }
  .step-actions--end .btn-primary { width: 100%; justify-content: center; }
}