/* ==========================================================================
   ヘッダーレイアウト - シンプル版
   wp-content/themes/ryuji01/css/layout/header.css
   ========================================================================== */

/* カラー変数 */
:root {
    --primary-blue: #1565c0;
    --primary-blue-dark: #0d47a1;
    --primary-blue-light: #1976d2;
}

/* ヘッダー基本設定 */
.site-header {
    width: 100%;
    background-color: rgba(30, 58, 138, 0.95);
    position: relative;
    z-index: 1000;
}

/* ヘッダーコンテナ */
.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ブランディング */
.site-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title {
    margin: 0;
    line-height: 1;
}

.site-title img {
    height: 60px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.site-description {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* 中央メッセージ */
.header-center {
    flex: 1;
    text-align: center;
}

.header-message {
    color: #ffffff;
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "游明朝", "serif";
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* ヘッダー右側 */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ==========================================================================
   ハンバーガーメニュー
   ========================================================================== */

/* ハンバーガーボタン */
.hamburger-menu {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

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

/* ハンバーガーメニューがアクティブな時 */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

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

/* スライドメニュー */
.slide-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 10001;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.slide-menu.active {
    right: 0;
}

/* スライドメニューヘッダー */
.slide-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.slide-menu-header h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.close-menu:hover {
    transform: rotate(90deg);
}

/* サービスメニュー */
.service-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.menu-category {
    border-bottom: 1px solid #f0f0f0;
}

.menu-category a {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-category a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(21, 101, 192, 0.1) 0%, rgba(21, 101, 192, 0.05) 100%);
    transition: width 0.3s ease;
}

.menu-category a:hover::before {
    width: 100%;
}

.menu-category a:hover {
    color: var(--primary-blue);
    padding-left: 40px;
}

.menu-category i {
    font-size: 1.5rem;
    color: var(--primary-blue-light);
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

/* スライドメニューフッター */
.slide-menu-footer {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.contact-link,
.phone-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    margin-bottom: 15px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-link:last-child,
.phone-link:last-child {
    margin-bottom: 0;
}

.contact-link {
    background: var(--primary-blue);
    color: white;
}

.contact-link:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(21, 101, 192, 0.3);
}

.phone-link {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.phone-link:hover {
    background: var(--primary-blue);
    color: white;
}

/* オーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* コンテンツセクション */
#content {
    position: relative;
    z-index: 1;
}

/* WordPress管理バー対応 */
body.admin-bar .slide-menu {
    top: 32px;
    height: calc(100vh - 32px);
}

@media (max-width: 782px) {
    body.admin-bar .slide-menu {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .header-container {
        padding: 20px 30px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .header-center {
        width: 100%;
        order: 3;
    }
    
    .header-message {
        font-size: 0.9rem;
    }
    
    .site-title img {
        height: 45px;
    }
    
    .site-description {
        display: none;
    }
    
    .slide-menu {
        width: 100%;
        right: -100%;
    }
    
    .hamburger-menu {
        width: 45px;
        height: 45px;
    }
    
    .hamburger-menu span {
        width: 22px;
        height: 2.5px;
    }
    
    .menu-category a {
        padding: 20px 25px;
        font-size: 1rem;
    }
    
    .slide-menu-header {
        padding: 20px;
    }
    
    .slide-menu-header h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 15px;
    }
    
    .site-title img {
        height: 40px;
    }
    
    .hamburger-menu {
        width: 40px;
        height: 40px;
    }
    
    .hamburger-menu span {
        width: 20px;
        height: 2px;
    }
    
    .menu-category a {
        padding: 18px 20px;
        font-size: 0.95rem;
    }
    
    .menu-category i {
        font-size: 1.3rem;
    }
}

/* === TrustWorks 新ヘッダー共通 === */
:root{--tw-line:#e5e7eb;--tw-ink:#0f172a;--tw-shadow:0 8px 24px rgba(15,23,42,.08)}
.tw-header{position:sticky;top:0;z-index:1000;background:#fff;border-bottom:1px solid var(--tw-line)}
.tw-header__inner{max-width:1200px;margin:0 auto;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.tw-header__right{margin-left:auto;display:flex;align-items:center;gap:12px}

/* カスタムロゴの高さ基準 */
.custom-logo{max-height:48px;height:auto;width:auto}
@media (max-width:380px){.custom-logo{max-height:38px}}
.custom-logo-link{display:inline-flex;align-items:center}

/* ロゴ未設定時のサイト名リンク */
.tw-site-name{text-decoration:none;color:var(--tw-ink);font-weight:700;font-size:20px}

/* 電話番号画像の高さ基準（サイズはお好みで） */
.tw-phone img{display:block;height:36px;width:auto}
@media (min-width:981px){ .tw-phone img{height:44px} }
@media (max-width:380px){ .tw-phone img{height:30px} }

/* ハンバーガー */
.tw-burger{display:inline-block;width:40px;height:40px;border:1px solid var(--tw-line);border-radius:10px;background:#fff;position:relative;z-index:1002;cursor:pointer}
.tw-burger span{position:absolute;left:8px;right:8px;height:2px;background:var(--tw-ink)}
.tw-burger span:nth-child(1){top:12px}
.tw-burger span:nth-child(2){top:19px}
.tw-burger span:nth-child(3){top:26px}

/* ドロワー */
.tw-drawer{position:fixed;inset:0 0 0 auto;width:84vw;max-width:360px;background:#fff;box-shadow:var(--tw-shadow);padding:20px;overflow:auto;z-index:1001}
.tw-drawer__list{list-style:none;margin:0 0 16px 0;padding:0}
.tw-drawer__list a{display:block;padding:12px 8px;color:var(--tw-ink);text-decoration:none;border-bottom:1px solid var(--tw-line)}
.tw-drawer__cta{display:block;margin-top:8px;text-align:center;padding:12px 14px;border:1px solid var(--tw-ink);border-radius:10px;color:var(--tw-ink);text-decoration:none}
.tw-dim{position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:1000}
.tw-no-scroll{overflow:hidden}

/* アクセシビリティ */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
