/*
 * PALAI JOURNAL — CLEAN OJS JOURNAL STYLE SHEET
 * Version: 8.0
 *
 * This is a consolidated version of the previous stylesheet.
 * Duplicate layout rules have been removed.
 *
 * IMPORTANT:
 * The uploaded Journal Logo is being used as the complete
 * journal masthead/header image. Do not add another title/logo
 * over it in CSS.
 */

/* =========================================================
   1. PALETTE
   ========================================================= */

:root {
    --palai-deep-green: #174f46;
    --palai-green: #23665a;
    --palai-maroon: #7b2630;
    --palai-gold: #b58a32;
    --palai-cream: #fbf8f0;
    --palai-paper: #ffffff;
    --palai-ink: #263238;
    --palai-muted: #66727a;
    --palai-border: #e2ddd2;
    --palai-soft-green: #eef5f2;
    --palai-soft-gold: #faf5e7;
    --palai-shadow: 0 3px 18px rgba(25, 55, 50, 0.08);
}

/* =========================================================
   2. GLOBAL TYPOGRAPHY
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    color: var(--palai-ink);
    background: #ffffff;
    font-family: "Noto Sans", "Noto Sans Malayalam", "Nirmala UI",
                 "Kartika", Arial, sans-serif;
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6,
.pkp_page_index .current_issue h2,
.pkp_page_index .section h2 {
    color: var(--palai-deep-green);
    font-weight: 650;
    line-height: 1.3;
}

a {
    color: var(--palai-green);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--palai-maroon);
    text-decoration: underline;
}

::selection {
    background: rgba(181, 138, 50, 0.22);
}

/* =========================================================
   3. HEADER / JOURNAL MASTHEAD
   =========================================================
   The uploaded image is the complete header.
   Keep its natural aspect ratio; do not impose a fixed height.
   ========================================================= */

.pkp_structure_head {
    width: 100% !important;
    background: var(--palai-cream);
    border-bottom: 1px solid var(--palai-border);
}

.pkp_structure_head .pkp_structure_content {
    width: 92% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

.pkp_site_name_wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_site_name {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_site_name a {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_site_name .is_img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_site_name .is_img img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
}

/* =========================================================
   4. PRIMARY NAVIGATION
   =========================================================
   Keep OJS's upper utility/user navigation separate.
   The uploaded masthead is the header image.
   ========================================================= */

.pkp_navigation_primary_wrapper {
    width: 100% !important;
    background: var(--palai-deep-green);
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 3px solid var(--palai-gold);
}

/* Only the primary navigation content is adjusted here.
   The .pkp_navigation_user_wrapper is deliberately untouched. */
.pkp_navigation_primary_wrapper .pkp_structure_content {
    width: 92% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pkp_navigation_primary {
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.pkp_navigation_primary > li {
    margin: 0;
    padding: 0;
}

.pkp_navigation_primary > li > a {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: .01em;
    padding: 0.48rem 0.85rem;
    line-height: 1.35;
    white-space: nowrap;
}

/* Keep Search at the same vertical level as the menu,
   without changing the separate upper user navigation. */
.pkp_navigation_primary_wrapper .pkp_search {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
}

.pkp_navigation_primary_wrapper .pkp_search a,
.pkp_navigation_primary_wrapper .pkp_search button,
.pkp_navigation_primary_wrapper .pkp_search input {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus,
.pkp_navigation_primary > li > a[aria-expanded="true"] {
    color: #ffffff;
    background: var(--palai-green);
    text-decoration: none;
}

.pkp_navigation_primary > li > ul {
    background: #ffffff;
    border: 1px solid var(--palai-border);
    box-shadow: var(--palai-shadow);
}

.pkp_navigation_primary > li > ul a {
    color: var(--palai-ink);
    padding: .65rem .9rem;
}

.pkp_navigation_primary > li > ul a:hover,
.pkp_navigation_primary > li > ul a:focus {
    color: var(--palai-maroon);
    background: var(--palai-soft-green);
}

/* IMPORTANT: leave the upper utility/user navigation in OJS's
   normal document flow so the top navigation remains visible. */
.pkp_navigation_user_wrapper {
    background: var(--palai-deep-green);
}

.pkp_navigation_user > li > a {
    color: #ffffff;
}

.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li > a:focus {
    color: #ffffff;
}

/* =========================================================
   5. COMMON PAGE WIDTH
   ========================================================= */

.pkp_structure_content {
    width: 88% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.pkp_structure_main {
    width: 88% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    background: #ffffff;
}

.pkp_page_index .pkp_structure_main {
    width: 88% !important;
    max-width: 1400px !important;

    padding-top: 0 !important;
}

/* =========================================================
   6. HOMEPAGE — ABOUT THE JOURNAL
   ========================================================= */

.pkp_page_index .homepage_about {
    width: 100% !important;
    max-width: 1200px;
    margin-top: -0.75rem !important;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.25rem;

    background: var(--palai-cream);
    border-left: 4px solid var(--palai-gold);
    padding: 1.5rem 1.75rem;
    border-radius: 0 6px 6px 0;
    box-sizing: border-box;
}

.pkp_page_index .homepage_about h2 {
    margin-top: 0;
    color: var(--palai-maroon);
}

.pkp_page_index .homepage_about p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   7. CURRENT ISSUE
   ========================================================= */

.pkp_page_index .current_issue {
    width: 100% !important;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;

    padding: 1.75rem;
    background: #ffffff;
    border: 1px solid var(--palai-border);
    border-top: 4px solid var(--palai-deep-green);
    box-shadow: var(--palai-shadow);
    box-sizing: border-box;
}

.pkp_page_index .current_issue h2 {
    color: var(--palai-maroon);
    font-size: 1.65rem;
    margin-top: 0;
}

.pkp_page_index .current_issue .current_issue_title {
    color: var(--palai-deep-green);
    font-weight: 650;
}

.pkp_page_index .current_issue .read_more {
    display: inline-block;
    margin-top: 1rem;
}

.pkp_page_index .current_issue .obj_issue_toc .cover img,
.pkp_page_issue .obj_issue_toc .cover img {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    border: 1px solid var(--palai-border);
}

/* =========================================================
   8. ARTICLE / ISSUE LISTINGS
   ========================================================= */

.obj_article_summary {
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--palai-border);
}

.obj_article_summary:last-child {
    border-bottom: 0;
}

.obj_article_summary .title {
    color: var(--palai-deep-green);
    font-size: 1.12rem;
    font-weight: 650;
    line-height: 1.45;
}

.obj_article_summary .title a:hover {
    color: var(--palai-maroon);
}

.obj_article_summary .meta {
    color: var(--palai-muted);
    font-size: .92rem;
}

.obj_article_summary .meta .authors {
    color: #4c5a60;
}

.pkp_page_index .section h2,
.obj_issue_toc .heading {
    color: var(--palai-maroon);
    border-bottom: 2px solid var(--palai-gold);
    padding-bottom: .55rem;
}

/* =========================================================
   9. ARTICLE PAGE
   ========================================================= */

.pkp_page_article .page_title {
    color: var(--palai-deep-green);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.35;
}

.pkp_page_article .authors {
    color: var(--palai-muted);
}

.pkp_page_article .author_bio {
    background: var(--palai-soft-green);
    border-left: 3px solid var(--palai-green);
    padding: 1rem 1.25rem;
}

.pkp_page_article .item.abstract {
    background: var(--palai-cream);
    border-top: 3px solid var(--palai-gold);
    padding: 1.35rem 1.5rem;
    margin-top: 1.5rem;
}

.pkp_page_article .item.abstract h2 {
    color: var(--palai-maroon);
    margin-top: 0;
}

.pkp_page_article .item.keywords {
    margin-top: 1.25rem;
}

.pkp_page_article .item.keywords .value {
    color: var(--palai-green);
}

.pkp_page_article .item {
    margin-bottom: 1.5rem;
}

.pkp_page_article .label {
    color: var(--palai-deep-green);
    font-weight: 700;
}

/* =========================================================
   10. BUTTONS / ACTIONS
   ========================================================= */

.pkp_button,
.pkp_button_primary,
button,
input[type="submit"],
input[type="button"] {
    border-radius: 4px;
}

.pkp_button {
    border: 1px solid var(--palai-green);
    color: var(--palai-green);
    background: #ffffff;
    font-weight: 600;
}

.pkp_button:hover,
.pkp_button:focus {
    color: #ffffff;
    background: var(--palai-green);
    border-color: var(--palai-green);
    text-decoration: none;
}

.pkp_button_primary,
.pkp_button_primary:hover,
.pkp_button_primary:focus {
    background: var(--palai-maroon);
    border-color: var(--palai-maroon);
    color: #ffffff;
    font-weight: 650;
}

/* =========================================================
   11. TABLES
   ========================================================= */

table {
    border-collapse: collapse;
    width: 100%;
}

table th {
    color: #ffffff;
    background: var(--palai-deep-green);
    font-weight: 650;
}

table th,
table td {
    padding: .7rem .8rem;
    border: 1px solid var(--palai-border);
}

table tr:nth-child(even) td {
    background: #fafbf9;
}

/* =========================================================
   12. FORMS
   ========================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
select,
textarea {
    border: 1px solid #cbd4d0;
    border-radius: 4px;
    background: #ffffff;
    color: var(--palai-ink);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--palai-green);
    box-shadow: 0 0 0 2px rgba(35, 102, 90, .12);
    outline: none;
}

/* =========================================================
   13. ANNOUNCEMENTS
   ========================================================= */

.obj_announcement_summary {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--palai-border);
}

.obj_announcement_summary .title {
    color: var(--palai-deep-green);
    font-weight: 650;
}

/* =========================================================
   14. SIDEBAR / BLOCKS
   ========================================================= */

.pkp_block {
    border-top: 3px solid var(--palai-gold);
    background: var(--palai-cream);
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
}

.pkp_block .title {
    color: var(--palai-deep-green);
    font-weight: 700;
}

/* =========================================================
   15. FOOTER BASE
   ========================================================= */

.pkp_structure_footer_wrapper {
    width: 100% !important;
    background: var(--palai-deep-green);
    border-top: 4px solid var(--palai-gold);
}

.pkp_structure_footer {
    width: 100% !important;
    color: rgba(255,255,255,.88);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.pkp_structure_footer a {
    color: #f4dfaa;
}

.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus {
    color: #ffffff;
}

.pkp_brand_footer {
    display: none !important;
}

/* =========================================================
   16. PALAI JOURNAL — FOUR-COLUMN FOOTER
   ========================================================= */

.palai-footer {
    width: 100%;
    margin-top: 0 !important;
    background: #174f46;
    color: rgba(255,255,255,0.88);
    border-top: 0 !important;
    font-size: 0.94rem;
}

.palai-footer-container {
    width: 92% !important;
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 1.25rem 2rem 2.5rem;
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr 1.15fr;
    column-gap: 3rem;
    row-gap: 2rem;
    box-sizing: border-box;
}

.palai-footer-column {
    min-width: 0;
}

.palai-footer-column h3 {
    margin: 0 0 1.1rem;
    padding-bottom: 0.65rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(181,138,50,0.7);
}

.palai-footer-brand h3 {
    color: #f4dfaa;
    font-size: 1.05rem;
}

.palai-footer-malayalam {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 500;
}

.palai-footer-description {
    margin: 0 0 1.1rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.65;
}

.palai-footer-issn {
    margin: 0 0 0.45rem;
    color: #f4dfaa;
    font-size: 0.95rem;
}

.palai-footer-status {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.82rem;
    line-height: 1.6;
}

.palai-footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.palai-footer-column li {
    margin: 0;
    padding: 0;
}

.palai-footer-column li + li {
    margin-top: 0.48rem;
}

.palai-footer-column a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.palai-footer-column a:hover,
.palai-footer-column a:focus {
    color: #f4dfaa;
    text-decoration: none;
    padding-left: 3px;
}

.palai-footer-publisher p {
    margin: 0 0 0.9rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
}

.palai-footer-publisher strong {
    color: #ffffff;
}

.palai-footer-publisher a {
    color: #f4dfaa;
}

.palai-footer-bottom {
    background: rgba(0,0,0,0.18);
    border-top: 1px solid rgba(255,255,255,0.12);
}

.palai-footer-bottom-container {
    width: 92% !important;
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    color: rgba(255,255,255,0.68);
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}

.palai-footer-bottom-container a {
    color: #f4dfaa;
    text-decoration: none;
}

.palai-footer-bottom-container a:hover,
.palai-footer-bottom-container a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.palai-footer-separator {
    color: rgba(255,255,255,0.35);
}

/* =========================================================
   17. ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(181, 138, 50, .55);
    outline-offset: 2px;
}

/* =========================================================
   18. LARGE SCREENS
   ========================================================= */

@media (min-width: 1400px) {
    .pkp_structure_content,
    .pkp_structure_main,
    .pkp_structure_head .pkp_structure_content,
    .pkp_navigation_primary_wrapper .pkp_structure_content,
    .palai-footer-container,
    .palai-footer-bottom-container {
        width: 90% !important;
        max-width: 1500px !important;
    }
}

/* =========================================================
   19. TABLETS
   ========================================================= */

@media (max-width: 900px) {
    .pkp_structure_content,
    .pkp_structure_main,
    .pkp_structure_head .pkp_structure_content,
    .pkp_navigation_primary_wrapper .pkp_structure_content,
    .palai-footer-container,
    .palai-footer-bottom-container {
        width: 94% !important;
        max-width: none !important;
    }

    .palai-footer-container {
        grid-template-columns: 1fr 1fr;
        column-gap: 2.5rem;
        row-gap: 2.5rem;
        padding: 1.25rem 1.5rem 2.5rem;
    }
}

/* =========================================================
   20. MOBILE
   ========================================================= */

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .pkp_navigation_primary > li > a {
        padding: .45rem .7rem;
    }

    .pkp_page_index .pkp_structure_main {
        padding-top: 0 !important;
    }

    .pkp_page_index .current_issue {
        padding: 1.1rem;
    }

    .pkp_page_article .page_title {
        font-size: 1.55rem;
    }

    .pkp_page_index .homepage_about {
        padding: 1.1rem 1.15rem;
    }

    .pkp_site_name .is_img img {
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 600px) {
    .pkp_structure_content,
    .pkp_structure_main,
    .pkp_structure_head .pkp_structure_content,
    .pkp_navigation_primary_wrapper .pkp_structure_content,
    .palai-footer-container,
    .palai-footer-bottom-container {
        width: 96% !important;
        max-width: none !important;
    }

    .pkp_page_index .current_issue,
    .pkp_page_index .homepage_about {
        width: 100%;
    }

    .palai-footer-container {
        grid-template-columns: 1fr;
        padding: 1.25rem 1.25rem 2.25rem;
        row-gap: 2rem;
    }

    .palai-footer-column h3 {
        margin-bottom: 0.85rem;
    }

    .palai-footer-bottom-container {
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 0.3rem;
    }

    .palai-footer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .pkp_page_index .current_issue h2 {
        font-size: 1.35rem;
    }

    .obj_article_summary .title {
        font-size: 1.03rem;
    }

    .pkp_button,
    .pkp_button_primary {
        width: 100%;
        text-align: center;
        margin-bottom: .5rem;
    }
}
