/* 工場環境ページのスタイル */

/* 工場環境概要セクション */
.facility-overview {
    position: relative;
    padding: 10rem 0;
    margin: 0;
    background-color: #333;
    color: #fff;
}

.facility-overview .container {
    position: relative;
    z-index: 2;
}

.facility-overview::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.facility-overview .section-title {
    color: #fff;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.overview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    position: relative;
}

.overview-text {
    text-align: center;
    max-width: 80rem;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.facility-image-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.facility-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 設計システムセクション */
.design-systems {
    padding: var(--section-spacing) 0;
    background-color: var(--mh--color--secondary-200);
}

.section-description {
    text-align: center;
    max-width: 80rem;
    margin: 0 auto 5rem;
    line-height: 1.8;
    font-size: 1.7rem;
}

/* 工程ステップのスタイル */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    max-width: 120rem;
    margin: 0 auto;
}

.process-step {
    display: flex;
    gap: 6rem;
    position: relative;
    align-items: flex-start;
}

.step-card {
    width: 56rem;
    height: 50rem;
    background-color: #fff;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 4rem;
    display: flex;
    flex-direction: column;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.step-number {
    position: absolute;
    top: 4rem;
    left: 4rem;
    font-size: 2.6rem;
    font-weight: 300;
    color: rgba(38, 49, 66, 0.45);
    line-height: 1;
    z-index: 2;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.03em;
}

.step-image {
    width: 90%;
    height: 30rem;
    overflow: hidden;
    border-radius: 0.8rem;
    margin: 1.5rem auto;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    flex-grow: 1;
}

.step-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.step-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.step-info h3 {
    font-size: 2.6rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 1.8rem;
    line-height: 1.3;
}

.step-info p {
    font-size: 1.7rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

/* 奇数・偶数ステップの配置を整理 */
.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

/* ステップ間の接続線 */
.process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -4.5rem;
    left: 28rem;
    width: 0.3rem;
    height: 4.5rem;
    background-color: var(--color-primary);
    opacity: 0.2;
}

.process-step:nth-child(even):not(:last-child)::after {
    left: auto;
    right: 28rem;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .step-card {
        width: 38rem;
        height: 42rem;
        padding: 3rem;
    }
    
    .step-number {
        top: 3rem;
        left: 3rem;
    }
    
    .step-image {
        height: 24rem;
    }
    
    /* 接続線の位置調整 */
    .process-step:not(:last-child)::after {
        left: 19rem;
    }
    
    .process-step:nth-child(even):not(:last-child)::after {
        right: 19rem;
    }
}

@media (max-width: 992px) {
    .process-steps {
        gap: 6rem;
    }
    
    .process-step {
        gap: 3rem;
    }
    
    .step-card {
        width: 34rem;
        height: 38rem;
        padding: 2.5rem;
    }
    
    .step-number {
        top: 2.5rem;
        left: 2.5rem;
    }
    
    .step-image {
        height: 20rem;
    }
    
    .step-info h3 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .step-info p {
        font-size: 1.6rem;
    }
    
    .process-step:not(:last-child)::after {
        left: 15rem;
    }
    
    .process-step:nth-child(even):not(:last-child)::after {
        right: 15rem;
    }
}

@media (max-width: 768px) {
    .process-steps {
        gap: 5rem;
    }
    
    .process-step,
    .process-step:nth-child(even) {
        flex-direction: column;
        gap: 2.5rem;
        align-items: center;
    }
    
    .step-card {
        width: 100%;
        max-width: 50rem;
    }
    
    .step-info {
        width: 100%;
        max-width: 50rem;
        text-align: center;
    }
    
    .process-step:not(:last-child)::after,
    .process-step:nth-child(even):not(:last-child)::after {
        left: 50%;
        transform: translateX(-50%);
        height: 3rem;
        bottom: -3rem;
    }
    
    .facility-overview {
        padding: 8rem 0;
    }
    
    .overview-text {
        font-size: 1.6rem;
        padding: 0 2rem;
    }
}

/* 加工設備セクション */
.processing-equipment {
    padding: var(--section-spacing) 0;
    background-color: var(--mh--color--secondary-100);
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 3.5rem;
}

.equipment-item {
    background-color: var(--color-text-light);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.equipment-item:hover {
    transform: translateY(-5px);
}

.equipment-image {
    position: relative;
    height: 0;
    padding-bottom: 75%; /* 4:3アスペクト比（width:800pxに対してheight:600px） */
    overflow: hidden;
    background-color: #f5f5f5; /* 画像読み込み前の背景色 */
    transition: background-color 0.3s ease;
}

.equipment-image.loaded {
    background-color: transparent;
}

.equipment-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    will-change: transform; /* GPU加速のヒント */
}

.equipment-item:hover .equipment-image img {
    transform: scale(1.05);
}

.equipment-content {
    padding: 2rem;
}

.equipment-content h3 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.equipment-content p {
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* 品質管理セクション */
.quality-control {
    padding: var(--section-spacing) 0;
    background-color: var(--mh--color--secondary-200);
}

.quality-content {
    display: flex;
    gap: 5rem;
    align-items: center;
}

.quality-image {
    flex: 0 0 45%;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.quality-image img {
    width: 100%;
    display: block;
}

.quality-text {
    flex: 1;
}

.quality-text p {
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.quality-features {
    margin: 2.5rem 0;
}

.quality-features li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.quality-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-secondary);
    font-weight: 500;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .quality-content {
        flex-direction: column;
    }
    
    .quality-image {
        flex: 0 0 100%;
        margin-bottom: 3rem;
    }
    
    .quality-text {
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .systems-grid,
    .equipment-grid {
        grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    }
}

@media (max-width: 480px) {
    .system-item,
    .equipment-item {
        padding: 2rem;
    }
    
    .equipment-image {
        height: 15rem;
    }
} 