/* --- 連携企業紹介ページ専用スタイル --- */

.back-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0.7;
    z-index: 50;
}

.back-button:hover {
    transform: translateX(-5px);
    color: #67e8f9; /* cyan-300 */
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(103, 232, 249, 0.5));
}

/* タブナビゲーションのスクロールバー隠し */
#tab-navigation {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
#tab-navigation::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* タブボタンのスタイル */
.tab-btn {
    background: var(--tab-inactive-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--tab-inactive-text, #94a3b8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(0);
}

.tab-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    color: var(--tab-active-text, #0891b2);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.tab-btn:active {
    transform: translateY(-2px);
    transition-duration: 0.1s;
}

.tab-btn.active {
    background: var(--tab-active-bg, linear-gradient(135deg, #024252 0%, #050510 100%));
    border-color: var(--tab-active-text, #67e8f9);
    color: var(--tab-active-text, #67e8f9);
    box-shadow: 0 5px 15px rgba(103, 232, 249, 0.3);
    transform: translateY(-2px);
}


/* カードのアニメーション：フェードイン */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#company-grid .cosmic-card {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background: color-mix(in srgb, var(--card-bg, #0f1423), transparent 40%);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

#company-grid .cosmic-card .company-name {
    color: var(--card-text, #e2e8f0);
    transition: color 0.3s ease;
    width: 100%;
    text-align: center;
}

/* ビューポートに合わせてグリッドの高さを調整 */
#tab-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#company-grid {
    align-content: start;
}

/* 縦方向のスペースが厳しい場合の調整 */
@media (max-height: 600px) {
    header {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .back-button {
        top: -0.25rem !important;
    }
    #tab-content h2 {
        font-size: 0.875rem !important;
    }
    #tab-content p {
        display: none; /* スローガンを消してスペースを稼ぐ */
    }
    .cosmic-card {
        padding: 0.25rem !important;
    }
}

/* ランドスケープ最適化 */
@media (orientation: landscape) and (max-height: 500px) {
    #tab-navigation {
        padding-top: 0 !important;
        padding-bottom: 0.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    footer {
        display: none;
    }
}
