/* =========================================================
   Jurnal Agronomi Indonesia
   Custom Journal Style Sheet for OJS 3 Bootstrap3 Theme
   Version: 1.0
   Palette: Academic Agronomy Green
   ========================================================= */


/* ---------- 1. Global typography and layout ---------- */

body {
    background: #f7f7f2;
    color: #222222;
    font-family: "Source Sans Pro", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.navbar-nav > li > a,
.pkp_block .title {
    font-family: "Merriweather Sans", "Segoe UI", Arial, sans-serif;
}

a {
    color: #1b5e20;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #0f3d16;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: #1b5e20;
    font-weight: 700;
    line-height: 1.35;
}

h1 {
    font-size: 30px;
}

h2 {
    font-size: 25px;
    border-bottom: 2px solid #d8e6d3;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

h3 {
    font-size: 21px;
}

p {
    margin-bottom: 14px;
}

.container,
.pkp_structure_main {
    max-width: 1180px;
}


/* ---------- 2. Header and journal identity ---------- */

.pkp_structure_head,
.header_view {
    background: #1b5e20;
    border-bottom: 4px solid #c8a951;
}

.navbar {
    background: #1b5e20;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.navbar-header .navbar-brand {
    color: #ffffff !important;
    font-weight: 700;
    height: auto;
    min-height: 76px;
    padding-top: 14px;
    padding-bottom: 14px;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    max-height: 64px;
    width: auto;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: #f4e8b8 !important;
    text-decoration: none;
}


/* ---------- 3. Main navigation ---------- */

.navbar-nav > li > a {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14px;
    padding-top: 27px;
    padding-bottom: 27px;
}

.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus,
.navbar-nav > .active > a,
.navbar-nav > .active > a:hover,
.navbar-nav > .active > a:focus {
    background: #0f3d16 !important;
    color: #f4e8b8 !important;
    text-decoration: none;
}

.navbar-nav > li > .dropdown-menu {
    border-radius: 0 0 4px 4px;
    border: none;
    border-top: 3px solid #c8a951;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.dropdown-menu > li > a {
    color: #1b5e20;
    font-weight: 500;
    padding: 9px 18px;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background: #eaf3e6;
    color: #0f3d16;
}

.navbar-toggle {
    border-color: #ffffff;
    margin-top: 20px;
}

.navbar-toggle .icon-bar {
    background-color: #ffffff;
}

.navbar-toggle:hover,
.navbar-toggle:focus {
    background: #0f3d16;
}


/* ---------- 4. Homepage title / journal description ---------- */

.page_index_journal h1,
.current_issue_title,
.page_title {
    color: #1b5e20;
    font-weight: 700;
}

.journal_description,
.homepage_image,
.additional_content {
    background: #ffffff;
    border: 1px solid #e4e4dc;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}


/* ---------- 5. Main content area ---------- */

.pkp_structure_content,
.page,
.obj_issue_toc,
.obj_article_details {
    background: #ffffff;
}

.pkp_structure_main {
    background: #ffffff;
    padding: 24px;
    border-radius: 6px;
    border: 1px solid #e5e5df;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}


/* ---------- 6. Sidebar blocks ---------- */

.pkp_structure_sidebar {
    font-size: 14px;
}

.pkp_block {
    background: #ffffff;
    border: 1px solid #dfe8dc;
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 16px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04);
}

.pkp_block .title,
.pkp_block h2,
.pkp_block h3 {
    color: #ffffff;
    background: #1b5e20;
    font-size: 15px;
    font-weight: 700;
    margin: -16px -16px 14px -16px;
    padding: 11px 16px;
    border-radius: 6px 6px 0 0;
    border-bottom: 3px solid #c8a951;
}

.pkp_block ul {
    padding-left: 18px;
}

.pkp_block li {
    margin-bottom: 7px;
}

.pkp_block a {
    color: #1b5e20;
}


/* ---------- 7. Buttons ---------- */

.btn,
.cmp_button,
.cmp_form .buttons button,
.page_lost_password .buttons button,
.obj_galley_link {
    border-radius: 4px;
    font-weight: 600;
}

.btn-primary,
.cmp_button,
.cmp_form .buttons button,
.page_lost_password .buttons button {
    background: #1b5e20;
    border-color: #1b5e20;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.cmp_button:hover,
.cmp_button:focus,
.cmp_form .buttons button:hover,
.page_lost_password .buttons button:hover {
    background: #0f3d16;
    border-color: #0f3d16;
    color: #ffffff !important;
}

.obj_galley_link {
    background: #ffffff;
    border: 1px solid #1b5e20;
    color: #1b5e20 !important;
    padding: 6px 12px;
    display: inline-block;
    margin-right: 5px;
}

.obj_galley_link:hover,
.obj_galley_link:focus {
    background: #1b5e20;
    color: #ffffff !important;
    text-decoration: none;
}


/* ---------- 8. Issue table of contents ---------- */

.obj_issue_toc .heading {
    border-bottom: 3px solid #d8e6d3;
    padding-bottom: 14px;
    margin-bottom: 22px;
}

.obj_issue_toc .section h2 {
    color: #ffffff;
    background: #1b5e20;
    border-bottom: 3px solid #c8a951;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 18px;
}

.obj_issue_toc .articles > li,
.obj_article_summary {
    border-bottom: 1px solid #e3e6df;
    padding: 16px 0;
}

.obj_article_summary .title {
    font-size: 17px;
    font-weight: 700;
    color: #1b5e20;
}

.obj_article_summary .title a {
    color: #1b5e20;
}

.obj_article_summary .authors {
    color: #555555;
    font-size: 14px;
    margin-top: 4px;
}

.obj_article_summary .pages,
.obj_article_summary .doi {
    color: #777777;
    font-size: 13px;
}


/* ---------- 9. Article detail page ---------- */

.obj_article_details .page_title,
.obj_article_details h1 {
    color: #1b5e20;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
}

.obj_article_details .authors {
    color: #444444;
    font-size: 15px;
    margin-bottom: 18px;
}

.obj_article_details .item {
    margin-bottom: 22px;
}

.obj_article_details .item .label,
.obj_article_details .item h2,
.obj_article_details .item h3 {
    color: #1b5e20;
    font-weight: 700;
}

.obj_article_details .abstract {
    background: #f8faf5;
    border-left: 5px solid #1b5e20;
    padding: 18px;
    border-radius: 4px;
}

.obj_article_details .keywords {
    background: #fbfbf7;
    border: 1px solid #e4e4dc;
    padding: 14px;
    border-radius: 4px;
}


/* ---------- 10. Article metadata panels ---------- */

.panel,
.list-group {
    border-radius: 6px;
}

.panel-default {
    border-color: #dfe8dc;
}

.panel-default > .panel-heading {
    background: #eaf3e6;
    color: #1b5e20;
    border-color: #dfe8dc;
    font-weight: 700;
}


/* ---------- 11. Forms, search, and input ---------- */

.form-control {
    border-radius: 4px;
    border-color: #cccccc;
    box-shadow: none;
}

.form-control:focus {
    border-color: #1b5e20;
    box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.12);
}

.input-group-btn .btn {
    border-color: #1b5e20;
}


/* ---------- 12. Breadcrumbs ---------- */

.breadcrumb {
    background: #eef5eb;
    border-radius: 4px;
    font-size: 13px;
}

.breadcrumb > li + li:before {
    color: #7a8b74;
}

.breadcrumb a {
    color: #1b5e20;
}


/* ---------- 13. Announcements ---------- */

.obj_announcement_summary {
    border-bottom: 1px solid #e3e6df;
    padding: 16px 0;
}

.obj_announcement_summary .title {
    color: #1b5e20;
    font-weight: 700;
}


/* ---------- 14. Footer ---------- */

.pkp_structure_footer,
.footer {
    background: #1b5e20;
    color: #ffffff;
    margin-top: 36px;
    padding: 28px 0;
    border-top: 5px solid #c8a951;
}

.pkp_structure_footer a,
.footer a {
    color: #f4e8b8;
}

.pkp_structure_footer a:hover,
.footer a:hover {
    color: #ffffff;
}

.pkp_brand_footer {
    display: none;
}


/* ---------- 15. Tables ---------- */

table {
    background: #ffffff;
}

.table > thead > tr > th,
table thead th {
    background: #1b5e20;
    color: #ffffff;
    border-bottom: 3px solid #c8a951;
}

.table > tbody > tr > td,
table tbody td {
    border-color: #e3e6df;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f8faf5;
}


/* ---------- 16. Badges and labels ---------- */

.label-primary,
.badge {
    background: #1b5e20;
}

.label-info {
    background: #2e7d32;
}

.label-warning {
    background: #c8a951;
    color: #222222;
}


/* ---------- 17. Accessibility and focus ---------- */

button:focus,
.btn:focus,
.form-control:focus {
    outline: 2px solid #d8e6d3;
    outline-offset: 2px;
}


/* ---------- 18. Mobile responsiveness ---------- */

@media (max-width: 767px) {

    body {
        font-size: 14px;
    }

    .navbar-header .navbar-brand {
        min-height: 62px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .navbar-brand img {
        max-height: 50px;
    }

    .navbar-nav > li > a {
        padding-top: 12px;
        padding-bottom: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .navbar-collapse {
        border-top: 1px solid rgba(255, 255, 255, 0.25);
        box-shadow: none;
    }

    .pkp_structure_main {
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .obj_article_details .page_title,
    .obj_article_details h1 {
        font-size: 23px;
    }

    h1 {
        font-size: 25px;
    }

    h2 {
        font-size: 21px;
    }
}


/* ---------- 19. Optional: make homepage cleaner ---------- */

.page_index_journal .additional_content h2,
.page_index_journal .current_issue h2 {
    color: #1b5e20;
    border-bottom: 2px solid #d8e6d3;
}


/* ---------- 20. Optional: DOI and metadata links ---------- */

.doi,
.item.doi,
.obj_article_summary .doi {
    color: #555555;
}

.doi a,
.item.doi a {
    color: #1b5e20;
    font-weight: 600;
}


/* =========================================================
   Link hover/focus refinement
   - Remove gold border/outline when link is clicked/focused
   - Use soft green background on hover
   ========================================================= */


/* General link hover */
a:hover {
    color: #0f3d16;
    background-color: #d8e6d3;
    text-decoration: none;
    border-radius: 3px;
}


/* Remove gold border when link is clicked or focused */
a:focus,
a:active {
    color: #0f3d16;
    background-color: #d8e6d3;
    text-decoration: none;
    outline: none !important;
    box-shadow: none !important;
}


/* Do not apply green background to navbar links */
.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus,
.navbar-nav > li > a:active {
    background: #0f3d16 !important;
    color: #f4e8b8 !important;
    outline: none !important;
    box-shadow: none !important;
}


/* Do not apply green background to journal brand/logo */
.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:active {
    background: transparent !important;
    color: #f4e8b8 !important;
    outline: none !important;
    box-shadow: none !important;
}


/* Dropdown links */
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-menu > li > a:active {
    background: #d8e6d3 !important;
    color: #0f3d16 !important;
    text-decoration: none;
    outline: none !important;
    box-shadow: none !important;
}


/* Sidebar links */
.pkp_block a:hover,
.pkp_block a:focus,
.pkp_block a:active {
    background: #d8e6d3;
    color: #0f3d16;
    text-decoration: none;
    border-radius: 3px;
    outline: none !important;
    box-shadow: none !important;
}


/* Footer links: keep readable on dark green footer */
.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus,
.pkp_structure_footer a:active,
.footer a:hover,
.footer a:focus,
.footer a:active {
    background: transparent;
    color: #ffffff;
    text-decoration: underline;
    outline: none !important;
    box-shadow: none !important;
}


/* Galley/PDF buttons: keep button style */
.obj_galley_link:hover,
.obj_galley_link:focus,
.obj_galley_link:active {
    background: #1b5e20;
    color: #ffffff !important;
    text-decoration: none;
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================================
   JAI Right Sidebar Custom Block
   ========================================================= */

.jai-sidebar-menu {
    margin-bottom: 20px;
}

.jai-side-card {
    background: #ffffff;
    border: 1px solid #dfe8dc;
    border-radius: 7px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.jai-side-title {
    background: #1b5e20;
    color: #ffffff;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    border-bottom: 3px solid #c8a951;
}

.jai-side-content {
    padding: 13px 14px;
}

.jai-side-content p {
    margin: 0;
    color: #444444;
    font-size: 13.5px;
    line-height: 1.55;
}


/* Menu links */

.jai-side-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.jai-side-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eef5eb;
}

.jai-side-list li:last-child {
    border-bottom: none;
}

.jai-side-list a {
    display: block;
    padding: 9px 14px;
    color: #1b5e20;
    font-size: 13.8px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none !important;
}

.jai-side-list a:hover,
.jai-side-list a:focus,
.jai-side-list a:active {
    background: #d8e6d3;
    color: #0f3d16;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}


/* Submission card */

.jai-submit-card {
    border-color: #1b5e20;
}

.jai-submit-card .jai-side-title {
    text-align: center;
}

.jai-submit-button {
    display: block;
    background: #c8a951;
    color: #222222 !important;
    border: 1px solid #c8a951;
    border-radius: 5px;
    padding: 11px 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
}

.jai-submit-button:hover,
.jai-submit-button:focus,
.jai-submit-button:active {
    background: #d8e6d3;
    border-color: #d8e6d3;
    color: #0f3d16 !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}


/* Info cards */

.jai-info-card strong {
    color: #1b5e20;
}


/* Indexing logos */

.jai-indexing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 13px;
}

.jai-indexing-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 8px;
    background: #fbfbf7;
    border: 1px solid #e4e4dc;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.jai-indexing-grid a:hover,
.jai-indexing-grid a:focus,
.jai-indexing-grid a:active {
    background: #d8e6d3;
    border-color: #b8d1b1;
    outline: none !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

.jai-indexing-grid img {
    display: block;
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* Visitor counter */

.jai-counter {
    text-align: center;
}

.jai-counter a {
    display: inline-block;
    text-decoration: none !important;
}

.jai-counter img {
    max-width: 100%;
    height: auto;
}


/* Prevent inherited OJS block spacing from disturbing this custom block */

.jai-sidebar-menu ul,
.jai-sidebar-menu li,
.jai-sidebar-menu p {
    box-sizing: border-box;
}


/* Mobile */

@media (max-width: 767px) {
    .jai-side-title {
        font-size: 13px;
        padding: 10px 12px;
    }

    .jai-side-list a {
        font-size: 13.5px;
        padding: 8px 12px;
    }

    .jai-side-content {
        padding: 12px;
    }

    .jai-indexing-grid {
        gap: 8px;
        padding: 12px;
    }

    .jai-indexing-grid a {
        min-height: 54px;
    }
}
