/* Shared ODM-style navigation, enabled only by header.php's page conditions. */
body[data-site-sidebar-layout] {
    --site-sidebar-width: clamp(220px, 18vw, 560px);
    --site-content-gap: clamp(20px, 2vw, 40px);
    background: #fff;
}
body[data-site-sidebar-layout] #page {
    padding-left: var(--site-sidebar-width);
    box-sizing: border-box;
    min-height: 100svh;
}
body[data-site-sidebar-layout] .header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--site-sidebar-width);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    z-index: 1000;
    background: #fff;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}
body[data-site-sidebar-layout] .header .header-box {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 32px clamp(24px, 2.5vw, 52px);
    box-sizing: border-box;
}
body[data-site-sidebar-layout] .header :is(.m-width-content, .ipd-20) {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body[data-site-sidebar-layout] .header .header-nav-box { display: block; }
body[data-site-sidebar-layout] .header .logo {
    width: 100%;
    float: none;
    margin: 0 0 clamp(16px, 3vh, 32px);
}
body[data-site-sidebar-layout] .header .logo a img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin: 0;
    padding: 0;
}
body[data-site-sidebar-layout] .header .nav-box { width: 100%; float: none; text-align: left; }
body[data-site-sidebar-layout] .header #menuPc { display: block; }
body[data-site-sidebar-layout] .header #menuPc > ul { display: flex; flex-direction: column; gap: 0; }
body[data-site-sidebar-layout] .header #menuPc > ul > li { position: relative; width: 100%; margin: 0; }
body[data-site-sidebar-layout] .header #menuPc > ul > li > a {
    display: block;
    padding: 8px 36px 8px 0;
    color: #171717;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: .12em;
    text-shadow: none;
}
body[data-site-sidebar-layout] .header #menuPc > ul > li.active > a { color: #171717; font-weight: 600; }
body[data-site-sidebar-layout] .header #menuPc a:hover { color: #171717; text-decoration: underline; text-underline-offset: 4px; }
body[data-site-sidebar-layout] .header .header-top { display: block; order: 2; margin-top: auto; padding-top: 24px; background: #fff; }
body[data-site-sidebar-layout] .header :is(.header-top-flex, .rights-flexs) { display: block; }
body[data-site-sidebar-layout] .header .header-top .share { float: none; justify-content: flex-start; flex-wrap: wrap; }
body[data-site-sidebar-layout] .header .header-top .share a { color: #555; margin: 0 16px 0 0; }
body[data-site-sidebar-layout] .header .header-language-pc { display: block; margin-top: 12px; }
body[data-site-sidebar-layout] .header :is(.tel-mail, .search, .btn-nav, .header-language-ph, .nav-child, #menuWap) { display: none !important; }
body[data-site-sidebar-layout] .site-submenu-toggle {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 18px;
    cursor: pointer;
}
body[data-site-sidebar-layout] .site-sidebar-submenu { margin: 0 0 8px 20px; }
body[data-site-sidebar-layout] .site-sidebar-submenu li { float: none; width: 100%; }
body[data-site-sidebar-layout] .site-sidebar-submenu a { display: block; padding: 6px 0; color: #555; font-size: 13px; line-height: 1.5; letter-spacing: .05em; overflow-wrap: anywhere; }
body[data-site-sidebar-layout] :is(.site-sidebar-submenu, .site-menu-backdrop)[hidden] { display: none; }
body[data-site-sidebar-layout] :is(.site-menu-toggle, .site-menu-backdrop) { display: none; }
body[data-site-sidebar-layout] :is(.header a, .header button, .site-menu-toggle):focus-visible { outline: 2px solid #de1617; outline-offset: 2px; }

/* Keep banners, articles and lists inside the right column with modest gutters. */
body[data-site-sidebar-layout] #page > :is(.banner, .inner-banner) { width: calc(100% - var(--site-content-gap) * 2); margin: 24px var(--site-content-gap) 0; }
body[data-site-sidebar-layout] #page > .main { width: 100%; min-width: 0; margin: 0; box-sizing: border-box; overflow-wrap: anywhere; }
body[data-site-sidebar-layout] .main .m-width-content { width: 100%; max-width: none; padding: 0 var(--site-content-gap); box-sizing: border-box; }
body[data-site-sidebar-layout] .main .m-width-content > .ipd-20 { padding-left: 0; padding-right: 0; }
body[data-site-sidebar-layout] .inner-banner .tit { font-size: clamp(24px, 3.5vw, 64px); }
body[data-site-sidebar-layout] .main :is(.text, .text-box, .pic, .news-edit-box) { min-width: 0; overflow-wrap: anywhere; }
body[data-site-sidebar-layout] .main img { max-width: 100%; }
body[data-site-sidebar-layout] .news-box .news-list ul li .pic { max-width: 100%; }
body[data-site-sidebar-layout] .main :is(.cer-swiper, .rp-swiper-box, .solu-swiper) { padding-left: 56px; padding-right: 56px; box-sizing: border-box; }
body[data-site-sidebar-layout] .main :is(.cer-swiper, .rp-swiper-box, .solu-swiper) .swiper-button-next { right: 0; }
body[data-site-sidebar-layout] .main :is(.cer-swiper, .rp-swiper-box, .solu-swiper) .swiper-button-prev { left: 0; }
body[data-site-sidebar-layout] :is(footer.footer, .mobile-bottom-nav) { display: none !important; }
body[data-site-sidebar-layout].admin-bar .header { top: 32px; height: calc(100dvh - 32px); }

.site-mobile-header { display: none; }

/* The content column is narrower than the viewport used by the original theme. */
@media (min-width: 768px) and (max-width: 1600px) {
    body[data-site-sidebar-layout] .about-one .ao-flex { display: block; }
    body[data-site-sidebar-layout] .about-one .ao-flex .pic { width: 100%; }
    body[data-site-sidebar-layout] .about-one .ao-flex .text-box { width: 100%; margin: 28px 0 0; padding-top: 0; }
    body[data-site-sidebar-layout] .news-detail .news-related { width: 100%; float: none; }
    body[data-site-sidebar-layout] .news-detail .news-edit-box { width: 100%; float: none; margin: 40px 0 0; }
    body[data-site-sidebar-layout] .news-box .news-list ul li { display: block; padding: 20px; }
    body[data-site-sidebar-layout] .news-box .news-list ul li .pic { width: 100%; }
    body[data-site-sidebar-layout] .news-box .news-list ul li .text { width: 100%; margin: 24px 0 0; }
    body[data-site-sidebar-layout] .solu-dis-list .list ul li { width: 50%; }
}
@media (max-width: 767px) {
    body[data-site-sidebar-layout] { --site-sidebar-width: min(300px, calc(100vw - 52px)); --site-content-gap: 16px; }
    body[data-site-sidebar-layout] #page { padding-left: 0; padding-top: 72px; }
    body[data-site-sidebar-layout] .header { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
    body[data-site-sidebar-layout].site-menu-open { overflow: hidden; }
    body[data-site-sidebar-layout].site-menu-open .header { transform: translateX(0); visibility: visible; }
    body[data-site-sidebar-layout] .header .header-box { padding: 64px 24px 24px; }
    body[data-site-sidebar-layout] .site-menu-toggle { display: block; position: fixed; z-index: 1002; top: 14px; left: auto; right: max(16px, env(safe-area-inset-right)); width: 44px; height: 44px; border: 1px solid #e5e5e5; background: #fff; color: #171717; font-size: 23px; cursor: pointer; }
    body[data-site-sidebar-layout] .site-menu-backdrop:not([hidden]) { display: block; position: fixed; z-index: 999; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0,0,0,.35); }
    body[data-site-sidebar-layout] .site-mobile-header { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 72px; padding: 8px 72px; box-sizing: border-box; align-items: center; justify-content: center; background: #fff; z-index: 998; border-bottom: 1px solid #eee; }
    body[data-site-sidebar-layout] .site-mobile-logo { display: flex; align-items: center; justify-content: center; max-width: 100%; height: 100%; }
    body[data-site-sidebar-layout] .site-mobile-logo img { display: block; width: auto; max-width: 100%; max-height: 52px; object-fit: contain; }
    body[data-site-sidebar-layout] #page > :is(.banner, .inner-banner) { margin-top: 16px; }
    body[data-site-sidebar-layout].admin-bar .site-mobile-header { top: 46px; }
    body[data-site-sidebar-layout].admin-bar .header { top: 46px; height: calc(100dvh - 46px); }
    body[data-site-sidebar-layout].admin-bar .site-menu-toggle { top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-site-sidebar-layout] .header { transition: none; }
}
