@charset "UTF-8";

* {
    box-sizing: border-box;
}

html,body {
    margin: 0;
}

/* ベース（背景画像） */
body {
    background-image: url('./img/news-img.webp');
    background-repeat: no-repeat;
    min-height: 100svh;

    /* 画面全体を隙間なく覆う */
    background-size: cover;

    /* 背景画像の基準位置 */
    background-position: center center;

    /* 背景を固定 */
    background-attachment: fixed;
}

.header {
    position: fixed; /* ヘッダーを固定位置に設定 */
    top: 0; /* ヘッダーの上端を画面の上端に設定 */
    left: 0; /* ヘッダーの左端を画面の左端に設定 */
    z-index: 100; /* ヘッダーの重なり順序を100に設定 */
    width: 100%; /* ヘッダーの幅を100%に設定 */
}

.ribbon {
    position: relative; /* リボンを相対位置に設定 */
    z-index: 2; /* リボンの重なり順序を2に設定 */
    
    display: block; /* リボンをブロック要素として表示 */
    width: 100%;
    height: auto;
}

.nav {
    position: absolute; /* ナビゲーションを絶対位置に設定 */
    top: clamp(38px, 4.2vw, 60px); /* ナビゲーションの上端をリボンの下端から60px下に設定 */
    right: max(5%, calc((100% - 1100px) / 2)); /* ナビゲーションの右端を画面幅に応じて調整 */
    z-index: 3; /* ナビゲーションの重なり順序を3に設定 */ 

    pointer-events: auto; /* ナビゲーションのクリックイベントを有効化 */    
}
.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.5vw, 35px); /* ナビゲーションのアイテム間の隙間を35pxに設定 */
    font-size: clamp(16px, 1.5vw, 20px); /* ナビゲーションのフォントサイズを20pxに設定 */
    margin: 0; /* 上部の余白を0に設定 */
    padding: 0;
    list-style: none;

    font-family: "Alata", sans-serif;
    line-height: 1.2; /* ナビゲーションの行間を1.2に設定 */
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-list a,
.nav-list p {
    display: block;
    margin: 0;
    padding: 0;

    font: inherit; /* 親要素のフォントスタイルを継承 */
    line-height: inherit; /* 親要素の行間を継承 */  
}

.nav-news {
    color: #a0a5a5;

    text-decoration-line: line-through;
    text-decoration-color: #a0a5a5;
    text-decoration-thickness: 2px;
}

.nav-link {
    color: #636f6f;
    text-decoration: none;

    transition:
        color 0.3s,
        opacity 0.3s;
}

.nav-link:visited {
    color: #636f6f;
}

.nav-link:hover {
    color: #087f83;
    opacity: 0.7;
}

.nav-link-current,
.nav-link-current:visited {
    color: #087f83;
}

.nav-link-current:hover {
    color: #636f6f;
    opacity: 0.7;
}

/*mainをリボンの下へスクロールさせる:*/ 

.main {
    padding-top: clamp(180px, 16vw, 260px);
}

/* What I Design */
.news-title {
    margin-top: 50px; /* 上部の余白を50pxに設定 */
    display: flex; /* フレックスボックスを使用して要素を配置 */
    align-items: center; /* 垂直方向の中央揃え */
    gap: 20px; /* アイコンとテキストの間に20pxの隙間を設定 */
    text-shadow: 8px 8px 2px rgba(32, 31, 31, 0.1); /* テキストに影を追加 */
    font-family:'Alata', sans-serif; /* フォントを'Alata'に設定 */
    font-size: clamp(40px, 4.5vw, 60px); /* フォントサイズを40pxに設定 */
    font-weight: 400; /* フォントの太さを400に設定 */
    color: #636F6F; /* フォントカラーを#636F6Fに設定 */
    margin-bottom: 30px; /* 下部の余白を20pxに設定 */
}


.news-title::before { 
    content:""; /* アイコンの内容を指定(文字の前のライン) */
    width: clamp(70px, 10vw, 145px); /* アイコンの幅を70pxに設定 */
    border-top: 3px solid #636F6F; /* アイコンの上線の色を#636F6Fに設定 */
    box-shadow: 8px 8px 2px rgba(32, 31, 31, 0.1); /* アイコンに影を追加 */
}

.news-main {
    width: min(1100px, calc(100% - 80px));
    margin: 0 auto;
    padding-top: clamp(50px, 7vh, 100px);
}

.news-section {
    width: min(100%, 560px);
}

.news-year {
    display: table; 
    width: min(180px, 40%);
    margin: clamp(50px, 8vh, 100px) 0 20px 50px;
    padding-bottom: 6px; 
    border-bottom: 2px dashed #087f83;

    font-family: "Futura", sans-serif;
    color: #087f83;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1;
}

.news-list {
    margin: 40px clamp(15px, 4vw, 40px);
    padding: 0 15px;

    list-style: none;
}

.news-item {
    display: grid;
    grid-template-columns: 145px 1fr; 
    column-gap: 5px;
    align-items: baseline; 

    margin-bottom: 5px;
}

.news-date {
    font-family: "Futura", sans-serif;
    color: #636f6f;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight: 700;
    white-space: nowrap; 
}

.news-text {
    margin: 0;

    font-family: "Noto Sans JP", sans-serif;
    color: #636f6f;
    font-size: clamp(13px, 1.2vw, 15px);
    font-weight: 400;
    line-height: 1.6;
}

.newslink {
    color: #087f83;
    text-decoration: none;

    transition:
        color 0.3s,
        opacity 0.3s;
}

.footer {
    text-align: center; /* フッターのテキストを中央揃えに設定 */
    font-family:'Zen Kaku Gothic', sans-serif; /* フォントを'Zen Kaku Gothic New'に設定 */
    font-size: clamp(12px, 2vw, 14px); /* フォントサイズを12pxに設定 */
    color: #636F6F; /* フォントカラーを#636F6Fに設定 */
    margin-top: 30px; /* 上部の余白を30pxに設定 */
    margin-bottom: 0; /* 下部の余白を0に設定 */
}

/* ----------------------------
   スクロール追従 TOPボタン
---------------------------- */
.scroll-top {
        position: fixed;
        right: 50px;

        /* Netlify表示やスマホ下部から離す */
        bottom: calc(75px + env(safe-area-inset-bottom));

        z-index: 999;

        /* タップできる範囲を確保 */
        display: grid;
        place-items: center;

        width: 44px;
        height: 44px;
    }

    .scroll-top img {
        display: block;
        width: 30px;
        height: auto;
    }

.scroll-top img {
    display: block;
    width: 50px;
    height: auto;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

/* ホバー時：ふわっと薄く */
.scroll-top:hover img {
  opacity: 0.6;
  transform: translateY(-4px); /* 少し浮かせると上品 */
}

html {
  scroll-behavior: smooth;
}

/*レスポンシブルデザイン*/
/* ========================================
   スマートフォン表示
======================================== */

@media screen and (max-width: 768px) {

    /* ページ全体 */
    body {
        position: relative;
        isolation: isolate;

        min-height: 100svh;

        /* 通常の背景画像は使用しない */
        background-image: none;
    }

    body::before {
        content: "";

        position: fixed;
        inset: 0;
        z-index: -1;

        background-image: url("./img/news-phone.webp");
        background-repeat: no-repeat;
        background-position: center top;
        background-size: cover;

        pointer-events: none;
    }

    /* ヘッダー */
    .header {
        position: fixed; /* ヘッダーを固定位置に設定 */
        top: 0; /* ヘッダーの上端を画面の上端に設定 */
        left: 0; /* ヘッダーの左端を画面の左端に設定 */
        z-index: 100; /* ヘッダーの重なり順序を100に設定 */

        width: 100%; /* ヘッダーの幅を100%に設定 */
        height: 170px; /* ヘッダーの高さを170pxに設定 */

        pointer-events: none; /* ヘッダーのクリックイベントを無効化 */
    }

    /* 上部のリボン */
    .ribbon {
        position: relative; /* リボンを相対位置に設定 */
        top: 0;
        left: 0;
        z-index: 2; /* リボンの重なり順序を2に設定 */

        display: block;
        width: 100%;
        height: auto;

        pointer-events: none;
    }

    /* ナビゲーション */
    .nav {
        position: absolute;
        top: 100px;
        right: auto;
        left: 50%;
        z-index: 3; /* ナビゲーションの重なり順序を3に設定 */

        width: 92%;
        transform: translateX(-50%);

        pointer-events: auto; /* ナビゲーションのクリックイベントを有効化 */
    }

    .nav-list {
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap: 8px;

        margin: 0;
        padding: 20px 10px;

        background-color: rgba(255, 255, 255, 0.55);

        font-size: 17px;
    }

    .nav-list li {
        flex-shrink: 0;
    }

    .nav-list p {
        margin: 0;
    }

    .nav-list p[aria-current="page"] {
        padding-bottom: 4px;
        border-bottom: 2px dashed #a0a5a5;
    }

    .scroll-top {
        position: fixed;
        right: 16px;

        /* Netlify表示やスマホ下部から離す */
        bottom: calc(75px + env(safe-area-inset-bottom));

        z-index: 999;

        /* タップできる範囲を確保 */
        display: grid;
        place-items: center;

        width: 44px;
        height: 44px;
    }

    .scroll-top img {
        display: block;
        width: 30px;
        height: auto;
    }

    .scroll-top:hover img {
        opacity: 0.6;
        transform: translateY(-4px);
    }

}