/**
 * Custom CSS untuk memperbaiki tampilan menu OJS
 * Mengatasi masalah layout yang berantakan
 */

/* Reset dan base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Header dan navbar */
#header {
    background: linear-gradient(135deg, #4a6741 0%, #6b8e23 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#header h1 {
    margin: 0;
    text-align: center;
    font-size: 2.2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation bar styling */
#navbar {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 10px 0;
    margin-bottom: 20px;
}

#navbar .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

#navbar .menu li {
    margin: 0;
    padding: 0;
}

#navbar .menu li a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

#navbar .menu li a:hover {
    background-color: #4a6741;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Main content layout */
#main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    min-height: 600px;
}

/* Left sidebar navigation */
#main>div:first-child {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#main>div:first-child ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#main>div:first-child ul li {
    margin-bottom: 8px;
}

#main>div:first-child ul li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #495057;
    border-radius: 5px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

#main>div:first-child ul li a:hover {
    background-color: #e9ecef;
    border-left-color: #4a6741;
    color: #4a6741;
}

/* Breadcrumbs */
.breadcrumb {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb a {
    color: #4a6741;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Main title */
#main h1 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Alphabetical navigation */
.alphabetical {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 30px;
    justify-content: center;
}

.alphabetical a {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: #495057;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 35px;
    text-align: center;
}

.alphabetical a:hover,
.alphabetical a.current {
    background: #4a6741;
    color: white;
}

/* Journal listings */
.journal-list {
    display: grid;
    gap: 20px;
}

.journal-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid #4a6741;
}

.journal-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.journal-cover {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

.journal-cover img {
    max-width: 120px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.journal-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.journal-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.journal-actions {
    clear: both;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.journal-actions a {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    text-decoration: none;
    color: #4a6741;
    border: 2px solid #4a6741;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.journal-actions a:hover {
    background: #4a6741;
    color: white;
    transform: translateY(-2px);
}

/* Right sidebar */
#main>div:last-child {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-section h3 {
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a6741;
}

/* Form styling */
.pkp_form input[type="text"],
.pkp_form input[type="password"],
.pkp_form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.pkp_form input[type="text"]:focus,
.pkp_form input[type="password"]:focus,
.pkp_form select:focus {
    outline: none;
    border-color: #4a6741;
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.1);
}

.pkp_form button,
.pkp_form input[type="submit"] {
    background: #4a6741;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pkp_form button:hover,
.pkp_form input[type="submit"]:hover {
    background: #3d5a35;
    transform: translateY(-2px);
}

/* Checkbox styling */
.pkp_form input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    #main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    #navbar .menu {
        flex-direction: column;
        gap: 10px;
    }

    .journal-cover {
        float: none;
        text-align: center;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .alphabetical {
        gap: 3px;
    }

    .alphabetical a {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 30px;
    }
}

@media (max-width: 480px) {
    #header h1 {
        font-size: 1.8em;
    }

    .journal-title {
        font-size: 1.1em;
    }

    .journal-actions a {
        display: block;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* Clearfix untuk float elements */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Additional styles for site content */
.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.intro-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
    color: #495057;
}

.no-journals {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #6c757d;
    font-style: italic;
}

.pagination-section {
    margin-top: 30px;
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pagination-section a {
    color: #4a6741;
    text-decoration: none;
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.pagination-section a:hover {
    background: #4a6741;
    color: white;
}

/* Override default OJS styles */
#main h2 {
    display: none;
    /* Hide the default page title since we have custom styling */
}

#content {
    padding: 0;
}

/* Fix for breadcrumbs */
.breadcrumb {
    margin: 0 0 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-content {
        padding: 15px;
    }

    .journal-item {
        padding: 15px;
    }

    .intro-section {
        padding: 15px;
    }
}