/* ==========================================================
   CUSTOM PORTAL THEME
   SITE PORTAL + JOURNAL PAGES
   ========================================================== */

body { background: #dedede; }
.pkp_structure_page { margin: 20px auto 0; background: #fff; }

/* SITE PORTAL */
body:has(.page_index_site.custom_portal) .pkp_site_name,
body:has(.page_index_site.custom_portal) .pkp_navigation_primary_wrapper,
body:has(.page_index_site.custom_portal) .pkp_structure_sidebar { display: none !important; }
body:has(.page_index_site.custom_portal) .pkp_structure_head,
body:has(.page_index_site.custom_portal) .pkp_head_wrapper,
body:has(.page_index_site.custom_portal) .pkp_structure_content,
body:has(.page_index_site.custom_portal) .pkp_structure_main { margin: 0 !important; padding: 0 !important; }
body:has(.page_index_site.custom_portal) .pkp_structure_content,
body:has(.page_index_site.custom_portal) .pkp_structure_main { display: block !important; width: 100% !important; max-width: none !important; float: none !important; }

.custom_portal { margin: 0; padding: 0; }
.custom_portal_content { width: 100%; background: #fff; }
.custom_portal_hero { width: 100%; margin: 0; padding: 0; line-height: 0; }
.custom_portal_hero img { display: block; width: 100%; height: auto; }
.custom_portal_logos { width: 100%; padding: 10px 16px; box-sizing: border-box; text-align: center; background: #fff; border-top: 1px solid #e6e6e6; border-bottom: 3px solid #1ba7a0; }
.custom_portal_logos img { display: block; width: auto; max-width: 620px; max-height: 46px; margin: 0 auto; }
.custom_portal .journals, .custom_journal_list { margin: 0; padding: 0; }
.custom_journal_list { display: block !important; width: 100% !important; list-style: none; }

body:has(.page_index_site.custom_portal) .page_index_site.custom_portal .custom_journal_item {
  display: grid !important; grid-template-columns: 150px minmax(0, 1fr) !important; gap: 28px !important; align-items: start !important;
  width: 100% !important; margin: 0 !important; padding: 28px 30px !important; box-sizing: border-box !important; float: none !important; clear: both !important;
  border-bottom: 1px solid #ddd !important;
}
body:has(.page_index_site.custom_portal) .custom_journal_thumb { grid-column: 1 !important; width: 150px !important; max-width: 150px !important; margin: 0 !important; padding: 0 !important; float: none !important; }
body:has(.page_index_site.custom_portal) .custom_journal_thumb img { display: block !important; width: 150px !important; max-width: 150px !important; height: auto !important; margin: 0 !important; }
body:has(.page_index_site.custom_portal) .custom_journal_placeholder { display: flex !important; width: 150px !important; min-height: 200px !important; align-items: center; justify-content: center; padding: 18px 14px; box-sizing: border-box; text-align: center; background: linear-gradient(145deg,#169d98,#1d6680); color:#fff !important; text-decoration:none !important; font-size:14px; font-weight:700; }
body:has(.page_index_site.custom_portal) .custom_journal_body { grid-column: 2 !important; width:auto !important; min-width:0 !important; max-width:none !important; margin:0 !important; padding:0 !important; float:none !important; }
body:has(.page_index_site.custom_portal) .custom_journal_title { margin:0 0 12px !important; padding:0 !important; font-size:16px !important; line-height:1.4 !important; }
body:has(.page_index_site.custom_portal) .custom_journal_title a { color:#166f8e !important; text-decoration:none !important; }
body:has(.page_index_site.custom_portal) .custom_journal_description { width:100% !important; max-width:none !important; margin:0 0 12px !important; padding:0 !important; color:#222; font-size:13px !important; line-height:1.7 !important; }
body:has(.page_index_site.custom_portal) .custom_journal_description p { margin:0 0 8px !important; }
body:has(.page_index_site.custom_portal) .custom_journal_links { display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; gap:18px !important; width:auto !important; margin:12px 0 0 !important; padding:0 !important; list-style:none !important; }
body:has(.page_index_site.custom_portal) .custom_journal_links li { width:auto !important; margin:0 !important; padding:0 !important; float:none !important; }
body:has(.page_index_site.custom_portal) .custom_journal_links a { color:#166f8e !important; font-size:12px; text-decoration:underline !important; }

/* JOURNAL PAGE */
body.journal_custom_header .pkp_structure_page { width:100% !important; max-width:1200px !important; margin:20px auto !important; background:#fff !important; }
body.journal_custom_header .pkp_structure_head,
body.journal_custom_header .journal_head_wrapper { width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; background:#fff !important; }
body.journal_custom_header .journal_header_banner { width:100% !important; margin:0 !important; padding:0 !important; line-height:0; }
body.journal_custom_header .journal_header_banner > a { display:block; width:100%; }
body.journal_custom_header .journal_header_banner img { display:block !important; width:100% !important; max-width:none !important; height:auto !important; margin:0 !important; padding:0 !important; }
body.journal_custom_header .pkp_navigation_user_wrapper { position:absolute !important; top:12px; right:22px; z-index:20; }
body.journal_custom_header .journal_site_nav { width:100% !important; margin:0 !important; }
body.journal_custom_header .pkp_navigation_primary_wrapper { display:block !important; width:100% !important; margin:0 !important; padding:0 24px !important; box-sizing:border-box; background:#fff !important; border-top:3px solid #1ba7a0; border-bottom:1px solid #ddd; }
body.journal_custom_header .pkp_navigation_primary { margin:0 !important; padding:0 !important; }
body.journal_custom_header .pkp_navigation_primary > li > a { padding:14px !important; color:#444 !important; font-size:13px !important; font-weight:600 !important; }

body.journal_custom_header .pkp_structure_content { display:grid !important; grid-template-columns:minmax(0,1fr) 280px !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; box-sizing:border-box; float:none !important; clear:both !important; border:0 !important; }
body.journal_custom_header .pkp_structure_main { grid-column:1 !important; grid-row:1 !important; width:auto !important; max-width:none !important; min-width:0 !important; margin:0 !important; padding:32px 30px !important; box-sizing:border-box; float:none !important; border:0 !important; }
body.journal_custom_header .pkp_structure_sidebar,
body.journal_custom_header .pkp_structure_sidebar.left { grid-column:2 !important; grid-row:1 !important; display:block !important; width:280px !important; max-width:280px !important; margin:0 !important; padding:32px 20px !important; box-sizing:border-box; float:none !important; clear:none !important; background:#fff !important; border:0 !important; border-left:1px solid #ddd !important; }
body.journal_custom_header .pkp_structure_content::before,
body.journal_custom_header .pkp_structure_content::after,
body.journal_custom_header .pkp_structure_main::before,
body.journal_custom_header .pkp_structure_main::after,
body.journal_custom_header .pkp_structure_sidebar::before,
body.journal_custom_header .pkp_structure_sidebar::after { content:none !important; display:none !important; border:0 !important; box-shadow:none !important; }

body.journal_custom_header .mjaa_sidebar_buttons { display:flex !important; flex-direction:column !important; gap:8px !important; width:100% !important; margin:0 !important; padding:0 !important; }
body.journal_custom_header .mjaa_sidebar_buttons a { display:block !important; width:100% !important; padding:10px !important; box-sizing:border-box; background:#18afa7 !important; color:#fff !important; text-align:center !important; text-decoration:none !important; font-size:12px !important; font-weight:600 !important; line-height:1.2 !important; border-radius:3px; box-shadow:0 1px 3px rgba(0,0,0,.18); }
body.journal_custom_header .mjaa_sidebar_buttons a:hover { background:#148f89 !important; }

.custom_current_issue { margin:0; padding:0 0 30px; }
.custom_current_issue > h2 { margin:0 0 18px; padding:0 0 10px; font-size:18px; font-weight:700; border-bottom:2px solid #1ba7a0; }
.custom_current_issue_title { margin:16px 0; font-weight:700; }
.custom_latest_articles { margin-bottom:30px; }
.custom_additional_content { margin-top:30px; }

/* FOOTER - SAME ON PORTAL AND JOURNAL */
.pkp_structure_footer_wrapper { display:block !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; box-sizing:border-box; float:none !important; clear:both !important; background:#efefef !important; border:0 !important; border-bottom:18px solid #4f8799 !important; }
.pkp_structure_footer { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; align-items:center !important; width:100% !important; max-width:none !important; min-height:190px; margin:0 !important; padding:35px 40px !important; box-sizing:border-box; float:none !important; }
.pkp_footer_content { grid-column:1 !important; width:auto !important; margin:0 !important; padding:0 !important; text-align:left !important; }
.pkp_brand_footer { grid-column:2 !important; width:auto !important; margin:0 !important; padding:0 !important; text-align:right !important; }
.pkp_brand_footer a { display:block !important; }
.pkp_brand_footer img { display:block !important; width:auto !important; max-width:160px !important; height:auto !important; margin:0 0 0 auto !important; }

@media (max-width:1024px) {
  body.journal_custom_header .pkp_structure_page { max-width:calc(100% - 24px) !important; }
  body.journal_custom_header .pkp_structure_content { grid-template-columns:minmax(0,1fr) 240px !important; }
  body.journal_custom_header .pkp_structure_sidebar,
  body.journal_custom_header .pkp_structure_sidebar.left { width:240px !important; max-width:240px !important; }
}

@media (max-width:768px) {
  body { background:#fff; }
  .pkp_structure_page { margin:0; }
  body:has(.page_index_site.custom_portal) .custom_journal_item { grid-template-columns:110px minmax(0,1fr) !important; gap:18px !important; padding:22px 18px !important; }
  body:has(.page_index_site.custom_portal) .custom_journal_thumb,
  body:has(.page_index_site.custom_portal) .custom_journal_thumb img,
  body:has(.page_index_site.custom_portal) .custom_journal_placeholder { width:110px !important; max-width:110px !important; }
  body.journal_custom_header .pkp_structure_page { width:100% !important; max-width:none !important; margin:0 !important; }
  body.journal_custom_header .pkp_structure_content { display:block !important; }
  body.journal_custom_header .pkp_structure_main { width:100% !important; padding:22px 18px !important; border:0 !important; }
  body.journal_custom_header .pkp_structure_sidebar,
  body.journal_custom_header .pkp_structure_sidebar.left { width:100% !important; max-width:none !important; padding:20px 18px !important; border-left:0 !important; border-top:1px solid #ddd !important; }
  .pkp_structure_footer { display:block !important; min-height:0; padding:28px 18px !important; }
  .pkp_brand_footer { margin-top:30px !important; text-align:left !important; }
  .pkp_brand_footer img { margin:0 !important; }
}

@media (max-width:600px) {
  body:has(.page_index_site.custom_portal) .page_index_site.custom_portal .custom_journal_item { display:block !important; padding:22px 18px !important; }
  body:has(.page_index_site.custom_portal) .custom_journal_thumb { width:130px !important; max-width:130px !important; margin:0 0 18px !important; }
  body:has(.page_index_site.custom_portal) .custom_journal_thumb img { width:130px !important; max-width:130px !important; }
}
