:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --text-color: #333;
    --text-muted: #6c757d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
    color: white;
    padding: 60px 0;
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
}

.post-card {
    margin-bottom: 20px;
}

.post-title {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.post-title:hover {
    color: var(--accent-color);
}

.category-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.search-form {
    max-width: 400px;
}

.sidebar {
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.category-list a:hover {
    background-color: #e9ecef;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9em;
}

.content-area {
    min-height: 400px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-html {
    word-wrap: break-word;
}

.content-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.content-html table {
    width: 100%;
    margin: 20px 0;
}

.content-html iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* Research page styles */
.research-level {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.research-sector {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.research-project {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Gallery styles */
.photo-category {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        margin-top: 30px;
    }
}

/* Search results highlighting */
mark {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Topic and source badges */
.topic-badge {
    background-color: #17a2b8;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

.source-badge {
    background-color: #6f42c1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

/* Statistics cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* File cards */
.file-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.file-icon {
    color: var(--primary-color);
}

.file-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.file-thumbnail:hover {
    transform: scale(1.02);
    border-color: var(--primary-color);
}

.file-info {
    font-size: 0.85rem;
}

.file-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.file-actions .btn {
    font-size: 0.8rem;
    padding: 4px 8px;
}

.file-meta {
    font-size: 0.75rem;
}

/* File type colors */
.fa-file-pdf { color: #dc3545; }
.fa-file-word { color: #007bff; }
.fa-file-excel { color: #28a745; }
.fa-file-powerpoint { color: #fd7e14; }
.fa-file-audio { color: #6f42c1; }
.fa-file-video { color: #e83e8c; }
.fa-file-archive { color: #6c757d; }
.fa-image { color: #17a2b8; }

/* Post images */
.post-image img {
    transition: transform 0.3s ease;
}

.post-image img:hover {
    transform: scale(1.02);
}

/* Category images */
.category-image {
    border: 1px solid #dee2e6;
}

/* Related images */
.related-image-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 1.5rem;
}

.related-image-card:hover .image-overlay {
    opacity: 1;
}

/* Featured image */
.post-featured-image img {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Gallery items */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    text-align: center;
}

.gallery-overlay-content p {
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Gallery sections */
.gallery-section {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 2rem;
}

.gallery-section:last-child {
    border-bottom: none;
}
