/* ==== FILTER BUTTONS ==== */

.bnb-pub-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.bnb-pub-filter .filter-btn {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.bnb-pub-filter .filter-btn:hover {
    background: #e0e0e0;
}

.bnb-pub-filter .filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
    font-weight: 600;
}


/* ===== GRID LAYOUT ==== */

.bnb-publications-grid {
    display: grid;
    gap: 30px;
    justify-content: center;
    grid-template-columns: repeat(3, minmax(350px, 1fr)); 
    max-width: 1200px;
    margin: 0 auto;
}

/* ==== BREAKPOINTS ==== */

@media (max-width: 599px) {
    .bnb-publications-grid {
        grid-template-columns: repeat(1, minmax(280px, 1fr));
        max-width: 500px;
    }
}

@media (min-width: 600px) and (max-width: 1199px) {
    .bnb-publications-grid {
        grid-template-columns: repeat(2, minmax(320px, 1fr));
        max-width: 900px;
    }
}

/* ==== CARD STYLES ==== */
.bnb-publication-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bnb-publication-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.bnb-publication-image-wrap {
    background-color: #f9f9f9; 
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bnb-publication-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bnb-publication-content {
    padding: 16px 18px 20px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.bnb-publication-title {
    font-style: italic;
    font-weight: 600;
    font-family: inherit; 
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.bnb-publication-excerpt {
    color: #555;
    font-size: 15px;
    margin-bottom: 12px;
    flex-grow: 1; 
}

.bnb-publication-date {
    font-size: 13px;
    margin-bottom: 15px;
}

.bnb-publication-read-more {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 14px;
    align-self: flex-start; 
}

.bnb-publication-read-more:hover {
    background: #333;
}

.bnb-btn-loading {
    background: #444 !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}


/* ==== MODAL STYLES ====== */

/* Modal Container */
#bnb-publication-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden; 
    transition: opacity .25s ease, visibility .25s;
}

#bnb-publication-modal.bnb-modal-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Overlay */
.bnb-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

/* Modal Inner Box  */
#bnb-publication-modal-inner {
    background: #fff;
    border-radius: 8px;
    max-width: 900px;
    width: 90%; 
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000000;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#bnb-publication-modal.bnb-modal-visible #bnb-publication-modal-inner {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    #bnb-publication-modal-inner {
        padding: 20px 25px;
        width: 95%;
    }
}

/* Close button */
#bnb-publication-close {
    position: absolute;
    color: #fff;
    right: 15px;
    top: 15px;
    width: 32px;
    height: 32px;
    background: #000;
    border: none;
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}

#bnb-publication-close:hover {
    background: #888;
}

/* Modal Content Header */
.bnb-pub-modal-header h2 {
    margin-top: 0;
    font-size: 28px;
    font-weight: 700;
}

.bnb-pub-modal-header p {
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}

.bnb-pub-modal-header hr {
    margin: 15px 0;
    border-color: #eee;
}

.bnb-pub-date-in-modal {
    color:#777;
    font-size:13px;
}

/* ==== LOADER BOX ==== */

#bnb-loader-box {
    position: absolute;
    z-index: 9999999;
    background: #fff;
    padding: 18px 24px;
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bnb-loading-text {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
}

/* Spinner animation */
.bnb-spinner {
    width: 23px;
    height: 23px;
    border: 4px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#bnb-publication-modal.bnb-modal-loading .bnb-modal-overlay {
    pointer-events: none;
    cursor: wait;
}

.bnb-publication-card {
  cursor: pointer;
}

.bnb-no-publications-wrap {
  grid-column: 1 / -1; 
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.bnb-no-publications-text {
  font-size: 18px !important;
  color: #555;
  text-align: center;
}
