/* Shared public portal components. Loaded after legacy and responsive styles. */
:root {
    --portal-ink: #243444;
    --portal-link: #075d95;
    --portal-muted: #596674;
    --portal-line: #dce3ea;
    --portal-surface: #f3f6f8;
    --portal-paper: #fff;
    --portal-selected: #e8f1f7;
}
body { color: var(--portal-ink); font-size: 16px; line-height: 1.5; background: var(--portal-surface) !important; }
#wrap { background: var(--portal-paper); box-shadow: none; }
#wrap a { color: var(--portal-link); text-underline-offset: 3px; }
#wrap a:hover { text-decoration: underline; }
#wrap :focus-visible { outline: 2px solid var(--portal-link) !important; outline-offset: 3px; }
#wrap ::selection { background: #d6e8f5; color: #173c58; }
.site-container { display: flex; flex-direction: column; }
.site-container > * { order: 5; min-width: 0; }
.site-container > .site-account { order: 0; }
.site-container > .site-header { order: 1; }
.site-container > .navigation { order: 2; }
.site-container > .site-main { order: 3; margin-top: 24px !important; }
.site-container > .site-top-articles { order: 4; margin-top: 32px !important; padding-top: 24px; border-top: 1px solid var(--portal-line); }
.site-account { font-size: 13px; }
.site-account a { display: inline-flex; min-height: 36px; align-items: center; }
.site-search { background: var(--portal-surface); border: 1px solid var(--portal-line); padding: 12px; text-align: left; }
#search_line.search-controls input { height: 44px; border: 1px solid #aebbc6; border-radius: 4px; font-size: 16px; box-shadow: none; box-sizing: border-box; }
#search_line.search-controls input[type=text] { padding: 8px 12px; }
#search_line.search-controls input[type=submit] { width: 80px; background: var(--portal-link); border-color: var(--portal-link); color: #fff; cursor: pointer; }
#search_line input::placeholder { color: var(--portal-muted); opacity: 1; }
.search-options { font-size: 13px; gap: 8px 16px; }
.navigation { height: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--portal-line); background: none; }
.navigation ul { display: flex; flex-wrap: wrap; gap: 4px; float: none; background: none; }
.navigation li, .navigation li.navigation_active { float: none; margin: 0; font: inherit; font-size: 14px; background: none; }
#wrap .navigation li a { display: flex; align-items: center; float: none; min-height: 44px; padding: 8px 12px; box-sizing: border-box; background: none; border-radius: 4px; color: var(--portal-ink); text-decoration: none; line-height: 1.3; }
#wrap .navigation li a:hover { background: var(--portal-surface); }
#wrap .navigation li.navigation_active a { color: var(--portal-link); background: var(--portal-selected); font-weight: 700; }
.navigation > .button1 { float: none !important; margin-left: auto; width: auto; background: none; }
#wrap .navigation > .button1 a, .primary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; background: var(--portal-link); border: 1px solid var(--portal-link); border-radius: 4px; color: #fff; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.3; text-decoration: none; cursor: pointer; box-sizing: border-box; }
#wrap .navigation > .button1 a:hover, .primary-action:hover { background: #064b78; text-decoration: none; }
#wrap .fcolor4, #wrap .fcolor5, #wrap .fcolor6 { color: var(--portal-muted); }
#wrap .fcolor4 a, #wrap .fcolor5 a, #wrap .fcolor6 a { color: var(--portal-muted); }
#wrap .fsize1, #wrap .fsize2 { font-size: 13px; line-height: 1.45; }
.site-main h1, .site-main .h1, .ui-container h1 { font-size: 28px !important; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 20px !important; color: var(--portal-ink); }
#wrap .breadcrumb, #wrap .breadcrumb a { font-size: 13px; line-height: 1.5; color: var(--portal-muted); }
.breadcrumb { margin-bottom: 16px; }
.directory-table { width: 100%; table-layout: fixed; }
.directory-table > tbody > tr > td { vertical-align: top; }
.directory-table .fsize4 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid #edf1f4; }
#wrap .category-row > a { display: block; padding: 10px 0; font-size: 15px; line-height: 1.4; text-decoration: none; overflow-wrap: normal; }
#wrap .category-row > a:hover { text-decoration: underline; }
#wrap .category-row > span { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.directory-tabs { display: none; }
.portal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.portal-filter > .float_right { display: flex; flex-wrap: wrap; gap: 8px; float: none; margin-left: auto; }
#wrap select, #wrap input[type=text], #wrap input[type=password], #wrap input[type=email], #wrap textarea { border: 1px solid #aebbc6; border-radius: 4px; background: #fff; color: var(--portal-ink); box-shadow: none; font: inherit; font-size: 16px; box-sizing: border-box; }
#wrap select { min-height: 44px; max-width: 100%; padding: 6px 8px; }
.company-list-item { margin: 0 !important; padding: 24px 0; border-bottom: 1px solid var(--portal-line); }
.company-list-item td { vertical-align: top; }
.company-list-item td:first-child:has(img) { padding-right: 16px; box-sizing: border-box; }
.company-list-item td > .fsize3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; line-height: 1.4; }
#wrap .company-list-item .fsize3 a { text-decoration: none; }
.company-list-item .fcolor5 { margin-top: 8px; font-size: 13px; }
.product-grid > .list, .board-grid > .list { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 20px; row-gap: 4px; padding: 24px 0; margin: 0 !important; border-bottom: 1px solid var(--portal-line); }
.product-grid .list .photo, .board-grid .list .photo { float: none; width: 100%; grid-column: 1; grid-row: 1 / span 2; }
.product-grid .list .cont, .board-grid .list .cont { display: block; height: auto; grid-column: 2; grid-row: 1; padding-left: 0; min-width: 0; line-height: 1.5; }
.product-grid .list .photo img, .board-grid .list .photo img { width: 100%; height: auto; max-height: 120px; object-fit: contain; border: 0; }
.board-grid .list > .cost { float: none; grid-column: 2; grid-row: 2; line-height: 1.4; margin: 0; font-size: 16px; font-weight: 700; white-space: normal; }
#wrap .product-grid .list .name, #wrap .board-grid .list .fsize3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
#wrap .product-grid .list .name a, #wrap .board-grid .list .fsize3 a { text-decoration: none; overflow-wrap: normal; }
.product-grid .list .cost { margin-top: 8px; }
.board-grid .list .fsize1 { font-size: 13px; }
.portal-article-item { margin: 0 !important; padding: 24px 0; border-bottom: 1px solid var(--portal-line); }
.portal-article-item td { vertical-align: top; }
#wrap .portal-article-item .fsize4 { font-size: 20px; line-height: 1.35; font-weight: 600; margin-bottom: 8px; }
#wrap .portal-article-item .fsize4 a { text-decoration: none; }
.articles_show { max-width: 76ch; margin: 0 auto; font-size: 17px; line-height: 1.75; }
.articles_show p { text-align: left !important; text-indent: 0 !important; margin: 0 0 1.25em; }
.articles_show h2, .articles_show h3 { margin: 1.5em 0 .6em; line-height: 1.35; }
.theme1_blockpage { border: 0; margin-top: 32px !important; }
.theme1_blockpage_pages { height: auto; min-height: 44px; background: var(--portal-surface); border-bottom: 1px solid var(--portal-line); }
.theme1_blockpage_pages ul { float: none; display: flex; flex-wrap: wrap; margin: 0; }
.theme1_blockpage_pages li, .theme1_blockpage_pages li a { float: none; margin: 0; padding: 0; background: none; font: inherit; font-size: 14px; }
.theme1_blockpage_pages li a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; box-sizing: border-box; line-height: 1.4; }
.theme1_blockpage_page-active a { font-weight: 700; color: var(--portal-link); background: var(--portal-selected) !important; }
.theme1_blockpage_content { height: auto !important; min-height: 100px; padding: 16px 0; }
.blockpage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
.blockpage-grid > div, .blockpage-grid > div.banner { float: none; width: auto; height: auto; min-height: 100px; margin: 0; font-size: 13px; line-height: 1.45; }
.blockpage-grid > div .img { border: 0; margin-right: 12px; }
.blockpage-grid > div .name, .blockpage-grid > div .name.type2 { max-height: none; line-height: 1.4; }
#wrap .blockpage-grid > div .name a { text-decoration: none; }
.blockpage-grid > div .descr { color: var(--portal-muted); }
.media-fallback { display: flex !important; align-items: center; justify-content: center; min-width: 72px; min-height: 72px; background: var(--portal-surface); color: var(--portal-muted); font-size: 12px; text-decoration: none; }
.portal-footer { font-size: 13px; color: var(--portal-muted); }
.portal-footer .copyright { font-size: 12px; line-height: 1.5; margin-top: 12px; }
.portal-footer .float_right { float: none; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0; }
.ui-container .box:has(form[action="login.php"]) { background: #fff; border: 1px solid var(--portal-line); box-shadow: none; text-align: left !important; padding: 24px !important; }
.ui-container .box:has(form[action="login.php"]) .fsize6 { color: var(--portal-ink); font-size: 26px; font-weight: 600; }
.ui-container form input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height: 44px; }
.ui-container label, .modal label { cursor: pointer; }
#regform .comment_form { color: var(--portal-muted); margin-top: 8px; }
@media (max-width: 767px) {
    .site-container > .site-main { margin-top: 16px !important; }
    .site-header { margin-bottom: 0 !important; }
    .site-search { padding: 8px; }
    .mobile-nav-ready .mobile-menu-toggle { background: #fff; border-color: #aebbc6; font-size: 14px; }
    .navigation { padding: 0 0 12px; align-items: stretch; }
    .navigation ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .navigation > .button1 { width: 100%; margin: 8px 0 0; }
    #wrap .navigation > .button1 a { width: 100%; }
    .site-main h1, .site-main .h1, .ui-container h1 { font-size: 24px !important; margin-bottom: 16px !important; }
    .directory-tabs { display: flex; gap: 4px; padding: 4px; background: var(--portal-surface); margin-bottom: 12px; }
    .directory-tabs button { flex: 1 1 0; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--portal-muted); font: inherit; font-size: 15px; font-weight: 700; border-radius: 3px; cursor: pointer; }
    .directory-tabs button[aria-selected=true] { background: #fff; color: var(--portal-link); }
    .directory-table[data-active-group] > tbody > tr { gap: 0; }
    .directory-table[data-active-group] .directory-column:not([data-active]) { display: none; }
    .directory-table[data-active-group] .directory-column > .fsize4 { display: none; }
    .category-row > span { padding-right: 4px; }
    .company-list-item { padding: 20px 0; }
    .company-list-item td:first-child:has(img) { width: 88px !important; padding-right: 12px; }
    .company-list-item td { font-size: 14px; line-height: 1.5; }
    .company-list-item td > .fsize3 { font-size: 18px; }
    .product-grid > .list, .board-grid > .list { grid-template-columns: 88px minmax(0, 1fr); column-gap: 12px; padding: 20px 0; }
    .product-grid .list .cont, .board-grid .list .cont { padding-left: 0; font-size: 14px; }
    .product-grid .list .photo, .board-grid .list .photo { width: 88px; }
    #wrap .product-grid .list .name, #wrap .board-grid .list .fsize3 { font-size: 17px; }
    .portal-filter > .float_right { margin-left: 0; width: 100%; }
    .portal-filter > select[name=region] { width: 100% !important; }
    .portal-article-item td[width="110"] { width: 80px; padding-right: 12px; box-sizing: border-box; }
    #wrap .portal-article-item .fsize4 { font-size: 18px; }
    .portal-article-item td { font-size: 14px; }
    .blockpage-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .blockpage-grid > div { font-size: 14px; }
    .articles_show { font-size: 16px; line-height: 1.7; }
    .portal-footer .fsize1 { font-size: 12px; }
    .primary-action { min-height: 44px; font-size: 16px; }
}
#wrap .product-grid .list .name a, #wrap .board-grid .list .fsize3 a { overflow-wrap: anywhere; }
.site-main .box.box_padding1:has(.portal-filter) { margin-bottom: 8px; }
.portal-article-item > tbody > tr > td { padding-top: 24px; padding-bottom: 24px; }
.portal-article-item .fsize1[style*="border-top"] { border-top: 0 !important; }
.ui-container form .primary-action { min-width: 160px; }
#wrap .page { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
#wrap .page a, #wrap .page_sel { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; padding: 6px 10px; box-sizing: border-box; border: 1px solid var(--portal-line); border-radius: 4px; background: #fff; color: var(--portal-link); text-decoration: none; }
#wrap .page_sel { background: var(--portal-selected); border-color: #a5c3da; font-weight: 700; }
.theme1_blockpage_larr, .theme1_blockpage_rarr { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none !important; color: var(--portal-link); cursor: pointer; }
.theme1_blockpage_points { margin-top: 12px; }
@media (min-width: 768px) {
    .directory-table > tbody > tr > td:first-child { padding-right: 20px !important; }
    .directory-table > tbody > tr > td:last-child { padding-left: 20px !important; }
}
@media (max-width: 767px) {
    .ui-container form .primary-action { width: 100%; }
    .portal-article-item > tbody > tr > td { padding-top: 20px; padding-bottom: 20px; }
}

/* Gallery cards retain complete titles and keep prices below the content. */
.product-grid:has(> .bl), .board-grid:has(> .bl) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-grid > div.bl, .board-grid > div.bl, .product-grid > div.bl.t2 { display: flex; flex-direction: column; float: none; clear: none !important; width: auto; height: auto; min-height: 220px; margin: 0 !important; padding: 12px; border: 1px solid var(--portal-line); border-radius: 8px; background: var(--portal-paper); box-sizing: border-box; }
.product-grid > div.bl .name, .board-grid > div.bl .name { height: auto; min-height: 48px; overflow: visible; margin: 12px 0 8px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.product-grid > div.bl .cost, .product-grid > div.bl .presence { position: static; display: block; margin-top: 8px; }
.product-grid > div.bl > .cost, .board-grid > div.bl > .cost { margin-top: auto; padding-top: 8px; }
.product-grid > div.bl .firm { height: auto; font-size: 13px; color: var(--portal-muted); }
.product-grid > div.bl .thumbimg, .board-grid > div.bl .thumbimg { display: flex !important; align-items: center; justify-content: center; width: 100% !important; max-width: 100%; height: 132px !important; }
.product-grid > div.bl .thumbimg img, .board-grid > div.bl .thumbimg img { width: auto; height: auto; max-height: 124px; margin: 0; object-fit: contain; }
.product-grid > div.bl .thumb_overlay, .board-grid > div.bl .thumb_overlay, .product-grid > .clear:empty, .board-grid > .clear:empty { display: none; }
#wrap .product-grid > div.bl > a, #wrap .board-grid > div.bl > a { text-decoration: none; }
.sape-content .ust_bl_text { font-size: 13px !important; line-height: 1.45 !important; }
@media (max-width: 767px) {
    .product-grid:has(> .bl), .board-grid:has(> .bl) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-grid > div.bl, .board-grid > div.bl, .product-grid > div.bl.t2 { padding: 8px; min-height: 190px; }
    .product-grid > div.bl .thumbimg, .board-grid > div.bl .thumbimg { height: 112px !important; }
    .product-grid > div.bl .thumbimg img, .board-grid > div.bl .thumbimg img { max-height: 108px; }
}
