/* =============================================================================
   ZAKKANET リニューアル 共通CSS (zn_renewal.css)
   全ページで共有するスタイル定義
   ============================================================================= */

/* CSS変数 */
:root {
    --primary-color: #0a2463;
    --primary-dark: #06153d;
    --primary-light: #1e3a8a;
    --accent-color: #d97706;
    --accent-hover: #b45309;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(10, 36, 99, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(10, 36, 99, 0.1), 0 4px 6px -2px rgba(10, 36, 99, 0.05);
    --highlight-bg: #fffbeb;
    --highlight-border: #fcd34d;
}

/* リセット & ベース */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =============================================================================
   ヘッダー
   ============================================================================= */
header {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area { display: flex; align-items: center; gap: 12px; z-index: 1001; }
.logo-img { max-height: 40px; width: auto; display: block; }

.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 0.95rem; font-weight: 500; color: rgba(255,255,255,0.85); position: relative; }
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; border-bottom: 2px solid var(--accent-color); }

.header-actions { display: flex; gap: 16px; align-items: center; z-index: 1001; }

/* ヘッダーボタン */
.btn-login { font-size: 0.9rem; font-weight: 600; color: #fff; }
.btn-join {
    background: var(--accent-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    display: inline-block;
}
.btn-join:hover { background: var(--accent-hover); }

.btn-post-header {
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}
.btn-post-header:hover { background-color: #fff; color: var(--primary-color); }

/* ハンバーガーメニューボタン */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    padding: 8px;
}

/* モバイルメニュー */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background-color: var(--primary-color);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    padding-bottom: 40px;
    overflow-y: auto;
}
.mobile-menu-overlay.active { transform: translateX(0); }

.mobile-nav-link {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}
.mobile-nav-link:hover { background: rgba(255,255,255,0.05); }
.mobile-nav-link i { margin-left: 8px; font-size: 0.9em; opacity: 0.7; }
.mobile-nav-logout {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 8px;
    padding-top: 16px !important;
}

/* =============================================================================
   フッター
   ============================================================================= */
.site-footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    padding: 60px 0;
    font-size: 0.9rem;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 1rem; font-weight: 700; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #cbd5e1; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; text-decoration: underline; }
.footer-col .logo-text { color: #fff; font-size: 1.4rem; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* =============================================================================
   共通バッジ・ステータス
   ============================================================================= */
.status-badge {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}
.badge-urgent { background-color: #ef4444; }
.badge-new { background-color: var(--accent-color); }
.badge-recruiting { background-color: #16a34a; }     /* 募集中：緑 */
.badge-negotiating { background-color: #0ea5e9; }   /* 商談中：青 */
.badge-closed { background-color: #64748b; }         /* 募集終了：グレー */

/* =============================================================================
   モバイルサイドバードロワー（全カテゴリページ共通）
   使い方:
     <aside class="sidebar">
       <div class="sidebar-drawer-header">...</div>  ← 追加
       ...
     </aside>
     <main class="main-area">
       <button class="drawer-trigger" onclick="openDrawer()">...</button> ← 追加
       ...
     </main>
     <!-- body末尾 -->
     <div class="drawer-overlay" id="drawerOverlay" onclick="closeDrawer()"></div>
   ============================================================================= */

/* トリガーボタン：PCでは非表示 */
.drawer-trigger { display: none; }

/* ドロワーヘッダー：PCでは非表示 */
.sidebar-drawer-header { display: none; }

/* オーバーレイ：常に非表示（JSでopen付与） */
.drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 299;
}
.drawer-overlay.open { display: block; }

@media (max-width: 900px) {
    /* サイドバーをドロワーとして使用 */
    .page-layout { display: block !important; }

    .sidebar {
        position: fixed !important;
        top: 0; left: 0;
        width: min(300px, 88vw);
        height: 100%;
        background: var(--bg-body);
        z-index: 300;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0 12px 40px;
    }
    .sidebar.drawer-open { transform: translateX(0); }

    /* ドロワーヘッダー：モバイルのみ表示 */
    .sidebar-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: var(--primary-color);
        color: #fff;
        padding: 16px 20px;
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0 -12px 16px;
    }
    .sidebar-drawer-title { font-size: 1rem; font-weight: 900; }
    .sidebar-drawer-close {
        background: rgba(255,255,255,0.2);
        border: none;
        color: #fff;
        width: 32px; height: 32px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1rem;
        display: flex; align-items: center; justify-content: center;
        font-family: inherit;
    }
    .sidebar-drawer-close:hover { background: rgba(255,255,255,0.35); }

    /* トリガーボタン：モバイルのみ表示 */
    .drawer-trigger {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 11px 16px;
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--primary-color);
        cursor: pointer;
        margin-bottom: 16px;
        font-family: 'Noto Sans JP', sans-serif;
        text-align: left;
    }
    .drawer-trigger:active { background: #f8fafc; }
    .drawer-trigger-label { flex: 1; }
    .drawer-trigger-badge {
        background: var(--primary-color);
        color: #fff;
        font-size: 0.72rem;
        font-weight: 700;
        padding: 2px 10px;
        border-radius: 10px;
        white-space: nowrap;
    }
}

/* =============================================================================
   レスポンシブ (共通)
   ============================================================================= */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .header-inner { padding: 0 16px; }
    .footer-grid { grid-template-columns: 1fr; }
}
