@charset "utf-8";
body {
    background-color: blue;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}
.logo {
    width: 150px;
    height: 50px;
    
}
.nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-family: "neuropol-nova", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 3rem;
}
.intro {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 700px; /* 画像の中央寄せ */
}

.intro img {
    width:300px;
    height: auto;
    margin: 250px auto;
}




.works {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 300px;
}
.work-item {
    width: 45%;
    
    color: black;
    /* padding: 20px; */
    text-align: center;
}
.work-image {
    width: 100%;
    height: 300px;
    
    /* margin-bottom: 10px; */
}
.title {
    font-size: 2rem;
}


.work-image {
    width: 100%; /* 親要素の幅いっぱいに広げる */
    height: auto; /* アスペクト比を保つ */
    overflow: hidden; /* はみ出し防止 */
    display: flex; /* 中央配置のため */
    justify-content: center;
    align-items: center;
}

.work-image img {
    width: 100%; /* 親要素の幅いっぱいに広げる */
    height: 100%; /* 親要素の高さに合わせる */
    object-fit: cover; /* はみ出さないよう調整しつつ、トリミング */
}


@media screen and (max-width: 768px) {
    .works {
        display: grid;
        grid-template-columns: 1fr; /* 1列に変更 */
        gap: 10px; /* アイテム間の余白を調整 */
        justify-content: center;
        align-items: center;
        padding: 20px; /* 必要に応じて余白調整 */
    }

    .work-item {
        width: 100%; /* 親要素の幅いっぱいに広げる */
        max-width: 300px; /* アイテムの最大幅を設定（適宜調整） */
        margin: 0 auto; /* 中央配置 */
        aspect-ratio: 1 / 1; /* 正方形にする */
         /* 背景色（必要なら設定） */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .work-image {
        width: 100%;
        height:90%;
        /* ダミー画像として */
    }

    .work-item div:last-child {
        
        padding: 5px;
        text-align: center;
    }}
    
    
    footer {
        padding: 40px 20px;
        height: 300px;
        background-color:blue;
        color: #fff;
    }
    .footer-nav {
        /* margin: 0 0 30px; */
        display: flex;
        justify-content: center;
        gap: 0 20px;
    }
    .footer-nav li a {
        font-size: 3rem;
        color: #000;
    }
    footer p {
        text-align: center;
    }
    footer p small {
        font-size: 1.3rem;
        color: #979ba9;
    }

    footer {
        background-image: url('../images/footer.png'); /* 画像のパスを指定 */
        background-size: cover; /* 画像をフッター全体に拡大・縮小 */
        margin-top: 300px;
        background-repeat: no-repeat; /* 画像の繰り返しを無効 */
        padding: 20px 0; /* 上下の余白 */
        color: white; /* テキストの色を調整 */
    }

    .footer-nav {
        position: absolute;
        right: 20px; /* 右から50px */
        
        padding-top: 130px;
        padding-bottom: 130px;
    }
    
    .footer-nav ul {
        list-style: none; /* リストのマーカーを削除 */
        margin: 0;
        padding: 0;
    }
    
    .footer-nav li {
        display: inline;
        margin-left: 15px; /* リストアイテムの間隔 */
    }
    
    .footer-nav a {
        text-decoration: none; /* 下線を削除 */
        color: white; /* 文字色 */
    }
    
    .footer-nav a:hover {
        text-decoration: underline; /* ホバー時のアクション（任意） */
    }
    
    .footer-nav a {
        color: white;
        text-decoration: none;
        margin: 0 10px;
        font-family: "neuropol-nova", sans-serif;
        font-weight: 400;
        font-style: normal;
        font-size: 3rem;
    }



    .works {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* PC時は3列 */
        gap: 20px;
        padding: 20px;
        max-width: 1700px; /* 必要に応じて調整 */
        margin: 0 auto;
    }
    
    .work-item {
        display: block; /* aタグをブロック要素に */
        text-decoration: none; /* リンクの下線を消す */
        color: inherit; /* 文字色を継承 */
        width: 200%; /* 親のカラムサイズに合わせる */
    }
    
    .work-image {
        width: 100%;
        height: 250px; /* 適切な高さを設定 */
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .work-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* はみ出さないよう調整しつつトリミング */
    }
    
    .title {
        text-align: center;
        font-size: 1.5rem;
        margin-top: 10px;
    }
    
    /* 768px以下で1列レイアウトに変更 */
    @media screen and (max-width: 768px) {
        .works {
            grid-template-columns: 1fr; /* 1列レイアウト */
        }
    
        .work-item {
            width: 100%; /* 幅を最大化 */
        }
    
        .work-image {
            height: 200px; /* 高さ調整 */
        }
    }




    .works {
        position: relative;
        width: calc(100% - 100px); /* 左右50pxずつ内側に */
        height: 100vh;
        margin: 0 auto; /* 中央寄せ */
        
        transform: translateX(-30px); /* 左に30px寄せる */
    }
    
    .work-item {
        position: absolute;
        width: 150px;
        height: 150px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .work-image {
        width: 100%;
        height: 100%;
    }
    
    .work-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.3s ease;
    }
    
    /* デスクトップ版（ランダム配置 & 左右50pxの余白） */
    .work-item:nth-child(1) { top: 10%; left: calc(10% + 20px); transform: rotate(-10deg); }
    .work-item:nth-child(2) { top: 30%; left: calc(40% + 20px); transform: rotate(15deg); }
    .work-item:nth-child(3) { top: 50%; left: calc(5% + 20px); transform: rotate(-20deg); }
    .work-item:nth-child(4) { top: 70%; left: calc(65% + 20px); transform: rotate(5deg); }
    .work-item:nth-child(5) { top: 20%; left: calc(75% + 20px); transform: rotate(-5deg); }
    .work-item:nth-child(6) { top: 60%; left: calc(35% + 20px); transform: rotate(10deg); }
    
    /* ホバー時のエフェクト */
    .work-item:hover .work-image img {
        opacity: 0;
    }
    

    
    .work-item:hover::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        
        opacity: 1;
        transition: opacity 0.3s ease;
    }
    
    /* スマホ（横幅375px以下）の場合 */
    @media (max-width: 620px) {
        .works {
            width: 100%;
            transform: none; /* 左右の調整をリセット */
        }
        
        .work-item {
            width: 100px; /* 小さめに */
            height: 100px;
        }
        
        /* 画面内に収まるよう均等配置 */
        .work-item:nth-child(1) { top: 5%; left: 10%; }
        .work-item:nth-child(2) { top: 20%; left: 50%; transform: translateX(-50%); }
        .work-item:nth-child(3) { top: 40%; left: 20%; }
        .work-item:nth-child(4) { top: 60%; left: 70%; }
        .work-item:nth-child(5) { top: 80%; left: 30%; }
        .work-item:nth-child(6) { top: 90%; left: 60%; }
    }


    .work-item {
        position: absolute;
        transition: transform 0.3s ease-in-out; /* アニメーションを追加 */
    }
    
    .work-item img {
        transition: transform 0.3s ease-in-out; /* スムーズな変化 */
    }
    
    /* ホバー時に拡大 */
    .work-item:hover img {
        transform: scale(1);
    }
    

    .work-item:hover img {
        transform: scale(2);
        transform-origin: center center;
    }
    



    .work-item {
        
        display: inline-block;
    }
    
    /* デフォルトの画像 */
    .default-image {
        width: 100px; /* 適当なサイズ */
        height: auto;
        display: block;
    }
    
    /* ホバー時に表示される画像 */
    .hover-image {
        width: 600px;
        height: 100%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, transform 0.3s ease;
        object-fit: cover;
    }
    
    /* ホバー時に表示しつつ移動 */
    .work-item:hover .hover-image {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -60%); /* 上に移動 */
        width: 200%;
        height: auto;
    }
    .work-item:hover {
        transform: none !important; /* 回転を防ぐ */
    }
    
    .work-item:hover .default-image {
        opacity: 0;  /* ホバーしたらデフォルト画像を消す */
        visibility: hidden;
    }

    @media screen and (max-width: 500px) {
        .logo {
            width: 75px;
            height: 25px;
        }
        .nav a {
            font-size: 1.4rem;
        }
    }

    /* ホバー時にタイトルを非表示に */
.work-item:hover .title {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.work-item:hover .hover-image {
    opacity: 1;
    transform: scale(3); /* 1.2倍に拡大 */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}