@charset "UTF-8";

/* =========================================================
   LABページ専用スタイル
   ========================================================= */

/* --- LAB ヒーローエリア --- */
.lab-hero {
    padding: 160px 20px 80px;
    background-color: #fff;
    text-align: center;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    border-bottom: 1px solid #eaeaea;
}

.lab-badge {
    display: inline-block;
    background: #eefbff;
    color: #00b4d8;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
}

.lab-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
}

.lab-subtitle {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* 検索ボックス */
.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 50px;
    border: 2px solid #eaeaea;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    background: #fff;
}

.search-box input:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 50px;
    border: none;
    background: #333;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #00b4d8;
}

/* --- セクション共通 --- */
.lab-section {
    padding: 80px 20px;
    background: #fff;
}

.lab-section.bg-gray {
    background: #f9f9f9;
}

.section-heading {
    font-size: 1.8rem;
    font-weight: 900;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
}

/* --- スタートアップカード --- */
.startup-card {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.startup-content {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.startup-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.startup-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.startup-image {
    flex: 1;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.dummy-img {
    color: #ccc;
    font-weight: bold;
}

/* --- コースグリッド修正 --- */
.course-grid {
    display: flex;
    justify-content: center;
    gap: 20px;       /* 30px → 20px に狭める */
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

/* カードの基本設定 */
.course-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 30px;
    width: 270px;    /* 280px → 270px に狭める */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* --- コースごとのアクセントカラー --- */
/* Scratch: オレンジ */
.course-card.scratch { border-top: 5px solid #ff9f43; }
.scratch .level-badge { background: #fff3cd; color: #856404; }

/* Python 1: 水色 (基礎) */
.course-card.python1 { border-top: 5px solid #3498db; }
.python1 .level-badge  { background: #d1ecf1; color: #0c5460; }

/* Python 2: インディゴ (応用・深みのある青) */
.course-card.python2 { border-top: 5px solid #3f51b5; }
.python2 .level-badge  { background: #e8eaf6; color: #1a237e; }

/* Arduino: 赤 */
.course-card.arduino { border-top: 5px solid #e74c3c; }
.arduino .level-badge { background: #f8d7da; color: #721c24; }

.course-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.course-card h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 10px;
}

.level-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    align-self: flex-start;
}

.scratch .level-badge { background: #fff3cd; color: #856404; }
.python .level-badge  { background: #d1ecf1; color: #0c5460; }
.arduino .level-badge { background: #f8d7da; color: #721c24; }

.course-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.course-list {
    list-style: none;
    margin-bottom: 25px;
    padding: 0;
}

.course-list li {
    font-size: 0.85rem;
    color: #555;
    padding-left: 20px;
    position: relative;
    margin-bottom: 5px;
}

.course-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #2ecc71;
    font-size: 0.8rem;
}

/* ボタン類 */
.btn-lab {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-lab.primary {
    background: #00b4d8;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.3);
}

.btn-lab.primary:hover {
    background: #0096c7;
    transform: translateY(-2px);
}

.btn-lab.outline {
    background: transparent;
    border: 2px solid #00b4d8;
    color: #00b4d8;
}

.btn-lab.outline:hover {
    background: #00b4d8;
    color: #fff;
}

.btn-text {
    color: #00b4d8;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: right;
    display: block;
}

.btn-text:hover {
    text-decoration: underline;
}

/* --- 教育者向けボックス --- */
.educator-box {
    background: #eefbff;
    border: 1px solid #bce6f5;
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.edu-text h3 {
    font-size: 1.5rem;
    color: #0077b6;
    margin-bottom: 10px;
}

.edu-text p {
    color: #023e8a;
    line-height: 1.6;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .startup-card {
        flex-direction: column-reverse; /* スマホでは画像を上に */
    }
    .startup-image {
        min-height: 200px;
    }
    .startup-content {
        padding: 30px;
    }
    .educator-box {
        flex-direction: column;
        text-align: center;
    }
    .search-box {
        flex-direction: column;
    }
    .search-box button {
        position: static;
        width: 100%;
        margin-top: 10px;
        border-radius: 50px;
        padding: 10px;
    }
}
/* --- スタートアップ (Video対応) --- */
.startup-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.startup-step-card {
    flex: 1;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease;
}

.startup-step-card:hover {
    transform: translateY(-5px);
    border-color: #00b4d8;
    box-shadow: 0 15px 40px rgba(0, 180, 216, 0.15);
}

.step-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7); /* 動画の上に乗るので半透明に */
    color: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
}

/* 動画エリアの設定 */
.step-video-box {
    width: 100%;
    aspect-ratio: 16 / 9; /* 16:9の比率を維持 */
    background: #000;
    position: relative;
}

.step-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* エリアいっぱいに表示 */
    display: block;
}

.step-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.step-content h3 {
    font-size: 0.9rem;
    color: #00b4d8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
}

.step-content h4 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.step-content p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.btn-lab.full-width {
    width: 100%;
    text-align: center;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .startup-grid {
        flex-direction: column;
        gap: 20px;
    }
}
/* --- 動画サムネイル (クリック可能エリア) --- */
.step-video-thumb {
    height: 200px;
    background: #000;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: transform 0.3s, opacity 0.3s;
}

/* 中央の再生ボタンアイコン */
.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 180, 216, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 5px; /* 三角形の位置調整 */
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

/* ホバー時のエフェクト */
.step-video-thumb:hover .thumb-img {
    transform: scale(1.05);
    opacity: 0.6;
}

.step-video-thumb:hover .play-icon-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: #00b4d8;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.4);
}

/* =========================================================
   動画モーダル (Overlay)
   ========================================================= */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* 背景をかなり暗く */
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.video-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    width: 90%;
    max-width: 900px;
    background: transparent; /* 背景なしで動画を際立たせる */
    position: relative;
    text-align: center;
}

#videoModalTitle {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比率維持 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-video-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-video-modal:hover {
    color: #00b4d8;
}
/* =========================================================
   WEB TOOLS セクション
   ========================================================= */
   .tools-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.group-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tool-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* ホバー時の挙動 */
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* プログラミング系（青アクセント） */
.tool-card.primary:hover {
    border-color: #00b4d8;
}
.tool-card.primary .tool-icon {
    background: #eefbff;
    color: #00b4d8;
}

/* ユーティリティ系（グレーアクセント） */
.tool-card.utility:hover {
    border-color: #666;
}
.tool-card.utility .tool-icon {
    background: #f0f0f0;
    color: #555;
}

.tool-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.tool-info {
    flex-grow: 1;
}

.tool-info h4 {
    color: #333;
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: bold;
}

.tool-info span {
    color: #888;
    font-size: 0.8rem;
    display: block;
}

.launch-icon {
    color: #ccc;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.tool-card:hover .launch-icon {
    color: #00b4d8;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .tool-cards {
        grid-template-columns: 1fr; /* スマホは縦積み */
    }
}