/* =========================================================
   BLOG.CSS — Transport360 Resources page
   Reuses tokens, type scale and card language from style.css
   (--white, --tint, --tint-2, --ink, --navy, --navy-deep, --blue,
   --blue-600, --sky, --muted, --muted-2, --line, --green, --amber,
   --shadow-sm, --shadow-md, --shadow-lg, --r, --r-lg, --maxw)
   ========================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================= BLOG HERO ================= */
.blog-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 460px at 82% -10%, #E7EEFF 0%, rgba(231, 238, 255, 0) 60%),
    radial-gradient(820px 460px at 4% 0%, #F0F5FF 0%, rgba(240, 245, 255, 0) 55%),
    var(--white);
  padding: 60px 0 12px;
  border-bottom: 1px solid var(--line);
}

.blog-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
  max-width: 760px;
  margin: 0 auto 18px;
}

.blog-hero .lead {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ================= FEATURED ARTICLE ================= */
.featured-section {
  padding-top: 52px;
  padding-bottom: 40px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d6fb;
}

.featured-media {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.featured-card:hover .featured-media img {
  transform: scale(1.045);
}

.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 27, 68, 0) 55%, rgba(7, 27, 68, .28) 100%);
  pointer-events: none;
}

.featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
  gap: 14px;
}

.featured-body h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.86rem);
  line-height: 1.28;
}

.featured-body p {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
}

.featured-body .blog-link {
  margin-top: 6px;
  padding-top: 0;
}

/* ================= CATEGORY FILTER ================= */
.filter-section {
  padding: 6px 0 8px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex: none;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .84rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: .18s ease;
  white-space: nowrap;
}

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

.filter-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px -10px rgba(29, 90, 240, .55);
}

.filter-pill:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

/* ================= ARTICLES GRID ================= */
.articles-section {
  padding-top: 30px;
}

.all-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.all-articles .blog-card {
  min-height: 0;
  padding: 0;
  display: block;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}

.all-articles .blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d6fb;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  text-decoration: none;
  color: inherit;
}

.card-link .blog-media {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  margin: -24px -24px 22px;
  isolation: isolate;
}

.card-link .blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.all-articles .blog-card:hover .blog-media img {
  transform: scale(1.05);
}

.card-link .blog-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 27, 68, 0) 50%, rgba(7, 27, 68, .3) 100%);
  pointer-events: none;
}

.card-link h3 {
  font-size: 1.1rem;
  line-height: 1.32;
  margin: 4px 0 10px;
}

.card-link p {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.62;
}

.card-link .blog-link {
  margin-top: auto;
  padding-top: 20px;
}

/* shared meta + link style (works for cards and featured) */
.blog-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted-2);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.blog-meta .category {
  color: var(--blue);
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-family: 'Sora', sans-serif;
  font-size: .82rem;
  font-weight: 700;
}

.blog-link span {
  color: var(--blue);
  transition: transform .2s ease;
}

.all-articles .blog-card:hover .blog-link span,
.featured-card:hover .blog-link span {
  transform: translateX(4px);
}

.no-results {
  text-align: center;
  color: var(--muted-2);
  font-size: .94rem;
  padding: 46px 0 6px;
}

/* ================= PAGINATION ================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.page-btn,
.page-num {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .86rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: .18s ease;
}

.page-btn {
  padding: 10px 18px;
}

.page-num {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.page-btn:hover:not(:disabled),
.page-num:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.page-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.page-num.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ================= NEWSLETTER ================= */
.newsletter {
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 44px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(460px 240px at 90% -20%, rgba(59, 130, 246, .28), transparent 60%);
  pointer-events: none;
}

.newsletter-copy {
  position: relative;
  max-width: 420px;
}

.newsletter-copy h2 {
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.newsletter-copy p {
  color: #c3d1f5;
  font-size: .92rem;
  line-height: 1.6;
}

.newsletter-form {
  position: relative;
  display: flex;
  gap: 10px;
  flex: none;
  width: 100%;
  max-width: 420px;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 13px 18px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
}

.newsletter-form input::placeholder {
  color: #9fb0d4;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--sky);
  background: rgba(255, 255, 255, .12);
}

.newsletter-form .btn {
  flex: none;
}

/* ================= RESPONSIVE ================= */
@media(max-width:960px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 240px;
  }

  .featured-body {
    padding: 30px 28px;
  }

  .all-articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:760px) {
  .blog-hero {
    padding: 44px 0 10px;
  }

  .featured-section {
    padding-top: 36px;
  }

  .newsletter {
    padding: 34px 26px;
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form {
    max-width: none;
  }
}

@media(max-width:520px) {
  .all-articles {
    grid-template-columns: 1fr;
  }

  .featured-body {
    padding: 24px 20px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
    justify-content: center;
  }

  .pagination {
    gap: 6px;
  }
}

@media(prefers-reduced-motion:reduce) {

  .featured-card,
  .all-articles .blog-card,
  .featured-media img,
  .blog-link span {
    transition: none !important;
  }
}


/* =========================================================
   BLOG-DETAIL.CSS — Transport360 article page
   Extends tokens + card language from style.css / blog.css
   (--white, --tint, --tint-2, --ink, --navy, --navy-deep, --blue,
   --blue-600, --sky, --muted, --muted-2, --line, --green, --amber,
   --shadow-sm, --shadow-md, --shadow-lg, --r, --r-lg, --maxw)
   ========================================================= */

/* ================= ARTICLE HERO ================= */
.article-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 460px at 82% -10%, #E7EEFF 0%, rgba(231, 238, 255, 0) 60%),
    radial-gradient(820px 460px at 4% 0%, #F0F5FF 0%, rgba(240, 245, 255, 0) 55%),
    var(--white);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--line);
}

.article-hero-inner {
  max-width: 860px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: 26px;
  transition: color .15s;
}

.back-link:hover {
  color: var(--blue);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2);
  margin-bottom: 18px;
}

.article-meta-top .category {
  color: var(--blue);
}

.article-meta-top .dot-sep {
  color: var(--line);
}

.article-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 18px;
  max-width: 800px;
}

.article-excerpt {
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 26px;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.byline-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: -.02em;
}

.byline-name {
  display: block;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
}

.byline-date {
  display: block;
  font-size: .8rem;
  color: var(--muted-2);
}

/* ================= FEATURED COVER IMAGE ================= */
.article-cover {
  padding: 40px 0 0;
}

.article-cover .wrap {
  max-width: 980px;
}

.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/8.5;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

/* ================= ARTICLE LAYOUT ================= */
.article-layout-section {
  padding-top: 52px;
}

.article-layout {
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
  /* grid-template-columns: 1fr 280px; */
  /* gap: 56px; */
}

/* ---- Main content ---- */
.article-content {
  max-width: 780px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #33415c;
  width: 100%;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
  margin: 44px 0 16px;
  scroll-margin-top: 96px;
}

.article-content h3 {
  font-size: 1.14rem;
  line-height: 1.35;
  color: var(--navy);
  margin: 28px 0 12px;
  scroll-margin-top: 96px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.article-content li {
  margin-bottom: 9px;
  padding-left: 4px;
}

.article-content ul {
  list-style: none;
  padding-left: 0;
}

.article-content ul li {
  position: relative;
  padding-left: 26px;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.article-content ol {
  counter-reset: alist;
  list-style: none;
  padding-left: 0;
}

.article-content ol li {
  position: relative;
  padding-left: 32px;
  counter-increment: alist;
}

.article-content ol li::before {
  content: counter(alist);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--tint);
  color: var(--blue);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .74rem;
  display: grid;
  place-items: center;
}

.article-content strong {
  color: var(--ink);
  font-weight: 700;
}

.article-content blockquote {
  margin: 26px 0;
  padding: 20px 24px;
  background: var(--tint-2);
  border-left: 4px solid var(--blue);
  border-radius: 0 14px 14px 0;
  color: var(--navy);
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
}

.article-content .callout {
  margin: 26px 0;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.article-content .callout p:last-child {
  margin-bottom: 0;
}

.article-content .formula {
  display: block;
  margin: 22px 0;
  padding: 18px 22px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .96rem;
  text-align: center;
  letter-spacing: .01em;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 26px;
  font-size: .92rem;
}

.article-content th,
.article-content td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.article-content th {
  font-family: 'Sora', sans-serif;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted-2);
  font-weight: 700;
}

.article-content td {
  color: #33415c;
}

/* ---- Sidebar ---- */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.toc-card,
.share-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 450px;
  margin-top: 1em !important;
}

.toc-title,
.share-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.toc-list {
  list-style: none;
}

.toc-list li {
  margin-bottom: 2px;
}

.toc-list a {
  display: block;
  font-size: .86rem;
  line-height: 1.4;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  transition: .15s;
}

.toc-list a:hover {
  background: var(--tint);
  color: var(--navy);
}

.toc-list a.active {
  color: var(--blue);
  font-weight: 600;
  border-left-color: var(--blue);
  background: var(--tint);
}

.share-actions {
  display: flex;
  gap: 8px;
  /* flex-direction: column; */
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: .86rem;
  color: var(--navy);
  background: var(--tint-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: .15s;
  text-align: left;
}

.share-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--tint);
}

.share-btn:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.share-btn svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.copy-feedback {
  margin-top: 10px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--green);
}

/* ================= RELATED ARTICLES ================= */
.related-section {
  padding-top: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.related-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c7d6fb;
}

.related-link {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.related-media {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  margin: -20px -20px 18px;
  isolation: isolate;
}

.related-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.related-card:hover .related-media img {
  transform: scale(1.05);
}

.related-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 27, 68, 0) 55%, rgba(7, 27, 68, .28) 100%);
  pointer-events: none;
}

.related-card h3 {
  font-size: 1rem;
  line-height: 1.32;
  margin-top: 10px;
}

/* ================= RESPONSIVE ================= */
@media(max-width:960px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .toc-card,
  .share-card {
    flex: 1;
    min-width: 260px;
  }

  .article-content {
    max-width: none;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:760px) {
  .article-hero {
    padding: 38px 0 30px;
  }

  .article-cover {
    padding-top: 30px;
  }

  .article-cover img {
    border-radius: 18px;
    aspect-ratio: 4/3;
  }

  .article-layout-section {
    padding-top: 40px;
  }

  .article-sidebar {
    flex-direction: column;
  }
}

@media(max-width:520px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-content h2 {
    font-size: 1.3rem;
  }

  .share-actions {
    flex-direction: column;
  }
}

@media(prefers-reduced-motion:reduce) {

  .related-card,
  .related-media img {
    transition: none !important;
  }
}


