/* ===========================================
   Blog Styles
   Covers: listing page, post page, cards,
   tag filters, author card, responsive.
   =========================================== */

/* ===========================================
   Blog Listing Hero
   =========================================== */
.blog-hero {
    padding-top: 140px;
    padding-bottom: 3rem;
    text-align: center;
}

.blog-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 200;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.blog-hero .lead {
    font-size: 1.2rem;
    color: var(--theme-text-secondary);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* ===========================================
   Tag Filter Bar
   =========================================== */
.blog-filter-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.blog-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--theme-border-primary);
    background: transparent;
    color: var(--theme-text-tertiary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-filter-btn:hover {
    border-color: var(--theme-border-hover);
    color: var(--theme-text-primary);
    background: var(--theme-glass-bg);
}

.blog-filter-btn.active {
    border-color: var(--octigen-blue);
    background: rgba(30, 79, 226, 0.12);
    color: var(--theme-text-primary);
}

.blog-filter-btn .filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.blog-filter-btn[data-tag="product"] .filter-dot   { background: var(--octigen-blue); }
.blog-filter-btn[data-tag="industry"] .filter-dot  { background: #7c5cbf; }
.blog-filter-btn[data-tag="tutorial"] .filter-dot  { background: #2ecc71; }
.blog-filter-btn[data-tag="startup-life"] .filter-dot { background: var(--octigen-orange); }


/* ===========================================
   Blog Listing Section
   =========================================== */
.blog-listing-section {
    padding: 3rem 0 5rem;
}

/* ===========================================
   Latest Badge (on first post card)
   =========================================== */
.blog-card-image-wrap {
    position: relative;
}

.blog-latest-badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 2;
    padding: 0.25rem 0.65rem;
    background: var(--octigen-blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===========================================
   Post Cards Grid
   =========================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    max-width: 960px;
    margin: 0 auto;
}

.blog-card {
    background: var(--theme-glass-bg);
    border: 1px solid var(--theme-glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

@media (hover: hover) {
    .blog-card:hover {
        border-color: var(--theme-border-hover);
        transform: translateY(-4px);
        box-shadow: var(--theme-shadow-lg);
    }
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--theme-bg-tertiary);
    flex-shrink: 0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

@media (hover: hover) {
    .blog-card:hover .blog-card-image img {
        transform: scale(1.04);
    }
}

.blog-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(30, 79, 226, 0.1) 0%,
        rgba(255, 107, 53, 0.07) 100%);
}

.blog-card-image-placeholder svg {
    width: 40px;
    height: 40px;
    color: var(--octigen-blue);
    opacity: 0.35;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

/* ===========================================
   Shared Card Elements
   =========================================== */
.blog-tag {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid;
}

.blog-tag-product {
    color: var(--octigen-blue);
    border-color: rgba(30, 79, 226, 0.35);
    background: rgba(30, 79, 226, 0.08);
}

.blog-tag-industry {
    color: #9b77e0;
    border-color: rgba(155, 119, 224, 0.35);
    background: rgba(155, 119, 224, 0.08);
}

.blog-tag-tutorial {
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.35);
    background: rgba(46, 204, 113, 0.08);
}

.blog-tag-startup-life {
    color: var(--octigen-orange);
    border-color: rgba(255, 107, 53, 0.35);
    background: rgba(255, 107, 53, 0.08);
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--theme-text-primary);
    line-height: 1.4;
    margin: 0;
    letter-spacing: 0;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--theme-text-secondary);
    line-height: 1.65;
    margin: 0;
    opacity: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--theme-border-secondary);
}

.blog-card-author-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-card-author-name {
    font-size: 0.82rem;
    color: var(--theme-text-tertiary);
    font-weight: 400;
}

.blog-card-meta-divider {
    color: var(--theme-text-muted);
    font-size: 0.8rem;
}

.blog-card-date {
    font-size: 0.82rem;
    color: var(--theme-text-muted);
}

.blog-card-read-time {
    font-size: 0.82rem;
    color: var(--theme-text-muted);
    margin-left: auto;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--octigen-blue);
    margin-top: 0.5rem;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.blog-read-more:hover {
    gap: 0.6rem;
    color: var(--octigen-blue);
}

/* ===========================================
   Empty / No Results State
   =========================================== */
.blog-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--theme-text-muted);
    grid-column: 1 / -1;
    max-width: 960px;
    margin: 0 auto;
}

.blog-empty-state p {
    font-size: 1rem;
    opacity: 1;
}

/* ===========================================
   Blog Post Page
   =========================================== */
.blog-post-hero {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    text-align: center;
}

.blog-post-hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.blog-post-hero-content .blog-tag {
    margin-bottom: 1rem;
}

.blog-post-hero h1 {
    font-size: 2.75rem;
    font-weight: 200;
    color: var(--theme-text-primary);
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
}

.blog-post-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--theme-text-muted);
    margin-top: 1rem;
}

.blog-post-hero-meta .meta-divider {
    color: var(--theme-border-primary);
}

/* ===========================================
   Post Cover Image
   =========================================== */
.blog-post-cover-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.blog-post-cover-wrap img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    border: 1px solid var(--theme-border-secondary);
}

.blog-post-cover-placeholder {
    width: 100%;
    height: 420px;
    border-radius: 20px;
    border: 1px solid var(--theme-border-secondary);
    background: linear-gradient(135deg,
        rgba(30, 79, 226, 0.08) 0%,
        rgba(255, 107, 53, 0.06) 50%,
        rgba(30, 79, 226, 0.05) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--theme-text-muted);
}

.blog-post-cover-placeholder svg {
    width: 56px;
    height: 56px;
    opacity: 0.35;
}

.blog-post-cover-placeholder span {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.5;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .blog-post-cover-placeholder {
        height: 240px;
    }
}

/* ===========================================
   Blog Post Body Content
   =========================================== */
.blog-post-section {
    padding: 0 0 3rem;
}

.blog-post-content {
    max-width: 720px;
    margin: 0 auto;
    color: var(--theme-text-secondary);
    font-size: 1.05rem;
    line-height: 1.85;
    font-weight: 300;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.85;
    opacity: 1;
}

.blog-post-content h2 {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--theme-text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0;
    line-height: 1.35;
}

.blog-post-content h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--theme-text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0;
    line-height: 1.4;
}

.blog-post-content ul,
.blog-post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.blog-post-content strong {
    color: var(--theme-text-primary);
    font-weight: 500;
}

.blog-post-content em {
    color: var(--theme-text-secondary);
}

.blog-post-content a {
    color: var(--octigen-blue);
    text-decoration: underline;
    text-decoration-color: rgba(30, 79, 226, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.blog-post-content a:hover {
    text-decoration-color: var(--octigen-blue);
}

.blog-post-content blockquote {
    border-left: 3px solid var(--octigen-blue);
    margin: 2rem 0;
    padding: 1rem 0 1rem 1.5rem;
    color: var(--theme-text-secondary);
    font-style: italic;
    font-size: 1.1rem;
}

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

.blog-post-content hr {
    border: none;
    border-top: 1px solid var(--theme-border-secondary);
    margin: 2.5rem 0;
}

.blog-post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 1px solid var(--theme-border-secondary);
}

.blog-post-content figure {
    margin: 2rem 0;
    text-align: center;
}

.blog-post-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    font-style: italic;
}

.blog-post-content pre {
    background: var(--theme-bg-tertiary);
    border: 1px solid var(--theme-border-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.blog-post-content code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.88em;
}

.blog-post-content p code,
.blog-post-content li code {
    background: var(--theme-bg-tertiary);
    border: 1px solid var(--theme-border-secondary);
    border-radius: 5px;
    padding: 0.15em 0.4em;
    color: var(--octigen-orange-light);
}

/* ===========================================
   Author Card
   =========================================== */
.blog-post-author-section {
    padding: 0 0 4rem;
}

.blog-post-author-card {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--theme-glass-bg);
    border: 1px solid var(--theme-glass-border);
    border-radius: 20px;
    padding: 1.75rem 2rem;
}

.blog-post-author-card::before {
    display: none;
}

.blog-post-author-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-post-author-info {
    flex: 1;
}

.blog-post-author-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--theme-text-primary);
    margin-bottom: 0.15rem;
}

.blog-post-author-role {
    font-size: 0.85rem;
    color: var(--octigen-blue);
    margin-bottom: 0.5rem;
}

.blog-post-author-bio {
    font-size: 0.9rem;
    color: var(--theme-text-tertiary);
    line-height: 1.6;
    margin: 0;
    opacity: 1;
}

/* ===========================================
   Related Posts Section
   =========================================== */
.blog-related-section {
    padding: 0 0 5rem;
}

.blog-related-header {
    max-width: 720px;
    margin: 0 auto 2rem;
}

.blog-related-header h3 {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--theme-text-primary);
    letter-spacing: 0;
}

.blog-related-grid {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* ===========================================
   Back to Blog Link
   =========================================== */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--theme-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}

.blog-back-link:hover {
    color: var(--theme-text-primary);
}

.blog-back-link svg {
    width: 16px;
    height: 16px;
}

.blog-back-wrap {
    padding: 140px 0 0;
    display: flex;
}

@media (max-width: 991px) {
    .blog-back-wrap {
        padding-top: 120px;
    }
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 991px) {
    .blog-hero {
        padding-top: 120px;
    }

    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-post-hero h1 {
        font-size: 2.1rem;
    }

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

@media (max-width: 767px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero .lead {
        font-size: 1.05rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .blog-post-hero h1 {
        font-size: 1.75rem;
    }

    .blog-post-hero-content .blog-tag {
        margin-bottom: 1rem;
    }

    .blog-post-content {
        font-size: 1rem;
    }

    .blog-post-author-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
}
