/* Blog specific typography and layout */
.blog-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #34d399 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-header p {
    font-size: 1.1rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(52, 211, 153, 0.15);
}

.blog-card-date {
    font-size: 0.85rem;
    color: #34d399;
    margin-bottom: 12px;
    font-weight: 600;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 1rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
}

/* Post view specific styles */
.post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
}

.post-main {
    min-width: 0;
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 80px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
}

.widget-cta h3 {
    color: #f8fafc;
    font-size: 1.4rem;
    margin: 0 0 12px 0;
}

.widget-cta p {
    color: #cbd5e1;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.widget-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #34d399 0%, #3b82f6 100%);
    color: white !important;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.4);
}

.widget-ad {
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.ad-placeholder {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    border-radius: 8px;
}

@media (max-width: 950px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .post-sidebar {
        margin-top: 0;
    }
}

.post-header {
    margin-bottom: 50px;
    text-align: left;
}

.post-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    color: #94a3b8;
    font-size: 1rem;
    display: flex;
    justify-content: flex-start;
    gap: 20px;
}

.post-meta span.date {
    color: #34d399;
}

.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: #f8fafc;
    margin-top: 2.5em;
    margin-bottom: 1em;
    font-weight: 700;
}

.post-content h2 {
    font-size: 1.8rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: 1.6em;
}

.post-content a {
    color: #3b82f6;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.6em;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 0.5em;
}

.post-content blockquote {
    border-left: 4px solid #34d399;
    padding-left: 20px;
    margin-left: 0;
    margin-right: 0;
    color: #cbd5e1;
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.post-content pre {
    background: #080d18;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.6em;
}

.post-content code {
    font-family: 'Courier New', Courier, monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 30px;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #34d399;
}

.back-link svg {
    margin-right: 8px;
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 50px;
    color: #94a3b8;
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 30px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Table Styles */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 1.05rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
}

.post-content th,
.post-content td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post-content th {
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    font-weight: 700;
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Scroll to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d399 0%, #3b82f6 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.4);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(52, 211, 153, 0.6);
}

#back-to-top svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

@media (max-width: 600px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    #back-to-top svg {
        width: 24px;
        height: 24px;
    }
}