/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --border-color: #ddd;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'PT Serif', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn.primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #2980b9;
}

.btn.secondary {
    background-color: var(--light-color);
    color: var(--text-color);
}

.btn.secondary:hover {
    background-color: #bdc3c7;
}

.btn.search-btn {
    padding: 10px 15px;
    background-color: var(--secondary-color);
    color: white;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 15px;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
}

nav ul li.active a {
    color: var(--secondary-color);
    font-weight: 700;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content Styles */
main {
    padding: 30px 0;
    min-height: calc(100vh - 150px);
}

.hero {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 40px;
    background-color: var(--light-color);
    border-radius: 8px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.journals-overview {
    margin-bottom: 40px;
}

.journal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.journal-card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.journal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.journal-card h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.recent-publications {
    margin-bottom: 40px;
}

.publications-list {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.publication-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item h4 {
    margin-bottom: 5px;
}

.publication-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.publication-abstract {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

/* Journal Page Styles */
.journal-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.journal-header .issn,
.journal-header .impact-factor {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.journal-header .description {
    font-size: 1.1rem;
    line-height: 1.7;
}

.journal-content {
    display: flex;
    gap: 30px;
}

.journal-sidebar {
    flex: 0 0 250px;
}

.journal-main {
    flex: 1;
}

.sidebar-section {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section ul li {
    margin-bottom: 10px;
}

.sidebar-section ul li a {
    color: var(--text-color);
}

.sidebar-section ul li a:hover {
    color: var(--secondary-color);
}

.sidebar-section p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.journal-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    width: 250px;
}

.search-box button {
    border-radius: 0 4px 4px 0;
}

.year-group {
    margin-bottom: 30px;
}

.year-heading {
    font-size: 1.3rem;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 20px;
}

/* Upload Page Styles */
.upload-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.status-message.success {
    background-color: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
    display: block;
}

.status-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    display: block;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    margin-bottom: 0;
}

footer a {
    color: var(--light-color);
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    margin-right: 15px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    .logo {
        margin-bottom: 15px;
        justify-content: center;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
        display: none;
        background: #fff;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        z-index: 1000;
    }
    nav ul.active {
        display: flex;
    }
    nav ul li {
        margin: 10px 0;
    }
    .mobile-menu {
        display: block;
        position: absolute;
        right: 20px;
        top: 18px;
        font-size: 1.8rem;
        cursor: pointer;
        color: #007bff;
    }
    .journal-cards, .publications-list, .volume-buttons {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 1.2rem !important;
        align-items: stretch !important;
    }
    .publication-card, .journal-card {
        padding: 1rem;
        font-size: 1rem;
    }
    .year-list {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    .year-btn, .volume-btn, .download-btn {
        width: 100%;
        font-size: 1rem;
        padding: 1em 0.5em;
        margin-bottom: 0.5em;
    }
    .journal-content {
        flex-direction: column;
    }
    .journal-sidebar {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }
    .journal-main {
        flex: 1 1 100%;
    }
    .search-box input {
        width: 100%;
        min-width: 0;
    }
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
@media (max-width: 480px) {
    .publication-card, .journal-card {
        font-size: 0.95rem;
        padding: 0.7rem;
    }
    .year-btn, .volume-btn, .download-btn {
        font-size: 0.95rem;
        padding: 0.8em 0.3em;
    }
    .journal-header h2, .volume-header h2 {
        font-size: 1.2rem;
    }
    .container {
        padding: 0 5px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.file-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

/* Style the file input button */
input[type="file"]::file-selector-button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: var(--light-color);
    color: var(--text-color);
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background-color: #ddd;
}

/* Issue Cards Styles */
.issue-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.issue-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.issue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.issue-card-content {
    padding: 20px;
    text-align: center;
}

.issue-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.issue-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.issue-btn {
    width: 100%;
    padding: 10px 20px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.issue-btn:hover {
    background-color: #34495e;
}

.issue-btn i {
    font-size: 1.1rem;
}

.no-issues {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
    font-style: italic;
}

.error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background-color: #fde8e8;
    border-radius: 4px;
}

/* Publication Details Styles */
.publication-details {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

.publication-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.publication-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.publication-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.publication-content {
    max-width: 800px;
    margin: 0 auto;
}

.publication-info {
    margin-bottom: 30px;
}

.info-section {
    margin-bottom: 25px;
}

.info-section h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
}

.info-section p {
    line-height: 1.6;
    color: #34495e;
}

.publication-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.error-message {
    text-align: center;
    padding: 40px;
}

.error-message i {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message p {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Issue Buttons Container Styles */
.issue-buttons-container {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);
    gap: 15px;
    margin-top: 20px;
    max-width: none;
    margin-left: 0;
    margin-right: auto;
    align-items: flex-start;
}

.issue-btn {
    width: 250px;
    padding: 12px 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.issue-btn:hover {
    background-color: #219150;
}

.issue-btn i {
    font-size: 1.2rem;
}

.no-issues {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
    font-style: italic;
}

.error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    background-color: #fde8e8;
    border-radius: 4px;
}

/* Year Selector Row Styles */
.year-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
    margin-top: 20px;
}

.year-btn {
    background: #f4f4f4;
    color: #2c3e50;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.year-btn.active, .year-btn:focus {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}
.year-btn:disabled {
    background: #eee;
    color: #bbb;
    cursor: not-allowed;
    border-color: #eee;
}

.site-name-navbar {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.issue-pagination {
    display: flex;
    gap: 8px;
    margin-top: 25px;
    justify-content: flex-start;
}
.page-btn {
    background: #f4f4f4;
    color: #2c3e50;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.page-btn.active, .page-btn:focus {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
}
.page-btn:hover:not(.active) {
    background: #e0f7ea;
    color: #219150;
    border-color: #27ae60;
}