:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --muted-text: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
}

/* Custom navbar styling */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-text) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hoverable dropdown - only on desktop devices */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

/* Search icon styling */
.navbar-search-icon {
    font-size: 1.2rem;
    color: var(--dark-text);
    transition: color 0.3s ease;
}

.navbar-search-icon:hover {
    color: var(--primary-color);
}

/* Index Cards Styling */
.index-card {
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    background: white;
}

.index-card:hover {
    border-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.index-icon {
    font-size: 3rem;
    color: var(--dark-text);
    transition: color 0.3s ease;
}

.index-card:hover .index-icon {
    color: var(--primary-color);
}

.index-card .btn-dark {
    background: var(--primary-color);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.index-card .btn-dark:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* Latest Research Section */
.latest-research-section {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.research-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    padding: 2rem 0;
}

.research-header::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 1200 120"><path d="M0,0 Q300,60 600,30 T1200,60 L1200,0 Z" fill="rgba(255,255,255,0.05)"/></svg>');
}

.research-header .container {
    position: relative;
    z-index: 1;
}

.research-header h3 {
    color: white;
}

.research-content {
    background: white;
    padding: 2rem 0;
}

.research-item {
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.research-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.research-item h5 {
    color: var(--dark-text);
    line-height: 1.4;
}

.research-item .text-muted {
    color: var(--muted-text) !important;
}

.research-item .text-primary {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

.research-item .text-primary:hover {
    color: var(--secondary-color) !important;
}

.research-header .btn-light {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.research-header .btn-light:hover {
    background: white;
    transform: translateY(-1px);
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
}

.hero-section::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 1200 120"><path d="M0,0 Q300,60 600,30 T1200,60 L1200,0 Z" fill="rgba(255,255,255,0.1)"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.journal-card .card-header {
    background: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Search components */
.search-section {
    background: var(--light-bg);
    padding: 60px 0;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box .form-control {
    border-radius: 50px;
    padding: 15px 25px;
    border: 2px solid var(--border-color);
    font-size: 1.1rem;
}

.search-box .btn {
    border-radius: 50px;
    padding: 15px 30px;
}

/* Footer */
footer {
    background: var(--dark-text);
    color: white;
    padding: 50px 0 20px;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .search-box .form-control {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

/* Authentication pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--light-bg);
}

.auth-card {
    max-width: 400px;
    margin: 0 auto;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Form styling */
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

/* Article Detail Page - Modern Design */
.article-detail-wrapper {
    background: var(--light-bg);
    min-height: calc(100vh - 76px);
    padding: 2rem 0;
}

.article-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.article-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.article-title {
    color: var(--dark-text);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-align: center;
}

.journal-badge {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
}

.authors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.author-item {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    color: var(--dark-text);
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-sidebar {
    padding-left: 1rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.info-card-title {
    color: var(--dark-text);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--dark-text);
    min-width: 80px;
    font-size: 0.9rem;
}

.info-value {
    color: var(--muted-text);
    text-align: right;
    font-size: 0.9rem;
    flex: 1;
    margin-left: 1rem;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.related-item:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.related-item h6 {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--muted-text);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline-success {
    color: var(--success-color);
    border-color: var(--success-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: var(--success-color);
    border-color: var(--success-color);
    transform: translateY(-2px);
}

@media (max-width: 992px) {
    .article-sidebar {
        padding-left: 0;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .article-detail-wrapper {
        padding: 1rem 0;
    }
    
    .article-content {
        padding: 1.5rem;
        margin: 0 1rem 1rem 1rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .authors-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-actions {
        flex-direction: column;
    }
    
    .article-actions .btn {
        width: 100%;
    }
    
    .info-card {
        margin: 0 1rem 1rem 1rem;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-value {
        text-align: left;
        margin-left: 0;
    }
}