/* ===== BLOG HEADER ===== */
.blog-header {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    padding: 120px 0 80px;
    margin-top: 70px;
    text-align: center;
}

.blog-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== BLOG SECTION ===== */
.blog-section {
    padding: 80px 0;
}

/* ===== BLOG GRID ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* ===== BLOG CARD ===== */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: visible;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: 16px 16px 0 0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
    min-height: 380px;
}

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

.blog-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.blog-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.5;
    color: var(--text);
    font-weight: 700;
}

.blog-excerpt {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 16px;
    flex-grow: 1;
    line-height: 1.7;
}

.blog-card-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: auto;
}

.blog-date {
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== BLOG DETAIL SECTION ===== */
.blog-detail-section {
    padding: 80px 0;
}

.blog-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 12px;
}

/* ===== BLOG DETAIL HEADER ===== */
.blog-detail-header {
    margin-bottom: 48px;
}

.blog-detail-image {
    margin-bottom: 32px;
}

.blog-detail-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.blog-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-detail-info h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.blog-detail-meta {
    display: flex;
    gap: 24px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.blog-detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-detail-meta i {
    color: var(--primary);
}

/* ===== BLOG DETAIL BODY ===== */
.blog-detail-body {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

.blog-detail-body h2 {
    font-size: 2rem;
    color: var(--text);
    margin: 32px 0 16px;
    margin-top: 0;
}

.blog-detail-body h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin: 24px 0 12px;
}

.blog-detail-body p {
    margin-bottom: 16px;
}

.blog-detail-body ul,
.blog-detail-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.blog-detail-body li {
    margin-bottom: 8px;
}

.blog-detail-body strong {
    color: var(--text);
}

/* ===== RELATED POSTS SECTION ===== */
.related-posts-section {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.related-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.related-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-post-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.related-post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

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

.related-post-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-post-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.3;
}

.related-post-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
    flex-grow: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .blog-title {
        font-size: 2.6rem;
    }

    .blog-subtitle {
        font-size: 1.05rem;
    }

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

    .blog-card-image {
        height: 340px;
    }

    .blog-card-image img {
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 0 60px;
    }

    .blog-title {
        font-size: 2rem;
    }

    .blog-subtitle {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blog-card-image {
        height: 320px;
    }

    .blog-card-image img {
        min-height: 320px;
    }

    .blog-detail-section {
        padding: 60px 0;
    }

    .blog-detail-container {
        padding: 0 20px;
    }

    .blog-detail-image img {
        height: 350px;
    }

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

    .blog-detail-body h2 {
        font-size: 1.6rem;
    }

    .blog-detail-body h3 {
        font-size: 1.2rem;
    }

    .blog-detail-body {
        font-size: 0.95rem;
    }

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

    .related-post-image {
        height: 180px;
    }

    .blog-detail-meta {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 1.8rem;
    }

    .blog-subtitle {
        font-size: 0.95rem;
    }

    .blog-card-content {
        padding: 18px;
    }

    .blog-card-content h3 {
        font-size: 1.1rem;
    }

    .blog-detail-info h1 {
        font-size: 1.6rem;
    }

    .blog-detail-body h2 {
        font-size: 1.3rem;
    }

    .blog-detail-body h3 {
        font-size: 1.05rem;
    }

    .back-link {
        margin-bottom: 24px;
    }
}

/* ===== NAVIGATION ACTIVE STATE ===== */
.nav-links a[href="blog.html"].active,
nav a[href="blog.html"]:not([href*="#"]) {
    color: var(--primary);
}

/* ===== PRINT STYLES ===== */
@media print {
    .blog-detail-section {
        background: #fff;
        color: #000;
    }

    .blog-detail-info h1 {
        color: #000;
    }

    .blog-detail-body {
        color: #333;
    }

    .back-link,
    .blog-detail-meta {
        display: none;
    }
}
