/* ===========BLOG HEADER==================== */

.blog__head {
    padding: 60px 12px;
    text-align: center;
}

.blog__title {
    color: var(--secondary);
    font-size: 3.25rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.0975rem;
    margin: 0 0 2rem 0;
}

.blog__subtitle {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--primary);
}

/* ===============HERO SLIDER================= */
.hero {
    width: 100%;
    margin-bottom: 60px;
}

.blog-hero__section {
    max-width: 1360px;
    margin: 0 auto;

}

.blog-hero__wrapper {
    position: relative;
    border-radius: 4px;
    border: 1px solid var(--border);
    box-shadow: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 420px;
    display: flex;
    flex-direction: column;
}

.swiper-slide {
    display: flex !important;
    align-items: center;
}

.blog-hero__content {
    width: 55%;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.blog-hero__type-wrapper {
    padding-bottom: 12px;
}

.blog-item__type {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 10px;
    align-self: start;
}

.blog-hero__title {
    color: var(--secondary);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.0975rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-hero__description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray);
    margin:  auto 0 40px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-hero__link {
    color: var(--violet);
    font-size: 18px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    text-decoration: underline;
}


.blog-hero__link svg path {
    stroke: currentColor;
}

.blog-hero__image {
    width: 45%;
    position: relative;
    overflow: hidden;
    max-height: 420px;
    flex-shrink: 0;
    align-self: stretch;
}

.blog-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider__controls {
    position: absolute;
    bottom: 12px;
    left: 55%;
    transform: translateX(calc(-100% - 12px));
    display: flex;
    border-top-left-radius: 8px;
    z-index: 1;
    gap: 12px;
}

.hero-slider__btn {
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slider__btn svg{
    width: 12px;
    height: 12px;
}

/* ============LIST SECTION================ */

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    gap: 18px;
}

.blog-search-box {
    position: relative;
    flex: 1;
}

.blog-search-box input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    outline: none;
    background: transparent;
    transition: border-color 0.3s;
    color: var(--primary);
}

.blog-search-box input:focus {
    border-bottom-color: var(--violet);
}

.blog-search-icon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    width: 16px;
    height: 16px;
}

.blog-list__nav {
    flex-shrink: 0;
    overflow-x: auto;
    padding: 5px;
}

.blog-list__filters {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-filter-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -1px;
    padding: 2px;
    width: 118px;
}
.blog-filter-item:first-child {
    margin-left: 0;
}
.blog-decor-item{
    position: relative;
    border: 1px dashed var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.blog-decor-item:not(.active):hover {
    border-color: var(--border);
    background-color: var(--violet-05);
}

.blog-decor-item.active {
    border: 1px solid var(--violet) !important;
    z-index: 1;
}

.blog-filter-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    width: 100%;
    height: 100%;
    white-space: nowrap;
}

.blog-decor-item.active .blog-filter-btn {
    color: var(--violet);
}

.blog-link-decor {
    position: absolute;
    width: 6px;
    height: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.blog-decor-item.active .blog-link-decor {
    opacity: 1;
    visibility: visible;
}

.blog-link-decor--1 { top: -1px; left: -1px; border-left: 2px solid var(--violet); border-top: 2px solid var(--violet); }
.blog-link-decor--2 { top: -1px; right: -1px; border-right: 2px solid var(--violet); border-top: 2px solid var(--violet); }
.blog-link-decor--3 { bottom: -1px; left: -1px; border-left: 2px solid var(--violet); border-bottom: 2px solid var(--violet); }
.blog-link-decor--4 { bottom: -1px; right: -1px; border-right: 2px solid var(--violet); border-bottom: 2px solid var(--violet); }

.blog-article-count {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 30px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px 30px;
    margin-bottom: 60px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

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

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


.blog-item__title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    color: var(--secondary);
}

.blog-item__date {
    font-size: 13px;
    color: var(--gray);
    margin-top: auto;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.blog-page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray);
    border-radius: 4px;
}

.blog-page-btn.active {
    background-color: var(--secondary);
    color: var(--white);
}

.blog-page-btn:hover:not(.active) {
    background-color: var(--bg-gray);
}

.blog-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =================ADAPTIVE STYLES================== */
@media (max-width: 992px) {
    .blog-hero__content {
        padding: 40px;
    }
    .blog-hero__title {
        font-size: 32px;
    }
    .blog-header {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .blog-filters {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .blog-search-box {
        width: 100%;
    }
    .blog-list__filters{
        justify-content: start;
        overflow-x: auto;

    }
    .blog-filter-item{
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .blog-hero__wrapper{
        height: auto;
    }
    .swiper-slide {
        flex-direction: column;
    }
    .blog-hero__description{
        margin: auto;
        -webkit-line-clamp: 2;
    }
    .blog-hero__content {
        width: 100%;
        padding: 30px 20px ;
        height: 300px;
    }

    .blog-hero__image {
        width: 100%;
        height: 250px;

        flex: 0 0 auto;
    }

    .hero-slider__controls {
        left: auto;
        right: 0;
        bottom: 250px;
        transform: none;
        gap: 0;
    }
    .hero-slider__btn{
        border-radius: 0;
    }

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