/* Resource library redesign — loaded only on /resources */

.resources-page {
  background: #fff;
}

.resources-page [hidden] {
  display: none !important;
}

.resource-library {
  --resource-blue: #234470;
  --resource-blue-soft: #eaf0f7;
  --resource-gold: #c9a227;
  --resource-green: #19634a;
  --resource-green-soft: #e8f4ef;
  --resource-orange: #9a4c16;
  --resource-orange-soft: #fff0e5;
  --resource-line: #dce3ea;
  --resource-ink: #142033;
  --resource-muted: #56657a;
}

.resource-library a:focus-visible,
.resource-library button:focus-visible,
.resource-library input:focus-visible {
  outline: 3px solid var(--resource-gold);
  outline-offset: 3px;
}

.resource-hero-v2 {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--resource-line);
  background:
    radial-gradient(circle at 86% 16%, rgba(201, 162, 39, .18), transparent 28rem),
    radial-gradient(circle at 8% 86%, rgba(35, 68, 112, .12), transparent 32rem),
    linear-gradient(135deg, #f8f4ed 0%, #fff 58%, #f3f7fb 100%);
}

.resource-hero-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(rgba(26, 43, 64, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 43, 64, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to left, #000, transparent 75%);
}

.resource-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 56px;
  align-items: center;
  padding-block: 64px 72px;
}

.resource-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--resource-muted);
  font-size: .82rem;
}

.resource-breadcrumbs a {
  color: var(--resource-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--resource-blue);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.resource-kicker::before {
  content: '';
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--resource-gold);
}

.resource-hero-copy h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -.035em;
}

.resource-hero-copy > p {
  max-width: 760px;
  margin-bottom: 26px;
  color: var(--resource-muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.72;
}

.resource-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(35, 68, 112, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: var(--resource-ink);
  font-size: .83rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.resource-stat strong {
  color: var(--resource-blue);
}

.resource-hero-panel {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 24px 60px rgba(15, 29, 46, .22);
}

.resource-hero-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 30px;
  width: 52px;
  height: 10px;
  border-radius: 6px 6px 0 0;
  background: var(--resource-gold);
}

.resource-hero-panel .panel-label {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.resource-hero-panel h2 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.55rem;
}

.resource-hero-panel > p {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .72);
  font-size: .92rem;
  line-height: 1.65;
}

.resource-panel-links {
  display: grid;
  gap: 10px;
}

.resource-panel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  transition: background .18s, transform .18s, border-color .18s;
}

.resource-panel-link:hover {
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .12);
}

.resource-panel-link span:last-child {
  color: var(--resource-gold);
  font-size: 1.1rem;
}

.resource-section {
  padding-block: 76px;
}

.resource-section-alt {
  border-block: 1px solid var(--resource-line);
  background: #f7f9fb;
}

.resource-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.resource-section-head > div {
  max-width: 720px;
}

.resource-section-head h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
}

.resource-section-head p {
  margin: 0;
  color: var(--resource-muted);
  line-height: 1.7;
}

.resource-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.resource-path {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--resource-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 32, 51, .06);
}

.resource-path::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--resource-blue);
}

.resource-path.trucking::after {
  background: var(--resource-green);
}

.resource-path-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.resource-path-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 14px;
  background: var(--resource-blue-soft);
  color: var(--resource-blue);
}

.resource-path.trucking .resource-path-icon {
  background: var(--resource-green-soft);
  color: var(--resource-green);
}

.resource-path-icon svg {
  width: 26px;
  height: 26px;
}

.resource-path-top h3 {
  margin: 0 0 3px;
  font-size: 1.28rem;
}

.resource-path-top p {
  margin: 0;
  color: var(--resource-muted);
  font-size: .88rem;
}

.resource-path ol {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: path-step;
}

.resource-path li {
  counter-increment: path-step;
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  min-height: 58px;
  padding: 9px 0;
}

.resource-path li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 42px;
  bottom: -8px;
  left: 16px;
  width: 2px;
  background: var(--resource-line);
}

.resource-path li::before {
  content: counter(path-step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c9d5e3;
  border-radius: 50%;
  background: #fff;
  color: var(--resource-blue);
  font-size: .8rem;
  font-weight: 800;
  z-index: 1;
}

.resource-path.trucking li::before {
  border-color: #bfd9cf;
  color: var(--resource-green);
}

.resource-path li a {
  display: block;
  padding-top: 4px;
  color: var(--resource-ink);
  font-weight: 750;
  line-height: 1.4;
}

.resource-path li a:hover {
  color: var(--resource-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-path.trucking li a:hover {
  color: var(--resource-green);
}

.resource-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.featured-guide {
  position: relative;
  display: flex;
  min-height: 245px;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--resource-line);
  border-radius: 16px;
  background: #fff;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.featured-guide::after {
  content: '';
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--resource-blue-soft);
  transition: transform .25s;
}

.featured-guide[data-kind='trucking']::after {
  background: var(--resource-green-soft);
}

.featured-guide:hover {
  transform: translateY(-4px);
  border-color: #b8c7d8;
  box-shadow: 0 16px 36px rgba(20, 32, 51, .11);
}

.featured-guide:hover::after {
  transform: scale(1.12);
}

.featured-guide .featured-label {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
  color: var(--resource-blue);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.featured-guide[data-kind='trucking'] .featured-label {
  color: var(--resource-green);
}

.featured-guide h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  font-size: 1.14rem;
  line-height: 1.35;
}

.featured-guide p {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  color: var(--resource-muted);
  font-size: .88rem;
  line-height: 1.6;
}

.featured-guide .featured-link {
  position: relative;
  z-index: 1;
  margin-top: auto;
  color: var(--resource-blue);
  font-size: .86rem;
  font-weight: 800;
}

.featured-guide[data-kind='trucking'] .featured-link {
  color: var(--resource-green);
}

.guide-tools-wrap {
  position: sticky;
  top: 73px;
  z-index: 80;
  border-bottom: 1px solid var(--resource-line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(20, 32, 51, .05);
  backdrop-filter: blur(14px);
}

.guide-tools {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: center;
  padding-block: 18px;
}

.guide-search-label {
  display: block;
  margin: 0 0 7px;
  color: var(--resource-ink);
  font-size: .76rem;
  font-weight: 800;
}

.guide-search-box {
  position: relative;
}

.guide-search-box svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 19px;
  height: 19px;
  color: var(--resource-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.guide-search-box input {
  min-height: 48px;
  margin: 0;
  padding: 11px 48px 11px 43px;
  border: 1px solid #cbd5df;
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
}

.guide-search-box input::placeholder {
  color: #7a8798;
}

.guide-search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--resource-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.guide-search-clear:hover {
  background: #eef2f6;
  color: var(--resource-ink);
}

.guide-filter-block {
  min-width: 0;
}

.guide-filter-label {
  margin: 0 0 7px;
  color: var(--resource-ink);
  font-size: .76rem;
  font-weight: 800;
}

.guide-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 2px 5px;
  scrollbar-width: thin;
}

.guide-filter {
  flex: 0 0 auto;
  min-height: 43px;
  padding: 9px 14px;
  border: 1px solid #cbd5df;
  border-radius: 999px;
  background: #fff;
  color: var(--resource-muted);
  font: inherit;
  font-size: .84rem;
  font-weight: 750;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.guide-filter:hover {
  border-color: var(--resource-blue);
  color: var(--resource-blue);
}

.guide-filter[aria-pressed='true'] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.guide-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.guide-results-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.guide-result-count {
  margin: 0;
  color: var(--resource-muted);
  font-size: .9rem;
  font-weight: 700;
}

.guide-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--resource-line);
}

.guide-jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 9px;
  background: #eef2f6;
  color: var(--resource-blue);
  font-size: .8rem;
  font-weight: 750;
}

.guide-jump-nav a:hover {
  background: var(--resource-blue);
  color: #fff;
}

.guide-category-band {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 56px 0 30px;
  color: var(--resource-blue);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.guide-category-band:first-of-type {
  margin-top: 0;
}

.guide-category-band::before,
.guide-category-band::after {
  content: '';
  height: 1px;
  background: var(--resource-line);
}

.guide-category-band::before {
  width: 34px;
  flex: 0 0 34px;
  background: var(--resource-gold);
}

.guide-category-band::after {
  flex: 1;
}

.guide-topic {
  scroll-margin-top: 190px;
  margin-bottom: 52px;
}

.guide-topic-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.guide-topic-head h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

.guide-count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--resource-blue-soft);
  color: var(--resource-blue);
  font-size: .76rem;
  font-weight: 850;
}

.guide-topic[data-group='trucking'] .guide-count {
  background: var(--resource-green-soft);
  color: var(--resource-green);
}

.guide-topic-desc {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--resource-muted);
  font-size: .94rem;
  line-height: 1.65;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  position: relative;
  display: flex;
  min-height: 238px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--resource-line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}

.guide-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--resource-blue);
  opacity: 0;
  transition: opacity .18s;
}

.guide-card[data-group='trucking']::before {
  background: var(--resource-green);
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: #b8c7d8;
  box-shadow: 0 14px 30px rgba(20, 32, 51, .09);
}

.guide-card:hover::before {
  opacity: 1;
}

.guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.guide-symbol {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 38px;
  padding-inline: 9px;
  border-radius: 10px;
  background: var(--resource-blue-soft);
  color: var(--resource-blue);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.guide-card[data-group='trucking'] .guide-symbol {
  background: var(--resource-green-soft);
  color: var(--resource-green);
}

.guide-type {
  color: var(--resource-muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.guide-card h4 {
  margin-bottom: 10px;
  color: var(--resource-ink);
  font-size: 1.06rem;
  line-height: 1.4;
}

.guide-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 18px;
  color: var(--resource-muted);
  font-size: .88rem;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.guide-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #edf1f4;
  color: var(--resource-blue);
  font-size: .82rem;
  font-weight: 850;
}

.guide-card[data-group='trucking'] .guide-card-link {
  color: var(--resource-green);
}

.guide-empty {
  padding: 42px 24px;
  border: 1px dashed #bdc9d6;
  border-radius: 16px;
  background: #f8fafc;
  text-align: center;
}

.guide-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--resource-blue-soft);
  color: var(--resource-blue);
}

.guide-empty h3 {
  margin-bottom: 7px;
  font-size: 1.2rem;
}

.guide-empty p {
  margin-bottom: 16px;
  color: var(--resource-muted);
}

.guide-empty button {
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
}

.resource-blog-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--resource-line);
  border-radius: 18px;
  background:
    linear-gradient(120deg, rgba(35, 68, 112, .06), rgba(25, 99, 74, .06)),
    #fff;
}

.resource-blog-cta h2 {
  margin-bottom: 8px;
  font-size: 1.65rem;
}

.resource-blog-cta p {
  max-width: 720px;
  margin: 0;
  color: var(--resource-muted);
}

.resource-blog-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
}

.resource-blog-cta a:hover {
  background: var(--resource-blue);
}

@media (max-width: 1050px) {
  .resource-hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .resource-hero-panel {
    max-width: 700px;
  }

  .resource-featured-grid,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .resource-section {
    padding-block: 60px;
  }

  .resource-path-grid,
  .guide-tools {
    grid-template-columns: 1fr;
  }

  .guide-tools-wrap {
    position: static;
  }

  .resource-blog-cta {
    grid-template-columns: 1fr;
  }

  .resource-blog-cta a {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .resource-hero-grid {
    padding-block: 46px 54px;
  }

  .resource-hero-copy h1 {
    font-size: clamp(2.15rem, 12vw, 3.05rem);
  }

  .resource-hero-panel,
  .resource-path {
    padding: 23px 20px;
  }

  .resource-section-head,
  .guide-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-featured-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .featured-guide,
  .guide-card {
    min-height: 0;
  }

  .guide-jump-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 14px;
  }

  .guide-jump-nav a {
    flex: 0 0 auto;
  }

  .resource-blog-cta {
    padding: 25px 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-library *,
  .resource-library *::before,
  .resource-library *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
