/* static/css/publications/publications_home.css */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Hero Section */
.publications-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 120px 0 80px 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.publications-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-stats {
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat-item {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

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

/* Publications Section */
.publications-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    min-height: 70vh;
}

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

.publications-grid {
    margin-top: 0;
    margin-left: -15px;
    margin-right: -15px;
}

.publications-grid > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Publication Card */
.publication-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.publication-card:hover::before {
    transform: scaleX(1);
}

.publication-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.publication-header {
    margin-bottom: 20px;
}

.publication-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.publication-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.publication-title a:hover {
    color: #667eea;
}

.publication-author {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.publication-author::before {
    content: '👤';
    font-size: 0.85rem;
}

.publication-body {
    flex-grow: 1;
    margin-bottom: 25px;
}

.publication-description {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: justify;
}

.publication-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.publication-meta {
    display: flex;
    align-items: center;
}

.publication-date {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.publication-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.publication-actions .btn {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.btn-outline-success {
    color: #28a745;
    border: 1px solid #28a745;
    background: transparent;
}

.btn-outline-success:hover {
    background: #28a745;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: #667eea;
    border: 1px solid #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: #6c757d;
    border: 1px solid #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.btn-primary {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
}

.btn-primary:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
    transform: translateY(-2px);
}

/* No Publications State */
.no-publications {
    text-align: center;
    padding: 100px 20px;
    color: #6c757d;
}

.no-publications .display-1 {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.3;
}

.no-publications h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #495057;
}

.no-publications p {
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Pagination */
.publications-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.pagination {
    margin-bottom: 0;
    display: flex;
    list-style: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-item {
    margin: 0;
}

.page-link {
    color: #667eea;
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
    margin: 0;
}

.page-link:hover {
    color: #5a6fd8;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    z-index: 3;
}

.page-item:first-child .page-link {
    border-radius: 12px 0 0 12px;
}

.page-item:last-child .page-link {
    border-radius: 0 12px 12px 0;
}

/* Bootstrap Icons Enhancements */
.bi {
    font-size: inherit;
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 1280px) {
    .hero-title {
        font-size: 3rem;
    }
    .publications-section {
        padding: 70px 0;
    }
}
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .publications-section {
        padding: 60px 0;
    }
    
    .publication-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .publications-hero {
        padding: 100px 0 60px 0;
    }
    
    .publication-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }
    
    .publication-actions {
        justify-content: center;
    }
    
    .publications-pagination {
        margin-top: 40px;
    }
    
    .page-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .publications-hero {
        padding: 80px 0 50px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .publications-section {
        padding: 50px 0;
    }
    
    .publication-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .publication-title {
        font-size: 1.2rem;
    }
    
    .stat-item {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .no-publications .display-1 {
        font-size: 3rem;
    }
    
    .no-publications h3 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .publications-hero,
    .publication-actions,
    .publications-pagination {
        display: none;
    }
    
    .publication-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 20px;
    }
}