.brif-wrapper {
    padding: 80px 0;
    width: 100%;
    overflow: hidden;
}

.brif-heading {
    text-align: center;
    margin-bottom: 38px;
}

.brif-heading span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a8176;
    font-size: 13px;
    margin-bottom: 8px;
}

.brif-heading h2 {
    font-size: 42px;
    line-height: 1.2;
    margin: 0 0 18px;
    font-weight: 500;
    color: #171310;
}

.brif-follow-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 999px;
    background: #171310;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    transition: all .25s ease;
}

.brif-follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.brifSwiper {
    width: 100%;
    padding: 10px 50px 35px;
    position: relative;
}

.brif-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0,0,0,.11);
    transition: all .3s ease;
}

.brif-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0,0,0,.16);
}

.brif-card a {
    color: inherit;
    text-decoration: none;
}

.brif-media {
    position: relative;
    overflow: hidden;
    background: #f4f1ec;
}

.brif-media img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.brif-card:hover .brif-media img {
    transform: scale(1.06);
}

.brif-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.58), rgba(0,0,0,.05));
    opacity: 0;
    transition: opacity .3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 18px;
}

.brif-card:hover .brif-overlay {
    opacity: 1;
}

.brif-type,
.brif-open {
    color: #fff;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.brif-caption {
    margin: 0;
    padding: 16px 18px 20px;
    color: #4b443e;
    font-size: 14px;
    line-height: 1.55;
}

.brif-posts {
    width: min(1180px, 92%);
    margin: 0 auto;
}

.brif-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.brif-posts-masonry {
    columns: 4 230px;
    column-gap: 22px;
}

.brif-posts-masonry .brif-card {
    break-inside: avoid;
    margin-bottom: 22px;
}

.brif-posts-grid .brif-media img,
.brif-posts-masonry .brif-media img {
    height: 300px;
}

.brif-swiper-nav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #171310;
    color: #fff;
    position: absolute;
    top: 43%;
    transform: translateY(-50%);
    z-index: 5;
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.brif-swiper-prev {
    left: 5px;
}

.brif-swiper-next {
    right: 5px;
}

.brif-empty {
    text-align: center;
    padding: 35px;
    background: #faf8f4;
    border-radius: 18px;
    width: min(680px, 92%);
    margin: 0 auto;
}

.brif-no-image {
    height: 320px;
    display: grid;
    place-items: center;
    color: #777;
}

.brif-admin-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 20px;
    margin: 18px 0;
    max-width: 900px;
}

.brif-error-box {
    border-left: 4px solid #d63638;
}

@media (max-width: 1024px) {
    .brif-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .brif-wrapper {
        padding: 55px 0;
    }

    .brif-heading h2 {
        font-size: 30px;
    }

    .brifSwiper {
        padding: 5px 18px 30px;
    }

    .brif-media img {
        height: 300px;
    }

    .brif-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .brif-posts-grid .brif-media img,
    .brif-posts-masonry .brif-media img {
        height: 230px;
    }

    .brif-swiper-nav {
        display: none;
    }
}

@media (max-width: 520px) {
    .brif-posts-grid {
        grid-template-columns: 1fr;
    }
}
