@charset "utf-8";

/* ------------------------------------
   基本レイアウト & サムネイル
------------------------------------ */

html,body {
width:100%;
height: 100%;
margin:0;
background-color: #FFFFFF;
}

img{
width:100%;
height:auto;
}

.thumb-list {
display: flex;
flex-wrap: wrap;
gap: 24px;
}

/*基本ボックス*/
#contents {
width:90%;
max-width: 1100px;
margin-left:auto;
margin-right:auto;
text-align: center;
display: flex;
flex-wrap: wrap;
gap:3vw 2vw;/*row-gap,column-gapをvwで指定*/
}

#read{
margin-top:3%;
width: 100%;
display: flex;
justify-content:center;
}

#footer{
width:100%;
height:10px;
margin-top: 5%;
}

/* button要素特有のスタイルリセット */
button.thumb {
cursor: pointer;       /* マウスカーソルを指マークにする */
font: inherit;         /* フォントを親要素に合わせる */
color: inherit;        /* 文字色を親要素に合わせる */
text-align: center;
box-sizing: border-box;
}


/* ------------------------------------
   動画サムネイル
------------------------------------ */

.thumb {
display: flex;
flex-direction: column;  /* 子要素を縦に並べる */
align-items: center;     /* 横方向の中央揃え */
background-color:#f2f2f2;
width:170px;
height:150px;
border: 1px solid #999999;
cursor:pointer;
color:#000;
text-decoration:none;
border-radius: 5px;
}

.thumb img {
width:90%;
border: solid 1px #999999;
margin-top:4%;
border-radius: 5px;
}

.thumb span {
display:block;
font-size:12px;
line-height: 1.2;
text-align:left;
padding-left:4%;
padding-right:4%;
}


/* ------------------------------------
   <dialog> モーダルのスタイル
------------------------------------ */

#videoModal {
border: none;
border-radius: 12px;
padding: 0;
max-width: 800px;
width: 90%;
background: #000;
overflow: hidden;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);

/* ▼ 中央配置のための指定を追加 ▼ */
margin: auto;         /* 画面中央に自動配置 */
position: fixed;      /* 画面をスクロールしても中央を維持 */
inset: 0;             /* top:0; right:0; bottom:0; left:0; の一括指定 */
}

/* モーダル背景（オーバーレイ） */
#videoModal::backdrop {
background: rgba(0, 0, 0, 0.75);
}

/* 16:9 のアスペクト比を保つレスポンシブコンテナ */
.modal-inner {
position: relative;
width: 100%;
padding-top: 56.25%; /* 16:9 の比率 */
}

.modal-inner iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

/* 閉じるボタン */
.modal-close {
position: absolute;
top: 10px;
right: 10px;
z-index: 10;
background: rgba(0, 0, 0, 0.6);
color: #fff;
border: none;
font-size: 20px;
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}

.modal-close:hover {
background: rgba(255, 0, 0, 0.8);
}