/* Homepage companion to the A-Z and Services directory design. */
body .pages-bbs:has(.homepage-modern) {max-width:1400px;width:calc(100% - 48px);background:#f6f8fb;border-radius:22px;padding:28px;margin-top:28px;}
body .pages-bbs:has(.homepage-modern)>.row {align-items:flex-start;}
body .homepage-modern {padding-right:28px;}
body .homepage-modern .card-body-sec {background:#fff;border:1px solid #e0e7ed;border-radius:16px;padding:20px;overflow:hidden;}
body .homepage-modern .home-profile-cards {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:12px 0;width:100%;}
/* jsGrid is a single child which creates the two card columns itself. */
body .homepage-modern .home-profile-cards:has(.jsgrid) {display:block!important;}
body .homepage-modern .home-profile-cards:has(.jsgrid)>#content,
body .homepage-modern .home-profile-cards:has(.jsgrid) .jsgrid {display:block;width:100%!important;max-width:none;}
body .homepage-modern .home-profile-cards>.adver-box,
body .homepage-modern .home-profile-cards .jsgrid-cell>.adver-box {display:flex!important;flex-wrap:nowrap!important;align-items:stretch;width:auto!important;min-width:0;margin:0!important;border:1px solid #e0e7ed;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 4px 14px #1b344608;transition:transform .18s ease,box-shadow .18s ease;}
body .homepage-modern .home-profile-cards .adver-box:hover {transform:translateY(-2px);box-shadow:0 9px 20px #1b344615;}
body .homepage-modern .home-profile-cards .adver-img {flex:0 0 42%;width:42%;min-height:145px;background:#e5edf2;}
body .homepage-modern .home-profile-cards .adver-img a {display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:9px;}
body .homepage-modern .home-profile-cards .adver-img img {display:block;width:100%;height:auto;max-height:145px;object-fit:contain;}
body .homepage-modern .home-profile-cards .text-box {width:58%;min-width:0;margin:0;padding:16px;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;}
body .homepage-modern .home-profile-cards .text-box:before {display:none;}
body .homepage-modern .home-profile-cards .text-box h3 {font-size:17px;line-height:1.3;text-align:center;margin:0 0 8px;font-weight:600;color:#20364e;overflow-wrap:anywhere;}
body .homepage-modern .home-profile-cards .text-box h3 a {color:#20364e;text-decoration:none;}
body .homepage-modern .home-profile-cards .text-box h3 a:hover {color:#176e7b;text-decoration:underline;}
body .homepage-modern .home-profile-cards .text-box p {font-size:12px;line-height:1.55;text-align:center;color:#405366;margin:0 0 10px;}
body .homepage-modern .home-profile-cards .text-box h3:last-child {font-size:13px;font-weight:500;color:#6e9dcc;margin:0;}
body .homepage-modern .home-profile-cards .jsgrid {overflow:visible;}
body .homepage-modern .home-profile-cards .jsgrid-grid-header {display:none;}
body .homepage-modern .home-profile-cards .jsgrid-grid-body {min-width:0!important;height:auto!important;overflow:visible!important;border:0;}
body .homepage-modern .home-profile-cards .jsgrid-table,
body .homepage-modern .home-profile-cards .jsgrid-table tbody,
body .homepage-modern .home-profile-cards .jsgrid-row {display:block;width:100%!important;min-width:0!important;border:0;background:transparent;white-space:normal;overflow:visible;}
body .homepage-modern .home-profile-cards .jsgrid-cell {display:grid;width:100%!important;min-width:0!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:0;border:0;background:transparent;white-space:normal;overflow:visible;}
body .homepage-modern .home-profile-cards .jsgrid-pager {grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;white-space:normal;padding:18px 0 4px;font-size:0;}
body .homepage-modern .home-profile-cards .jsgrid-pager a,
body .homepage-modern .home-profile-cards .jsgrid-pager .jsgrid-pager-current-page {display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:8px 12px;border:1px solid #d7e1e9;border-radius:8px;background:#fff;color:#214a9a;font-size:14px;font-weight:400;text-decoration:none;box-sizing:border-box;}
body .homepage-modern .home-profile-cards .jsgrid-pager .jsgrid-pager-current-page {background:#17394d;border-color:#17394d;color:#fff;font-weight:600;}
body .homepage-modern .home-profile-cards .jsgrid-pager a:hover {background:#edf3f8;border-color:#b8cad8;}
body .pages-bbs:has(.homepage-modern) .sidebar-column {padding-left:8px;}
body .pages-bbs:has(.homepage-modern) .sidebar-column h4 {font-size:20px;font-weight:700;color:#20364e;margin:4px 0 20px;}
body .pages-bbs:has(.homepage-modern) .sidebar-column .card {background:transparent;border:0;}
body .pages-bbs:has(.homepage-modern) .sidebar-column iframe {width:100%;border-radius:10px;}
body .homepage-modern a:focus-visible,body .homepage-modern input:focus-visible {outline:3px solid #258598;outline-offset:3px;}
@media(max-width:991px) {
 body .pages-bbs:has(.homepage-modern) {width:calc(100% - 28px);padding:18px;}
 body .homepage-modern {padding-right:0;}
 body .homepage-modern .home-profile-cards {grid-template-columns:minmax(0,1fr);}
}
@media(max-width:575px) {
 body .pages-bbs:has(.homepage-modern) {width:100%;border-radius:0;margin-top:12px;padding:14px;}
 body .homepage-modern .card-body-sec {padding:12px;}
 body .homepage-modern .home-profile-cards .adver-img {flex-basis:38%;width:38%;min-height:120px;}
 body .homepage-modern .home-profile-cards .text-box {width:62%;padding:11px;}
 body .homepage-modern .home-profile-cards .jsgrid-cell {grid-template-columns:minmax(0,1fr);}
}
@media(prefers-reduced-motion:reduce) {body .homepage-modern .home-profile-cards .adver-box {transition:none;}body .homepage-modern .home-profile-cards .adver-box:hover {transform:none;}}

/* Responsive module rows: visible buttons always share the complete row evenly. */
body .homepage-modern ul.nav-order {display:flex!important;flex-wrap:wrap;align-items:stretch;gap:12px;width:100%;}
body .homepage-modern ul.nav-order>li.nav-item.show {display:block!important;flex:1 1 0!important;width:auto!important;min-width:0;margin:0!important;padding:0!important;}
body .homepage-modern ul.nav-order>li.nav-item.hide {display:none!important;}
body .homepage-modern ul.nav-order>li.nav-item:has(>.tab-content) {display:block!important;flex:0 0 100%!important;width:100%!important;margin:0!important;padding:0!important;}
body .homepage-modern ul.nav-order>li.nav-item:has(>.tab-content) {margin-top:12px!important;position:relative;z-index:1;}
body .homepage-modern ul.nav-order>li.nav-item>a.nav-link {width:100%!important;height:100%;box-sizing:border-box;}
body .homepage-modern ul.nav-order>li.nav-item>a.nav-link .text-left {white-space:nowrap;}
body .homepage-modern ul.nav-order.hmr-stacked>li.nav-item.show {flex:0 0 100%!important;width:100%!important;}

/* Row A has two links and a search field rather than four module positions. */
body .homepage-modern ul.update-head {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch;width:100%;}
body .homepage-modern ul.update-head>li {width:auto!important;min-width:0;margin:0!important;padding:0!important;}
body .homepage-modern ul.update-head>li>a {width:100%!important;height:100%;box-sizing:border-box;}
body .homepage-modern ul.update-head>li>a .text-left {white-space:nowrap;}
body .homepage-modern ul.update-head .form-search,
body .homepage-modern ul.update-head .form-group {width:100%;height:100%;margin:0!important;}
body .homepage-modern ul.update-head .form-search form {display:block;width:100%;height:100%;margin:0!important;}
body .homepage-modern ul.update-head .search-input-detail {width:100%!important;height:54px!important;margin:0!important;box-sizing:border-box;}
body .homepage-modern ul.update-head.hmr-stacked-a {display:flex!important;flex-direction:column;}
body .homepage-modern ul.update-head.hmr-stacked-a>li {width:100%!important;}
body .homepage-modern ul.update-head.hmr-stacked-a>li:last-child {order:1;}
body .homepage-modern ul.update-head.hmr-stacked-a>li:nth-child(2) {order:2;}
body .homepage-modern ul.update-head.hmr-stacked-a>li:first-child {order:3;}
@media(max-width:900px) {
 body .homepage-modern ul.update-head {grid-template-columns:repeat(3,minmax(0,1fr));}
 body .homepage-modern ul.update-head>li:last-child {grid-column:auto;}
}
@media(max-width:575px) {
 body .homepage-modern ul.update-head {grid-template-columns:repeat(3,minmax(0,1fr));}
 body .homepage-modern ul.update-head>li:last-child {grid-column:auto;}
}

/* Polished bevel homepage menu buttons. */
body .homepage-modern .home-second-sec .update-head>li>a,
body .homepage-modern .nav-order>li.nav-item>a.nav-link {position:relative;isolation:isolate;overflow:hidden;display:flex!important;align-items:center;justify-content:center;min-height:54px;padding:12px 48px 12px 18px!important;border:1px solid rgba(255,255,255,.48)!important;border-top-color:rgba(255,255,255,.82)!important;border-left-color:rgba(255,255,255,.62)!important;border-bottom:5px solid rgba(32,54,78,.30)!important;border-radius:9px!important;background:linear-gradient(145deg,#9bc0df,#82aacd 60%,#638db5)!important;color:#fff!important;font-weight:700!important;text-transform:uppercase;letter-spacing:.2px;text-align:center;box-shadow:inset 0 3px 0 rgba(255,255,255,.30),0 8px 16px rgba(32,54,78,.18);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,border-width .18s ease;}
body .homepage-modern .home-second-sec .update-head>li>a::before,
body .homepage-modern .nav-order>li.nav-item>a.nav-link::before {content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(115deg,rgba(255,255,255,.35),transparent 42%,rgba(0,0,0,.12));pointer-events:none;}
body .homepage-modern .home-second-sec .update-head>li>a:hover,
body .homepage-modern .nav-order>li.nav-item>a.nav-link:hover {transform:perspective(300px) rotateX(-5deg) translateY(-2px);filter:saturate(1.15) brightness(1.03);box-shadow:inset 0 3px 0 rgba(255,255,255,.34),0 11px 20px rgba(32,54,78,.23);}
body .homepage-modern .home-second-sec .update-head>li>a:active,
body .homepage-modern .nav-order>li.nav-item>a.nav-link:active {transform:translateY(3px);border-bottom-width:2px!important;box-shadow:inset 0 2px 4px rgba(32,54,78,.18),0 3px 7px rgba(32,54,78,.16);}
body .homepage-modern .home-second-sec .update-head>li>a.active,
body .homepage-modern .nav-order>li.nav-item>a.nav-link.active {background:linear-gradient(145deg,#f6b43e,#e9a12b 60%,#c77d0a)!important;}
body .homepage-modern .home-second-sec .update-head>li:nth-child(2)>a {background:linear-gradient(145deg,#67df74,#4dd05c 60%,#2da73d)!important;}
body .homepage-modern .home-second-sec .update-head>li>a .text-left,
body .homepage-modern .nav-order>li.nav-item>a.nav-link .text-left {float:none!important;width:auto!important;text-align:center!important;color:#fff!important;font-weight:700!important;}
body .homepage-modern .home-second-sec .update-head>li>a .img-right,
body .homepage-modern .nav-order>li.nav-item>a.nav-link .img-right {position:absolute!important;right:14px;top:50%;transform:translateY(-50%) rotate(90deg);width:26px!important;height:26px!important;margin:0!important;padding:3px!important;border-radius:50%!important;background:#fff!important;}
body .homepage-modern .home-second-sec .update-head>li>a.active .img-right,
body .homepage-modern .nav-order>li.nav-item>a.nav-link.active .img-right {transform:translateY(-50%) rotate(270deg);}
body .homepage-modern .home-second-sec .update-head>li:nth-child(2)>a .img-right {transform:translateY(-50%) rotate(0deg);}
@media(max-width:575px) {
 body .homepage-modern .home-second-sec .update-head>li>a,
 body .homepage-modern .nav-order>li.nav-item>a.nav-link {min-height:50px;padding-left:12px!important;padding-right:42px!important;}
}

/* Keep Row A as three true equal columns until the shared JS stacking point. */
body .homepage-modern .home-second-sec ul.update-head:not(.hmr-stacked-a) {
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:12px!important;
 width:100%!important;
}
body .homepage-modern .home-second-sec ul.update-head>li {
 width:100%!important;
 min-width:0!important;
 margin:0!important;
 padding:0!important;
}
body .homepage-modern .home-second-sec ul.update-head>li .form-search,
body .homepage-modern .home-second-sec ul.update-head>li form,
body .homepage-modern .home-second-sec ul.update-head>li .form-group,
body .homepage-modern .home-second-sec ul.update-head>li .search-input-detail {
 width:100%!important;
 max-width:none!important;
 box-sizing:border-box!important;
}
