/* ============================================================
   HEADER STYLING FOR HOMESITE AND SITE-LEVEL PAGES
   (index, aboutus, announcement, privacy, login, register, etc etc.)
   ============================================================ */

/* Base layout for header with logo + title */
body[class*="pkp_page_"] .pkp_site_name {
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
}

/* Hide breadcrumbs globally */
.cmp_breadcrumbs {
    display: none !important;
}

/* --- Site title style --- */
body[class*="pkp_page_"] div.pkp_journal_name {
    margin-left: 20px !important;
    font-size: 1.2em;
    font-weight: bold !important;
    /* color: #ffffff !important;  Use a solid text color instead of gradient */
    position: relative;
    z-index: 10;
    line-height: 1.6;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
}

/* --- Active / hovered menu links --- */
body.pkp_page_index .pkp_navigation_primary a[href*="index/index"],
body.pkp_page_announcement .pkp_navigation_primary a[href*="announcement"],
body.pkp_page_aboutus .pkp_navigation_primary a[href*="aboutus"],
body.pkp_page_login .pkp_navigation_user a[href*="login"],
body.pkp_page_user.pkp_op_register .pkp_navigation_user a[href*="user/register"] {
    color: #ffffe0 !important;
    font-weight: bold !important;
    background-color: transparent !important;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_user > li > a:hover {
    color: #ffffe0 !important;
    font-weight: bold !important;
    background-color: transparent !important;
}

/* --- Dropdown menu colors --- */
.pkp_navigation_primary li ul {
    background-color: #cce6ff !important;
}

.pkp_navigation_primary li ul li a {
    color: #0050a0 !important;
    font-weight: normal !important;
    background-color: transparent !important;
}

.pkp_navigation_primary li ul li a:hover {
    color: #ffffff !important;
    background-color: #add8e6 !important;
}

/* --- Hide default <h1> headings inside these pages --- */
body.pkp_page_aboutus .page h1,
body.pkp_page_announcement .page h1,
body.pkp_page_privacy .page h1,
body.pkp_page_contactus .page h1,
body.pkp_page_terms .page h1,
body.pkp_page_copyright .page h1,
body.pkp_page_subscription .page h1,
body.pkp_page_open .page h1,
body.pkp_page_ethic .page h1,
body.pkp_page_advisory .page h1,
body.pkp_page_directors .page h1,
body.pkp_page_editorial .page h1,
body.pkp_page_editorial-policy .page h1,
body.pkp_page_reviewp .page h1,
body.pkp_page_login .page h1,
body.pkp_page_user.pkp_op_register .page h1 {
    display: none !important;
}

/* --- Footer link consistency --- */
.pkp_structure_footer a,
.pkp_structure_footer a:visited,
.pkp_structure_footer a:hover,
.pkp_structure_footer a:active,
.pkp_structure_footer a:focus {
    color: inherit !important;
    text-decoration: none !important;
}

/* ============================================================
   TITLE + TAGLINE FIX (Adaptive one-line truncation each)
   ============================================================ */

/* Wrapper that holds both title and tagline */
body[class*="pkp_page_"] .pkp_site_title_wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-left: 20px !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* --- Journal title (first line, one-line ellipsis) --- */
body[class*="pkp_page_"] .pkp_site_title_wrapper .pkp_journal_name {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
}

/* --- Tagline (second line, one-line ellipsis) --- */
body[class*="pkp_page_"] .pkp_site_title_wrapper .homepage_tagline {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 0.8em !important;
    font-weight: 500 !important;
    font-style: italic !important;
    color: #d7f3f5 !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

/* ============================================================
   RESPONSIVE BEHAVIOR (Logo + stacked title/tagline)
   ============================================================ */

@media (max-width: 768px) {
    body[class*="pkp_page_"] .pkp_site_name {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body[class*="pkp_page_"] .pkp_site_title_wrapper {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding-left: 10px !important; /* reduce margin for mobile */
    }

    /* Ensure adaptive truncation on small screens */
    body[class*="pkp_page_"] .pkp_site_title_wrapper .pkp_journal_name,
    body[class*="pkp_page_"] .pkp_site_title_wrapper .homepage_tagline {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    /* Make submenu background transparent only in mobile mode */
    .pkp_navigation_primary li ul {
        background-color: transparent !important;
    }

    /* Submenu item color in mobile */
    .pkp_navigation_primary li ul li a {
        color: #ffffb3 !important;
    }

    /* Hover effects for all menu items in mobile: bold text, no underline */
    .pkp_navigation_primary > li > a:hover,
    .pkp_navigation_primary li ul li a:hover,
    .pkp_navigation_user > li > a:hover {
        font-weight: bold !important;
        text-decoration: none !important;
    }
}
@media (max-width: 768px) {
    body[class*="pkp_page_"] .pkp_site_name {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body[class*="pkp_page_"] .pkp_site_title_wrapper {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        padding-left: 10px !important; /* reduce margin for mobile */
    }


/* Mobile-only: tighten spacing between title and tagline */
    body[class*="pkp_page_"] .pkp_site_title_wrapper .pkp_journal_name {
        line-height: 1.15 !important;
    }

    body[class*="pkp_page_"] .pkp_site_title_wrapper .homepage_tagline {
        margin-top: 0 !important;
        line-height: 1.1 !important;
    }


    /* Ensure adaptive truncation on small screens */
    body[class*="pkp_page_"] .pkp_site_title_wrapper .pkp_journal_name,
    body[class*="pkp_page_"] .pkp_site_title_wrapper .homepage_tagline {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    /* Submenu background transparent only in mobile mode */
    .pkp_navigation_primary li ul {
        background-color: transparent !important;
    }

    /* Submenu item text color (normal state) */
    .pkp_navigation_primary li ul li a {
        color: #ffffb3 !important;
    }

    /* MOBILE-ONLY submenu hover effect */
    .pkp_navigation_primary li ul li a:hover {
        color: #66ffff !important;          /* bright cyan on hover */
        text-decoration: none !important;   /* remove underline */
        background-color: transparent !important; /* keep flat look */
        font-weight: bold !important;
    }

    /* Hover effects for main/user menu links (keep consistent) */
    .pkp_navigation_primary > li > a:hover,
    .pkp_navigation_user > li > a:hover {
        font-weight: bold !important;
        text-decoration: none !important;
        color: #ffffe0 !important; /* same as desktop main menu hover */
    }
}
/* Hover effect for links in side block */
.pkp_structure_sidebar .pkp_block .content a:hover {
    color: #00cccc !important;
    font-weight: bold !important;
}


/* === Minimal fix for clipped descenders, keeping title centered === */
body[class*="pkp_page_"] .pkp_site_name {
    align-items: center !important;    /* keep title vertically centered with logo */
    overflow: visible !important;      /* allow full letter tails (g, q, y) */
}

body[class*="pkp_page_"] .pkp_site_title_wrapper .pkp_journal_name,
body[class*="pkp_page_"] div.pkp_journal_name {
    line-height: 1.35 !important;      /* just enough space for descenders */
    padding-bottom: 0.05em !important; /* tiny breathing room without extra height */
    overflow: visible !important;
    vertical-align: middle !important;
}

/* Default link style inside the description section */
body[class*="pkp_page_"] .description a {
    text-decoration: none !important;
    color: #003366 !important; /* dark blue */


   