#main_back {
    background-color:#fff;
}

#wrapper    {
    width:960px;
    padding-left:20px;
    padding-right:20px;
    margin-left:auto;
    margin-right:auto;
}

/*ヘッダー*/

#header {
    position:relative;
    height:120px;
    width:960px;
}

#header .logo   {
    position:absolute;
    top:45px;
    left:0px;
}

#header .txt01  {
    position:absolute;
    top:20px;
    left:0px;
}
    
#header .txt02  {
    position:absolute;
    top:55px;
    left:240px;
}
   
#g_menu {
    position:absolute;
    top:55px;
    left:543px;
    height:32px;
    border-right: 1px solid #B9171E;
}


#g_menu li  {
    float: left;
    width: 103px;
    text-align: center;
    border-left: 1px solid #B9171E;
    height:32px;
}

#g_menu img {
    margin-top:7px;
}


/*サイドバー*/
#sidebar    {
    float:left;
    width:85px;
}

#sidebar .main_title    {
    margin-bottom:48px;  
    vertical-align:top;
}

#sidebar .menu_box img  {
    margin-top:30px;
    padding-bottom:30px;
    border-bottom: 1px solid #c3171e;
    vertical-align:top;
}

#sidebar .menu_box a img	{
  opacity: 1;
  transition: 0.3s;
}
#sidebar .menu_box a:hover img	{
  opacity: .6;
}

/*コンテンツ*/
#content    {
    margin-left:130px;
    width:830px;
}

#content img    {
    vertical-align:top;
}


/*フッター*/

.page_top   {
    text-align:right;
    padding-top:35px;
    padding-bottom:24px;
    height:24px;
       
}

#footer {
    background-color:#fff;
    margin-top:7px;
    height:165px;
}

#footer_area    {
    position:relative;
    width:960px;
    padding-left:20px;
    padding-right:20px;
    margin-left:auto;
    margin-right:auto;
}

#footer_area .f_logo    {
    position:absolute;
    top:22px;
    left:20px;
}

#copyright  {
    padding-top:27px;
    padding-bottom:26px;
    font-size:12px;
    color:#fff;
    text-align:center;
}

.footer_menu    {
    position:absolute;
    top:22px;
    left:299px;
    height:76px;
    border-left: 1px solid #B9171E;
    padding-left:29px;
    padding-top:10px;
}

.footer_menu ul {
    margin-bottom:15px;
}

.footer_menu li {
    float:left;
    font-size:12px;
    background-image:url(../images/Footer_icn.jpg);
    background-repeat:no-repeat;
    padding-left:15px;
    width:142px;
    line-height:12px;
}

.footer_sub_menu    {
    position:absolute;
    width:960px;
    top:130px;
    height:20px;
    text-align:right;
}

.footer_sub_menu ul {
    float:right;
}

.footer_sub_menu li {
    float: left;
    font-size: 12px;
    padding-left: 20px;
    padding-right: 20px;
    border-left: 1px solid #B9171E;
    list-style-type: none;    
}

.menu-item-48   {
    border-right: 1px solid #B9171E;
}

/* モバイル専用要素の非表示（PC） */
.mobile_only {
    display: none;
}

/* PC専用要素 */
@media screen and (min-width: 769px) {
    .desktop_header {
        display: block !important;
    }
    
    .mobile_header {
        display: none !important;
    }
}

/* モバイル対応 */
body.menu-open {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* iPad対応 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    #content img,
    #main_content img,
    .post_view img,
    .post_detail img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
        box-sizing: border-box;
        margin: 0 auto;
        padding: 0;
    }
}

@media screen and (max-width: 768px) {
    #wrapper {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    #header {
        height: auto;
        width: 100%;
        padding: 10px 0;
        position: relative;
    }
    
    /* モバイルヘッダー */
    .mobile_header {
        display: flex;
        flex-direction: column;
        padding: 10px 15px;
    }
    
    /* ヘッダートップ行 */
    .header_top_row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    /* ヘッダーサブタイトル画像 */
    .header_subtitle_image {
        flex-shrink: 0;
    }
    
    .header_subtitle_image img {
        height: auto;
    }
    
    /* ヘッダーメイン行 */
    .header_main_row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    #header .logo {
        position: static;
        margin: 0;
        flex-shrink: 0;
    }
    
    .header_controls {
        display: flex;
        align-items: center;
        gap: 15px;
        flex-shrink: 0;
        margin-right: 5px;
    }
    
    #header .txt02 {
        position: static;
        display: block;
        margin: 0 0 10px 15px;
        text-align: left;
    }
    
    /* PCメニューを非表示 */
    #g_menu {
        display: none;
    }
    
    /* モバイル専用要素を表示 */
    .mobile_only {
        display: block;
    }
    
    /* ハンバーガーメニューボタン */
    #mobile_menu_toggle {
        position: static;
        width: 30px;
        height: 30px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .hamburger {
        position: relative;
        width: 30px;
        height: 30px;
    }
    
    .hamburger span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: #B9171E;
        border-radius: 2px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
    }
    
    .hamburger span:nth-child(1) {
        top: 6px;
    }
    
    .hamburger span:nth-child(2) {
        top: 13px;
    }
    
    .hamburger span:nth-child(3) {
        top: 20px;
    }
    
    /* ハンバーガーメニュー開時のアニメーション */
    .hamburger.active span:nth-child(1) {
        top: 13px;
        transform: rotate(135deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }
    
    .hamburger.active span:nth-child(3) {
        top: 13px;
        transform: rotate(-135deg);
    }
    
    /* モバイルメニュー */
    #mobile_menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        height: 100svh;
        background: #fff;
        border-left: 2px solid #B9171E;
        z-index: 1000;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-transform: translate3d(0,0,0);
        padding-top: 40px;
        padding-bottom: 30px;
        box-sizing: border-box;
    }
    
    #mobile_menu.active {
        right: 0;
    }
    
    #mobile_menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    #mobile_menu li {
        border-bottom: 1px solid #eee;
    }
    
    #mobile_menu a {
        display: block;
        padding: 8px 15px;
        color: #333;
        text-decoration: none;
        font-size: 14px;
        line-height: 1.2;
        transition: background-color 0.2s ease;
    }
    
    #mobile_menu a:hover {
        background-color: #f5f5f5;
        color: #B9171E;
    }
    
    /* オーバーレイ */
    #mobile_menu_overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    #mobile_menu_overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    #sidebar {
        float: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    #sidebar .main_title {
        display: none;
    }
    
    #sidebar .menu_box {
        display: none;
    }
    
    /* モバイル用ページタイトル */
    #sidebar::before {
        content: attr(data-title);
        display: block;
        margin: 20px 10px;
        padding: 15px 20px;
        background: #fff;
        border-top: 3px solid #B9171E;
        border-bottom: 3px solid #B9171E;
        text-align: center;
        font-size: 20px;
        color: #333;
        font-weight: bold;
        letter-spacing: 0.1em;
    }
    
    #content {
        margin-left: 0;
        width: 100%;
    }
    
    #content img {
        max-width: 100%;
        height: auto;
    }
    
    #footer {
        height: auto;
        margin-top: 20px;
    }
    
    #footer_area {
        width: 100%;
        padding: 20px 10px;
        height: auto;
        text-align: center;
        box-sizing: border-box;
    }
    
    #footer_area .f_logo {
        position: static;
        display: block;
        margin: 0 auto 20px;
    }
    
    .footer_menu {
        display: none !important;
    }
    
    .footer_sub_menu {
        position: static !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 0 !important;
        height: auto !important;
    }
    
    .footer_sub_menu ul {
        float: none;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .footer_sub_menu li {
        display: block;
        border: 1px solid #B9171E;
        padding: 8px 15px;
        border-radius: 3px;
        list-style: none;
    }
    
    .footer_sub_menu li a {
        color: #B9171E;
        text-decoration: none;
        font-size: 14px;
    }
    
    #copyright {
        font-size: 10px;
        padding-left: 15px;
        padding-right: 15px;
        line-height: 1.4;
    }
    
    /* インラインスタイルのpadding-leftを無効化 */
    p[style*="padding-left"] {
        padding-left: 0 !important;
    }
}