:root {
    --primary-color: #e8312b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 16px; 
}

.modern-blog-section {
    padding: 60px 0; 
    background-color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.section-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.scroll-controls {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    color: var(--text-dark);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}


.blog-grid {
    scroll-behavior: smooth; 
    display: flex;
    overflow-x: auto;
    gap: 24px;
    padding: 20px 5px 40px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .scroll-controls {
        display: none; 
    }
}

.section-header h2 {
    font-size: 35px;
    font-weight: 700;
    color: black;
    margin: 0;
}

.section-header p {
    color: var(--text-light);
    margin-top: 5px;
}

.blog-grid {
    display: flex;
    overflow-x: auto;
    gap: 24px;
    padding: 20px 5px 40px 5px; 
    scroll-snap-type: x mandatory;
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch;
}

.blog-grid::-webkit-scrollbar {
    display: none;
}

.blog-card {
    flex: 0 0 400px; 
    scroll-snap-align: start;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    transition: transform 0.5s ease;
}

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

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.category-badge.tutorial { background: linear-gradient(180deg, #0a2340 0%, #2e6193 100%); }
.category-badge.blog { background: linear-gradient(180deg, #0a2340 0%, #2e6193 100%); }

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

.post-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
}

.post-title {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-title a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.2s;
}

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

.post-description {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    margin-top: auto;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more span {
    transition: transform 0.2s;
}

.read-more:hover span {
    transform: translateX(5px);
}

@media (max-width: 480px) {
    .blog-card {
        flex: 0 0 280px;
    }
    .section-header h2 {
        font-size: 1.6rem;
    }
}
