
/* Modern Enhancements */

/* Sticky Header with Logo Hide */
#header {
    position: relative;
    z-index: 1000;
    background: #fff;
    transition: all 0.3s ease;
}

/* ロゴ部分をスティッキーにしない */
#header #site-title {
    transition: all 0.3s ease;
}

/* スクロール時にロゴを非表示に */
#header.scrolled #site-title {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.3s ease;
}

/* グローバルメニューをスティッキーに */
#gMenu {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ハンバーガーメニューボタン - PC/スマホ共通 */
.hamburger-menu {
    display: flex;
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 10001;
    width: 50px;
    height: 50px;
    background: #3d3d3d;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hamburger-menu:hover {
    background: #555;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

/* ×ボタンのアニメーション改善 */
.hamburger-menu span:nth-child(1) {
    top: 18px;
}

.hamburger-menu span:nth-child(2) {
    top: 24px;
}

.hamburger-menu span:nth-child(3) {
    top: 30px;
}

.hamburger-menu.active span:nth-child(1) {
    top: 24px;
    transform: rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    top: 24px;
    transform: rotate(-45deg);
}

/* フルスクリーンメニュー - PC/スマホ共通 */
.hamburger-menu {
    display: flex;
}

/* 全てのborderを強制削除 */
#gMenu,
#gMenu *,
#gMenu .menu,
#gMenu .menu li,
#gMenu .menu li a,
#gMenu #menu-header-navi-1,
#gMenu #menu-header-navi-1 li,
#gMenu #menu-header-navi-1 li a,
#gMenu #gMenuInner,
#gMenu .sub-menu,
#gMenu .sub-menu li,
#gMenu .sub-menu li a {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* デフォルトでメニューを非表示 */
#gMenu {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(61, 61, 61, 0.98) !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10000;
    overflow-y: auto;
    padding-top: 80px;
    display: block !important;
}

#gMenu.open {
    transform: translateX(0);
}

/* MENU見出しを非表示 */
#gMenu .assistive-text,
#gMenu h3.assistive-text {
    display: none !important;
}

/* Skip linkを非表示 */
#gMenu .skip-link {
    display: none !important;
}

/* メニュー項目を大きく */
#gMenu .menu,
#gMenu #menu-header-navi-1 {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    list-style: none;
}

#gMenu .menu li,
#gMenu #menu-header-navi-1 li {
    width: 100%;
    text-align: center;
    list-style: none;
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
}

/* 最後の項目の罫線を削除（不要だが念のため残す） */
#gMenu .menu li:last-child,
#gMenu #menu-header-navi-1 li:last-child {
    border-bottom: none !important;
}

#gMenu .menu li a,
#gMenu #menu-header-navi-1 li a {
    display: block !important;
    padding: 25px 20px !important;
    color: #fff !important;
    font-size: 24px !important;
    text-decoration: none !important;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 1px !important;
}

#gMenu .menu li a strong,
#gMenu #menu-header-navi-1 li a strong {
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif !important;
}

#gMenu .menu li a:hover,
#gMenu #menu-header-navi-1 li a:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* 画像非表示、テキスト表示 */
#gMenu .menu-icon,
#gMenu img {
    display: none !important;
}

#gMenu .menu-text {
    display: inline !important;
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif !important;
    letter-spacing: 1px !important;
}

/* すべてのテキストを白に */
#gMenu *,
#gMenu a,
#gMenu span,
#gMenu strong {
    color: #fff !important;
    font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif !important;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Modern Card Hover Effects */
.whitebox {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.whitebox:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.whitebox {
    animation: fadeIn 0.5s ease-out;
}

.whitebox:nth-child(1) { animation-delay: 0.1s; }
.whitebox:nth-child(2) { animation-delay: 0.2s; }
.whitebox:nth-child(3) { animation-delay: 0.3s; }
.whitebox:nth-child(4) { animation-delay: 0.4s; }
.whitebox:nth-child(5) { animation-delay: 0.5s; }
.whitebox:nth-child(6) { animation-delay: 0.6s; }

/* Smooth transitions */
a {
    transition: all 0.3s ease;
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #3d3d3d;
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 24px;
    line-height: 1;
}

#back-to-top:hover {
    background: #555;
    transform: translateY(-5px);
}

#back-to-top.show {
    display: flex;
}

/* Footer Logo */
.footer-logo {
    text-align: center;
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 60px;
    width: auto;
    display: inline-block;
}

/* ページタイトルのセンタリングと装飾削除 */
#pageTitBnr {
    text-align: center !important;
}

#pageTitBnr #pageTitInner {
    max-width: 100% !important;
    text-align: center !important;
}

#pageTitBnr #pageTitInner #pageTit,
#pageTit {
    text-align: center !important;
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-shadow: none !important;
    background: none !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* h1のみセンタリング、h2とh3は左寄せ */
#content h1.contentTitle {
    text-align: center !important;
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* パンくずリストを非表示 */
#panList {
    display: none !important;
}

/* スマホサイズでヘッダーロゴを70%に（元が137pxなので約95pxに） */
@media (max-width: 768px) {
    /* 左右の余白を広げる */
    #main {
        padding: 0 20px !important;
    }
    
    #content {
        padding: 30px 25px !important;
    }
    
    .innerBox {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    #header {
        padding: 20px 15px !important;
        min-height: 80px !important;
    }
    
    #header #site-title {
        text-align: center !important;
        margin: 10px 0 !important;
    }
    
    #header #site-title img,
    #site-title img,
    #header img {
        max-width: 95px !important;
        width: 95px !important;
        height: auto !important;
    }
    
    /* テーブルと画像を画面幅に収める */
    table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }
    
    table td {
        padding: 5px !important;
    }
    
    table img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    #tablepress-2 {
        display: block !important;
        overflow-x: auto !important;
    }
    
    #tablepress-2 tbody {
        display: block !important;
        width: 100% !important;
    }
    
    #tablepress-2 tr {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }
    
    #tablepress-2 td {
        flex: 1 1 30% !important;
        min-width: 80px !important;
        text-align: center !important;
    }
}
