/* Enhanced Blog Styles - Modern Design */

/* Ghost-style System Font Stack */
body,
.article-container,
.article-header,
.article-body,
.blog-card,
.related-grid {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Article Layout with Sidebar TOC */
.article-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
}

/* Table of Contents Sidebar */
.article-toc {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.article-toc h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc li {
    margin-bottom: 0.5rem;
}

.article-toc a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.6;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 1rem;
}

.article-toc a:hover {
    color: var(--primary-color);
}

.article-toc a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

/* Article Main Content */
.article-main {
    min-width: 0;
    max-width: 720px;
}

/* Article Container */
.article-container {
    background: white;
}

.article-container .container {
    max-width: 1400px;
}

/* Article Header - Centered, Magazine Style */
.article-header {
    max-width: 720px;
    margin: 0 auto 3rem;
    text-align: center;
    padding: 3rem 2rem 2rem;
}

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

.article-meta span {
    font-size: 0.875rem;
    color: #64748b;
}

.article-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.article-header h1 {
    font-size: 2.625rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: #15171a;
    font-weight: 700;
    letter-spacing: -0.022em;
}

.article-excerpt {
    font-size: 1.25rem;
    color: #738a94;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Decorative Divider */
.article-divider {
    margin-top: 2.5rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        rgba(100, 116, 139, 0.2) 15%,
        rgba(100, 116, 139, 0.3) 50%,
        rgba(100, 116, 139, 0.2) 85%,
        transparent
    );
}

.article-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    color: #15171a;
    font-size: 0.875rem;
}

.author-info span {
    color: #64748b;
    font-size: 0.8125rem;
}

/* Breadcrumb */
.breadcrumb {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumb span:not([id]) {
    color: #cbd5e1;
}

/* Hide TOC on mobile */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-toc {
        display: none;
    }

    .article-header h1 {
        font-size: 2.25rem;
    }
}

/* Blog Header - More dramatic */
.blog-header {
    padding: 140px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

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

.blog-header h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.blog-header p {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.95);
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* Blog Filters - Modernized */
.blog-filters {
    padding: 2.5rem 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.filter-btn {
    padding: 0.65rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.15);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 128, 96, 0.25);
}

/* Search Box - Enhanced */
.search-box input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.1);
}

/* Blog Grid - Improved spacing */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
    margin-top: 1rem;
}

/* Blog Cards - Premium design */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

/* Category-specific gradients with patterns */
.blog-card-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card[data-category="shopify"] .blog-card-image {
    background: linear-gradient(135deg, #95bf47 0%, #5f9717 100%);
}

.blog-card[data-category="ai"] .blog-card-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card[data-category="seo"] .blog-card-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.blog-card[data-category="case study"] .blog-card-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Decorative pattern overlay */
.blog-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        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.15) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px);
}

/* Icon in center */
.blog-card-image::after {
    content: '📝';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.3;
}

.blog-card[data-category="ai"] .blog-card-image::after {
    content: '🤖';
}

.blog-card[data-category="seo"] .blog-card-image::after {
    content: '🔍';
}

.blog-card[data-category="case study"] .blog-card-image::after {
    content: '📊';
}

.blog-card-category {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: rgba(255,255,255,0.98);
    padding: 0.45rem 1rem;
    border-radius: 24px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

/* Card Content - Better typography */
.blog-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: #a0aec0;
    margin-bottom: 1rem;
    font-weight: 500;
}

.blog-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #15171a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: #738a94;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 2px solid #f7fafc;
}

.blog-card-author {
    font-size: 0.95rem;
    color: #718096;
    font-weight: 500;
}

.blog-card-read-more {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card-read-more {
    gap: 0.6rem;
}

/* Article Page - Magazine-style */
.article-container {
    padding: 100px 0 4rem;
    background: #ffffff;
}

.breadcrumb {
    display: flex;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #a0aec0;
    margin-bottom: 3rem;
    font-weight: 500;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Article Header - Hero style */
.article-header {
    margin-bottom: 4rem;
    max-width: 800px;
}

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

.article-category {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.article-date,
.article-read-time {
    color: #718096;
    font-size: 0.95rem;
    font-weight: 500;
}

.article-header h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 900;
    color: #15171a;
    letter-spacing: -0.02em;
}

.article-excerpt {
    font-size: 1.35rem;
    color: #738a94;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
}

.author-info strong {
    font-size: 1.1rem;
    color: #2d3748;
}

.author-info span {
    font-size: 0.95rem;
    color: #718096;
}

/* Article Body - Ghost-style typography */
.article-body {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #3c484e;
    max-width: 720px;
    font-weight: 400;
}

.article-body > * {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #15171a;
    position: relative;
    letter-spacing: -0.018em;
    line-height: 1.3;
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 3px;
}

.article-body h3 {
    font-size: 1.625rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: #15171a;
    letter-spacing: -0.014em;
    line-height: 1.35;
}

.article-body h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #15171a;
    letter-spacing: -0.012em;
    line-height: 1.4;
}

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

.article-body strong {
    font-weight: 700;
    color: #15171a;
}

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

.article-body li {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-body blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 2rem 2rem 2rem 2.5rem;
    margin: 3rem 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #2d3748;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
}

.article-body blockquote::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: -0.75rem;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.article-body code {
    background: #fef5e7;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9em;
    color: #c53030;
    border: 1px solid #fbd38d;
    font-weight: 500;
}

.article-body pre {
    background: #1a202c;
    padding: 2rem;
    border-radius: 16px;
    overflow-x: auto;
    margin: 2.5rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #2d3748;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
    border: none;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Tables - Better styling */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.article-body th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.article-body td {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.article-body tr:last-child td {
    border-bottom: none;
}

.article-body tr:hover {
    background: #f7fafc;
}

/* Newsletter - More attractive */
.blog-newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5rem 0;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
}

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

.newsletter-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 900;
}

.newsletter-form input {
    flex: 1;
    padding: 1.1rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.newsletter-form button {
    padding: 1.1rem 2.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Share buttons - Enhanced */
.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Article CTA Wrapper - Light Grey Background */
.article-cta-wrapper {
    background: #f7f8f9;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 5rem 2rem;
    margin-top: 4rem;
}

/* Article CTA - More compelling */
.article-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.article-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.article-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.article-cta p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.article-cta .btn-large {
    background: white;
    color: var(--primary-color);
    font-size: 1.15rem;
    padding: 1.25rem 3rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.article-cta .btn-large:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* Related Articles - Ghost-style dark cards */
.related-articles {
    margin-top: 0;
    padding: 5rem 2rem;
    background: #0a0b0d;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.related-articles h2 {
    font-size: 1rem;
    margin-bottom: 3rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.related-grid .blog-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: none;
}

.related-grid .blog-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.04) 100%);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.related-grid .blog-card-image {
    height: 200px;
    position: relative;
}

.related-grid .blog-card-content {
    padding: 1.75rem;
}

.related-grid .blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.95);
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-grid .blog-card-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: #ffffff;
    font-weight: 700;
}

.related-grid .blog-card-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0;
}

.related-grid .blog-card-meta {
    display: none;
}

.related-grid .blog-card-footer {
    display: none;
}

/* Responsive - Enhanced */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2.75rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-header h1 {
        font-size: 2.25rem;
    }

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

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

    .article-cta h2,
    .newsletter-card h2 {
        font-size: 2rem;
    }
}
