/* blog.css */

.blog-hero {
    background: linear-gradient(135deg, var(--cfn-dark-green) 0%, var(--npt-black) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #e2e8f0;
}

.social-links-hero .btn-white {
    border-color: white;
    color: white;
}

.social-links-hero .btn-white:hover {
    background-color: white;
    color: var(--cfn-dark-green);
}

.news-section {
    padding: 60px 20px 100px;
    background-color: #f8fafc;
    min-height: 50vh;
}

.seo-guides-section {
    padding: 70px 20px;
    background: #ffffff;
}

.section-header {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-tag {
    display: inline-block;
    color: var(--cfn-green);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-header h2 {
    color: var(--npt-black);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin: 0 0 12px;
}

.section-header p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0;
}

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

.guide-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 26px;
}

.post-card {
    background:
        linear-gradient(145deg, #ffffff 0%, #f8fafc 100%),
        radial-gradient(circle at top right, rgba(3, 166, 60, 0.12), transparent 35%);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.guide-kicker {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.guide-card h3 {
    font-size: 1.3rem;
    line-height: 1.25;
    margin: 0 0 12px;
}

.guide-card h3 a {
    color: var(--npt-black);
    text-decoration: none;
}

.guide-card h3 a:hover,
.guide-card h3 a:focus-visible {
    color: var(--cfn-dark-green);
}

.guide-card p {
    color: #475569;
    flex: 1;
    line-height: 1.6;
    margin: 0 0 20px;
}

.post-card-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 12px;
    margin: 0 0 20px;
}

.guide-link {
    color: var(--cfn-green);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.guide-link:hover,
.guide-link:focus-visible {
    color: var(--cfn-dark-green);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-green-hover);
    border-color: rgba(3, 166, 60, 0.2);
}

.news-image {
    height: 200px;
    background-color: #cbd5e1;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--npt-black);
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-excerpt {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.news-link {
    color: var(--cfn-green);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto; /* Push to bottom */
}

.news-link:hover {
    color: var(--cfn-dark-green);
    gap: 12px; /* Slide arrow */
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cfn-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Article Pages */
.article-page {
    background: #ffffff;
}

.article-hero {
    background:
        radial-gradient(circle at 18% 20%, rgba(3, 166, 60, 0.2), transparent 30%),
        linear-gradient(135deg, var(--cfn-dark-green) 0%, var(--npt-black) 100%);
    color: #ffffff;
    padding: 92px 20px 76px;
    text-align: center;
}

.article-breadcrumb {
    color: #bbf7d0;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 auto 22px;
    max-width: 820px;
}

.article-breadcrumb a {
    color: #ffffff;
}

.article-category {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #dcfce7;
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
    padding: 8px 14px;
    text-transform: uppercase;
}

.article-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 auto 18px;
    max-width: 920px;
}

.article-hero p {
    color: #e2e8f0;
    font-size: 1.18rem;
    line-height: 1.65;
    margin: 0 auto 24px;
    max-width: 760px;
}

.article-meta {
    color: #bbf7d0;
    display: flex;
    flex-wrap: wrap;
    font-weight: 700;
    gap: 14px;
    justify-content: center;
}

.article-body {
    color: #334155;
    font-size: 1.06rem;
    line-height: 1.78;
    margin: 0 auto;
    max-width: 820px;
    padding: 68px 20px;
}

.article-body h2 {
    color: var(--npt-black);
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.2;
    margin: 42px 0 14px;
}

.article-body p {
    margin: 0 0 22px;
}

.article-body ul {
    margin: 0 0 28px;
    padding-left: 22px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-callout {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 5px solid var(--cfn-green);
    border-radius: 10px;
    margin: 34px 0;
    padding: 22px 24px;
}

.article-callout strong {
    color: var(--cfn-dark-green);
    display: block;
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 8px;
}

.article-callout p {
    margin: 0;
}

.article-cta {
    align-items: center;
    background: linear-gradient(135deg, #052e16 0%, #067a35 100%);
    border-radius: 14px;
    color: #ffffff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin: 44px 0 12px;
    padding: 28px;
}

.article-cta h2 {
    color: #ffffff;
    margin: 0 0 8px;
}

.article-cta p {
    color: #dcfce7;
    margin: 0;
}

.article-cta a {
    background: #ffffff;
    border-radius: 999px;
    color: var(--cfn-dark-green);
    flex-shrink: 0;
    font-weight: 800;
    padding: 12px 18px;
    text-decoration: none;
}

.related-posts {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 56px 20px 80px;
}

.related-posts h2 {
    color: var(--npt-black);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0 auto 24px;
    max-width: 1000px;
}

.related-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 1000px;
}

.related-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: inherit;
    padding: 20px;
    text-decoration: none;
}

.related-card span {
    color: var(--cfn-green);
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.related-card strong {
    color: var(--npt-black);
    display: block;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.3;
    margin-bottom: 14px;
}

.related-card small {
    color: #64748b;
    font-weight: 700;
}

@media (max-width: 800px) {
    .article-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .blog-hero,
    .article-hero {
        padding: 56px 16px 48px;
    }

    .blog-hero h1,
    .article-hero h1 {
        font-size: clamp(2rem, 10vw, 2.75rem);
    }

    .seo-guides-section,
    .news-section,
    .related-posts {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 46px;
        padding-bottom: 54px;
    }

    .guide-card,
    .news-card,
    .article-cta,
    .related-card {
        padding: 20px;
        border-radius: 10px;
    }

    .article-body {
        font-size: 1rem;
        padding: 38px 16px;
    }

    .article-cta a {
        width: 100%;
        text-align: center;
    }

    .article-meta,
    .post-card-meta {
        align-items: center;
        flex-direction: column;
        gap: 6px;
    }
}

/* --- Touch targets ------------------------------------------------------ */
/* These are standalone card call-to-actions, not links inside a sentence, so
   the inline-text exemption does not apply. They measured 23px tall on a
   phone; padding brings them to the 44px minimum without moving the text. */
.guide-link,
.news-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 900px) {
    /* Breadcrumbs sit tight to the heading; give the links room to be tapped
       without pushing the layout around. */
    .article-breadcrumb a {
        display: inline-block;
        padding: 6px 0;
    }
}

/* Card titles are the primary link into each article, so they need a real tap
   box rather than the bare 25px the text line gives them. Padding rather than
   min-height keeps the heading's position in the card unchanged. */
.guide-card h3 a,
.news-card h3 a,
.post-card h3 a {
    display: inline-block;
    padding: 6px 0;
}
