/* ==========================================================
   Lab Room Page Styling
   ========================================================== */
.l-main-lab {
    background-color: var(--color-bg);
    overflow-x: hidden;
}

/* 共通パーツ：セクション大見出し */
.c-section-title {
    color: var(--color-blue);
    font-family: Arial;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    padding-left: 80px;
}

/* Hero Section */
.p-lab-hero {
    width: 100%;
    height: 482px;
}

.p-lab-hero__inner {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}

.p-lab-hero__left {
    width: 35%;
    flex-shrink: 0;
}

.p-lab-hero__title {
    color: #FFF;
    text-align: center;
    font-family: Roboto;
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 3.2px;
    margin: 0;
}

.p-lab-hero__right {
    width: 65%;
    height: 482px;
    flex-shrink: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.20) 100%), 
                url('../images/lab-hero.jpg') lightgray -52.741px -130.109px / 114.924% 147.369% no-repeat;
}

/* Intro Section */
.p-lab-intro {
    padding: 100px 80px;
}

.p-lab-intro__inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.p-lab-intro__text {
    width: 100%;
    max-width: 1064px;
    color: #FFF;
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 18px;
    font-weight: 400;
    line-height: 30px;
}

/* 白枠の制御 */
.p-lab-section1,
.p-lab-section2,
.p-lab-section3 {
    width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
}

.p-lab-section1__inner,
.p-lab-section2__inner,
.p-lab-section3__inner {
    width: 100%;
    background-color: #F2F2F2;
    padding: 80px 0;
    margin-bottom: 90px;
}

/* コンテンツ幅の出し分け: 画面端から計 160px */
.p-lab-section1__content-inner,
.p-lab-section2__content-inner,
.p-lab-section3__content-inner {
    padding: 0 80px; /* 80px + 80px = 160px */
}

/* 動画プレースホルダーのみ: 画面端から計 240px */
.p-lab-section3__video-inner {
    padding: 0 160px; /* 80px + 160px = 240px */
}

/* Section 1: Equipment List */
.p-lab-section1__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.p-lab-section1__left {
    width: 48%;
    height: 408px;
    background: url('../images/lab-equipment.jpg') lightgray center / cover no-repeat;
}

.p-lab-section1__right {
    width: 48%;
}

.p-lab-section1__list {
    color: #333;
    font-family: "Noto Sans JP";
    font-size: 16px;
    font-weight: 400;
    line-height: 30px;
}

/* Section 2: Systems Grid */
.p-lab-section2__inner {
    border-top: 1px solid #EEE;
    padding-top: 80px;
}

.p-lab-section2__intro-text {
    color: #333;
    font-family: "Noto Sans JP";
    font-size: 16px;
    font-weight: 400;
    line-height: 30px;
    margin-bottom: 60px;
}

.p-lab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px 50px;
}

.p-lab-grid__image {
    width: 100%;
    height: 324px;
    background-size: cover;
    background-position: center;
    margin-bottom: 20px;
}

.p-lab-grid__image--01 { background-image: url('../images/lab-module-01.jpg'); }
.p-lab-grid__image--02 { background-image: url('../images/lab-module-02.jpg'); }
.p-lab-grid__image--03 { background-image: url('../images/lab-module-03.jpg'); }

.p-lab-grid__text {
    color: #333;
    font-family: "Noto Sans JP";
    font-size: 16px;
    line-height: 30px;
}

/* Section 3: Video & Modal Setting */
.p-lab-section3__inner {
    border-top: 1px solid #EEE;
    padding-top: 80px;
}

.p-lab-section3__intro-text {
    color: #333;
    font-family: "Noto Sans JP";
    font-size: 16px;
    line-height: 30px;
    margin-bottom: 50px;
}

/* 動画プレースホルダー（トリガー） */
.p-lab-video__placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 890 / 504;
    position: relative; /* アイコン配置用 */
    overflow: hidden;
    display: block;
    cursor: pointer;    /* カーソルを指マークに */
}

.p-lab-video__placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.p-lab-video__placeholder:hover img {
    transform: scale(1.05); /* ホバー時に画像を少し拡大 */
}

/* 再生ボタンアイコン */
.c-play-button {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 80px; height: 80px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center; align-items: center;
    transition: all 0.3s ease;
    pointer-events: none;
}

.p-lab-video__placeholder:hover .c-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(255, 255, 255, 0.9);
}

.c-play-button__triangle {
    width: 0; height: 0;
    border-style: solid;
    border-width: 15px 0 15px 26px;
    border-color: transparent transparent transparent var(--color-blue);
    margin-left: 5px;
}

/* モーダルウィンドウ本体 */
.c-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    /* アニメーションの追加 */
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* 表示された時のスタイル（JSで制御するために追加） */
.c-modal.is-active {
    display: block;
    opacity: 1;
}

.c-modal__overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.c-modal__content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 90%;
    max-width: 1200px; /* ここでお好みの動画サイズを指定 */
    background: #000;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    line-height: 0;
}

/* アクティブ時に元の大きさ（1倍）に戻る */
.is-active .c-modal__content {
    transform: translate(-50%, -50%) scale(1);
}

.c-modal__content video {
    width: 100%; height: auto;
    display: block;
}

.c-modal__close {
    position: absolute;
    top: -40px; right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

/* 動画のダウンロードボタンを非表示（Chrome系ブラウザ対策） */
video::-internal-media-controls-download-button {
    display: none;
}
video::-webkit-media-controls-enclosure {
    overflow: hidden;
}
video::-webkit-media-controls-panel {
    width: calc(100% + 30px); /* 右端の三点リーダーを隠すための調整 */
}

/* --- Responsive (834px基準) --- */
@media (max-width: 834px) {
    /* Hero SP: 文字(60px)を画像中央に配置 */
    .p-lab-hero { position: relative; height: 482px; }
    .p-lab-hero__inner {
        position: relative; z-index: 10; height: 100%;
        display: flex; justify-content: center; align-items: center; padding: 0 20px;
    }
    .p-lab-hero__left { width: 100%; position: relative; z-index: 20; }
    .p-lab-hero__title { text-align: center; color: #FFF; font-size: 45px; letter-spacing: 2px; }
    .p-lab-hero__right { 
        position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; 
        margin: 0; 
        background-position: center; background-size: cover; 
    }
    
    /* スマホ用に再生ボタンを小さく調整 */
    .c-play-button {
        width: 60px;
        height: 60px;
    }
    .c-play-button__triangle {
        border-width: 10px 0 10px 18px;
    }
    .c-modal__close {
        top: -35px;
        right: 10px;
    }

    /* Layout Reset */
    .p-lab-intro, .p-lab-section1, .p-lab-section2, .p-lab-section3 { padding: 0 20px; }
    .p-lab-section1__inner, .p-lab-section2__inner, .p-lab-section3__inner { margin-bottom: 60px; padding: 40px 20px; }
    
    .p-lab-section1__content-inner, .p-lab-section2__content-inner, .p-lab-section3__content-inner, .p-lab-section3__video-inner,
    .c-section-title { padding: 0; margin-left: 0; }

    /* Content Stack */
    .p-lab-section1__content { flex-direction: column; display: flex; }
    .p-lab-grid { grid-template-columns: 1fr; }
    .p-lab-section1__left, .p-lab-section1__right { width: 100% !important; }
    .p-lab-section1__left { margin-bottom: 30px; }
}


/* Responsive */
@media (max-width: 1250px) {
    /* 白枠のセクションとCTAを同時にはみ出し防止 */
    .p-lab-section1,
    .p-lab-section2,
    .p-lab-section3,
    .c-cta__inner {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .p-lab-hero__left {
    width: 40%;
    }
}

@media (max-width: 834px) {
    .p-lab-hero__left {
    width: 100%;
    }
    .p-lab-intro__text {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {

}