/* ==========================================================================
   BLOG CARDS COMPONENT
   ========================================================================== */

.blog-cards-section {
    padding: var(--spacing-2xl, 80px) 0;
    background-color: var(--dark-bg, #05050a);
}

.blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg, 40px);
    margin-top: var(--spacing-2xl, 80px);
}

.blog-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* reduce heavy shadow for smoother paint */
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    will-change: transform;
    backface-visibility: hidden;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red, #E60000);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.blog-card__image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.1);
}

.blog-card__category {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--primary-red, #E60000);
    color: #fff;
    padding: 6px 15px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.blog-card__content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}

.blog-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 10px 0 15px 0;
    line-height: 1.3;
}

.blog-card__title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card__title a:hover {
    color: var(--primary-red, #E60000);
}

.blog-card__excerpt {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 0 0 auto 0;
    font-size: 0.95rem;
    flex-grow: 1;
}

.blog-card__link {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
    margin-top: 20px;
    width: fit-content;
}

.blog-card__link:hover {
    color: var(--primary-red, #E60000);
}

.blog-card__link i {
    transition: transform 0.3s ease;
}

.blog-card__link:hover i {
    transform: translateX(5px);
}

/* SWIPER STYLES */
.swiper-slide {
    height: auto;
    display: flex;
}

.swiper-slide .blog-card {
    width: 100%;
}

.swiper-button-next,
.swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(230, 0, 0, 0.1);
    border: 2px solid var(--primary-red);
    border-radius: 50%;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-red);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    color: var(--primary-red);
    font-weight: bold;
}

.swiper-button-next:hover::after,
.swiper-button-prev:hover::after {
    color: #fff;
}

.swiper-button-prev {
    left: -65px;
}

.swiper-button-next {
    right: -65px;
}

.swiper-pagination {
    bottom: -50px !important;
    position: static;
    margin-top: 40px;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--primary-red);
    width: 30px;
    border-radius: 6px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .blog-cards-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-card__image {
        height: 200px;
    }
    
    .blog-card__content {
        padding: 25px;
    }
    
    .blog-card__title {
        font-size: 1.3rem;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }
    
    .swiper-pagination {
        bottom: 0 !important;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .blog-card__image {
        height: 180px;
    }
    
    .blog-card__content {
        padding: 20px;
    }
}

/* skill progress transition */
.skill-progress {
    height: 8px;
    background: var(--primary-red, #E60000);
    width: 0;
    transition: width 900ms cubic-bezier(.2,.8,.2,1);
    will-change: width;
}
