/* ============================================================
   Home Blog Section ("Корисні Статті")
   ============================================================ */

.home-blog-section {
    width: 100%;
    background-color: #1C1A29;
    padding: 160px 0;
    position: relative;
    overflow: hidden;
}

.home-blog-container {
    width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
}

/* Header styles matching certificates / academy sections */
.home-blog-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
    width: 100%;
}

.home-blog-icon {
    position: absolute;
    left: -10px;
    top: -15px;
    width: 57px;
    height: 56px;
    z-index: 2;
}

.home-blog-title {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: inline-block;
    position: relative;
    padding-left: 45px;
}

.home-blog-dots {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.home-blog-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #F7D48D;
    box-shadow: 0 0 4px rgba(247, 212, 141, 0.8);
}

/* Articles carousel track */
.home-blog-grid {
    display: flex;
    gap: 24px;
    width: 100%;
    margin-bottom: 60px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 0 10px 0;
    box-sizing: border-box;
}

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

/* Premium Card structure */
.home-blog-card {
    flex: 0 0 calc((100% - 48px) / 3); /* 3 cards visible on desktop */
    box-sizing: border-box;
    scroll-snap-align: start;
    background: #050409;
    border: 1px solid rgba(253, 198, 103, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.home-blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 20px rgba(253, 198, 103, 0.08);
}

.home-blog-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid rgba(253, 198, 103, 0.1);
}

.home-blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.home-blog-card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-light);
    line-height: 28px;
    margin: 0;
}

.home-blog-card-desc {
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 248, 234, 0.7);
    line-height: 22px;
    margin: 0;
    flex-grow: 1;
}

.home-blog-card-link {
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-gold);
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
    align-self: flex-start;
    margin-top: auto;
}

.home-blog-card-link:hover {
    opacity: 0.8;
}

/* Navigation buttons and pagination */
.home-blog-navigation-wrapper {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.home-blog-navigation {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.home-blog-pagination {
    display: flex;
    height: 30px;
    justify-content: flex-start;
    align-items: center;
}

.home-blog-current, .home-blog-total {
    color: var(--text-light, #FFF8EA);
    font-size: 24px;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    line-height: 40.80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-blog-slash {
    color: var(--accent-gold, #FDC667);
    font-size: 32px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    letter-spacing: 1.92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 12.23px;
    height: 37.95px;
    text-align: center;
}

.home-blog-current {
    width: 20.39px;
    height: 40px;
}

.home-blog-btn {
    width: 60px;
    height: 20px;
    border-radius: 2px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    outline: none;
}

.home-blog-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(340deg) brightness(1.2);
}

.home-blog-btn-left img {
    transform: rotate(180deg);
}

.home-blog-btn:hover {
    opacity: 0.7;
}

/* ============================================================
   Responsive styling
   ============================================================ */
@media (max-width: 1480px) {
    .home-blog-container {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .home-blog-section {
        padding: 100px 0;
    }
    .home-blog-grid {
        gap: 20px;
    }
    .home-blog-card {
        flex: 0 0 calc((100% - 20px) / 2); /* 2 cards visible */
    }
}

@media (max-width: 768px) {
    .home-blog-section {
        padding: 80px 0;
    }
    .home-blog-grid {
        gap: 16px;
        margin-bottom: 40px;
    }
    .home-blog-card {
        flex: 0 0 100%; /* 1 card visible */
    }
    .home-blog-title {
        font-size: 28px;
        padding-left: 35px;
    }
    .home-blog-icon {
        width: 44px;
        height: 43px;
        left: -5px;
        top: -10px;
    }
    .home-blog-dots {
        gap: 10px;
        margin-bottom: 20px;
    }
}
