.pkp_site_name_wrapper {
    padding-top: 140px;
    padding-bottom:10px;
}

.pkp_navigation_primary_wrapper {
    padding-top: 10px;
    padding-bottom: 10px;
}

.pkp_site_name {
	display: none;
}

.pkp_page_index h2,
.pkp_page_index .obj_issue_toc h2,
.pkp_page_index .page_title,
.pkp_page_index .section h2 {
    display: none !important;
}
body.pkp_page_index .pkp_structure_main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.pkp_page_index .pkp_structure_content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.pkp_page_index .cmp_intro {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.pkp_page_index .page_content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Fix Login / Register visibility on white background */
.pkp_navigation_user > li > a {
    color: #000000 !important;   /* black text */
    font-weight: 600;
}

/* Hover effect */
.pkp_navigation_user > li > a:hover {
    color: #1e6fa8 !important;   /* blue hover */
}


/* Target the main container that holds both content and blocks */
/* --- NEW CLEAN LAYOUT SECTION --- */

/* 1. Reset Main Container */
.pkp_structure_main {
    display: flex !important;
    flex-direction: column;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

/* 1. DESKTOP VIEW (Cover on the Top-Right) */
.about_the_journal {
    display: block; /* Standard flow so we can float the image */
    overflow: hidden; /* Clears the float */
    position: relative;
    width: 100%;
}
body .homepage-book-cover {
    width: 180px !important;
    max-width: 180px !important;
}

body .homepage-book-cover img {
    width: 100% !important;
    max-width: 180px !important;
    height: auto !important;
    object-fit: contain;
}

/* Second image spacing */
.homepage-book-cover .second-cover {
    margin-top: 14px;
}

/* Text blocks between images */
.right-side-content {
    margin: 14px 0;
    padding: 12px 14px;
    background: #f8f9fa;
    border-left: 4px solid #1e6fa8;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* Space between text lines */
.right-side-content .line {
    margin-bottom: 6px;
    font-weight: 600;
}

.right-side-content .line:last-child {
    margin-bottom: 0;
}

/* Plagiarism highlight */
.right-side-content.plagiarism {
    background: #fff3f3;
    border-left-color: #e63946;
    font-weight: 700;
}



/* 2. TEXT STYLING */
.about_the_journal .description {
    text-align: justify !important;
    text-justify: inter-word;
    display: block;
}


/* ===== MOBILE RESPONSIVE FIX (Centered at Bottom) ===== */
@media (max-width: 768px) {

    .about_the_journal {
        display: flex !important;
        flex-direction: column !important; 
        padding-right: 0 !important; /* Removes the side gap from desktop */
    }

    /* Move Text to Top */
    .about_the_journal > div:first-child,
    .page_about_index .description {
        order: 1 !important;
        width: 100% !important;
    }

    /* Move Cover to Bottom and Center it */
    .pkp_page_index .homepage-book-cover {
        order: 2 !important;
        position: relative !important; 
        
        /* These 3 lines kill the "right shift" from desktop */
        right: auto !important;   
        left: auto !important;    
        float: none !important;   
        
        /* These 2 lines handle the centering */
        width: 220px !important; 
        margin: 30px auto !important; 
        
        display: block !important;
        top: 0 !important;
    }

    /* Ensure the image inside also behaves */
    .pkp_page_index .homepage-book-cover img {
        margin: 0 auto !important;
        display: block !important;
    }
}


/* Cleanup: Remove any rogue borders/lines */
.pkp_structure_content::before,
.pkp_structure_content::after,
.pkp_page_index hr {
    display: none !important;
}

/* Ensure the About text stays on the left */
.page_about {
    flex: 2; 
    min-width: 0; /* Prevents overflow */
}

/* Force the Custom Block area to move to the top-right */
.pkp_structure_sidebar {
    flex: 1;
    order: 2; /* Moves it to the right */
    margin-top: 50px; /* Aligns it roughly with the 'About' header */
}

/* If you are NOT using a sidebar but a footer-block, use this: */
.custom-sidebar-container {
    position: absolute;
    right: 5%;
    top: 300px; /* Adjust this number based on your header height */
    width: 250px;
}

/* 2. Content Section (About the Journal) */
.pkp_structure_content {
    flex: 0 0 65% !important;
    margin-left: -40px !important;
    margin-right: 40px !important;
}

/* 3. JUSTIFY THE TEXT (Corrected Version) */
.page_about_index .description,
.page_about_index .description p,
.page_about_index .description div,
.pkp_structure_content p {
    text-align: justify !important;
    text-justify: inter-word !important;
}

/* DEBUG: remove ALL horizontal separators on homepage */
.pkp_page_index hr,
.pkp_page_index *::before,
.pkp_page_index *::after {
    border: none !important;
    background: none !important;
}


/* Anchor about section */
.pkp_page_index .about_the_journal {
    position: relative;
    padding-right: 280px;
}

/* Book cover fixed to about section */
.pkp_page_index .homepage-book-cover {
    position: absolute;
    top: 50px;      /* space from top */
    right: -120px;  /* pushes slightly more to right */
    width: 240px;
}


/* Image styling */
   .pkp_page_index .homepage-book-cover img {
    width: 100%;
    height: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    border-radius: 6px; 
} 


/* Remove unwanted grids / section lines */
.pkp_structure_content::before,
.pkp_structure_content::after,
.pkp_page_index .obj_issue_toc {
    border: none !important;
}
    .pkp_page_index .pkp_structure_content {
        padding-right: 0;
    }
}

/* Main content container width fix */
.pkp_structure_main {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ===== MOBILE RESPONSIVE FIX ===== */
@media (max-width: 768px) {

  body {
    overflow-x: hidden !important;
  }

  .pkp_structure_content,
  .pkp_page_index,
  .homepage-about {
    width: 100% !important;
    padding: 12px !important;
    margin: 0 !important;
  }

  .right-sidebar,
  .pkp_structure_sidebar {
    float: none !important;
    width: 100% !important;
    margin: 10px 0 !important;
    text-align: center;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .pkp_site_name,
  .pkp_navigation_primary,
  .pkp_navigation_user {
    text-align: center;
  }

  .pkp_navigation_primary ul {
    flex-direction: column;
  }

  .pkp_navigation_primary li {
    display: block;
    width: 100%;
  }

  .pkp_page_index .homepage-about {
    display: block !important;
  }

}


/* ONLY APPLY TO MOBILE AND TABLET */
@media (max-width: 991px) {

    /* 1. Position the Menu Wrapper to the Left */
    .pkp_navigation_primary_wrapper, 
    .pkp_nav_menu_wrapper,
    .pkp_navigation_user_wrapper {
        left: 0 !important;
        right: auto !important;
        text-align: left !important;
        display: block !important;
    }

    /* 2. Force Menu Items to Left-Align */
    .pkp_navigation_primary, 
    .pkp_navigation_user, 
    .pkp_nav_menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important; 
        text-align: left !important;
        padding-left: 20px !important;
    }

    /* 3. Individual links alignment */
    .pkp_navigation_primary li, 
    .pkp_navigation_user li {
        width: 100% !important;
        text-align: left !important;
    }

    .pkp_navigation_primary a, 
    .pkp_navigation_user a,
    .pkp_navigation_primary .search_link {
        text-align: left !important;
        display: block !important;
        width: 100% !important;
        padding: 10px 0 !important;
    }

    /* 4. The Toggle Button (Three Lines) */
    .pkp_site_nav_toggle {
        display: block !important;
        position: absolute !important;
        top: 15px !important;
        left: 15px !important;
        width: 40px !important;
        height: 40px !important;
        z-index: 10001 !important;
        background: transparent !important;
        border: none !important;
    }

    .pkp_site_nav_toggle::before {
        content: "" !important;
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        background: #333 !important;
        box-shadow: 0 8px 0 #333, 0 -8px 0 #333 !important;
        position: relative !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

}
/* END OF MOBILE CHANGES - Desktop remains untouched */

