/* Responsive guardrails for the primary navigation and workflow cards. */

/* The full desktop navigation no longer fits comfortably below this width. */
@media (min-width: 981px) and (max-width: 1180px) {
  html body .site-header .header-inner {
    min-height: 72px;
    gap: 12px;
  }

  html body .site-header .brand {
    min-width: 0;
    flex: 0 1 auto;
  }

  html body .site-header .header-actions {
    margin-left: auto;
    gap: 8px;
  }

  html body .site-header :is(.header-phone, .header-cta) {
    display: none !important;
  }

  html body .site-header .mobile-menu-toggle {
    display: inline-grid !important;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    cursor: pointer;
  }

  html body .site-header .main-nav {
    position: fixed !important;
    top: 72px !important;
    right: var(--gutter) !important;
    left: var(--gutter) !important;
    display: grid !important;
    width: auto !important;
    max-height: calc(100dvh - 92px);
    padding: 12px !important;
    overflow-y: auto;
    gap: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(17, 31, 42, 0.97) !important;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(20px) saturate(128%);
    -webkit-backdrop-filter: blur(20px) saturate(128%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
    visibility: hidden;
  }

  html body .site-header.is-menu-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  html body .site-header .main-nav > .nav-link,
  html body .site-header .main-nav > .nav-dropdown > .nav-link-trigger {
    width: 100%;
    min-height: 52px !important;
    justify-content: space-between;
    padding: 0 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: #f7f3ec !important;
  }

  html body .site-header .nav-dropdown {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html body .site-header .nav-dropdown-menu {
    position: static !important;
    display: none !important;
    width: 100% !important;
    padding: 8px !important;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.17) !important;
    border-radius: 6px !important;
    background: rgba(245, 243, 239, 0.98) !important;
    box-shadow: 0 16px 34px rgba(5, 12, 17, 0.2) !important;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  html body .site-header .nav-dropdown.is-open .nav-dropdown-menu {
    display: grid !important;
  }

  html body .site-header .nav-dropdown-menu a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 10px 12px !important;
    border: 1px solid rgba(38, 61, 78, 0.28) !important;
    border-radius: 5px !important;
    background: #fbfaf7 !important;
    color: #26343e !important;
  }

  html body .site-header .main-nav :is(.mobile-contact-actions, .mobile-nav-cta) {
    display: grid;
  }

  html body .site-header .main-nav .mobile-contact-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html body .site-header .main-nav .mobile-nav-cta {
    width: 100%;
    margin-top: 0;
  }
}

/* Give every workflow title a real text column and allow natural wrapping. */
html body #workflow :is(
  .workflow-track,
  .workflow-step,
  .workflow-step-copy,
  .workflow-step-heading,
  .workflow-step-title
) {
  min-width: 0;
}

html body #workflow .workflow-step-title,
html body #workflow .workflow-step p {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

html body #workflow .workflow-step:nth-child(n) .workflow-step-title {
  font: normal 600 1.2rem/1.14 Georgia, "Times New Roman", serif !important;
}


@media (min-width: 981px) and (max-width: 1180px) {
  html body #workflow .workflow-track {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    overflow: visible !important;
  }

  html body #workflow .workflow-step,
  html body #workflow .workflow-step:nth-last-child(-n + 2),
  html body #workflow .workflow-step:last-child:nth-child(odd) {
    width: auto !important;
    grid-column: auto !important;
    margin: 0 !important;
  }
}

@media (min-width: 681px) and (max-width: 980px) {
  html body #workflow .workflow-track {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    overflow: visible !important;
  }

  html body #workflow .workflow-step,
  html body #workflow .workflow-step:nth-child(n) {
    --workflow-step-offset: 0px !important;
    width: auto !important;
    grid-column: auto !important;
    margin: 0 !important;
  }
}

@media (max-width: 680px) {
  html body .site-header .main-nav {
    gap: 6px;
    padding: 12px !important;
  }

  html body .site-header .mobile-contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 14px;
  }

  html body .site-header .mobile-contact-label {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: rgba(247, 243, 236, 0.68) !important;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  html body .site-header .mobile-contact-action {
    min-width: 0;
    min-height: 48px;
    gap: 8px;
    padding: 10px 12px;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    color: #f7f3ec !important;
    font-size: clamp(0.76rem, 3.4vw, 0.86rem);
    letter-spacing: 0.015em;
    white-space: nowrap;
  }

  html body .site-header .mobile-contact-action:first-of-type {
    grid-column: 1 / -1;
  }

  html body .site-header .mobile-contact-action :is(.material-symbols-outlined, .mobile-contact-brand-icon) {
    flex: 0 0 auto;
  }

  html body .site-header .mobile-nav-cta {
    min-height: 50px;
    margin-top: 6px !important;
    letter-spacing: 0.055em;
  }

  html body #workflow .workflow-step-heading {
    grid-template-columns: clamp(34px, 10vw, 44px) minmax(0, 1fr) !important;
  }
}
