:root {
    --primary-green: #22c55e;
    --primary-green-hover: #16a34a;
    --dark-slate: #1e293b;
    --light-slate: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.blog-main, .blog-detail-main {
    padding-top: 120px;
    min-height: calc(100vh - 120px);
    position: relative;
    z-index: 1;
}

body {
    background-color: var(--bg-body);
}

.blog-hero-section {
    background: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
}

.blog-subtitle {
    font-size: 1.25rem;
    color: var(--light-slate);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 40px 0;
}

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

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

@media (max-width: 560px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Blog Card Link Wrapper */
.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

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

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

.blog-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    color: var(--primary-green);
    font-size: 2.5rem;
    opacity: 0.4;
}

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

.blog-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dark-slate);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    margin-top: auto;
    font-size: 0.82rem;
    color: var(--light-slate);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
}


.blog-article {
    max-width: 800px;
    margin: 1px auto;
    padding: 0 1.5rem;
}

.blog-article-header {
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.blog-hero-image {
    width: fit-content;
    margin-bottom: 3rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.blog-detail-img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-slate);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

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

.blog-article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-slate);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-align: center;
    display: block;
}

.blog-article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--light-slate);
    font-size: 0.95rem;
    width: 100%;
    align-items: baseline;
}

.blog-article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dark-slate);
}

.blog-article-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.blog-article-content h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-article-content p {
    margin-bottom: 1.5rem;
}

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

.blog-article-content li {
    margin-bottom: 0.75rem;
}

.blog-article-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* CTA Banner */
.blog-cta-banner {
    margin-top: 4rem;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}

.blog-cta-banner h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.blog-cta-banner p {
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.blog-cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

body.dark-mode .blog-card {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

body.dark-mode .blog-card-image {
    background: rgba(30, 41, 59, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .blog-card-image-placeholder {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(30, 41, 59, 0.5) 100%);
}

body.dark-mode .blog-card-title {
    color: #f8fafc;
}

body.dark-mode .blog-card-link:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

body.dark-mode .blog-article-content {
    color: #e2e8f0;
}

body.dark-mode .blog-article-title {
    color: #f8fafc;
}

body.dark-mode .blog-article-content code {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

body.dark-mode .blog-hero-image {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
    .blog-article-title {
        font-size: 2rem;
    }
    
    .blog-article-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
}
