@charset "UTF-8";

* {
    box-sizing: border-box;
    /*「border」の領域を基準にする*/
}

body {
    position: relative;
    /*この値が設定されている要素の中を自由に移動が出来ます。*/
    margin: 0;
    padding: 0;
    display: grid;
    /*グリッドレイアウトは格子状の枠を作って、その枠に配置する方法でレイアウトします*/
    grid-template-columns:
        [left] 20% [main] 1fr [end] 20% [right];
    grid-template-rows:
        [header] auto [top] auto [news] auto [main] auto [nav2] auto [footer] auto [bottom];
}

header {
    grid-column-start: left;
    grid-column-end: right;
    grid-row-start: header;
    grid-row-end: top;
    background: #5a281e;
    color: white;
    text-align: center;
    padding: 10px 0;
}

top {
    position: relative;
    grid-column-start: left;
    grid-column-end: right;
    grid-row-start: top;
    grid-row-end: news;
}

top img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: bottom;
}

.topcomment {
    position: absolute;
    bottom: 40%;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 25px;
    color: white;
    text-align: center;
}

nav {
    grid-column-start: left;
    grid-column-end: right;
    grid-row-start: top;
    grid-row-end: news;
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    justify-content: center;
    align-items: center;
    background: rgba(149, 1, 1, 0.2);
    padding: 20px 0;
}

nav img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin: 0 10px;
}

nav .ontop {
    padding: 0 30px;
    text-align: left;
    color: white;
}

nav .jap {
    font-size: large;
}

nav .ontop1 {
    font-weight: bold;
    text-align: left;
    color: white;
    display: flex;
    flex-direction: column;
    /* 縦並び */
    line-height: 1;
    /* 行間を最小に */
}

nav .ontop1 > div {
    margin: 0;
    /* デフォルト余白を消す */
    padding: 0;
}

nav .jap1 {
    font-size: 40px;
    font-family: 'Hiragino Mincho ProN', "Hiragino Mincho Pro", serif;
}

news {
    grid-column-start: main;
    grid-column-end: end;
    grid-row-start: news;
    grid-row-end: main;
    max-width: 1000px;
    margin: 50px auto;
}

news .newstitle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: solid 1px blue;
}

news .newstitle h1 {
    color: #5a281e;
    font-size: 1.8rem;
    font-family: 'Hiragino Mincho ProN', "Hiragino Mincho Pro", serif;
}

news .newstitle p {
    font-size: 1rem;
    color: #c85a82;
    font-family: 'Hiragino Kaku Gothic ProN', san-serif;
}

news .more {
    background-color: #283c64;
    color: white;
    border-radius: 1rem;
    padding: 10px;
}

news .content {
    display: flex;
    align-items: top;
    margin: 10px 0;
}

news .date {
    width: 150px;
}

news .genre1,
news .genre2 {
    display: inline-block;
    /* インライン要素として横並びに */
    height: 24px;
    /* 日付と同じ高さに固定 */
    line-height: 24px;
    /* テキストを縦中央揃え */
    padding: 0 10px;
    /* 左右余白はそのまま */
    border-radius: 20px;
    color: white;
}

news .genre1 {
    background: blue;
}

news .genre2 {
    background: grey;
}

news .content p {
    width: 500px;
    margin: 0 50px;
}

main {
    grid-column-start: left;
    grid-column-end: right;
    grid-row-start: main;
    grid-row-end: nav2;
    display: flex;
    gap: 20px;
    /* 画像の間隔 */
    padding: 100px 200px;
    background: rgb(138, 137, 137);
    color: white;
}

/* 画像全体を2×2に並べる */
.pic4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2列 */
}

/* 各画像サイズ統一 */
.pic4 img {
    width: 300px;
    /* 固定幅 */
    height: 200px;
    /* 固定高さ */
    object-fit: cover;
    /* 縦横比を崩さずトリミング */
    display: block;
}

/* テキスト部分 */
.maintext {
    max-width: 800px;
}

nav2 {
    grid-column-start: left;
    grid-column-end: right;
    grid-row-start: nav2;
    grid-row-end: footer;
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    margin: 200px 0;
}

nav2>div {
    position: relative;
    /* 子要素の絶対配置の基準にする */
    text-align: center;
}

nav2 img {
    width: 25vw;
    height: 200px;
    object-fit: cover;
    display: block;
}

nav2 h2 {
    position: absolute;
    top: 50%;
    /* 親の高さの中央 */
    left: 50%;
    transform: translate(-50%, -50%);
    /* 中央揃え補正 */
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明背景（読みやすく） */
    padding: 5px 10px;
    font-size: 1rem;
    border-radius: 5px;
}

#scrol {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50px);
}

#scrol img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

footer {
    position: relative;
    grid-column-start: left;
    grid-column-end: right;
    grid-row-start: footer;
    grid-row-end: bottom;
    display: flex;
    background: #c85a82;
    color: white;
    padding: 20px 0 40px 0;
    margin-top: 200px;
    justify-content: center;
}

footer img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin: 0 10px;
}

footer .ftitle1 {
    display: flex;
    padding: 10px 0;
}

footer .ftitle2 {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    /* 行間を最小に */
}

footer .ftitle2 > h1, p {
    margin: 0;
    padding: 0;
}
footer .info {
    max-width: 600px;
}

footer .link1 {
    width: 50px;
    height: 50px;
    object-fit: cover;
    object-position: left;
}

footer .link2 {
    width: 60px;
    height: 40px;
    object-fit: cover;
    object-position: left;
}

footer .boxlink, 
footer .boxlink1, 
footer .boxlink2 {
    padding: 10px;
    margin: 5px 0;
    background: white;
}

footer .boxlink {
    display: block;
    width: 400px;
}

footer .boxlink1, 
footer .boxlink2 {
    display: inline-block; /* 改行しない */
    vertical-align: top;   /* 高さを揃える */
}

footer .boxlink1 {
    width: 100px;
}

footer .boxlink2 {
    width: 200px;
}

