/* ============================
   case-header.css
   カスタムヘッダー スタイル
   ============================ */

/* ===== 既存ヘッダーを非表示 ===== */
.site-header,
.header-primary {
    display: none !important;
}

/* ===== ヘッダー全体 ===== */
.ca-site-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===== 帯：キャッチコピー ===== */
.ca-header-band {
    background: #1e3a5f;
    color: #fff;
    padding: 6px 24px;
    font-size: 1rem;
    font-weight: 500;
}
.ca-header-band-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ca-header-band-text {
    font-size: 1rem;
}
.ca-header-band-links {
    display: flex;
    align-items: center;
}
.ca-header-band-links a {
    font-size: 1rem;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: 0 12px;
    border-right: 1px solid rgba(255,255,255,.2);
    transition: color .15s;
    white-space: nowrap;
}
.ca-header-band-links a:first-child {
    border-left: 1px solid rgba(255,255,255,.2);
}
.ca-header-band-links a:hover {
    color: #fff;
    text-decoration: none;
}

/* ===== 1段目：ロゴ + 認証 ===== */
.ca-header-main {
    border-bottom: 1px solid #f3f4f6;
}
.ca-header-main-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ロゴ */
.ca-header-logo {
    margin-right: auto;
}
.ca-header-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.ca-header-logo-img {
    height: 40px;
    width: auto;
}
.ca-header-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e3a5f;
    letter-spacing: -.02em;
}

/* 認証リンク群 */
.ca-header-auth {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ca-header-nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.ca-header-nav-link:hover {
    background: #f3f4f6;
    color: #111;
    text-decoration: none;
}
.ca-header-mypage {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}
.ca-header-mypage:hover {
    background: #dbeafe;
    text-decoration: none;
    color: #1e40af;
}
.ca-header-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ca-header-logout {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 8px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.ca-header-logout:hover {
    color: #dc2626;
    background: #fef2f2;
    text-decoration: none;
}
.ca-header-login {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: 1.5px solid #1e3a5f;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a5f;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.ca-header-login:hover {
    background: #1e3a5f;
    color: #fff;
    text-decoration: none;
}
.ca-header-register {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #16a34a;
    border: 1.5px solid #16a34a;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}
.ca-header-register:hover {
    background: #15803d;
    text-decoration: none;
    color: #fff;
}

/* ハンバーガー */
.ca-header-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}
.ca-header-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #374151;
    border-radius: 2px;
}

/* ===== 2段目：ナビ ===== */
.ca-header-nav {
    background: #fff;
}
.ca-header-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.ca-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.ca-nav-list li + li {
    border-left: 1px solid #e5e7eb;
}
.ca-nav-list li a {
    display: block;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
    position: relative;
}
.ca-nav-list li a:hover {
    color: #15803d;
    border-bottom-color: #22c55e;
    background: linear-gradient(to bottom, transparent, rgba(34,197,94,.06));
    text-decoration: none;
}
.ca-nav-list li.current-menu-item a,
.ca-nav-list li.current-post-type-ancestor a,
.ca-nav-list li.current-page-ancestor a {
    color: #1e3a5f;
    border-bottom-color: #004a93;
    background: linear-gradient(to bottom, transparent, rgba(0,74,147,.06));
    text-decoration: none;
    font-weight: 700;
}

/* ===== スマホ用ドロワーナビ ===== */
.ca-mobile-nav {
    display: none;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
}
.ca-mobile-nav.is-open { display: block; }
.ca-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 16px;
}
.ca-mobile-nav-list li a {
    display: block;
    padding: 12px 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}
.ca-mobile-auth-links {
    display: flex;
    gap: 8px;
    padding: 12px 24px 0;
}
.ca-mobile-auth-links .ca-header-login,
.ca-mobile-auth-links .ca-header-register {
    flex: 1;
    justify-content: center;
}

/* ===== スマホ用モバイルナビ ===== */
.ca-mobile-nav {
    display: none;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 8px 0 16px;
}
.ca-mobile-nav.is-open {
    display: block;
}
.ca-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 16px;
}
.ca-mobile-nav-list li a {
    display: block;
    padding: 13px 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: color .15s;
}
.ca-mobile-nav-list li a:hover {
    color: #1e3a5f;
    text-decoration: none;
}
.ca-mobile-auth-links {
    display: flex;
    gap: 8px;
    padding: 12px 16px 0;
}
.ca-mobile-auth-links .ca-header-login,
.ca-mobile-auth-links .ca-header-register {
    flex: 1;
    justify-content: center;
}

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
    .ca-header-nav-link {
        display: none;
    }
}
@media (max-width: 768px) {
    .ca-header-band-links  { display: none; }
    .ca-header-main-inner  { padding: 10px 16px; }
    .ca-header-hamburger   { display: flex; }
    .ca-header-nav         { display: none; }
    .ca-header-auth        { display: none; }
    .ca-header-logo-img    { height: 32px; }
}
