/* =============================================================
   NGL FreightMate — Blog
   Extends the main site design system: #04081f navy ground,
   #3879f4 blue, #72ecc9 teal, Geist throughout.
   ============================================================= */

:root {
    --b-bg:      #04081f;
    --b-bg-alt:  #0a1029;
    --b-card:    #0d1430;
    --b-line:    rgba(255, 255, 255, .09);
    --b-line-2:  rgba(255, 255, 255, .16);
    --b-text:    #aeb6cc;
    --b-head:    #f2f5fa;
    --b-blue:    #3879f4;
    --b-teal:    #72ecc9;
}

body.blog-body {
    background: var(--b-bg);
    color: var(--b-text);
    font-family: "Geist", sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.blog-body .container { max-width: 1100px; }

/* =============================================================
   Navigation
   ============================================================= */

.blog-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(4, 8, 31, .93);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    border-bottom: 1px solid var(--b-line);
}
.blog-nav .container {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 66px;
}
.bn-logo img { height: 27px; width: auto; display: block; }

.bn-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}
.bn-links a {
    color: var(--b-text);
    text-decoration: none;
    font-size: 14.5px;
    transition: color .15s ease;
    white-space: nowrap;
}
.bn-links a:hover { color: #fff; }

.bn-cta {
    background: #ff7a2f;
    color: #fff !important;
    padding: 8px 17px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 14px !important;
}
.bn-cta:hover { background: #f06a20; }

.bn-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
    flex-direction: column;
    gap: 4px;
}
.bn-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
}
.bn-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bn-toggle.is-open span:nth-child(2) { opacity: 0; }
.bn-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =============================================================
   Page header
   ============================================================= */

.blog-hero {
    padding: 62px 0 40px;
    border-bottom: 1px solid var(--b-line);
    background:
        radial-gradient(760px 380px at 12% -30%, rgba(56, 121, 244, .17), transparent 66%),
        var(--b-bg);
}
.blog-hero .eyebrow {
    font-size: 11px;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: var(--b-teal);
    margin-bottom: 13px;
    font-weight: 500;
}
.blog-hero h1 {
    font-size: 44px;
    line-height: 1.12;
    color: var(--b-head);
    margin: 0 0 15px;
    letter-spacing: -.022em;
    font-weight: 600;
}
.blog-hero p {
    font-size: 17.5px;
    line-height: 1.65;
    max-width: 660px;
    margin: 0;
    color: var(--b-text);
}

/* =============================================================
   Post grid
   ============================================================= */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 26px;
    padding: 48px 0 20px;
}

.post-card {
    background: var(--b-card);
    border: 1px solid var(--b-line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
    opacity: 0;
    transform: translateY(22px);
}
.post-card.in-view { opacity: 1; transform: translateY(0); }
.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--b-line-2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .34);
}

.pc-media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #101f6c, #04081f);
    overflow: hidden;
    position: relative;
}
.pc-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.post-card:hover .pc-media img { transform: scale(1.045); }

/* Placeholder when a post has no image. */
.pc-media.no-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(115deg, transparent 0 22px, rgba(114, 236, 201, .07) 22px 24px);
}

.pc-body { padding: 19px 20px 21px; flex: 1; display: flex; flex-direction: column; }

.pc-cat {
    font-size: 10.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--b-teal);
    margin-bottom: 9px;
    font-weight: 500;
}

.pc-title {
    font-size: 19.5px;
    line-height: 1.32;
    color: var(--b-head);
    margin: 0 0 9px;
    font-weight: 600;
    letter-spacing: -.011em;
}
.pc-title a { color: inherit; text-decoration: none; }
.pc-title a:hover { color: var(--b-blue); }

.pc-excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 15px;
    flex: 1;
    color: var(--b-text);
}

.pc-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: #7b85a8;
    padding-top: 13px;
    border-top: 1px solid var(--b-line);
}
.pc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* Featured first post spans wider on large screens. */
@media (min-width: 900px) {
    .post-grid .post-card.featured { grid-column: span 2; }
    .post-grid .post-card.featured .pc-media { aspect-ratio: 21 / 9; }
    .post-grid .post-card.featured .pc-title { font-size: 27px; }
    .post-grid .post-card.featured .pc-excerpt { font-size: 15.5px; }
}

/* =============================================================
   Article
   ============================================================= */

.read-bar-track {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    z-index: 70;
}
.read-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--b-blue), var(--b-teal));
    transition: width .08s linear;
}

.article-head {
    padding: 54px 0 32px;
    background:
        radial-gradient(680px 340px at 50% -40%, rgba(56, 121, 244, .16), transparent 65%),
        var(--b-bg);
}
.article-head .container { max-width: 780px; }

.ah-crumb { font-size: 13px; margin-bottom: 18px; color: #7b85a8; }
.ah-crumb a { color: var(--b-teal); text-decoration: none; }
.ah-crumb a:hover { text-decoration: underline; }

.article-head h1 {
    font-size: 40px;
    line-height: 1.18;
    color: var(--b-head);
    margin: 0 0 17px;
    letter-spacing: -.022em;
    font-weight: 600;
}

.ah-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: #7b85a8;
}
.ah-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.ah-meta .tag-pill {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--b-line);
    border-radius: 30px;
    padding: 3px 11px;
    color: var(--b-text);
    text-decoration: none;
    font-size: 12.5px;
}
.ah-meta .tag-pill:hover { border-color: var(--b-teal); color: var(--b-teal); }

.article-figure {
    max-width: 980px;
    margin: 0 auto 6px;
    padding: 0 15px;
}
.article-figure img {
    width: 100%;
    border-radius: 14px;
    display: block;
    border: 1px solid var(--b-line);
}

/* Body copy */
.article-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 42px 15px 30px;
    font-size: 17px;
    line-height: 1.78;
    color: #c3cbe0;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.35em; }
.article-body h2 {
    font-size: 27px;
    color: var(--b-head);
    margin: 2em 0 .65em;
    line-height: 1.25;
    letter-spacing: -.014em;
    font-weight: 600;
}
.article-body h3 {
    font-size: 21px;
    color: var(--b-head);
    margin: 1.7em 0 .55em;
    font-weight: 600;
}
.article-body h4 { font-size: 18px; color: var(--b-head); margin: 1.5em 0 .5em; }
.article-body a { color: var(--b-teal); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: #fff; }
.article-body ul, .article-body ol { margin: 0 0 1.35em; padding-left: 1.35em; }
.article-body li { margin-bottom: .5em; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1.6em 0; }
.article-body blockquote {
    margin: 1.8em 0;
    padding: 4px 0 4px 22px;
    border-left: 2px solid var(--b-teal);
    color: var(--b-head);
    font-size: 19px;
    line-height: 1.6;
}
.article-body pre {
    background: var(--b-bg-alt);
    border: 1px solid var(--b-line);
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 14px;
    margin: 1.6em 0;
}
.article-body code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: .92em;
    background: rgba(255, 255, 255, .07);
    padding: 2px 6px;
    border-radius: 4px;
}
.article-body pre code { background: none; padding: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--b-line); margin: 2.4em 0; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 15px;
}
.article-body th, .article-body td {
    border: 1px solid var(--b-line);
    padding: 9px 12px;
    text-align: left;
}
.article-body th { background: var(--b-bg-alt); color: var(--b-head); font-weight: 600; }

/* Article footer */
.article-foot {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 15px 40px;
}
.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid var(--b-line);
    border-bottom: 1px solid var(--b-line);
    font-size: 13.5px;
}
.share-row a {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--b-line);
    border-radius: 50%;
    color: var(--b-text);
    transition: border-color .16s ease, color .16s ease;
}
.share-row a:hover { border-color: var(--b-teal); color: var(--b-teal); }
.share-row svg { width: 15px; height: 15px; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 26px 0 0;
}
.pn-item {
    border: 1px solid var(--b-line);
    border-radius: 12px;
    padding: 15px 17px;
    text-decoration: none;
    display: block;
    transition: border-color .18s ease, background .18s ease;
}
.pn-item:hover { border-color: var(--b-line-2); background: var(--b-bg-alt); }
.pn-label {
    font-size: 10.5px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--b-teal);
    margin-bottom: 6px;
}
.pn-title { color: var(--b-head); font-size: 15px; line-height: 1.4; }
.pn-item.next { text-align: right; }

/* Related */
.related-sec {
    padding: 52px 0 62px;
    border-top: 1px solid var(--b-line);
    background: var(--b-bg-alt);
    margin-top: 46px;
}
.related-sec h2 {
    font-size: 22px;
    color: var(--b-head);
    margin: 0 0 24px;
    font-weight: 600;
}

/* CTA */
.blog-cta {
    text-align: center;
    padding: 58px 20px;
    border-top: 1px solid var(--b-line);
}
.blog-cta h2 {
    font-size: 30px;
    color: var(--b-head);
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: -.016em;
}
.blog-cta p { max-width: 520px; margin: 0 auto 22px; }
.blog-cta .orangeBtn { display: inline-block; }

/* =============================================================
   Pagination
   ============================================================= */

.blog-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 26px 0 62px;
}
.blog-pager a, .blog-pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--b-line);
    border-radius: 8px;
    color: var(--b-text);
    text-decoration: none;
    font-size: 14px;
    transition: border-color .16s ease, color .16s ease;
}
.blog-pager a:hover { border-color: var(--b-teal); color: var(--b-teal); }
.blog-pager .current { background: var(--b-blue); border-color: var(--b-blue); color: #fff; }

/* =============================================================
   Empty state
   ============================================================= */

.blog-empty { text-align: center; padding: 82px 20px; }
.blog-empty h2 { color: var(--b-head); font-size: 23px; margin-bottom: 10px; font-weight: 600; }
.blog-empty p { max-width: 430px; margin: 0 auto; }

/* =============================================================
   Footer
   ============================================================= */

.blog-footer {
    border-top: 1px solid var(--b-line);
    padding: 26px 0;
    background: var(--b-bg);
}
.blog-footer .copyright { font-size: 13.5px; color: #7b85a8; gap: 8px; }
.blog-footer a { color: var(--b-text); text-decoration: none; }
.blog-footer a:hover { color: #fff; }
.blog-footer .Logo-LogistiWerx img { height: 17px; margin: 0 5px; vertical-align: -3px; }

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 860px) {
    .bn-toggle { display: flex; }
    .bn-links {
        position: fixed;
        inset: 66px 0 auto 0;
        background: var(--b-bg);
        border-bottom: 1px solid var(--b-line);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
        display: none;
        margin-left: 0;
    }
    .bn-links.open { display: flex; }
    .bn-links a { padding: 13px 22px; border-bottom: 1px solid var(--b-line); }
    .bn-links a:last-child { border-bottom: 0; }
    .bn-cta { margin: 10px 22px 4px; text-align: center; }

    .blog-hero { padding: 42px 0 30px; }
    .blog-hero h1 { font-size: 31px; }
    .blog-hero p { font-size: 16px; }

    .post-grid { grid-template-columns: 1fr; gap: 20px; padding: 32px 0 12px; }
    .article-head { padding: 34px 0 24px; }
    .article-head h1 { font-size: 28px; }
    .article-body { font-size: 16px; padding: 30px 15px 22px; }
    .article-body h2 { font-size: 22px; }
    .article-body h3 { font-size: 18.5px; }
    .post-nav { grid-template-columns: 1fr; }
    .pn-item.next { text-align: left; }
    .blog-cta h2 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    .post-card, .pc-media img { transition: none !important; }
    .post-card { opacity: 1 !important; transform: none !important; }
}
