/* --- サイト全体の基本設定 --- */
:root {
    --bg: #ffffff;
    --text: #111111;
    --accent: #004098;
    --gray: #f2f2f2;
    --line: #eee;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- 共通レイアウト --- */
.container { max-width: 1300px; margin: 0 auto; padding: 20px 40px; position: relative; }

/* --- サイドヘッダー (共通) --- */
header {
    position: fixed; top: 0; left: 0; width: 80px; height: 100vh;
    background: #fff; border-right: 1px solid var(--line);
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 40px 0; z-index: 1001;
}
.logo-vert { writing-mode: vertical-rl; font-weight: bold; letter-spacing: 0.35em; font-size: 0.85rem; }
.logo-vert a { text-decoration: none; color: var(--text); }
.since { font-family: sans-serif; font-size: 0.6rem; transform: rotate(-90deg); white-space: nowrap; color: #bbb; font-weight: bold; }
.staff-link { text-decoration: none; color: transparent; transition: 0.5s; margin-right: 5px; cursor: default; }
.staff-link:hover { color: #eee; cursor: pointer; }

/* --- グローバルナビ (共通) --- */
.g-nav {
    position: fixed; top: 0; left: 80px; right: 0; height: 100px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px; z-index: 1000;
}
.sitetitle img { height: 26px; width: auto; vertical-align: middle; }

/* ナビリンク */
.nav-links { display: flex; gap: 35px; align-items: center; }
.nav-links a { 
    text-decoration: none; color: var(--text); font-family: sans-serif; 
    font-size: 1rem; font-weight: bold; letter-spacing: 0.05em;
    transition: 0.3s; position: relative;
}
.nav-links a:not(.btn-contact):hover { color: var(--accent); }
/* --- お問い合わせボタンの特別仕様 --- */
.g-nav .btn-contact {
    background: var(--accent);
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 2px;
    font-size: 0.9rem !important;
    transition: all 0.4s var(--ease) !important;
    box-shadow: 0 10px 20px rgba(0,64,152,0.1);
}
.g-nav .btn-contact:hover {
    background: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* --- Dropdown --- */
.dropdown { position: relative; }
.dropdown-content { position: absolute; top: 100%; right: 0; background: #fff; width: 300px; padding: 25px; box-shadow: 20px 20px 60px rgba(0,0,0,0.08); opacity: 0; visibility: hidden; transform: translateY(15px); transition: 0.4s var(--ease); border: 1px solid #f0f0f0; margin-top: 10px; }
.dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-content a { display: block; padding: 12px 0; border-bottom: 1px solid #f9f9f9; font-family: serif; font-size: 0.9rem; text-decoration: none; color: var(--text); transition: 0.3s; }
.dropdown-content a:hover { padding-left: 10px; background: #fafafa; color: var(--accent); }

/* --- Mobile Menu Toggle --- */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1100; }
.menu-toggle span { display: block; width: 25px; height: 2px; background: var(--text); margin: 6px 0; transition: 0.3s; }

.btn-contact {
    background: var(--accent);
    color: #fff !important;
    padding: 20px 80px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: 0.4s;
}
.btn-contact:hover { transform: scale(1.05); background: #0056cc; }

/* --- フッター (共通) --- */
footer { margin-left: 80px; padding: 100px 40px; background: #fafafa; border-top: 1px solid var(--line); }
.footer-flex { display: flex; justify-content: space-between; align-items: flex-end; }

/* PCレイアウト */
@media (min-width: 1281px) {
    header.side-bar { position: fixed; top: 0; left: 0; width: 80px; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 40px 0; z-index: 1100; }
    .logo-vert { writing-mode: vertical-rl; font-weight: bold; letter-spacing: 0.35em; font-size: 0.85rem; }
    .logo-vert a { text-decoration: none; color: var(--text); }
    .since { font-family: sans-serif; font-size: 0.6rem; transform: rotate(-90deg); white-space: nowrap; color: #bbb; font-weight: bold; }

    .container { 
        width: 100%;
        max-width: 1100px; /* 1300だと広すぎる場合があるので、少し絞ると読みやすい */
        margin: 0 auto; 
        padding: 0 40px 100px; 
    }

    /* フッターもサイドバー分を考慮して中央寄せ */
    footer { 
        margin-left: 80px; 
        padding: 100px 0; 
        display: flex;
        justify-content: center;
    }
    footer .container {
        padding-bottom: 0;
    }
}

/* モバイル用：画像の上に文字を重ねる設定を継承・強化 */
@media (max-width: 1280px) {
    header { height: 60px; width: 100%; flex-direction: row; padding: 0 20px; border-right: none; border-bottom: 1px solid var(--line); }
    .logo-vert { writing-mode: horizontal-tb; font-size: 0.8rem; }
    .since { transform: rotate(0); margin-left: 20px; }
    .g-nav { left: 0 !important; top: 60px; height: 70px; padding: 0 20px; border-bottom: 1px solid var(--line); }
    .nav-links {
        position: fixed; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px);
        background: #fff; flex-direction: column; padding: 40px; gap: 20px;
        transform: translateX(100%); transition: 0.4s var(--ease);
        overflow-y: auto; align-items: flex-start;
    }
    .nav-links.is-open { transform: translateX(0); }
    .nav-links a { font-size: 1.2rem; }
    .g-nav .btn-contact { width: 100%; text-align: center; margin-top: 10px; }

    .dropdown-content { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; width: 100%; padding: 10px 0 0 20px; border: none; display: none; }
    .dropdown:hover .dropdown-content { display: block; }

    .menu-toggle { display: block; } /* スマホ用ハンバーガー表示 */

    .container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 20px !important;
        width: 100% !important;
        max-width: none !important;
    }

    footer { margin-left: 0 !important; padding: 60px 0 !important; width: 100% !important; }
    .footer-flex { flex-direction: column; align-items: flex-start; gap: 30px; padding: 0 20px; }
}

@media (max-width: 480px) {
    .sitetitle img { height: 20px; }
}
