/* Publication CSS */

/* Sort Dropdown Styling */
#sortDropdown::after {
    display: none !important;
}

#sortDropdown:hover {
    background-color: #f8f9fa !important;
}

#sortDropdown:focus {
    box-shadow: 0 0 0 0.2rem rgba(3, 155, 193, 0.25) !important;
    border-color: #039BC1 !important;
}

.dropdown-menu.show {
    margin-top: 0.5rem !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #039BC1 !important;
}

.dropdown-item.active {
    background-color: #039BC1;
    color: white !important;
}

/* Publications Grid Styles */
#publicationsGrid {
    margin-bottom: 2rem;
}

.publication-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-link:hover {
    text-decoration: none;
    color: inherit;
}

.publication-card {
    height: 100%;
    margin-bottom: 0;
    transition: transform 0.3s ease;
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    padding: 1rem;
    background-color: white;
    display: flex;
    flex-direction: column;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.publication-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 12px;
    background-color: #f8f9fa;
    position: relative;
    margin-bottom: 1rem;
}

.publication-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

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

.publication-arrow-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    background-color: rgba(3, 155, 193, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    text-decoration: none;
}

.publication-arrow-link:hover {
    background-color: #039BC1;
    /* transform: scale(1.1); */
    text-decoration: none;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.publication-content {
    background-color: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.publication-title {
    font-family: poppins, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-description {
    font-family: poppins, sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    /* padding-top: 1rem; */
    /* border-top: 1px solid #f0f0f0; */
}

.author-profile {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-name {
    font-family: poppins, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.author-role {
    font-family: poppins, sans-serif;
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

/* Pagination Styles */
.pagination {
    margin-top: 3rem;
}

.page-link {
    font-family: poppins, sans-serif;
    color: #333;
    border: 1px solid #DDDDDD;
    padding: 0.5rem 0.75rem;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    background-color: #039BC1;
    color: white;
    border-color: #039BC1;
}

.page-item.active .page-link {
    background-color: #039BC1;
    border-color: #039BC1;
    color: white;
}

.page-item.disabled .page-link {
    background-color: #f8f9fa;
    color: #999;
    border-color: #DDDDDD;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Styles */
@media (max-width: 991px) {
    /* Tablet: 2 columns */
    .publication-card {
        padding: 0.875rem;
    }

    .publication-image-container {
        height: 220px;
    }
}

@media (max-width: 768px) {
    /* Mobile: 1 column */
    .publication-card {
        padding: 0.75rem;
    }

    .publication-image-container {
        height: 200px;
    }

    .publication-title {
        font-size: 16px;
    }

    .publication-description {
        font-size: 13px;
    }

    .author-profile {
        width: 40px;
        height: 40px;
    }

    .author-name {
        font-size: 13px;
    }

    .author-role {
        font-size: 11px;
    }

    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .publication-card {
        padding: 0.625rem;
    }

    .publication-image-container {
        height: 180px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-link {
        padding: 0.35rem 0.5rem;
        font-size: 13px;
    }
}
