/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Charcoal Gray */
    background-color: #F5F5F5; /* White Smoke */
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: #66CDAA; /* Updated Light Sea Green */
    color: white;
    padding: 8px 0;
    text-align: start;
    font-size: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Logo */
.pkp_site_name .is_img img {
    max-width: 300px; /* Increase the width as needed */
    max-height: 150px; /* Keep the aspect ratio */
}


.pkp_page_index .journals .thumb img {
    display: flex;           /* Enable flexbox */
    justify-content: center;  /* Center horizontally */
    align-items: center;      /* Center vertically */
    height: 100%;             /* Adjust to container's height */
}

/* Responsive Styles */

/* Mobile and Intermediate Screen Adjustments */
@media (max-width: 1024px) {
    /* Header */
    header {
        font-size: 1.5rem; /* Reduce font size for smaller screens */
        padding: 5px 15px; /* Reduce padding but keep some space for aesthetics */
        text-align: start; /* Maintain left alignment */
    }

    /* Logo */
    .pkp_site_name .is_img img {
        max-width: 150px; /* Reduce the width for better fit on smaller screens */
        max-height: 35px; /* Adjust the height */
        width: auto; /* Maintain aspect ratio */
        height: auto; /* Maintain aspect ratio */
        float: left; /* Keep the logo aligned to the left */
        margin: 0; /* Remove unnecessary margin */
    }

    /* Journal Images */
    .pkp_page_index .journals .thumb img {
        height: auto; /* Adjust height automatically to fit the container */
        width: 100%; /* Take the full width of its container for responsiveness */
        display: block; /* Ensure images are displayed properly on small screens */
        margin: auto; /* Center the images */
    }
}

@media (max-width: 768px) {
    /* Further adjustments for mobile (tablets and below) */

    /* Header */
    header {
        font-size: 1.2rem; /* Further reduce font size for mobile */
        padding: 5px 10px; /* Keep some padding for better spacing */
        text-align: start; /* Keep left alignment */
    }

    /* Logo */
    .pkp_site_name .is_img img {
        max-width: 150px; /* Further reduce the logo size for small screens */
        max-height: 35px; /* Maintain aspect ratio */
        float: left; /* Keep it aligned to the left */
        margin: 0; /* No margin to prevent overlapping */
    }

    /* Journal Images */
    .pkp_page_index .journals .thumb img {
        max-width: 90%; /* Limit width to avoid overflowing on smaller screens */
    }
}


/* =========================================================
   Enhanced Journal Cover Layout (Strict & Final)
   ========================================================= */

/* 1. Main container layout */
.pkp_page_index .journals li.has_thumb {
    display: flex !important;
    align-items: flex-start !important; /* Keeps it flush at the top */
    gap: 40px !important;
    margin-bottom: 50px !important;
}

/* 2. The bounding box for the image */
.pkp_page_index .journals .thumb {
    flex: 0 0 320px !important;
    max-width: 320px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. The link wrapping the image */
.pkp_page_index .journals .thumb a {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

/* 4. The actual image - Stripped of any weird flex or object-fit rules */
.pkp_page_index .journals .thumb img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important; /* Overrides any lingering OJS height rules */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px !important;
    object-fit: initial !important; /* Removes the white padding issue */
    background: transparent !important;
    margin: 0 !important;
}

/* 5. Text alignment and gap removal */
.pkp_page_index .journals .body {
    flex: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.pkp_page_index .journals .body h3 {
    margin-top: 0 !important;
    padding-top: 0 !important;
    line-height: 1.1 !important;
    margin-bottom: 15px !important;
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */

@media (max-width: 768px) {
    .pkp_page_index .journals li.has_thumb {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 20px !important;
    }
    .pkp_page_index .journals .thumb {
        flex: 0 0 auto !important;
        max-width: 90% !important;
    }
    .pkp_page_index .journals .body p {
        text-align: left !important;
    }
}




















/* Links */
a {
    color: #1E90FF; /* Updated Dim Blue */
    text-decoration: none;
}

a:hover {
    color: #104E8B; /* Darker blue on hover */
    text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #66CDAA; /* Updated Light Sea Green */
    margin-top: 0;
    font-weight: bold;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #66CDAA; /* Updated Light Sea Green */
    padding-bottom: 10px;
}

h2 {
    font-size: 2rem;
    border-bottom: 1px solid #5ab597; /* Slightly darker Light Sea Green */
    padding-bottom: 8px;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
    color: #666666;
}

/* Paragraphs */
p {
    color: #333333; /* Charcoal Gray */
    font-size: 1rem;
    margin: 0 0 20px 0;
    text-align: justify;
}

/* Blockquote */
blockquote {
    font-style: italic;
    background: #AFEEEE; /* Pale Turquoise */
    padding: 15px;
    border-left: 5px solid #66CDAA; /* Updated Light Sea Green */
    margin: 20px 0;
}

/* Lists */
ul, ol {
    margin: 10px 0 20px 40px;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #dddddd;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #66CDAA; /* Updated Light Sea Green */
    color: white;
}

/* Buttons */
button, .btn {
    background-color: #66CDAA; /* Updated Light Sea Green */
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
}

button:hover, .btn:hover {
    background-color: #5ab597; /* Slightly darker Light Sea Green */
}

/* Footer */
footer {
    background-color: #778899; /* Light Slate Gray */
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Forms */
input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="submit"] {
    background-color: #66CDAA; /* Updated Light Sea Green */
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #5ab597; /* Slightly darker Light Sea Green */
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Center Image */
.center-image {
    display: block;
    margin: auto;
}

/* Journal-Specific Styles */
.journal-header {
    background-color: #66CDAA; /* Updated Light Sea Green */
    color: white;
    text-align: center;
    padding: 50px 0;
    margin-bottom: 40px;
}

.journal-title {
    font-size: 3rem;
    font-weight: bold;
}

.journal-subtitle {
    font-size: 1.5rem;
    color: #F5F5F5; /* White Smoke */
}

/* Code Blocks */
pre, code {
    background-color: #F5F5F5; /* White Smoke */
    padding: 10px;
    border: 1px solid #dddddd;
    border-radius: 5px;
}

/* Custom Elements */
.custom-badge {
    background-color: #5ab597; /* Slightly darker Light Sea Green */
    color: white;
    padding: 5px 10px;
    font-size: 0.9rem;
    border-radius: 3px;
    display: inline-block;
}

.highlight {
    background-color: #fff0b3;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}
















/* ===========================================================
   OJS 3.5 DEFAULT THEME NAVBAR
   Biology Circle
   =========================================================== */

/* Green branding area */
.pkp_structure_head {
    background: #66CDAA;
}

/* White navigation strip 
.pkp_navigation_primary_row {
    background: #ffffff !important;
    border-top: none !important;
    border-bottom: 8px solid #66CDAA !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

*/


/* White navigation strip - Outer background row forced full width */
.pkp_site_nav_menu,
.pkp_navigation_bar_wrapper,
.pkp_navigation_primary_row {
    background: #ffffff !important;
    border-top: none !important;
    border-bottom: 8px solid #66CDAA !important;
    box-shadow: none !important;
    
    /* Forces the background container to break out and span 100% edge-to-edge */
    width: 100% !important;
    max-width: 100% !important; 
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Inner Navigation Wrapper - Controls the 1400px alignment boundary for the links */
.pkp_navigation_primary_wrapper {
    background: transparent !important;
    width: 100% !important;
    max-width: 1400px !important;       /* Locks the item text bounds to match the content container length */
    margin: 0 auto !important;          /* Centers the links inside the edge-to-edge white bar */
    padding: 0 24px !important;         /* Matches your main content section margins perfectly */
    box-sizing: border-box !important;
    
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}


/* Ensure the overarching navigation tag doesn't enforce backgrounds or block bounds */
.pkp_site_nav_menu {
    background: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Ensure the layout wrapper enforces the centralized 1400px max width */
.pkp_navigation_primary_wrapper {
    width: 100% !important;
    max-width: 1400px !important;       /* Fix: Locks navigation area width precisely to content area width */
    margin: 0 auto !important;          /* Fix: Keeps the link row centered inside wide screens */
    padding: 0 24px !important;         /* Fix: Matches the breathing room padding of your main content area */
    box-sizing: border-box !important;
    
    /* Ensure the wrapper uses flex layout to keep elements aligned cleanly */
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Navigation container */
.pkp_navigation_primary {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px; /* Slightly reduced gap to keep elements bounded */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box !important;
}

/* Remove list spacing */
.pkp_navigation_primary > li {
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1 1 auto !important; /* Fix: Allows flex items to shrink or expand evenly to stay inside the container */
    min-width: 0 !important;   /* Fix: Crucial step that allows flex elements to shrink below their content size */
}

/* Navigation links */
.pkp_navigation_primary > li > a {

    display: flex;
    align-items: center;
    justify-content: center;

    height: 72px;

    padding: 0 12px; /* Decreased padding to give text breathing room horizontally */

    font-size: 14px; /* Balanced standard font size */

    font-weight: 700;

    letter-spacing: .5px;

    text-transform: uppercase;

    color: #7b7b7b;

    transition: .2s ease;

    text-decoration: none;

    white-space: nowrap !important; 
    word-break: keep-all !important;

    /* Create an invisible border so the layout doesn't jump on hover */
    border-bottom: 4px solid transparent !important;
    box-sizing: border-box !important;
}

/* Hover effect changed to an underline matching your branding */
.pkp_navigation_primary > li > a:hover {
    color: #66CDAA !important;
    border-bottom-color: #66CDAA !important;
    background: transparent !important;
    text-decoration: none;
}

/* Active page matching underline styling */
.pkp_navigation_primary > li.current > a,
.pkp_navigation_primary > li > a:focus {
    color: #66CDAA !important;
    border-bottom-color: #66CDAA !important;
}

/* Dropdown */
.pkp_navigation_primary ul{
    border:none;
    box-shadow:0 8px 25px rgba(0,0,0,.12);
}

.pkp_navigation_primary ul li a{
    font-size:14px;
    color:#555;
    padding:12px 18px;
    white-space: nowrap !important; 
}

.pkp_navigation_primary ul li a:hover{
    background:#66CDAA;
    color:#fff;
}

/* Search and User menu alignment */
.pkp_navigation_user_wrapper{
    display:flex;
    align-items:center;
}

/* Mobile */
@media screen and (max-width:991px){
    .pkp_navigation_primary{
        flex-wrap:wrap;
        justify-content:flex-start;
    }
    .pkp_navigation_primary > li > a{
        height:56px;
        padding:0 14px;
        font-size:14px;
        border-bottom: none !important; /* Clean up layout borders on mobile layout stack */
    }
}


/* ===========================================================
   FIX FOR JOURNAL-SPECIFIC SEARCH WRAPPER
   =========================================================== */

/* Ensure the inner wrapper handles both the list and the search div as a single row */
.pkp_navigation_primary_wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Adjust the primary list so it shares horizontal space instead of hogging it */
ul.pkp_navigation_primary {
    flex: 1 1 auto !important;
    width: auto !important;
}

/* Align and contain the external search block box model */
.pkp_navigation_search_wrapper {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    height: 72px !important; /* Matches link heights exactly */
    margin: 0 !important;
    padding: 0 !important;
}

/* Restyle the search anchor link to look identical to standard nav items */
.pkp_navigation_search_wrapper a.pkp_search {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important; /* Adds subtle spacing between the icon and text */
    
    height: 72px !important;
    padding: 0 12px !important;

    font-size: 14px !important; /* Scales text down from the enlarged size */
    font-weight: 700 !important;
    letter-spacing: .5px !important;
    text-transform: uppercase !important;
    color: #7b7b7b !important;
    text-decoration: none !important;
    
    border-bottom: 4px solid transparent !important;
    box-sizing: border-box !important;
    transition: .2s ease !important;
    white-space: nowrap !important;
}

/* Replicate the underline hover effect for the search item */
.pkp_navigation_search_wrapper a.pkp_search:hover {
    color: #66CDAA !important;
    border-bottom-color: #66CDAA !important;
    background: transparent !important;
}










/* ===========================================================
   8. WIDEN MAIN CONTENT AREA (REMOVE SIDE GAPS)
   =========================================================== */

/* Targets the main body container and pushes max-width bounds to match the navbar */
.pkp_structure_content.has_sidebar {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 24px !important; /* Adds slight breathing room next to extreme window borders */
    box-sizing: border-box !important;
}

/* Adjust column balance inside the widened container if necessary */
.pkp_structure_main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.pkp_structure_sidebar.left {
    flex: 0 0 auto !important;
}
