/* ==========================================================================
   BLOG STYLES - PRODUCTION READY
   ========================================================================== */

/* Hero Section */
.blog-hero {
    position: relative;
    padding: calc(var(--space-16, 4rem) + 40px) 0 var(--space-16, 4rem);
    background: linear-gradient(145deg, #0b0f19 0%, #151c2e 50%, #1e1b4b 100%);
    overflow: hidden;
    color: var(--color-white, #ffffff);
    text-align: center;
}

.blog-hero__mesh {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 18% 25%, rgba(99, 102, 241, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 82% 35%, rgba(168, 85, 247, 0.28) 0%, transparent 42%),
        radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    opacity: 0.9;
}

.blog-hero__grid-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

.blog-hero__container {
    position: relative;
    z-index: 2;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--space-4, 1rem);
}

.blog-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 9999px;
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.blog-hero__title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.025em;
    margin: 0 0 16px;
}

.blog-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 auto 36px;
    max-width: 680px;
}

/* Search Bar in Hero */
.blog-search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.blog-search-bar__form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    padding: 6px 8px 6px 20px;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.blog-search-bar__form:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 12px 30px -5px rgba(0, 0, 0, 0.4);
}

.blog-search-bar__icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex-shrink: 0;
    margin-right: 12px;
}

.blog-search-bar__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 15px;
}

.blog-search-bar__input::placeholder {
    color: #94a3b8;
}

.blog-search-bar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.blog-search-bar__btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

/* Category Filter Bar */
.blog-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 72px;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.blog-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.blog-nav__inner::-webkit-scrollbar {
    display: none;
}

.blog-nav__categories {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.blog-nav__pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    border-radius: 9999px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.blog-nav__pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.blog-nav__pill--active {
    background: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.blog-nav__pill--active:hover {
    background: #4338ca;
    color: #ffffff;
}

.blog-nav__status {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}

/* Main Blog Section */
.blog-main {
    padding: 56px 0 80px;
    background: #f8fafc;
    min-height: 600px;
}

.blog-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.blog-section-header__title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Featured Section */
.blog-featured {
    margin-bottom: 56px;
}

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

.blog-featured-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.blog-featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -10px rgba(79, 70, 229, 0.12);
    border-color: #c7d2fe;
}

.blog-featured-card__media {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

.blog-featured-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-featured-card:hover .blog-featured-card__img {
    transform: scale(1.05);
}

.blog-featured-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 100%);
}

.blog-featured-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 5px 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.blog-featured-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-featured-card__category {
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.blog-featured-card__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 10px;
}

.blog-featured-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-featured-card__title a:hover {
    color: #4f46e5;
}

.blog-featured-card__excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.blog-card-meta__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card-meta__author {
    font-weight: 600;
    color: #475569;
}

.blog-card-meta__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cbd5e1;
}

/* Regular Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 30px -8px rgba(79, 70, 229, 0.1);
    border-color: #cbd5e1;
}

.blog-card__media {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #1e293b;
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.05);
}

.blog-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.blog-card__body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__category {
    font-size: 12px;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.blog-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin: 0 0 10px;
}

.blog-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card__title a:hover {
    color: #4f46e5;
}

.blog-card__excerpt {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 18px;
    flex: 1;
}

.blog-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.blog-tag-pill {
    display: inline-block;
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.blog-tag-pill:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 64px 20px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px dashed #cbd5e1;
    max-width: 520px;
    margin: 0 auto;
}

.blog-empty__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    color: #94a3b8;
}

.blog-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.blog-empty__desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
}

.blog-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-empty__btn:hover {
    background: #4338ca;
}

/* Pagination */
.blog-pagination {
    margin-top: 56px;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   BLOG DETAIL PAGE
   ========================================================================== */

.blog-post-page {
    background: #ffffff;
    min-height: 800px;
    padding-bottom: 80px;
}

.blog-post-header {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
    padding: 48px 0 40px;
}

.blog-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 24px;
}

.blog-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-breadcrumbs a:hover {
    color: #4f46e5;
}

.blog-post-header__content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.blog-post-header__category {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.blog-post-header__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0 0 20px;
}

.blog-post-header__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: #64748b;
    flex-wrap: wrap;
}

.blog-post-header__author {
    font-weight: 600;
    color: #334155;
}

.blog-post-featured-image {
    max-width: 960px;
    margin: -20px auto 48px;
    padding: 0 20px;
}

.blog-post-featured-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

.blog-post-body-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-post-excerpt {
    font-size: 18px;
    line-height: 1.7;
    color: #475569;
    padding: 20px 24px;
    background: #f8fafc;
    border-left: 4px solid #4f46e5;
    border-radius: 0 12px 12px 0;
    margin-bottom: 40px;
    font-style: italic;
}

.blog-post-content {
    font-size: 17px;
    line-height: 1.85;
    color: #334155;
}

.blog-post-content h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 44px 0 16px;
    line-height: 1.3;
}

.blog-post-content h3 {
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
    margin: 32px 0 14px;
    line-height: 1.35;
}

.blog-post-content p {
    margin: 0 0 22px;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 0 0 24px 20px;
    padding-left: 10px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 28px 0;
}

.blog-post-content blockquote {
    padding: 16px 24px;
    border-left: 4px solid #818cf8;
    background: #f8fafc;
    font-style: italic;
    color: #475569;
    margin: 28px 0;
    border-radius: 0 8px 8px 0;
}

.blog-post-content pre,
.blog-post-content code {
    background: #0f172a;
    color: #f8fafc;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.blog-post-content pre {
    padding: 16px 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.blog-post-content code:not(pre code) {
    padding: 2px 6px;
    font-size: 0.9em;
    background: #e2e8f0;
    color: #0f172a;
}

/* Post Footer & Sharing */
.blog-post-footer {
    max-width: 820px;
    margin: 48px auto 0;
    padding: 32px 20px 0;
    border-top: 1px solid #e2e8f0;
}

.blog-post-tags-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.blog-post-tags-row__label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.blog-post-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}

.blog-post-share-row__label {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.blog-post-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
}

.blog-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.blog-share-btn--twitter:hover {
    border-color: #000000;
    color: #000000;
}

.blog-share-btn--linkedin:hover {
    border-color: #0a66c2;
    color: #0a66c2;
}

.blog-share-btn--facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
}

/* Related Posts Section */
.blog-related-section {
    background: #f8fafc;
    padding: 64px 0 80px;
    border-top: 1px solid #e2e8f0;
}

.blog-related-section__title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 32px;
    text-align: center;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid,
    .blog-featured__grid {
        grid-template-columns: 1fr;
    }

    .blog-hero {
        padding: calc(var(--space-12, 3rem) + 30px) 0 var(--space-12, 3rem);
    }

    .blog-search-bar__form {
        padding: 4px 6px 4px 16px;
    }

    .blog-search-bar__btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .blog-post-header__title {
        font-size: 26px;
    }

    .blog-post-content {
        font-size: 16px;
    }
}
