/* =============================
   BLOG PAGE GLOBAL STYLES
   ============================= */

body.blog-page,
body.blog-article {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    color: #1f2a44;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.blog-page .navbar,
.blog-article .navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

/* =============================
   BLOG HERO
   ============================= */

.blog-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 0 120px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.25), transparent),
                radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.25), transparent),
                #0f172a;
    color: #ffffff;
}

.blog-hero::before,
.blog-hero::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(16, 185, 129, 0.25));
    filter: blur(60px);
    z-index: 0;
    animation: float 18s ease-in-out infinite alternate;
}

.blog-hero::before {
    top: -160px;
    left: -120px;
}

.blog-hero::after {
    bottom: -160px;
    right: -40px;
    animation-delay: 4s;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    padding: 0 24px;
}

.blog-hero-content {
    max-width: 720px;
}

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(6px);
}

.blog-hero-title {
    font-size: clamp(2.8rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.blog-hero-description {
    font-size: 1.12rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 32px;
}

.blog-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-hero-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-hero-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.blog-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 48px;
}

.hero-stat-card {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* =============================
   BLOG FEATURED SECTION
   ============================= */

.blog-featured {
    margin-top: -80px;
    padding: 0 0 80px;
}

.featured-card {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    padding: 40px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 30px 70px -24px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

.featured-media {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    min-height: 280px;
}

.featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.6s ease;
}

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

.featured-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.featured-badge {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.featured-title {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.18;
    color: #0f172a;
}

.featured-excerpt {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.7;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1f2a44;
}

.featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: #475569;
}

.featured-actions {
    margin-top: 8px;
}

.featured-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease;
}

.featured-actions .btn-secondary:hover {
    background: rgba(37, 99, 235, 0.18);
    transform: translateX(4px);
}

/* =============================
   BLOG GRID
   ============================= */

.blog-grid-section {
    padding: 0 0 120px;
}

.blog-topics-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
}

.blog-filter-pill {
    padding: 10px 18px;
    border-radius: 999px;
    background: #f1f5ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: 1px solid rgba(37, 99, 235, 0.18);
    transition: all 0.25s ease;
    cursor: pointer;
}

.blog-filter-pill:hover,
.blog-filter-pill.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 22px -12px rgba(37, 99, 235, 0.5);
}

.blog-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.blog-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 26px 45px -30px rgba(15, 23, 42, 0.45);
    transform: translateY(0px);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-image, linear-gradient(135deg, #1d4ed8, #2563eb));
    background-size: cover;
    background-position: center;
    filter: brightness(0.92);
    transform: scale(1.02);
    transition: transform 0.6s ease;
}

.blog-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.05) 35%, rgba(15, 23, 42, 0.78) 100%);
    opacity: 1;
    transition: opacity 0.4s ease;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 32px 60px -24px rgba(15, 23, 42, 0.48);
}

.blog-card:hover::before {
    transform: scale(1.08);
}

.blog-card:hover::after {
    opacity: 0.92;
}

.blog-card-content {
    position: relative;
    padding: 28px;
    z-index: 2;
}

.blog-card-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.blog-tag {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-card-title {
    font-size: 1.4rem;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 12px;
}

.blog-card-excerpt {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
    margin-bottom: 22px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

.blog-card-meta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.blog-card-meta a:hover {
    text-decoration: underline;
}

/* =============================
   NEWSLETTER & CTA
   ============================= */

.blog-newsletter {
    padding: 90px 0;
}

.newsletter-card {
    position: relative;
    padding: 46px 48px;
    border-radius: 28px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 32px 70px -28px rgba(37, 99, 235, 0.5);
}

.newsletter-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1531297484001-80022131f5a1?auto=format&fit=crop&w=1600&q=80') center/cover;
    opacity: 0.06;
}

.newsletter-card h2 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 18px;
}

.newsletter-card p {
    font-size: 1.05rem;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.9);
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.newsletter-form input {
    flex: 1 1 260px;
    padding: 14px 18px;
    border-radius: 14px;
    border: none;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 14px 24px;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    background: #ffffff;
    color: #2563eb;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -20px rgba(255, 255, 255, 0.75);
}

/* =============================
   ARTICLE PAGE STYLES
   ============================= */

.article-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    padding: 160px 0 80px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.55)),
                var(--hero-image, url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1600&q=80')) center/cover;
}

.article-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.3), transparent 50%),
                radial-gradient(circle at 80% 0%, rgba(16, 185, 129, 0.28), transparent 60%);
    mix-blend-mode: lighten;
    opacity: 0.7;
}

.article-hero .container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 24px;
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.95rem;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.82);
}

.article-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-article main {
    position: relative;
    margin-top: -72px;
    padding-bottom: 120px;
}

.article-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-content-card {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    padding: 50px 56px;
    box-shadow: 0 30px 70px -32px rgba(15, 23, 42, 0.35);
}

.article-content-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.article-content-card:hover::before {
    opacity: 1;
}

.article-content-card h2 {
    font-size: 1.8rem;
    margin: 32px 0 16px;
    color: #0f172a;
    position: relative;
}

.article-content-card h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 56px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #16a34a);
}

.article-content-card p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #475569;
    margin-bottom: 18px;
}

.article-content-card ul,
.article-content-card ol {
    margin: 16px 0 24px 20px;
    padding-left: 16px;
    color: #1f2937;
}

.article-content-card li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 40px 0 0;
    padding-top: 32px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.article-share-actions {
    display: flex;
    gap: 12px;
}

.article-share-actions a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    transition: transform 0.25s ease, background 0.25s ease;
}

.article-share-actions a:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.related-articles {
    margin-top: 80px;
}

.related-articles h3 {
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: #0f172a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.related-card {
    border-radius: 20px;
    background: #f8fbff;
    padding: 22px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px -24px rgba(37, 99, 235, 0.35);
}

.related-card a {
    display: block;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
}

.related-card p {
    margin-top: 8px;
    font-size: 0.92rem;
    color: #475569;
}

/* =============================
   ANIMATIONS
   ============================= */

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }
    100% {
        transform: translateY(25px) scale(1.05);
    }
}

/* =============================
   RESPONSIVE ADJUSTMENTS
   ============================= */

@media (max-width: 1024px) {
    .blog-hero {
        padding: 120px 0 100px;
    }

    .featured-card {
        grid-template-columns: 1fr;
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .blog-hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-card {
        min-height: 320px;
    }

    .newsletter-card {
        padding: 36px;
    }

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

    .article-content-card {
        padding: 42px 34px;
    }
}

@media (max-width: 560px) {
    .blog-hero {
        padding: 110px 0 80px;
    }

    .blog-hero-stats {
        grid-template-columns: 1fr;
    }

    .featured-card {
        padding: 26px;
    }

    .blog-card-content {
        padding: 24px;
    }

    .article-content-card {
        padding: 36px 26px;
    }
}

