/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Roboto, "Droid Sans", "Yu Gothic", Meiryo, "Meiryo UI", sans-serif;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
     Header
     ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 1px 20px 3px rgba(0, 0, 0, 0.1);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
}

/* ロゴ */
.header-logo {
    display: block;
    width: 100px;
    height: 40px;
    z-index: 70;
    margin-right: 8px;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================
     PC Navigation
     ============================================ */
.pc-nav {
    display: none;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: static;
}

/* 3Dフリップリンク */
.nav-link {
    display: block;
    height: 40px;
    width: 70px;
    perspective: 1000px;
    padding: 0;
}

.nav-flip {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
    transform-style: preserve-3d;
}

.nav-item:hover .nav-flip,
.nav-item.active .nav-flip {
    transform: rotateX(90deg);
}

.nav-front,
.nav-back {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.nav-front {
    background: #ffffff;
    color: #334155;
    transform: translateZ(20px);
}

.nav-front span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.nav-back {
    background: #1F2C5C;
    color: #ffffff;
    border-radius: 2px;
    transform: rotateX(-90deg) translateZ(20px);
}

.nav-back span {
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* キャレット矢印 */
.caret {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    transform: rotate(45deg);
    margin-bottom: 2px;
    margin-left: 2px;
}

/* ============================================
     Mega Menu
     ============================================ */
.mega-menu {
    position: absolute;
    left: 0;
    top: 64px;
    width: 100%;
    padding-top: 2px;
    margin-top: -10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 100;
}

.nav-item.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-menu-overlay {
    width: 100%;
    background: rgba(71, 105, 162, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 32px 0;
}

.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    width: 98%;
}

/* フレックスレイアウト (ABOUT, COLUMN, RECRUIT, CONTACT) */
.mega-menu-grid.flex-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 48px;
}

.flex-layout .mega-category {
    width: calc(33.333% - 32px);
}

/* カラムレイアウト (SERVICES) */
.mega-menu-grid.columns-layout {
    columns: 3;
    column-gap: 48px;
    column-fill: balance;
}

.columns-layout .mega-category {
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.columns-layout .mega-category.has-deep {
    margin-bottom: 32px;
}

/* メガメニュー カテゴリタイトル */
.mega-category-title {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4769A2;
    font-weight: 700;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    transition: color 0.2s;
}

.mega-category-title:hover {
    color: #1F2C5C;
}

/* ディープリンク一覧 */
.mega-deep-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-deep-list li a {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 12px;
    color: #475569;
    line-height: 1.625;
    transition: color 0.2s;
}

.mega-deep-list li a:hover {
    color: #1F2C5C;
}

/* ============================================
     SP Hamburger
     ============================================ */
.sp-hamburger {
    display: flex;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 120;
    width: 32px;
    height: 32px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 24px;
    background: #131B3F;
    transition: all 0.3s;
}

/* ×表示時 */
.sp-hamburger.is-open .hamburger-line {
    background: #ffffff;
}

.sp-hamburger.is-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.sp-hamburger.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.sp-hamburger.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
     SP Overlay
     ============================================ */
.sp-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #131B3F;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Roboto, "Droid Sans", "Yu Gothic", Meiryo, "Meiryo UI", sans-serif;
    line-height: 1.5;
}

.sp-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sp-logo-area {
    display: flex;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 32px;
}

.sp-logo {
    width: 128px;
    height: auto;
}

/* SP ナビゲーション */
.sp-nav {
    padding: 0 16px;
    color: #ffffff;
    letter-spacing: 0.1em;
    font-size: 13px;
}

.sp-nav-list {
    border-top: none;
}

.sp-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-nav-item:last-child {
    border-bottom: none;
}

.sp-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.sp-nav-link,
.sp-nav-link-area {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    cursor: pointer;
}

.sp-nav-label {
    font-weight: 700;
}

.sp-nav-en {
    font-size: 10px;
    opacity: 0.6;
    font-weight: 300;
}

.sp-toggle,
.sp-toggle-spacer {
    width: 24px;
    display: flex;
    justify-content: flex-end;
    cursor: pointer;
    user-select: none;
}

.sp-toggle-spacer {
    visibility: hidden;
}

/* SP サブメニュー */
.sp-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.sp-submenu.open {
    max-height: 2000px;
    padding-bottom: 16px;
}

.sp-submenu-list {
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sp-submenu-list li {
    padding: 0;
}

.sp-submenu-list .sp-submenu-list-li {
    padding: 8px 0;
}

.sp-submenu-list .sp-submenu-list-li a {
    font-size: 12px;
}

.sp-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.sp-sub-row a {
    font-size: 12px;
    opacity: 0.9;
    color: #ffffff;
}

.sp-deep-toggle {
    cursor: pointer;
    user-select: none;
    color: #ffffff;
}

/* SP ディープメニュー */
.sp-deep-menu {
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    transition: max-height 0.3s;
}

.sp-deep-menu.open {
    max-height: 1000px;
    margin-bottom: 8px;
}

.sp-deep-menu a {
    display: flex;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    opacity: 0.9;
    line-height: 1.625;
    letter-spacing: normal;
}

.sp-deep-menu a:last-child {
    border-bottom: none;
}

/* ============================================
     Responsive
     ============================================ */

/* md: 768px */
@media (min-width: 768px) {
    .header-inner {
        padding: 0 8px;
    }

    .header-logo {
        width: 120px;
    }

    .pc-nav {
        display: flex;
    }

    .sp-hamburger {
        display: none;
    }

    .sp-overlay {
        display: none;
    }

    .nav-link {
        width: 70px;
    }

    .nav-front span,
    .nav-back span {
        font-size: 10px;
    }

    .mega-menu-inner {
        width: 98%;
    }

    .mega-category-title {
        font-size: 14px;
    }
}

/* lg: 1024px */
@media (min-width: 1024px) {
    .header-logo {
        width: 140px;
    }

    .nav-link {
        width: 100px;
    }

    .nav-front span,
    .nav-back span {
        font-size: 12px;
    }
}

/* xl: 1280px */
@media (min-width: 1280px) {
    .header-inner {
        padding: 0;
    }

    .nav-link {
        width: 90px;
    }

    .mega-menu-inner {
        width: 100%;
    }

    .mega-category-title {
        font-size: 16px;
    }
}

/* ===== Breadcrumb ===== */
.main_case_studies {
    padding-top: 64px;
}

.breadcrumb-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    width: 100%;
    height: 64px;
    align-items: center;
    background-color: #fff;
}

.breadcrumb-nav {
    width: 100%;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    overflow-wrap: break-word;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-link {
    font-family: "Noto Sans JP", Helvetica, sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-link:hover {
    color: #131b3f;
}

.breadcrumb-separator .breadcrumb-chevron {
    width: 12px;
    height: 24px;
    fill: currentColor;
}

.breadcrumb-current {
    font-family: "Noto Sans JP", Helvetica, sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #000;
}

@media (min-width: 640px) {
    .breadcrumb-list {
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .breadcrumb-bar {
        padding: 0 8px;
    }
}

@media (min-width: 1280px) {
    .breadcrumb-bar {
        padding: 0;
    }
}