/* Publication Page Styles */
.publication-area {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.publication-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.section-title {
    margin-bottom: 60px;
}

.section-main-title h2 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-main-title p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 30px;
    font-weight: 400;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    margin: 0 auto;
    border-radius: 2px;
}

/* Publication Grid */
.publication-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center; /* Center items if not full row */
}

.publication-item {
    flex: 0 0 calc(33.333% - 20px); /* 3 items per row */
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease forwards; /* Staggered animation will be added by JS if needed */
}

@media (max-width: 992px) {
    .publication-item {
        flex: 0 0 calc(50% - 15px); /* 2 items per row on medium screens */
    }
}

@media (max-width: 768px) {
    .publication-item {
        flex: 0 0 100%; /* 1 item per row on small screens */
    }
}

/* Publication Card */
.publication-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    height: 100%; /* Ensure cards in a row have same height */
    display: flex;
    flex-direction: column;
}

.publication-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.publication-image-container {
    position: relative;
    overflow: hidden;
    height: 280px; /* Fixed height for the image container */
    flex-shrink: 0; /* Prevent image container from shrinking */
}

.publication-image-container a {
    display: block;
    width: 100%;
    height: 100%;
}

.publication-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, cropping if necessary */
    transition: transform 0.6s ease;
}

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

.publication-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.9),
        rgba(139, 92, 246, 0.9)
    );
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.publication-overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.publication-overlay-content i {
    font-size: 2.5rem;
}

/* Publication Content */
.publication-content {
    padding: 25px;
    flex-grow: 1; /* Allow content to take remaining space */
    display: flex;
    flex-direction: column;
}

.publication-title {
    margin-bottom: 15px;
}

.publication-title h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
    margin-bottom: 0;
}

.publication-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.publication-actions {
    margin-top: auto; /* Push actions to the bottom */
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* Remove underline for links */
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1a202c;
}

/* Animation Classes */
.fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
