/* Portal-only layout; retain the forum theme and search behavior. */
#lsp-portal-hero { box-sizing: border-box; height: 230px; min-width: 0; padding: 40px 0 35px; background-position: center 42%; }
#lsp-portal-hero .wp { width: min(1200px, calc(100% - 32px)); min-width: 0; }
#lsp-portal-hero .vk_search_index_title { width: auto; margin: 0; }
#lsp-portal-hero .vk_search_index_title h2 { margin: 0; font-size: 27px; line-height: 40px; }
#lsp-portal-hero .vk_search_index_div { width: 100%; margin: 20px auto 0; }
#lsp-portal-hero .vk_search_index { box-sizing: border-box; width: min(680px, 100%); height: 58px; line-height: 46px; border-width: 6px; border-radius: 32px; }
#lsp-portal-hero .scbar_txt_td { width: calc(100% - 82px); }
#lsp-portal-hero #scbar_txt { box-sizing: border-box; width: 100%; height: 46px; line-height: 46px; padding-left: 20px; }
#lsp-portal-hero .scbar_btn_td, #lsp-portal-hero #scbar_btn { width: 82px; height: 46px; }
#lsp-resource-tabs > .wp { margin-top: 25px; }
#lsp-resource-tabs .vk_tab_block_title { height: auto; min-height: 44px; line-height: 42px; }
#lsp-resource-tabs .lsp_resource_navigation { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
#lsp-resource-tabs .vk_tab_block_title ul { display: flex; align-items: center; gap: 12px; margin: 0; }
#lsp-resource-tabs .vk_tab_block_title ul li { margin: 0; padding: 0; height: 42px; border: 0; background: transparent; }
#lsp-resource-tabs .lsp_forum_link { box-sizing: border-box; display: block; padding: 0 20px; height: 42px; line-height: 40px; border: 1px solid #eee; border-radius: 30px; background: #fff; color: #333; font-size: 16px; text-decoration: none; }
#lsp-resource-tabs .lsp_forum_link:hover { color: #007bff; border-color: #007bff; }
#lsp-resource-tabs .lsp_forum_link:focus-visible { outline: 2px solid #007bff; outline-offset: 3px; }
#lsp-resource-tabs { scroll-margin-top: 90px; }
/* The link owns the whole rounded button, including padding and border. */
#lsp-resource-tabs .lsp_tab_link { box-sizing: border-box; display: block; height: 100%; padding: 0 20px; border: 1px solid #eee; border-radius: inherit; background: #fff; color: inherit; text-decoration: none; cursor: pointer; user-select: none; }
#lsp-resource-tabs li.on > .lsp_tab_link { border-color: #007bff; background: #007bff; }
#lsp-resource-tabs .lsp_tab_link:focus-visible { outline: 2px solid #007bff; outline-offset: 5px; }
#lsp-resource-tabs .lsp_resource_panel[hidden] { display: none; }
#lsp-resource-tabs .lsp_resource_grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
#lsp-resource-tabs .lsp_resource_card { min-width: 0; overflow: hidden; border-radius: 5px; background: #fff; border: 1px solid rgba(0,0,0,.05); transition: transform .3s, box-shadow .3s; }
#lsp-resource-tabs .lsp_resource_card:hover { transform: translateY(-5px); box-shadow: 0 15px 25px -2px rgba(0,0,0,.2); }
#lsp-resource-tabs .lsp_resource_cover { display: block; width: 100%; height: 161px; overflow: hidden; background: #eef4fc; }
#lsp-resource-tabs .lsp_resource_cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
#lsp-resource-tabs .lsp_resource_cover:hover img { transform: scale(1.1); }
#lsp-resource-tabs .lsp_resource_noimage { display: flex; align-items: center; justify-content: center; height: 100%; color: #5581a8; font-size: 20px; background: linear-gradient(135deg, #edf6ff, #e1eafa); }
#lsp-resource-tabs .lsp_resource_info { padding: 0 10px; text-align: center; }
#lsp-resource-tabs .lsp_resource_info h3 { margin: 15px 0 0; height: 30px; line-height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; }
#lsp-resource-tabs .lsp_resource_info h3 a { font-size: 14px; color: #333; }
#lsp-resource-tabs .lsp_resource_card:hover h3 a { color: #f60; }
#lsp-resource-tabs .lsp_resource_forum { display: block; height: 20px; line-height: 20px; color: #999; }
#lsp-resource-tabs .lsp_resource_stats { display: flex; min-height: 20px; margin: 15px 0; font-size: 12px; }
#lsp-resource-tabs .lsp_resource_stats span { white-space: nowrap; }
#lsp-resource-tabs .lsp_resource_author { display: flex; align-items: center; gap: 5px; border-top: 1px solid #eee; padding: 10px 0; height: 30px; font-size: 12px; color: #333; }
#lsp-resource-tabs .lsp_resource_author img { border-radius: 50%; }
#lsp-resource-tabs .lsp_resource_author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lsp-resource-tabs .lsp_resource_author time { margin-left: auto; color: #999; white-space: nowrap; }
#lsp-resource-tabs .lsp_resource_pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; clear: both; padding: 20px 0 35px; }
#lsp-resource-tabs .lsp_resource_pager a, #lsp-resource-tabs .lsp_resource_pager > span:not(.lsp_page_total), #lsp-resource-tabs .lsp_page_jump button { box-sizing: border-box; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid #ddd; border-radius: 5px; background: #fff; line-height: 34px; text-align: center; color: #444; }
#lsp-resource-tabs .lsp_resource_pager a:hover, #lsp-resource-tabs .lsp_page_jump button:hover { border-color: #007bff; color: #007bff; text-decoration: none; }
#lsp-resource-tabs .lsp_resource_pager > span.current[aria-current="page"] { background: #007bff; border-color: #007bff; color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgba(0,123,255,.25); }
#lsp-resource-tabs .lsp_resource_pager .disabled { color: #bbb; background: #f7f7f7; }
#lsp-resource-tabs .lsp_page_total { color: #888; margin-right: 5px; }
#lsp-resource-tabs .lsp_page_jump { display: flex; align-items: center; gap: 8px; margin-left: 5px; }
#lsp-resource-tabs .lsp_page_jump input[type="number"] { box-sizing: border-box; width: 66px; height: 36px; padding: 0 5px; border: 1px solid #ddd; border-radius: 5px; background: #fff; text-align: center; }
#lsp-resource-tabs .lsp_page_jump button { cursor: pointer; font: inherit; }
#lsp-resource-tabs .lsp_resource_empty { text-align: center; padding: 50px 0; color: #888; }
@media (max-width: 900px) {
    #lsp-resource-tabs { width: 100vw; min-width: 0; margin-left: 0; margin-right: 0; }
    #lsp-resource-tabs .wp { width: calc(100% - 24px); min-width: 0; }
    #lsp-resource-tabs .lsp_resource_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    #lsp-resource-tabs .vk_tab_block_title ul li { margin: 0 3px; }
    #lsp-resource-tabs .lsp_tab_link { padding: 0 12px; }
    #lsp-resource-tabs .lsp_resource_cover { height: auto; aspect-ratio: 285 / 161; }
    #lsp-resource-tabs .lsp_resource_noimage { min-height: 110px; font-size: 16px; }
    #lsp-resource-tabs .lsp_resource_stats span { margin-right: 6px; font-size: 11px; }
    #lsp-resource-tabs .lsp_page_total { width: 100%; text-align: center; }
    #lsp-resource-tabs .lsp_page_jump { justify-content: center; width: 100%; margin: 8px 0 0; }
}

@media (max-width: 900px) {
    #lsp-portal-hero { width: 100vw; margin-left: 0; margin-right: 0; }
}
@media (max-width: 600px) {
    #lsp-portal-hero { height: 200px; padding: 28px 0; }
    #lsp-portal-hero .vk_search_index_title h2 { font-size: 21px; line-height: 32px; }
    #lsp-portal-hero .vk_search_index_div { margin-top: 18px; }
    #lsp-resource-tabs .lsp_resource_navigation, #lsp-resource-tabs .vk_tab_block_title ul { gap: 6px; }
    #lsp-resource-tabs .vk_tab_block_title ul li { margin: 0; font-size: 14px !important; }
    #lsp-resource-tabs .lsp_tab_link { padding: 0 10px; }
    #lsp-resource-tabs .lsp_forum_link { padding: 0 10px; font-size: 14px; }
}
