/* 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #fff;
    scroll-behavior: smooth; /* スムーススクロール */
}

/* ナビゲーション */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1000;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ヒーローセクション */
.hero {
    height: 100vh;
    background: url('https://ttmphotograph.net/img/topcover.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-text h1 {
    font-size: 3rem;
    letter-spacing: 5px;
}

/* コンテンツセクション */
.content {
    padding: 100px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.list-unstyled{
    list-style: none;
}
/* スキルセクション */
.skills-container {
    text-align: left;
    margin-top: 30px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* バーの背景（グレーの土台） */
.skill-bar-bg {
    background: #eee;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

/* 実際に伸びるバー */
.skill-bar {
    background: #333; /* ミニマルな黒 */
    height: 100%;
    width: 0%; /* 最初は0 */
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.5, 1); /* 滑らかに伸びる */
}

/* 画面に入った時に付与するクラス */
.is-visible .skill-bar {
    /* JavaScriptで後ほど制御しますが、CSS側で受け皿を作ります */
}
/* パララックス背景 */
.parallax-bg {
    height: 400px;
    background-attachment: fixed; /* これがパララックスの鍵です */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ギャラリー簡易グリッド */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.grid .item img {
    width: 100%;
    height: 200px; /* 高さを揃える場合 */
    object-fit: cover; /* 縦横比を保ったまま枠に収める */
    border-radius: 4px; /* 角を少し丸くすると柔らかい印象に */
    display: block;
}
.item {
    /* background: #eee; */
    padding: 50px 0;
}

.btn {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid #333;
    color: #333;
    text-decoration: none;
    margin-top: 20px;
}

/* フェードインの初期状態 */
.fade-in {
    opacity: 0;
    transform: translateY(30px); /* 30px下に下げておく */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* 画面内に入った時に付与するクラス */
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0); /* 元の位置に戻る */
}
/* ライトボックスの背景（暗幕） */
.lightbox {
    display: none; /* 最初は隠しておく */
    position: fixed;
    z-index: 2000; /* ナビゲーションより上に表示 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* 背景を黒の透過に */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* 表示状態のクラス */
.lightbox.active {
    display: flex;
    opacity: 1;
}

/* 拡大される画像 */
.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1); /* ふわっと少し大きくしながら表示 */
}

/* 閉じるボタン */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}
/* フォームの外枠 */
.form-wrapper {
    position: relative;
    width: 100%;
    max-width: 640px; /* PCでの最大幅を制限 */
    margin: 30px auto 0; /* 中央寄せ */
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}

/* iframe 本体のレスポンシブ設定 */
.form-wrapper iframe {
    width: 100% !important; /* 親要素の幅いっぱいに広げる */
    height: 900px; /* 必要に応じて調整。フォームの長さに合わせてください */
    border: none;
}
/* --- レスポンシブ対応 (画面幅が768px以下の設定) --- */
@media (max-width: 768px) {
    /* ナビゲーションを中央寄せ・縦気味に */
    nav {
        padding: 10px 20px;
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        margin-top: 10px;
    }

    nav ul li {
        margin: 0 10px;
    }

    /* ヒーローセクションの文字サイズを調整 */
    .hero-text h1 {
        /* font-size: 1.8rem; */
        font-size: clamp(1.4rem, 7vw, 3rem);
        letter-spacing: 2px;
    }

    /* コンテンツの余白を狭める */
    .content {
        padding: 60px 20px;
    }

    /* ギャラリーを1列にする */
    .grid {
        grid-template-columns: 1fr; /* 3列から1列へ */
        gap: 20px;
    }

    /* スマホではパララックス(fixed)を解除する場合が多い */
    /* ※iOS等で背景画像が消えたり拡大されたりするバグを防ぐため */
    .parallax-bg {
        background-attachment: scroll; 
        height: 250px;
    }
        .form-wrapper iframe {
        height: 1000px; /* スマホは縦長になりやすいため少し高く設定 */
    }
}