/* Publications Section Styles */
.publications-section {
    padding: 80px 0;
    background: #ffffff;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-input:focus {
    border-color: #2c3e50;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 18px;
}

/* Tabs */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #2c3e50;
    background: white;
    color: #2c3e50;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.tab-btn:hover {
    background: #2c3e50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.tab-btn.active {
    background: #2c3e50;
    color: white;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

/* Main Content Area */
.publications-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Carousel Container */
.carousel-container {
    flex: 2;
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.publications-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #2c3e50 #ecf0f1;
    padding: 10px;
}

.publications-carousel::-webkit-scrollbar {
    width: 8px;
}

.publications-carousel::-webkit-scrollbar-track {
    background: #ecf0f1;
    border-radius: 10px;
}

.publications-carousel::-webkit-scrollbar-thumb {
    background: #2c3e50;
    border-radius: 10px;
}

.publications-carousel::-webkit-scrollbar-thumb:hover {
    background: #1a252f;
}

/* Publication Card */
.publication-card {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #ecf0f1;
}

.publication-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #2c3e50;
}

.publication-card.active-hover {
    border-color: #2c3e50;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.3);
}

.card-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-authors {
    font-size: 13px;
    color: #7f8c8d;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
}

.card-year {
    font-size: 12px;
    color: #95a5a6;
    font-weight: 600;
}

.card-category {
    font-size: 11px;
    padding: 4px 10px;
    background: #2c3e50;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}

/* Carousel Navigation Buttons - Hidden for vertical scroll */
.carousel-nav {
    display: none;
}

/* Preview Panel */
.preview-panel {
    flex: 1;
    min-width: 350px;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.preview-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: #95a5a6;
}

.preview-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.preview-default p {
    font-size: 16px;
    line-height: 1.6;
}

.preview-content {
    animation: fadeIn 0.3s ease;
}

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

.preview-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
}

.preview-authors {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-style: italic;
}

.preview-year {
    font-size: 13px;
    color: #95a5a6;
    margin-bottom: 20px;
    font-weight: 600;
}

.preview-abstract {
    font-size: 15px;
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.preview-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.preview-link:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 18px;
}

.no-results i {
    font-size: 60px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .publications-content {
        flex-direction: column;
    }
    
    .preview-panel {
        max-width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .carousel-container {
        padding: 20px;
    }
    
    .publications-carousel {
        grid-template-columns: 1fr;
    }
    
    .tabs-container {
        gap: 8px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        padding: 15px;
    }
}

/* ===== OLD GRID STYLES (BACKUP) ===== */
.publications-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 20px;
	max-height: 600px;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	overflow-y: auto;
	padding: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}

.publication-card .img-post {
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.publication-card .img-post img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.publication-card .content-post {
	padding: 20px;
}

.publication-card .content-post h6 {
	margin-bottom: 10px;
	font-size: 18px;
}

.publication-card .date {
	font-size: 12px;
	color: #999;
	margin-bottom: 10px;
}

.publication-card .content-post p {
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 15px;
}
