/* ==========================================================================
   technology.css
   技術・開発体制ページ専用スタイル
   1. 強みセクション (.section-strength)
   2. 技術スタック (.tech-stack-grid)
   3. パートナーシップフロー (.partnership-flow)
   4. 共通スタイル調整
   5. レスポンシブ対応 (Mobile)
   ========================================================================== */

/* === 1. 強みセクション (.section-strength) === */
.section-strength::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(50vw - 600px - 520px);
    width: 500px;
    height: 100%;
    background-color: #edf0f4;
    transform: skewX(-25deg);
    z-index: -1;
    transition: width 2s ease-out, left 2s ease-out;
}

.section-strength.is-animating::before {
    width: 5000px;
    left: calc(50vw - 600px - 520px - 950px);
}

.section-strength .solution-layout-new__pre-title {
    color: var(--color-text-secondary);
}
.section-strength .solution-layout-new__left .section-title {
    color: var(--color-main);
}

.section-strength .solution-layout-new__right {
    padding-top: 0;
}

.strength-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.strength-item {
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 260px;
    background-color: var(--color-text-light);
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.strength-item__image {
    flex: 0 0 300px;
    align-self: stretch;
}

.strength-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strength-item__content {
    padding: 30px;
}

.strength-item__title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-main);
}

/* === 2. 技術スタック (.tech-stack-grid) === */
.section-tech-stack .section-description {
    text-align: center;
    margin-bottom: 50px;
}

.tech-stack-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-top: none;
}

.tech-category {
    position: relative;
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    
    display: flex;
    align-items: flex-start; /* タイトルを左上に配置 */
    gap: 40px;
    overflow: hidden;
}

/* 左側のアクセントライン */
.tech-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-main);
    opacity: 0.8;
}

.tech-category__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 0;
    margin-top: 6px; /* リストの高さに合わせて位置を微調整 */
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
    flex: 0 0 240px;
    letter-spacing: 0.05em;
    font-family: var(--font-family-heading);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    flex: 1;
}

.tech-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    color: var(--color-text-dark);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: none;
    
    /* アニメーション初期状態 */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: default;
}

.tech-list li:hover {
    background-color: #fff;
    border-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    
    /* ホバー時は遅延なしで即座に反応させる */
    transition-delay: 0s !important;
    transition-duration: 0.2s;
}

/* 親要素(.tech-category)が表示されたら、子要素を表示 */
.tech-category.is-visible .tech-list li {
    opacity: 1;
    transform: translateY(0);
}

/* 順番に出現させるための遅延設定 */
.tech-category.is-visible .tech-list li:nth-child(1) { transition-delay: 0.05s; }
.tech-category.is-visible .tech-list li:nth-child(2) { transition-delay: 0.1s; }
.tech-category.is-visible .tech-list li:nth-child(3) { transition-delay: 0.15s; }
.tech-category.is-visible .tech-list li:nth-child(4) { transition-delay: 0.2s; }
.tech-category.is-visible .tech-list li:nth-child(5) { transition-delay: 0.25s; }
.tech-category.is-visible .tech-list li:nth-child(6) { transition-delay: 0.3s; }
.tech-category.is-visible .tech-list li:nth-child(7) { transition-delay: 0.35s; }
.tech-category.is-visible .tech-list li:nth-child(8) { transition-delay: 0.4s; }
.tech-item-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.9;
}

/* === 3. パートナーシップフロー (.partnership-flow) === */
.section-partnership .section-description {
    max-width: 1200px;
    margin-top: 1rem;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.partnership-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    counter-reset: partnership-counter;
}

.partnership-step {
    position: relative;
    overflow: hidden;
    padding: 0 1.5rem 2rem;
    border-radius: var(--radius);
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    text-align: center;
    /* 上部にアクセントラインを追加 */
    border-top: 4px solid var(--color-main);
    counter-increment: partnership-counter;
}

.partnership-step__icon {
    width: 100%;
    padding: 1.5rem 1.5rem 0;
    background-color: #fff;
}

.partnership-step__icon img {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

/* 左上にSTEPラベルを追加 */
.partnership-step::before {
    content: 'STEP 0' counter(partnership-counter);
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--color-main);
    color: #fff;
    padding: 6px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 0 0 12px 0;
    z-index: 2;
    font-family: var(--font-family-heading);
    letter-spacing: 0.05em;
}

.partnership-step__content {
    padding: 0 0.5rem;
}

.partnership-step__title {
    position: relative;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 15px;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
}

.partnership-step__title::before {
    content: none;
}

.partnership-step__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--color-main);
}

.partnership-step__desc {
    font-size: 1rem;
    line-height: 1.7;
    text-align: left;
}

/* 強調部分のデザイン */
.partnership-step__desc strong {
    font-weight: 700;
    color: var(--color-main);
    background: linear-gradient(transparent 70%, rgba(0, 68, 136, 0.1) 70%); /* 下部に薄いマーカー */
    padding: 0 2px;
}

/* === 4. 共通スタイル調整 === */
.section .section-description {
    font-size: 1.3rem;
    line-height: 1.8;
}

/* === 5. レスポンシブ対応 (Mobile) === */
@media (max-width: 767px) {
    
    /* --- 1. 強みセクション --- */
    .solution-layout-new {
        flex-direction: column;
        gap: 20px;
    }

    .solution-layout-new__left,
    .solution-layout-new__right {
        width: 100%;
        padding-top: 0;
    }

    .strength-list {
        gap: 30px;
    }

    .strength-item {
        flex-direction: column;
        min-height: auto;
        align-items: flex-start;
        gap: 0;
    }

    .strength-item__image {
        flex: none;
        width: 100%;
        height: 180px;
    }

    .strength-item__content {
        padding: 14px 20px;
        width: 100%;
    }

    .strength-item__title {
        font-size: 1.1rem;
        margin-bottom: 0;
        line-height: 1.4;
    }

    /* アジャイル開発のタイトル改行調整 */
    .strength-item__title--agile .strength-item__text-upper {
        display: block;
    }

    .strength-item__title--agile .strength-item__text-lower {
        display: block;
        text-align: right;
    }

    .strength-item__desc {
        font-size: 0.95rem;
        line-height: 1.75;
        margin-top: 12px;
    }

    /* --- 2. 技術スタック --- */
    .tech-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 25px;
    }
    
    .tech-category__title {
        flex: auto;
        width: 100%;
        font-size: 1.2rem;
        margin-top: 0;
    }

    .tech-list li {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .tech-list {
        width: 100%;
    }

    /* --- 3. パートナーシップフロー --- */
    .partnership-flow {
        margin-top: 3rem;
        gap: 2rem;
        grid-template-columns: 1fr;
    }

    .partnership-step {
        padding: 0 1rem 2rem;
    }
    
    .partnership-step::before {
        font-size: 0.75rem;
        padding: 4px 16px;
    }

    .partnership-step__title {
        font-size: 1.1rem;
    }
    
    .partnership-step__desc {
        font-size: 0.95rem;
        line-height: 1.8;
        text-align: left;
    }

    /* --- 4. 共通スタイル調整 --- */
    .section .section-description {
        font-size: 0.95rem;
        line-height: 1.9;
        text-align: left;
    }
    .section .section-description br {
        display: none;
    }

}