/*
 Theme Name:   Understrap Child
 Theme URI:    https://understrap.com
 Description:  Understrap Child Theme
 Author:       the Understrap Contributors
 Author URI:   https://github.com/understrap/understrap-child/graphs/contributors
 Template:     understrap
 Version:      1.2.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  understrap-child
 Tags: one-column, custom-menu, featured-images, theme-options, translation-ready
 GitHub Theme URI: understrap/understrap-child
*/

body {
    position: relative;
    overflow: visible;
    z-index: 1;
    font-family: "M PLUS 1p";
    background: linear-gradient(135deg, rgba(29, 97, 165, 0.7), rgba(1, 183, 239, 0.7), rgba(239, 128, 178, 0.7));
    background-size: 300% 300%; /* グラデーションを大きくして動きやすくする */
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.site{
  min-height: calc(100vh - 7rem);
  position: relative;
}

/* フルスクリーンイントロ */
#full-screen-intro {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.image-sequence {
    position: absolute;
    width: 100%;
    height: 100%;
}

.sequence-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.light-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    animation: lightAnimation 3s ease-in-out infinite;
}

/* ライトエフェクトのアニメーション */
@keyframes lightAnimation {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}


/* フルスクリーンメニュー */
#menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #395daa;  /* #395daa 背景色 */
    color: white;
    font-size: 32px;
    padding: 20px;
    border-radius:50%;
    border: none; 
    z-index: 3;
    cursor: pointer;
    width: 80px;
    height: 80px; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100001!important;
}

#burger-icon, #close-icon {
    font-size: 32px;
    display: block;
}

#full-screen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(57, 93, 170, 0.9);
    visibility: hidden;  /* 初期状態では非表示 */
    opacity: 0;  /* 初期状態では透明 */
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
    z-index: 100000!important;
}

#full-screen-menu.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0s linear 0s;
}

.full-menu-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;  /* スクロール可能にする */
}

#full-screen-menu ul {
    list-style: none;
    padding: 20px;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;  /* メニューの背景を透明に */
    color: white;
    max-width: 90%;
    height: 80%;  /* 高さを指定してスクロール可能に */
    overflow-y: auto;  /* メニュー項目が多くなった場合、スクロールできるように */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* メニュー項目のスタイル */
#full-screen-menu ul li {
    margin: 15px 0;  /* アイテムの上下のマージンを広げる */
    font-size: 24px;
    text-align: center;
    position: relative;
    padding: 15px 30px;  /* アイテムのパディングを調整 */
    border: 3px solid #395daa;  /* 枠線を太くする */
    border-radius: 50px;  /* 角を大きく丸くする */
    transition: transform 0.3s ease, box-shadow 0.3s ease;  /* アニメーション追加 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);  /* 少し影をつけて立体感を出す */
    background-color: rgba(255, 255, 255, 0.1);  /* 背景色を少し透明に */
    width: 300px;  /* 幅を統一 */
}

/* ホバー時の動き */
#full-screen-menu ul li:hover {
    transform: translateY(-5px);  /* ホバー時に少し上に動かす */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);  /* ホバー時に影を強くする */
    background-color: rgba(255, 255, 255, 0.2);  /* 背景色をさらに明るく */
}

#full-screen-menu ul li a {
    color: white;  /* テキストカラーを白に設定 */
    font-size: 24px;
    text-decoration: none;
    display: block;
    padding: 10px 0;
}

/* モバイル時のスクロールバー装飾 */
@media (max-width: 768px) {
    /* スクロールバーのスタイル */
    #full-screen-menu ul::-webkit-scrollbar {
        width: 8px;  /* スクロールバーの幅 */
    }

    #full-screen-menu ul::-webkit-scrollbar-thumb {
        background-color: #395daa;  /* スクロールバーのつまみ（サム）をブルーに */
        border-radius: 10px;  /* つまみの角を丸くする */
    }

    #full-screen-menu ul::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);  /* スクロールバーのトラック（背景）を薄い白に */
        border-radius: 10px;
    }

    #full-screen-menu ul {
        max-width: 100%;
        padding: 10px;
    }

    #full-screen-menu ul li {
        font-size: 20px;
        margin: 10px 0;
        padding: 12px 25px;
        width: 100%;  /* モバイルでは全幅を使用 */
    }

    #full-screen-menu ul li a {
        font-size: 20px;
        padding: 12px 0;
    }
}

/* PC版のデスクトップサイズで幅を広くする */
@media (min-width: 1024px) {
    #full-screen-menu ul li {
        width: 300px;  /* デスクトップではもう少し幅を広く */
    }
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
}

#logo-container {
    position: absolute;  /* 画像をスクリーン全体に配置 */
    top: 0px;
    left: 0px;
    width: 100%;
    height: 200px;
    overflow: hidden;
    z-index: 2;  /* スライド画像の上に配置 */
}

#logo-container img {
    max-height: 150px;
    width: auto;
    position: absolute;
    top: 20px;
    left: 20px;
}

#logo-container .logo {
  display: inline-block; /* インラインブロックとして配置 */
  transition: transform 0.3s ease, opacity 0.3s ease; /* アニメーションの設定 */
}

/* ロゴ画像にホバーしたときのスタイル */
#logo-container .logo:hover {
  opacity: 0.6; /* 透過させる */
  transform: translateX(10px) translateY(-5px); /* 少し右上に動かす */
}


#scroll-container {
    position: fixed;  /* スクロール要素を画面に固定 */
    bottom: 0;  /* 画面下端に配置 */
    left: 50%;
    transform: translateX(-50%);  /* 水平方向の中央揃え */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    pointer-events: none;  /* クリックやその他のイベントをブロック */
    z-index: 2;  /* スライド画像より前に表示 */
    visibility: visible;  /* 最初は表示 */
    margin-bottom: 0;  /* 追加: 下の余白を削除 */
}

#scroll-text {
    color: white;
    font-size: clamp(14px, 0.9vw, 20px); /* 最小14px、最大20px */
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    top: 0;
    font-family: Arial, sans-serif;
}

/* スマホやタブレット向けの調整 */
@media (max-width: 768px) {
    #scroll-text {
        font-size: clamp(16px, 1.8vw, 20px);
    }
}

/* 非常に小さい画面サイズ向けに調整 */
@media (max-width: 480px) {
    #scroll-text {
        font-size: clamp(18px, 2.3vw, 22px);
    }
}

#scroll-line {
    width: 2px;  /* 縦線の太さ */
    height: 50px;  /* 縦線の高さ */
    background-color: #fff;  /* 線の色 */
    position: fixed;  /* 画面下端に固定 */
    bottom: 0;  /* 画面の一番下に配置 */
    left: 50%;  /* 中央揃え */
    transform: translateX(-50%);  /* 中央揃え */
}

#scroll-circle {
    width: 15px;  /* サークルを小さく */
    height: 15px;  /* サークルを小さく */
    border: 2px solid #ccc;  /* 薄い灰色 */
    border-radius: 50%;
    position: absolute;
    bottom: 0;  /* 初期位置を線の下に配置 */
    animation: moveCircle 1.5s infinite alternate;
}

/* 円を上下に動かすアニメーション */
@keyframes moveCircle {
    0% {
        bottom: 0;  /* 下の位置 */
    }
    100% {
        bottom: 50px;  /* 上の位置 */
    }
}

/* スクロール後にアイコンを隠す */
.scrolled #scroll-container {
    visibility: hidden;
}

.container {
    margin-bottom: 3rem;
}


.section-title {
    font-size: 1.8em;
    color: #fff;
    margin:1rem 0;
}


.timeline-container {
    display: flex;
    justify-content: space-between;  /* カードを両端に配置 */
    gap: 30px;
    margin: 5rem 0;
    width: 100%;  /* 幅を100%に設定 */
    flex-wrap: wrap;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    width: 30%;  /* 幅はそのままで、3列に配置される */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.3);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* 高さを自動的に調整 */
    align-items: stretch; /* 高さを親のカードと合わせる */
}

.timeline-card:hover {
    transform: translateY(-10px) rotateY(10deg);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.7);
}

.timeline-card::before {
    content: attr(data-year);
    position: absolute;
    top: 10px; /* 上部に固定 */
    left: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: cyan;
    text-shadow: 0 0 10px cyan;
}

.timeline-card p {
    margin-top: 50px; /* 文字と `data-year` の間隔を調整 */
    font-size: 1rem;
    color: #fff;
    text-align: center;
    /* テキストの長さに合わせて高さを調整 */
    flex-grow: 1;  /* 必要に応じてテキストがカードの高さを埋める */
    flex-shrink: 0; /* テキストの長さによって縮まないようにする */
}

/* モバイル向けのスタイル調整 */
@media (max-width: 768px) {
    .timeline-card {
        width: 90%;  /* モバイルでの幅を90%に変更 */
        padding: 15px;  /* モバイル用にパディングを少し減らす */
    }

    .timeline-card::before {
        font-size: 1.2rem;  /* 年号のフォントサイズを少し小さくする */
    }

    .timeline-card p {
        margin-top: 30px;  /* スマホ向けに間隔を縮める */
        font-size: 0.9rem;
    }
}

/* 非常に小さい画面サイズ向け調整 */
@media (max-width: 480px) {
    .timeline-card {
        width: 100%;  /* 幅を100%に */
    }

    .timeline-card::before {
        font-size: 1rem;  /* さらに小さくする */
    }

    .timeline-card p {
        font-size: 0.8rem;  /* 小さい画面ではフォントをさらに小さく */
        margin-top: 20px;
    }
}


/* トップページ「お知らせ」コンテナのスタイル */
.news-section {
    padding: 50px 0;

}

/* ベーススタイル */
.news-card {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 左寄せ */
    padding: 20px 15px;  /* 高さを大きく */
    border-bottom: 2px solid #ddd; /* 区切り線を太く */
    transition: background-color 0.3s ease;
    font-size: 18px; /* 文字サイズを大きく */
}

.news-card:hover {
    background-color:rgba(247, 247, 247, 0.5); /* ホバー時の背景色 */
}

.news-date {
    font-size: 20px; /* 日付のフォントサイズを大きく */
    color: #fff;
    margin-right: 15px;
    flex-shrink: 0; /* 日付部分が縮まないように */
}

.news-title {
    font-size: 22px; /* タイトルのフォントサイズを大きく */
    font-weight: bold;
    margin: 0;
    flex-grow: 1; /* タイトル部分が残りのスペースを埋める */
}

.news-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center; /* アイコンとタイトルを一列に配置 */
}

.news-title a:hover {
    color: #2c529a;
}

.news-title a:focus {
    outline: none;
}

.news-title a .icon {
    margin-right: 10px;  /* アイコンとタイトルの間隔 */
    font-size: 24px;  /* アイコンのサイズ */
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .news-card {
        padding: 20px;
    }

    .news-date {
        font-size: 18px;
    }

    .news-title {
        font-size: 20px;
    }

    .news-title a {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .news-card {
        padding: 18px;
    }

    .news-date {
        font-size: 16px;
    }

    .news-title {
        font-size: 18px;
    }

    .news-title a {
        font-size: 18px;
    }

    .news-title a .icon {
        font-size: 20px; /* アイコンのサイズを少し小さく */
    }
}


.more-container{
    text-align: right;
    margin-top:3rem;
}

/* ボタンの基本スタイル */
.news-more-btn {
    padding: 15px 30px;
    cursor: pointer;
    background:rgba(255, 255, 255, 0.3);
    color: #333; /* 文字色 */
    border: 2px solid #fff; /* 枠線の色 */
    border-radius: 50px; /* 丸い角 */
    position: relative;
    transition: all 0.3s ease; /* すべてのプロパティにアニメーションを追加 */
    display:inline-block;
}

.news-more-btn a{
    text-decoration:none;
    color:#fff;
}
/* ホバー時のスタイル */
.news-more-btn:hover {
    color: #2a619c;
    background:rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}


/* ホバー時にエフェクトが表示される */
.news-more-btn:hover::before {
    opacity: 0.3; /* グラデーションの透過度を変更 */
}


/* イベントカード全体 */
.events-slider {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    gap: 15px;
}

.event-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
    border: 5px solid transparent;
    background-clip: padding-box;
    padding: 25px;
    background-image:
        linear-gradient(#fff 0 100%),
        repeating-linear-gradient(135deg, #395daa 0 5px, transparent 5px 10px);
    background-repeat: no-repeat;
    background-position: center;
    background-size: calc(100% - 10px) calc(100% - 10px), 100%;
}

.event-card:hover  .event-title a:hover {
    color: #007bff; /* ホバー時にタイトルリンクを青色に変える */
}

.event-thumbnail {
    position: relative;
    height: 200px;
    background-color: #f0f0f0;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.event-card:hover .event-thumbnail {
    transform: scale(1.1); 
}

.event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: block;
}

/* NEW! ラベル */
.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    background-color: #395daa;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    animation: fade 3s ease-in-out infinite;
    z-index: 1; /* 他の要素より前に表示 */
}

/* ゆっくりとフェードイン・フェードアウト */
@keyframes fade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.event-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100px;
}

.event-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.event-title a {
    color: #333; /* タイトルリンクの色 */
    text-decoration: none; /* リンクの下線をなくす */
}

.event-date {
    font-size: 14px;
    color: #777;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

/* スライダーの自動スクロール設定 */
@media (max-width: 768px) {
    .events-slider {
        flex-wrap: nowrap;
        gap: 20px;
    }

    /* タブレットサイズで表示件数を3件に */
    .event-card {
        width: 33.33%;
    }
}

@media screen and (max-width: 480px) {
    /* モバイルサイズで表示件数を2件に */
    .event-card {
        width: 50%;
    }

    .event-thumbnail {
        height: 150px;
    }
}

/* PCサイズで表示件数を5件に */
@media screen and (min-width: 1024px) {
    .event-card {
        width: 20%; /* 5件表示 */
    }
}


/* single.php page.phpヘッダー */

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}


/* ボタンの基本スタイル */
.events-more-btn {
    padding: 15px 30px;
    cursor: pointer;
    background:rgba(255, 255, 255, 0.3);
    color: #333; /* 文字色 */
    border: 2px solid #fff; /* 枠線の色 */
    border-radius: 50px; /* 丸い角 */
    position: relative;
    transition: all 0.3s ease;
    margin-top:3rem;
    text-align:center;
}

.events-more-btn a{
    text-decoration:none;
    color:#fff;
}
/* ホバー時のスタイル */
.events-more-btn:hover {
    color: #2a619c;
    background:rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}



/* ホバー時にエフェクトが表示される */
.news-more-btn:hover::before {
    opacity: 0.3; /* グラデーションの透過度を変更 */
}


.light-ring {
    position: absolute;
    border-radius: 50%;
    background: transparent;
    animation: pulse 2s ease-in-out infinite;
    z-index: -1; /* .site-mainの後ろに表示させる */
}

.site-main{
  margin-top:10rem;
  background:rgba(255, 255, 255, 0.8);
  border-radius: 10px; /* 角丸を10pxに設定 */
  padding: 3rem; /* 内側の余白を設定（お好みで調整） */
}


.page-title, .entry-title{
    font-weight:normal;
    font-size:2rem;
    color:#1d61a5;
}

.page-title::after,
.entry-title::after {
    content: "";
    display: block;
    width: 100%;
    height: 3px; /* 線の太さ */
    background: linear-gradient(to right, #ef80b2, #1d61a5, #01b7ef);
    margin-top: 2rem;
}


.entry-content{
    margin:3rem auto;
}

.entry-content img{
}

/* ハッシュタグ */
.tag-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-tag {
    display: inline-block;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 16px;
    text-decoration: none;
    transition: background 0.3s ease;
    background-color: #f5f7f9;
    color:#395daa;
}

.custom-tag:hover {
    background-color: #395daa;
    color: #fff;
}


/*アーカイブページ*/
/* アーカイブのカードコンテナ */
.archive-news-card-container, .archive-event-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
    margin-top: 3rem;
}

/* news と event の共通カードスタイル */
.archive-news-card, .archive-event-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: calc(25% - 20px); /* 4列レイアウト */
    min-width: 250px;
    max-width: 300px;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* news のカードはコンパクトに */
.archive-news-card {
    min-height: auto; /* 高さの制約を解除 */
    padding: 10px 15px;
}

/* event のみサムネイルを表示 */
.archive-event-thumbnail {
    width: 100%;
    height: 180px;
    background-color: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}

.archive-event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* タイトルと日付のコンテナ */
.archive-news-details, .archive-event-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    padding-top: 10px;
}

/* タイトル */
.archive-news-title, .archive-event-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 日付 */
.archive-news-date, .archive-event-date {
    font-size: 12px;
    color: #777;
    text-align: right;
}

.archive-news-card a, .archive-event-card a {
    text-decoration: none;
}

/* ホバー時の動き */
.archive-news-card:hover, .archive-event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .archive-news-card, .archive-event-card {
        width: calc(50% - 20px); /* 2列レイアウト */
    }
}

@media (max-width: 600px) {
    .archive-news-card, .archive-event-card {
        width: 100%; /* 1列レイアウト */
    }
}

/* 無限スクロール後にカードレイアウトが崩れないように */
.archive-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
    margin-top: 3rem;
}

/* 新しい投稿にも適用されるように、flexレイアウトを強化 */
.archive-news-card, .archive-event-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: all 0.3s ease;
    width: calc(25% - 20px);
    min-width: 250px;
    max-width: 300px;
    margin-bottom: 20px;
}

/* カードの高さが適切に保たれるように調整 */
.archive-event-thumbnail {
    height: 180px; /* イベントサムネイルの高さ */
}

/* スクロール後にも整列されるように調整 */
@media (max-width: 1024px) {
    .archive-news-card, .archive-event-card {
        width: calc(50% - 20px); /* 2列レイアウト */
    }
}

@media (max-width: 600px) {
    .archive-news-card, .archive-event-card {
        width: 100%; /* 1列レイアウト */
    }
}


/* PreviousとNextリンクのスタイル（PC用） */
.container.navigation .nav-previous,
.container.navigation .nav-next {
    margin-top:2rem;
    padding: 15px 30px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(239, 128, 178, 0.2), rgba(1, 183, 239, 0.2));
    color: #333; /* 文字色 */
    border: 2px solid #fff; /* 枠線の色 */
    border-radius: 50px; /* 丸い角 */
    position: relative;
    transition: all 0.3s ease; /* すべてのプロパティにアニメーションを追加 */
    display:inline-block;
}

/* 通常時のリンクカラー */
.container.navigation .nav-previous a,
.container.navigation .nav-next a {
    text-decoration:none;
    color:#fff;
}

/* ホバー時 */
.container.navigation .nav-previous:hover,
.container.navigation .nav-next:hover {
    color: #2a619c;
    background: linear-gradient(135deg, rgba(239, 128, 178, 0.5), rgba(1, 183, 239, 0.5));
    transform: scale(1.1);
}

/* アイコンとテキストの間隔 */
.container.navigation .nav-previous i,
.container.navigation .nav-next i {
    margin-right: 5px;
}

/* スマホ（768px以下）でボタンを消してテキストリンクのみにする */
@media screen and (max-width: 768px) {
    .container.navigation .nav-previous,
    .container.navigation .nav-next {
        display: block;
        width: auto;
        background: none !important;
        border: none;
        padding: 0;
        text-align: left;
        margin-top: 1rem;
    }

    /* スマホ用のリンクの色 */
    .container.navigation .nav-previous a,
    .container.navigation .nav-next a {
        color: #1d61a5;
        font-size: 16px;
        padding: 0;
    }

    /* ホバー時 */
    .container.navigation .nav-previous a:hover,
    .container.navigation .nav-next a:hover {
        color: #ef80b2;
        background: none !important;
    }
}


/* ギャラリーのスタイル */
.masonry-container {
    display: flex;
    flex-wrap: wrap;
    margin: 2rem -10px;
}

.masonry-item {
    width: calc(33.333% - 20px); /* 3列（デフォルト） */
    margin: 10px;
    position: relative; /* ホバー時のタイトル表示のために位置調整 */
}

.portfolio-image-container {
    position: relative; /* 画像の上にタイトルを配置するため */
}

.portfolio-title {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    background-color: #ef80b2;
    padding: 10px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}

.masonry-item:hover .portfolio-title {
    opacity: 1;
    background-color: #01b7ef;
    color: #1d61a5;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.gallery-tag {
    padding: 10px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(239, 128, 178, 0.2), rgba(1, 183, 239, 0.2));
    color: #333;
    border: 2px solid #fff;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.gallery-tag:hover {
    background: linear-gradient(135deg, rgba(239, 128, 178, 0.4), rgba(1, 183, 239, 0.4));
    border-color: #ddd;
    color: #000;
}

.gallery-tag.active {
    background-color: #01b7ef !important;
    color: #fff !important;
    border-color: #01b7ef !important;
    font-weight: bold;
}

.back-to-gallery-button {
    padding: 10px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(239, 128, 178, 0.2), rgba(1, 183, 239, 0.2));
    color: #333;
    border: 2px solid #fff;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.back-to-gallery-button:hover {
    background: linear-gradient(135deg, rgba(239, 128, 178, 0.4), rgba(1, 183, 239, 0.4));
    border-color: #ddd;
    color: #000;
}

/* レスポンシブ対応 */
/* タブレット（768px以下）：2列 */
@media (max-width: 768px) {
    .masonry-item {
        width: calc(50% - 20px); /* 2列 */
    }
    .portfolio-title {
        font-size: 0.8rem; /* フォントサイズを小さく */
        padding: 8px;
    }
}

/* スマホ（480px以下）：1列 */
@media (max-width: 480px) {
    .masonry-item {
        width: 100%!important; /* 1列 */
        margin: 10px 0; /* 横の余白をなくす */
    }
    .portfolio-title {
        font-size: 0.7rem; /* フォントサイズを小さく */
        padding: 6px;
    }
}


.title-404{
    text-align:center;
    color:#395daa;
    margin-bottom:5rem;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto; 
}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto; /* 幅を自動で調整 */
}

.search-field {
    border-radius: 20px; /* 角丸 */
    padding: 8px 16px;
    font-size: 16px;
    width: 300px; /* 入力フィールドの幅 */
    outline: none;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    border-color: transparent; /* フォーカス時の枠線を消す */
}

.search-submit {
    background-color: #395daa; /* ボタンの背景色 */
    border: none;
    border-radius: 50%; /* 丸いボタン */
    padding: 12px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.search-submit i {
    color: #fff; /* アイコンの色 */
    font-size: 18px;
}

.search-submit:hover {
    background-color: #2c4a9a; /* ホバー時の色 */
}

.search-submit:focus {
    outline: none; /* ボタンのフォーカス時の枠線を消す */
}



#wrapper-footer {
    position: relative;
    background-color: #3359a0; /* フッターの背景色 */
    margin-top: 7rem; /* 画像の高さ分、調整 */
}


#wrapper-footer::before {
    content: "";
    position: absolute;
    top: -100px; /* 画像をフッターの上に配置 */
    left: 0;
    width: 100%;
    height: 100px; /* 画像の高さを適宜調整 */
    background: url('https://150th.ed.shizuoka.ac.jp/wp-content/uploads/fuji.png') no-repeat left bottom;
    background-size: contain;
}

/* スマホ対応 */
@media (max-width: 768px) {
    #wrapper-footer {
        padding-top: 100px; /* 画像の高さを調整 */
    }

    #wrapper-footer::before {
        top: -100px;
        height: 100px;
        background-size: contain;
    }
}

.site-footer{
    text-align:center;
    color:#fff;
    font-size:0.9rem;
}


.footer-logo {
    width: 100%; /* 幅を100%に */
    background-color: #fff; /* 背景を白に */
    padding: 10px 20px; /* 上下10px、左右20pxの余白 */
    display: flex;
    justify-content: flex-end; /* ロゴを右寄せ */
    align-items: center;
}

.footer-logo img {
    max-height: 50px; /* ロゴの高さを適宜調整 */
    width: auto;
    display: block;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .footer-logo {
        padding: 10px; /* スマホ時の余白調整 */
    }

    .footer-logo img {
        max-height: 40px; /* スマホ時にロゴを少し小さく */
    }
}