/* ==========================================================================
   Blog Styles - Be Stylish
   ========================================================================== */

/* Ensure header displays correctly on blog pages */
body:has(.blog-main) header,
body:has(.article-main) header {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Blog Hero Section */
.blog-hero {
    padding: 8rem 2rem 4rem;
    background: var(--gradient-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero h1 {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.blog-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    font-weight: 400;
}

/* Blog Main Container */
.blog-main {
    min-height: 100vh;
    background: var(--light-bg);
}

/* Blog Listing */
.blog-listing {
    padding: 4rem 2rem;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.blog-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    margin: 0 auto;
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
}

.blog-card.featured .blog-card-image {
    aspect-ratio: auto;
    min-height: 400px;
}

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

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

.blog-card-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card.featured .blog-card-content {
    padding: 2.5rem;
    justify-content: center;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

.blog-card-meta time {
    font-weight: 500;
}

.read-time {
    position: relative;
    padding-left: 1rem;
}

.read-time::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
}

.blog-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    text-align: left;
}

.blog-card.featured h2 {
    font-size: 1.75rem;
}

.blog-card h2 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card h2 a:hover {
    color: #9747ff;
}

.blog-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    text-align: left;
    font-size: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #9747ff;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s ease;
    gap: 0.25rem;
}

.read-more:hover {
    gap: 0.5rem;
}

/* Blog CTA Section */
.blog-cta {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    text-align: center;
}

.blog-cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.blog-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.blog-cta p {
    color: #666;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Article Page Styles
   ========================================================================== */

.article-main {
    min-height: 100vh;
    background: var(--light-bg);
    padding-top: 6rem;
}


/* Breadcrumb */
.breadcrumb {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin: 0 0.75rem;
    color: #aaa;
}

.breadcrumb a {
    color: #9747ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #7a38d1;
}

.breadcrumb li[aria-current="page"] {
    color: #666;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Article Content */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.article-header {
    margin-bottom: 2.5rem;
    position: static;
    width: auto;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 10px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-meta time,
.article-meta .read-time {
    color: #888;
    font-size: 0.95rem;
}

.article-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
    margin-bottom: 1.25rem;
    text-align: left;
    letter-spacing: -0.5px;
}

.article-excerpt {
    font-size: 1.25rem;
    color: #555;
    line-height: 1.6;
    text-align: left;
    font-weight: 400;
}

/* Article Hero Image */
.article-hero-image {
    margin: 2.5rem 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-hero-image figcaption,
.article-inline-image figcaption {
    background: rgba(0, 0, 0, 0.04);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* Article Body */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    color: var(--text-color);
    text-align: left;
    letter-spacing: -0.3px;
}

.article-body p {
    margin-bottom: 1.5rem;
    text-align: left;
}

.article-body section {
    margin-bottom: 1rem;
}

/* Feature Lists */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    position: relative;
    padding: 1rem 1rem 1rem 2.5rem;
    margin-bottom: 0.75rem;
    background: rgba(151, 71, 255, 0.04);
    border-radius: 0.75rem;
    border-left: 3px solid #9747ff;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0.85rem;
    top: 1rem;
    color: #9747ff;
    font-weight: 700;
}

/* Inline Images */
.article-inline-image {
    margin: 2.5rem 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-inline-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* CTA Box */
.article-cta-box {
    background: linear-gradient(135deg, #f8f5ff 0%, #f0f4ff 100%);
    border: 2px solid rgba(151, 71, 255, 0.15);
    border-radius: 1.25rem;
    padding: 2.5rem;
    margin: 3rem 0;
    text-align: center;
}

.article-cta-box h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    margin-top: 0;
}

.article-cta-box p {
    text-align: center;
    margin-bottom: 1rem;
    color: #555;
}

.article-cta-box .cta-button {
    margin-top: 1rem;
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.author-box {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.5rem;
}

.author-bio {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
    color: #666;
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.facebook {
    background: #4267B2;
    color: white;
}

.share-btn.linkedin {
    background: #0077B5;
    color: white;
}

/* Related Articles */
.related-articles {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    text-align: center;
}

.related-articles h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.coming-soon {
    color: #888;
    margin-bottom: 1.5rem;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid #9747ff;
    color: #9747ff;
}

.cta-button.secondary:hover {
    background: #9747ff;
    color: white;
}

/* Active nav link */
.nav a.active {
    color: #9747ff;
}

.nav a.active::after {
    width: 100%;
}

/* Logo as link */
a.logo {
    text-decoration: none;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

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

    .blog-card.featured .blog-card-image {
        min-height: 300px;
        aspect-ratio: 16/10;
    }

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

@media (max-width: 768px) {
    .blog-hero {
        padding: 7rem 1.5rem 3rem;
    }

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

    .blog-hero p {
        font-size: 1.1rem;
    }

    .blog-listing {
        padding: 3rem 1.5rem;
    }

    .article-content h1 {
        font-size: 2rem;
    }

    .article-excerpt {
        font-size: 1.1rem;
    }

    .article-body {
        font-size: 1.05rem;
    }

    .article-body h2 {
        font-size: 1.4rem;
    }

    .article-cta-box {
        padding: 2rem 1.5rem;
    }

    .share-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

    .blog-card-content {
        padding: 1.25rem;
    }

    .blog-card h2 {
        font-size: 1.25rem;
    }

    .article-content {
        padding: 0 1rem 3rem;
    }

    .article-content h1 {
        font-size: 1.75rem;
    }

    .breadcrumb {
        padding: 1rem;
    }

    .breadcrumb li[aria-current="page"] {
        max-width: 180px;
    }

    .article-meta {
        gap: 0.5rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .share-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

