/* =========================================================
   MITCHPATH LOGISTIC LLC
   CDL APPLICATION CSS
========================================================= */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.cdl-page {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: #2f2622;
  background: #ffffff;
  position: relative;
  overflow-x: hidden;
}

body.cdl-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: -2;
}

body.cdl-page::after {
  content: "";
  position: fixed;
  top: calc(50% + 80px);
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: url("../assets/mitchpathlogo.png") no-repeat center center;
  background-size: contain;
  opacity: 0.72;
  z-index: -1;
  pointer-events: none;
}

.site-header,
.cdl-main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* ---------- CONTAINER ---------- */
.container {
  width: min(1320px, calc(100% - 60px));
  margin: 0 auto;
}

.cdl-main {
  padding: 40px 0 90px;
}

.app-shell {
  width: min(1320px, calc(100% - 60px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* =========================================================
   HEADER / NAVIGATION
========================================================= */
.site-header {
  position: relative;
  z-index: 20;
  padding: 24px 0 20px;
  background: #ffffff;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: nowrap;
}

.brand-block h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.08;
  font-weight: 800;
  color: #2f2622;
}

.brand-block p {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #5d4b43;
  font-weight: 500;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.site-nav a {
  display: inline-block;
  padding: 8px 0;
  color: #4e3b34;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
  margin-left: 22px;
}

.site-nav a:hover,
.site-nav a.active {
  color: #8a5d47;
}

.site-nav a:hover {
  transform: translateY(-1px);
}

/* =========================================================
   MAIN APPLICATION LAYOUT
========================================================= */
.cdl-main {
  padding: 40px 0 90px;
}

.app-shell {
  width: min(1320px, calc(100% - 60px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sidebar-card,
.step-card,
.form-actions,
.site-footer .container {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(171, 134, 110, 0.14);
  border-radius: 28px;
  box-shadow: 0 10px 24px rgba(91, 62, 49, 0.05);
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar-card {
  padding: 28px 24px;
  min-height: 980px;
}

.step-card {
  padding: 30px 28px;
  margin-bottom: 22px;
  min-height: 680px;
}

.sidebar-logo {
  width: 100%;
  max-width: 160px;
  height: auto;
  display: block;
  margin: 0 auto 18px;
}

.form-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 22px;
  min-height: 118px;
}

.progress-wrap {
  margin-bottom: 22px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #6f4f42;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(185, 125, 98, 0.14);
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-fill {
  width: 10%;
  height: 100%;
  border-radius: 999px;
  background: #8c5a45;
  transition: width 0.25s ease;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding-left: 20px;
}

.step-list li {
  margin-bottom: 10px;
  line-height: 1.5;
  color: #6a564e;
  cursor: pointer;
  font-size: 1rem;
}

.step-list li.active {
  color: #8a5d47;
  font-weight: 700;
}

.step-list li.complete {
  color: #5d4b43;
}

/* =========================================================
   FORM CONTENT
========================================================= */
.app-content {
  min-width: 0;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.step-card {
  padding: 30px 28px;
  margin-bottom: 22px;
  min-height: 680px;
}

.step-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(185, 125, 98, 0.12);
  color: #7a5244;
  font-size: 0.85rem;
  font-weight: 700;
}

.step-card h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.15;
  color: #2f2622;
}

.step-header p {
  margin: 0 0 22px;
  line-height: 1.8;
  color: #5f4d46;
  font-size: 1rem;
  min-height: 58px;
}

.review-box {
  margin-top: 18px;
  padding: 22px 20px;
  border-radius: 22px;
  background: rgba(250, 246, 243, 0.92);
  border: 1px solid rgba(185, 125, 98, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px 20px;
  align-content: start;
  min-height: 360px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  font-weight: 700;
  color: #4e3b34;
  font-size: 1rem;
}

.form-group label span {
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(171, 134, 110, 0.24);
  border-radius: 16px;
  background: #ffffff;
  color: #2f2622;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(140, 90, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(140, 90, 69, 0.10);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.form-group input[readonly] {
  background: rgba(248, 241, 236, 0.85);
}

.check-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.7;
  color: #5f4d46;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.field-error {
  border-color: #b24b4b !important;
  box-shadow: 0 0 0 3px rgba(178, 75, 75, 0.10) !important;
}

/* =========================================================
   FORM ACTIONS
========================================================= */
.form-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 22px;
  min-height: 118px;
}

.form-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
  transition: all 0.25s ease;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.88);
  color: #6f4f42;
  border: 1px solid rgba(185, 125, 98, 0.3);
}

.btn-secondary:hover {
  background: rgba(248, 238, 232, 0.95);
}

.btn-primary {
  background: rgba(255, 255, 255, 0.88);
  color: #6f4f42;
  border: 1px solid rgba(185, 125, 98, 0.3);
}

.btn-primary:hover {
  background: rgba(248, 238, 232, 0.95);
  border-color: rgba(185, 125, 98, 0.3);
  color: #6f4f42;
}

#submitBtn,
#prevBtn {
  display: none;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  padding: 0 0 34px;
}

.site-footer .container {
  padding: 18px 22px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: #5f4d46;
  font-size: 0.96rem;
  line-height: 1.7;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
  }

  .sidebar-card,
  .step-card {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .container,
  .app-shell,
  .site-footer .container {
    width: min(100%, calc(100% - 30px));
  }

  .header-wrap {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .site-nav a {
    margin: 0 9px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  body.cdl-page::after {
    width: 520px;
    height: 520px;
    top: calc(50% + 60px);
  }
}

@media (max-width: 768px) {
  .step-card,
  .sidebar-card,
  .form-actions,
  .site-footer .container {
    padding: 22px 18px;
    border-radius: 22px;
  }

  body.cdl-page::after {
    width: 430px;
    height: 430px;
    top: calc(50% + 60px);
  }
}

@media (max-width: 480px) {
  body.cdl-page::after {
    width: 320px;
    height: 320px;
    top: calc(50% + 50px);
  }

  .brand-block h1 {
    font-size: 1.7rem;
  }

  .brand-block p {
    font-size: 0.92rem;
  }

  .site-nav a {
    font-size: 0.92rem;
    margin: 0 6px;
  }

  .step-card h3 {
    font-size: 1.35rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }
}