/*!
 * Blog + Gallery — Bibahabd / profession-search style
 */
.bbd-blog,
.bbd-gallery {
    font-family: var(--ps-font, "Poppins", "Segoe UI", Tahoma, Arial, sans-serif);
}

.bbd-blog__intro,
.bbd-gallery__intro {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    color: #555;
}

/* Category filters */
.bbd-blog__filters,
.bbd-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.bbd-blog__filter,
.bbd-gallery__filter {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid var(--ps-green-border, #d4dd9d);
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bbd-blog__filter:hover,
.bbd-gallery__filter:hover,
.bbd-blog__filter.is-active,
.bbd-gallery__filter.is-active {
    background: var(--ps-green, #93b219);
    border-color: var(--ps-green, #93b219);
    color: #fff !important;
}

/* Blog grid */
.bbd-blog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.bbd-blog__card {
    background: #fff;
    border: 1px solid var(--ps-green-border, #d4dd9d);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}

.bbd-blog__card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.bbd-blog__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ps-green-soft, #edf3c7);
}

.bbd-blog__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.bbd-blog__card:hover .bbd-blog__media img {
    transform: scale(1.04);
}

.bbd-blog__cat {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: var(--ps-green, #93b219);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bbd-blog__body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bbd-blog__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #777;
    margin-bottom: 8px;
}

.bbd-blog__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    color: #222;
}

.bbd-blog__title a {
    color: inherit;
    text-decoration: none;
}

.bbd-blog__title a:hover {
    color: var(--ps-green, #93b219);
}

.bbd-blog__excerpt {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    line-height: 1.5;
    flex: 1;
}

.bbd-blog__read {
    font-size: 13px;
    font-weight: 700;
    color: var(--ps-green, #93b219);
    text-decoration: none;
    text-transform: uppercase;
}

.bbd-blog__read:hover {
    color: #000;
}

.bbd-blog__empty {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    background: var(--ps-green-soft, #edf3c7);
    border: 1px solid var(--ps-green-border, #d4dd9d);
    color: #555;
    font-weight: 600;
}

.bbd-blog__pagination {
    margin: 8px 0 28px;
}

.bbd-blog__pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.bbd-blog__pagination .page-link {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid var(--ps-green-border, #d4dd9d);
    background: #fff;
    color: #333;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}

.bbd-blog__pagination .page-item.active .page-link,
.bbd-blog__pagination .page-link:hover {
    background: var(--ps-green, #93b219);
    border-color: var(--ps-green, #93b219);
    color: #fff;
}

.bbd-blog__pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* Article */
.bbd-article {
    background: var(--ps-green-soft, #edf3c7);
    border: 1px solid var(--ps-green-border, #d4dd9d);
    padding: 22px 24px;
    margin-bottom: 30px;
}

.bbd-article__back {
    display: inline-block;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 14px;
    color: var(--ps-green, #93b219);
    text-decoration: none;
}

.bbd-article__back:hover {
    color: #000;
}

.bbd-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.bbd-article__meta a {
    color: var(--ps-green, #93b219);
    font-weight: 700;
}

.bbd-article__cover {
    margin-bottom: 18px;
    border: 1px solid var(--ps-green-border, #d4dd9d);
    overflow: hidden;
    background: #fff;
}

.bbd-article__cover img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 420px;
    object-fit: cover;
}

.bbd-article__prose {
    background: #fff;
    border: 1px solid var(--ps-green-border, #d4dd9d);
    padding: 18px 20px;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    font-weight: 500;
}

.bbd-article__prose img {
    max-width: 100%;
    height: auto;
}

.bbd-article__prose h2,
.bbd-article__prose h3 {
    font-weight: 800;
    color: #1a1a1a;
    margin: 1.2em 0 0.5em;
}

.bbd-article__prose p {
    margin: 0 0 1em;
}

.bbd-article__prose a {
    color: var(--ps-green, #93b219);
    font-weight: 700;
}

/* Gallery */
.bbd-gallery__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #222;
    text-align: center;
}

.bbd-gallery__lead {
    margin: 0 auto 20px;
    max-width: 640px;
    text-align: center;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}

.bbd-gallery__filters {
    justify-content: center;
}

.bbd-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.bbd-gallery__item.is-hidden {
    display: none;
}

.bbd-gallery__card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--ps-green-border, #d4dd9d);
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.bbd-gallery__card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.bbd-gallery__card:hover img {
    transform: scale(1.05);
}

.bbd-gallery__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bbd-gallery__card:hover .bbd-gallery__overlay,
.bbd-gallery__card:focus .bbd-gallery__overlay {
    opacity: 1;
}

.bbd-gallery__caption {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.bbd-gallery__zoom {
    color: #fff;
    font-size: 16px;
}

.bbd-gallery__empty {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    background: var(--ps-green-soft, #edf3c7);
    border: 1px solid var(--ps-green-border, #d4dd9d);
    font-weight: 600;
    color: #555;
}

.bbd-gallery-lightbox {
    border: none;
    padding: 0;
    max-width: min(920px, 94vw);
    background: transparent;
}

.bbd-gallery-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.78);
}

.bbd-gallery-lightbox__inner {
    background: #111;
    border: 2px solid var(--ps-green, #93b219);
    position: relative;
    padding: 12px;
}

.bbd-gallery-lightbox__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: var(--ps-green, #93b219);
    color: #fff;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.bbd-gallery-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
}

.bbd-gallery-lightbox__title {
    margin: 10px 0 0;
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.bbd-gallery-cta {
    margin: 10px 0 28px;
    padding: 22px 18px;
    background: var(--ps-green, #93b219);
    border: 1px solid var(--ps-green-border, #d4dd9d);
    text-align: center;
    color: #fff;
}

.bbd-gallery-cta h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.bbd-gallery-cta p {
    margin: 8px auto 0;
    max-width: 480px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
}

.bbd-gallery-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.bbd-gallery-cta__btn {
    display: inline-block;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #fff;
}

.bbd-gallery-cta__btn--primary {
    background: #fff;
    color: var(--ps-green, #93b219) !important;
}

.bbd-gallery-cta__btn--ghost {
    background: transparent;
    color: #fff !important;
}

.bbd-gallery-cta__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Homepage teaser */
.bbd-media-teaser {
    padding: 50px 0;
    background: #f7f9ef;
}

.bbd-media-teaser .bbd-section-title {
    padding-top: 0;
}

.bbd-media-teaser__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}

.bbd-media-teaser__more {
    margin-top: 22px;
    text-align: center;
}

.bbd-media-teaser__more a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bbd-green, #93b219);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

.bbd-media-teaser__more a:hover {
    background: var(--bbd-green-dark, #6f8a12);
}

@media (max-width: 980px) {
    .bbd-blog__grid,
    .bbd-gallery__grid,
    .bbd-media-teaser__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .bbd-blog__grid,
    .bbd-gallery__grid,
    .bbd-media-teaser__grid {
        grid-template-columns: 1fr;
    }

    .bbd-article {
        padding: 14px;
    }

    .bbd-article__prose {
        padding: 14px;
        font-size: 15px;
    }

    .bbd-blog__title {
        font-size: 16px;
    }

    .bbd-gallery__title {
        font-size: 18px;
    }

    .bbd-gallery-cta h3 {
        font-size: 18px;
    }

    .bbd-gallery-cta__btn {
        width: 100%;
        text-align: center;
    }
}
