/* VARIAVLES
======================================= */
:root{
    --light-blue:#c0cbff;
    --blue:blue;
    --dark-blue:#002b99;
    --navy:#202f55;
    --white:white;
    --black:black;
    --kiwi:'Kiwi Maru',serif;
}


/* GENERAL STYING
======================================= */
body{
    text-align: center;
    font-family: var(--kiwi);
    margin: 0;
    background-image: url('../images/backgroundImage.JPG');
    background-size: cover;
    background-attachment: fixed;
    background-color: var(--dark-blue);

}

/* COMMON 
========================================*/
p{
    font-family: var(--kiwi);
    line-height: 1.7;
}

.title{
    margin: 3rem 0;
}

.contentbox{
    height: 100vh;
    display: flex;
    justify-items: center;
    align-items: center;
}


/* ローディング 
========================================*/
#loading{
    background-color:var(--dark-blue);
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loading p{
    font-size: 3rem;
    color: var(--light-blue);
}
/*　メニューバー
====================================== */
#nav{
    position: fixed;
    z-index: 9998;
    width: 40%;
    left: 30%;
    background-color: var(--light-blue);
    padding: 20px 0;
    border-radius: 20px;
    margin: 8px;
}

#nav ul{
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    justify-content: center;
    gap:3vw ;
}

#nav a{
    position: relative;
    text-decoration: none;
    color: var(--white);
    font-size: 18px;
}

#nav a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transform: .3s ease;
}
#nav a:hover::after{
    width: 100%;
}


/* ヒーローエリア
==================================== */
#container{
    display: flex;
    align-items: center;
    background-color: var(--white);
}

#hero{
    height: 100vh;
    width: 50%;
    position: relative;
    background-color: var(--light-blue); 
    overflow: hidden;
}

.layer{
    position: absolute;
    inset: -8%;
}


.back{
    background:url('../images/kurage.png') no-repeat center/cover;
    z-index: 2;
}
.middle{
    background: url('../images/kiri.png') no-repeat center/cover;
    z-index: 3;
}
.front{
    background: url('../images/kiro.png') no-repeat center/cover;
    z-index: 4;
}

/* お知らせ
============================================== */
#news{
    position: relative;
    margin-left: 5%;

}

.news-list{
    list-style: none;
    height: 400px;
    width: 40vw;
    overflow-y: auto;
    padding: 0;
}

.news-list li{
    text-align: left;
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.news-list time{
    color: #777;
    width: 120px;
}

/* 自己紹介 
================================================*/
#about{
    width: 100%;
    margin: auto;
    padding: 10vh 10% ;
    background-color: var(--white);

}

#icon{
    height: 15rem;
    border-radius: 50%;
}
.about-content{
    padding-left: 5rem;
    padding-right: 5rem;
}
.snslink{
    margin: 1rem;
}

/* ゲーム
============================================== */
#games{
    width: 100%;
    margin: auto;
    padding: 150px 10%;
    background-color: var(--white);
}


.games-thumbnails{
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 50px; 
    padding: 0%;
}
.games-item{
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}
.games-item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform .35s ease;
}

.games-item:hover img{
    transform:scale(1.08) ;
}

/* ポップアップ 
============================================*/
.popup{
    position:fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.8);

    margin: auto;
    display: none;
    justify-content: center;
    align-items: center;
}

.popup-article{
    width: 100%;
}

.popup-links a{
    display: block;
    margin-top: 20px ;
    margin-bottom: 10px;
}

.popup-content{
    position: relative;
    background: var(--white);
    padding: 45px 5%;
    border-radius: 10px;
    
    display: flex;
    gap: 40px;
    
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

.close{
    position: absolute;
    top: 10px;
    right: 30px;
    font-size: 40px;
    cursor: pointer;
}


.slide-area{
    position: relative;
}

.img-area{
    width:  700px;
    max-width: 700px;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: left center;  /* ← 追加 */
    justify-items: center;
    align-items: center;
}

.popup-text{
    width: 100%;
    margin: auto;
    white-space: pre-line;
    text-align: center;
    justify-items: center;
}

.prev,.next{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    -webkit-text-stroke: 5px var(--navy);
    paint-order: stroke;
}

.prev:hover,.next:hover{
    text-shadow: 3px 3px 5px var(--navy) ;
    
}
.prev{
    left: 10px;
}
.next{
    right: 10px;
}

/* コンタクト
================================== */
#contact{
    width: 100%;
    margin: auto;
    padding-top: 100px;
    padding-bottom: 50px;
    background-color: var(--white);
}

.contact-button{
    margin: 30px ;
    padding: 20px 40px;
    font-size: 18px;
    font-family: var(--kiwi);

    background-color: var(--light-blue);
    color: var(--white);
    border-color:var(--white);
    border-radius: 40px;
    box-sizing: border-box;

    cursor: pointer;
    transition: 0.3s;
}

.contact-button:hover{
    transition: translateY(-3px);
    border-color: var(--light-blue);
    color: var(--light-blue);
    background-color: var(--white);
}

.contact-button::after{
    background-color: var(--light-blue);
    color: var(--white);
    border-color:var(--white);
    border-radius: 40px;
    box-sizing: border-box;
}


/* デスクトップサイズ
=================================== */
@media (max-width:900px) {   

    body{
        padding: 0;
        margin: 0;
        width: 100%;
        margin-right: 0%;
        overflow-x: hidden;
    }

    /* ナビゲーションバー */
    #nav{
        display: none;
    }

    /*ヒーローエリア*/
    #container{
        margin: 0%;
        padding: 0%;
        flex-direction: column;
        align-items: center;
        width: 100%;     
    }

    #hero{
       width: 100vw; 
       margin: auto;
    }

    /* お知らせ */
    #news{
        width: 100%;
        margin: auto;
    }

    .news-list{
        width: 90%;
        margin: auto;
    }
    
    /* 自己紹介 */
    .about-content{
        padding: 0;
    }

    /* ゲーム */
    #games{
        padding: 15%;
        justify-items: center;
    }
    .games-thumbnails{
        grid-template-columns:1fr;
        gap: 10px; 
    }
    
    .games-item{
        width:  80%;
        margin: auto;
    }

    .games-item img{
        height: 100%;
        object-fit: cover;
    }

    /* ポップアップ */
    .popup-content{
        flex-direction: column;
        width: 80%;
        padding: 25px;
        gap: 20px;
    }

    .slide-area{
        width: 100%;
    }

    .popup-text{
        width: 100%;
    }

    .img-area{
        width: 100%;
        height: auto;
    }
    /* お問い合わせ */
    #contact{
        margin-top: 25%;
    }

    #contact p{
        margin: 5%;
    }
 } 