/* companyページ専用のスタイル */
.main-content {
    background-color: #1b1b1b;
    background-image: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* サイドバー関連の要素の色を明るい灰色に変更 */
.sidebar {
    background-color: #D7D5CA;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin: 0px 10px 10px 0px;
    transition: background-color 0.3s ease-in-out;
}

.hamburger-menu span {
    background-color: var(--color-orange);
}

.map-placeholder {
    background-image: url('../images/map2.png');
}

.member-bar {
    box-sizing: border-box;
    width: calc(100% - 2vh);
    height: calc(100% - 15px);
    background-color: #D7D5CA;
    border-top-right-radius: 200px;
    border-bottom-right-radius: 200px;
    position: relative;
    z-index: 998;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.member-bar:hover {
    background-color: #e0e0e0;
}

.members-text {
    color: var(--color2);
    font-size: 4rem;
    font-weight: bold;
    text-align: left;
    position: absolute;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    z-index: 999;
    transition: color 0.3s ease;
    cursor: pointer;
    pointer-events: none;
}

.middle-container {
    top: 32%;
    height: 36%;
    overflow-y: hidden;
}

.menu-text {
    color: var(--color-orange);
}

.middle-bottom-container {
    top: 68%;
    height: 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 0;
}

.middle-bottom-left {
    color: #D7D5CA;
    font-size: 1.2rem;
    font-weight: bold;
    width: 50%;
    text-align: left;
    cursor: pointer;
}

.middle-bottom-right {
    color: #D7D5CA;
    font-size: 1.2rem;
    font-weight: bold;
    width: 50%;
    text-align: right;
    padding: 0 2rem;
}

.middle-bottom-right::after {
    content: "→";
    font-size: 1.4rem;
}

.bottom-container {
    top: 75%;
    height: 25%;
}

/* 会社情報のグリッドレイアウト */
.company-info-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    /* 最大幅を100%に設定 */
    margin: 1rem;
    overflow-x: auto;
    padding: 0;
    /* 左右の余白を削除 */
    height: 100%;
    /* 高さを100%に設定 */
    scrollbar-width: none;
    /* Firefox用 */
    -ms-overflow-style: none;
    /* IE/Edge用 */
    overflow-y: hidden;
}

.company-info-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera用 */
}

/* 各情報アイテム */
.info-item {
    position: relative;
    min-width: 195px;
    width: 195px;
    height: 100%;
    /* 高さを100%に設定 */
    flex-shrink: 0;
    padding-left: 2rem;
}

/* 画像スタック */
.image-stack {
    position: relative;
    width: 92%;
    height: 92%;
}

/* スタック内の画像共通スタイル */
.info-image {
    position: absolute;
    bottom: 0;
    top: 3vh;
    left: 0;
    width: 92%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.3);
    transform-origin: center;
    overflow-x: hidden;
}

/* スタック画像の重なり順と表示状態 */
.info-image.top {
    z-index: 3;
    transform: scale(1.3) rotate(0deg);
    /* 初期状態の回転角度を明示的に指定 */
    max-height: 100%;
}

.info-image.middle {
    z-index: 2;
    opacity: 1;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    max-height: 100%;
}

.info-image.bottom {
    z-index: 1;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 100%;
}

/* 回転アニメーションの定義 */
@keyframes acceleratedRotation {
    0% {
        transform: scale(1.3) rotate(0deg);
    }

    70% {
        transform: scale(1.3) rotate(20deg);
    }

    /* 最初の70%で20度までゆっくり回転 */
    75% {
        transform: scale(1.3) rotate(60deg);
    }

    /* 次の5%で20度から60度まで一気に加速 */
    95% {
        transform: scale(1.3) rotate(180deg);
    }

    /* 残りの20%で60度から190度まで最高速度 */
    100% {
        transform: scale(1.3) rotate(200deg);
    }

    /* 最後の5%で190度から200度まで少し遅く */
}

/* 中心から消えるアニメーション */
@keyframes fadeFromCenter {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* ホバー時の画像切り替え */
.image-stack:hover .info-image.top {
    animation: acceleratedRotation 0.9s cubic-bezier(0.1, 0.1, 0.9, 0.9) forwards;
}

.image-stack:hover .info-image.middle {
    animation: fadeFromCenter 0.2s ease-out forwards;
    animation-delay: 0.7s;
}

.image-stack:hover .info-image.bottom {
    opacity: 1;
    transition-delay: 0.7s;
}

.hamburger-menu span {
    background-color: var(--color-orange);
}

/* 会社情報ポップアップ */
.company-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.company-popup.show {
    display: flex;
}

.company-popup-content {
    background: none;
    width: auto;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: #000000;
    border-bottom-right-radius: 10px;
    display: flex;
}

.company-popup-body {
    padding: 1.5rem;
    flex: 1;
    background-color: #ffffff;
    border-bottom-right-radius: 10px;
}

.company-popup-body h2 {
    color: var(--color-orange);
    margin: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.company-info-row {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #D7D5CA;
    padding: 0.5rem 0.5rem;
}

.company-info-label {
    width: 120px;
    color: #000000;
    font-weight: bold;
    margin-right: 20px;
}

.company-info-value {
    flex: 1;
    color: #000000;
}

.company-popup-content-main {
    background-color: var(--color1);
    width: auto;
    padding: 15px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.company-popup-content-main2 {
    display: none;
    background-color: var(--color1);
    width: auto;
    padding: 15px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.company-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    width: auto;
    height: auto;
    background: none;
    margin-left: 15px;
}

.company-close:hover {
    opacity: 0.7;
}

.company-close .close-button {
    background: none;
    border: none;
    color: var(--color2);
    font-size: 2rem;
    font-weight: 300;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    padding: 0;
    line-height: 0.8;
}

.company-close .close-text {
    color: var(--color2);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.company-close:hover .close-button,
.company-close:hover .close-text {
    color: var(--color-orange);
}

.footer-info {
    display: none;
}

.company-popup-body2 {
    display: none;
}

/* メンバーバーのホバー効果 */
body:not(:has(.overlay.show)) .member-bar:hover:not(:has(.member-popup:hover)) {
    background-color: #a4a299;
    cursor: pointer;
}

body:not(:has(.overlay.show)) .member-bar:hover:not(:has(.member-popup:hover)) .members-text {
    color: var(--color-orange);
}

.member-popup {
    display: none;
    position: fixed;
    bottom: calc(25vh + 10px);
    right: calc((100% - 70px - 4vh) * 0.15);
    width: calc((100% - 70px - 4vh) * 0.85);
    height: auto;
    background-color: #1a1a1a;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    box-sizing: border-box;
    z-index: 999;
    margin-bottom: 0px;
    padding: 20px;
    overflow: visible;
}

.member-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 997;
}