/* Blog Page Specific Styles */

/* --- Blog Page Hero --- */
.blog-hero {
    padding: clamp(2rem, 5vw + 1rem, 6rem) 0 clamp(4rem, 5vw + 2rem, 6rem);
    background-color: var(--color-bg-body);
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.blog-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.blog-hero-content h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.blog-hero-content h1 span {
    color: #94a3b8; /* Slate accent */
}

.blog-hero-content p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto;
}

/* --- Premium Blog Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4rem 2.5rem;
}

.premium-blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    group: hover;
}

.pbc-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: var(--color-gray-100);
    display: block;
}

.pbc-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-blog-card:hover .pbc-image-wrapper img {
    transform: scale(1.03);
}

.pbc-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-weight: 500;
}

.pbc-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pbc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.pbc-category {
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pbc-date {
    color: var(--color-text-muted);
}

.pbc-title {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 0 0 1rem 0;
}

.pbc-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pbc-title a:hover {
    color: var(--color-primary);
}

.pbc-excerpt {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0 0 1.5rem 0;
    flex: 1;
    /* CSS Line Clamping */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pbc-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: auto;
}

.pbc-read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.pbc-read-more:hover {
    color: var(--color-primary);
}

.premium-blog-card:hover .pbc-read-more::after {
    transform: translateX(4px);
}

/* --- Blog Premium CTA (Split-Deck Editorial) --- */
.blog-premium-cta {
    background-color: var(--color-bg-footer); /* Seamless integration with footer */
    color: #ffffff;
    padding: 10rem 0 8rem;
}

.bp-cta-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.bp-cta-text {
    max-width: 600px;
}

.bp-cta-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8; /* Slate muted */
    margin-bottom: 1.5rem;
}

.bp-cta-text h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.bp-cta-text h2 span {
    color: var(--color-primary-light, #60a5fa); /* Soft blue accent */
}

.bp-cta-text p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
}

.btn-blog-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1.25rem 3rem;
    border-radius: 4rem; /* Pill shape */
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-blog-cta:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5);
}

.btn-blog-cta .arrow {
    transition: transform 0.3s ease;
}

.btn-blog-cta:hover .arrow {
    transform: translateX(6px);
}

/* --- Detail Article Premium Hero --- */
.article-premium-hero {
    padding: clamp(2rem, 5vw + 1rem, 6rem) 0 clamp(2rem, 4vw, 4rem);
    background-color: var(--color-bg-body);
    text-align: center;
}

.aph-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.aph-category {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.aph-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.aph-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.aph-meta {
    font-size: 0.95rem;
    color: #94a3b8;
    font-weight: 500;
}

.article-featured-image {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 4rem;
    aspect-ratio: 16/9; /* Standard editorial photography ratio */
    background: var(--color-gray-100);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.afi-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.article-body {
    max-width: 720px; /* Optimal reading length */
    margin: 0 auto;
    font-size: 1.1875rem; /* ~19px, highly legible */
    line-height: 1.8;
    color: #1e293b; /* Slate 800 */
}

.article-body p {
    margin-bottom: 1.75rem;
}

.article-body h2 {
    font-size: 2.25rem;
    margin-top: 4rem;
    margin-bottom: 1.25rem;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.article-body h3 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #0f172a;
    line-height: 1.3;
}

.article-body h4 {
    font-size: 1.35rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.article-body strong, .article-body b {
    color: #0f172a;
    font-weight: 600;
}

.article-body blockquote {
    margin: 2.5rem 0;
    padding: 2rem 2.5rem;
    background-color: #f8fafc; /* Slate 50 */
    border-left: 4px solid var(--color-primary);
    border-radius: 0 1rem 1rem 0;
    font-size: 1.35rem;
    font-style: italic;
    line-height: 1.6;
    color: #334155;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body ul, .article-body ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.article-body ul li::marker {
    color: var(--color-primary);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2.5rem 0;
}

/* --- Related Articles --- */
.related-articles {
    max-width: 1100px;
    margin: 5rem auto 0;
    padding-top: 4rem;
    border-top: 1px solid var(--color-border);
}

.ra-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.ra-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.ra-header h3 {
    font-size: 1.75rem;
    color: #0f172a;
    margin: 0;
}

.ra-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.ra-card {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ra-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
}

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

.ra-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: var(--color-gray-100);
}

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

.ra-card:hover .ra-thumbnail img {
    transform: scale(1.05);
}

.ra-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.ra-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ra-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.ra-title {
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ra-meta {
    margin-top: auto;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* --- Article End Actions (CTA & Back Nav) --- */
.article-end-actions {
    max-width: 1100px; /* Align with related articles width */
    margin: 4rem auto 0;
    padding-top: 3rem;
}

.article-cta-box {
    background-color: var(--color-bg-footer); /* Deep Navy */
    border-radius: 1.5rem;
    padding: 5rem 4rem;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
    margin-bottom: 2rem; /* Gap to the back nav */
}

.acb-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8; /* Slate muted */
    margin-bottom: 1.5rem;
}

.article-cta-box h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-cta-box p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.btn-article-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1.25rem 3rem;
    border-radius: 4rem; /* Pill shape */
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-article-cta:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5);
}

.btn-article-cta .arrow {
    transition: transform 0.3s ease;
}

.btn-article-cta:hover .arrow {
    transform: translateX(6px);
}

.article-back-nav {
    text-align: center;
    padding-bottom: 3rem; /* Spacing before global footer */
}

.article-back-nav .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-back-nav .back-link .arrow {
    transition: transform 0.3s ease;
}

.article-back-nav .back-link:hover {
    color: var(--color-primary);
}

.article-back-nav .back-link:hover .arrow {
    transform: translateX(-4px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
/* Removed old article-header media query */
    
    .bp-cta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }
}

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .article-body {
        font-size: 1.125rem;
    }
    
    .article-cta-box {
        padding: 3rem 1.5rem;
        border-radius: 1rem;
    }
    
    .article-cta-box p {
        font-size: 1.125rem;
    }
    
    .btn-article-cta {
        width: 100%;
        padding: 1rem 1.5rem;
    }

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

    .blog-premium-cta {
        padding: 6rem 0 5rem;
    }

    .btn-blog-cta {
        width: 100%;
        padding: 1rem 2rem;
    }
}
