/* style.css: スタイルシート */

/* 共通スタイル */
html,body {
    height: 100%; /* ページ全体の高さを確保 */
    margin: 0; /* 余白をなくしてフッターを正しく配置 */
}

body {
    font-family: 
        "Lato", 
        sans-serif;
    display: flex;
    flex-direction: column;
    background-image: url('images/haikei1.jpg');
    background-size: cover;          /* 横幅が画面にぴったり合うようにする */
    background-repeat: no-repeat;      /* 画像の繰り返しを防止 */
    background-attachment: fixed;      /* 背景画像をスクロールに対して固定 */
    background-position: top center;   /* 背景画像を中央上部に配置 */
    padding: 0;
}

/* コンテンツを包む要素 */
.content-wrapper {
    flex: 1; /* コンテンツ部分がページ全体の残りを埋める */
    position: relative;              /* 通常の配置に戻す */
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5); /* 透明度50%の白背景を設定 */
    z-index: 1;                      /* 背景よりも前に配置 */
    box-sizing: border-box;          /* パディングを含めてサイズ計算 */
}

/* ヘッダー */
header {
    background-color: #FDEBCD;
    padding: 20px;
    text-align: center;
}

/* ログイン時のヘッダー */
.header-logged-in {
    position: fixed;
    background-color: #f9f9f9; /* ヘッダーの背景色 */
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    top: 0px;
    left:0;
    right: 0px;
    with: 100vw;
    z-index:1000;
}

/* ログアウト時のヘッダー */
.header-logged-out {
    background-color: transparent; /* 背景色を消す */
    border-bottom: none; /* 枠線も消す */
    padding: 0;
}

/* デフォルトのスタイル */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* アコーディオンリンク */
.accordion-links {
    flex: 1;
    text-align: right;
}

/* アコーディオンパネル用スタイル */
.username-display {
    position: relative;
    display: inline-block;
}

.username-display button {
    background-color: #F9A825;
    border: none;
    color: #fff;
    cursor: pointer;
    padding:  10px 20px;
}

#logout-panel {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    width: max-content; /* パネルの幅をコンテンツに合わせる */
    text-align: left; /* 文字を左寄せ */
}

#logout-panel ul {
    list-style: none;
    margin: 0;
    padding: 10px;
    text-align: left; /* リスト全体を左寄せ */
}

#logout-panel ul li {
    margin: 0;
    padding: 0;
}

#logout-panel ul li a {
    text-decoration: none;
    color: #333;
    padding: 20px 10px;
    display: block;
}

#logout-panel ul li a:hover {
    background-color: #f5f5f5;
}

/* ナビゲーション */
nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav li {
    margin: 0 15px;
}

nav a {
    text-decoration: none;
    color: #333;
}

/* メインコンテンツ */
main {
    padding: 80px 20px;
    text-align: center;
}

/* メインコンテンツの画像 */
.main-image {
    max-width: 95%; /* 画面幅に合わせる */
    height: auto;    /* 縦横比を維持 */
    display: block;
    margin: 20px auto;
    border-radius: 10px; /* 角丸にする（オプション） */
}

.sub-image-container {
    position: relative; /* 子要素の配置を相対基準に */
    max-width: 100%;
    margin: 20px auto;
    display: inline-block;
    text-align: center;
}

.sub-image {
    max-width: 95%; /* 画面幅に合わせる */
    height: auto;    /* 縦横比を維持 */
    display: block;
    margin: 20px auto;
    border: 10px solid #4B2E2E; /* ダークブラウンの縁取り */
    border-radius: 10px; /* 角丸にする（オプション） */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 立体感を加える（オプション） */
}

/* 手書き風の英字スタイル */
.foreground-text {
    position: absolute;
    top: 10%; /* 画像の左上に近づける */
    left: 5%; /* 左端から少し内側に配置 */
    transform: rotate(-10deg); /* 少し回転させる */
    font-family: 'Dancing Script', serif; /* スタイリッシュなセリフ体フォント */
    font-size: clamp(18px, 10vw, 72px); /* 最小18px、最大72px、10vwで調整 */
    color: #B38E30; /* 少し暗いアンティークゴールド */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), /* 文字の影 */
                 0 0 10px rgba(255, 215, 0, 0.8); /* 光沢感を演出 */
    white-space: nowrap; /* 文字を1行にする */
    background: linear-gradient(to bottom, #D4AF37, #FFFBE6); /* アンティーク風のグラデーション */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* グラデーションを文字に適用 */
}

/* message-block 要素のスタイル：招待状風 */
.message-block {
    background: linear-gradient(to bottom, #FFFDF5, #FAF3E0); /* 優しいベージュのグラデーション */
    border: 2px solid #4B2E2E; /* ダークブラウンの縁取り */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15); /* 控えめな影 */
    color: #333333;
    font-family: 'Nunito', sans-serif; /* 柔らかい印象のフォント */
    text-align: left; /* 招待状らしく中央揃え */
    margin: 20px auto; /* 上下に余白を追加 */
    width: 90%; /* 横幅を抑えて中央に配置 */
    max-width: 1000px; /* 最大幅を設定 */
    position: relative;
}

/* p 要素のスタイル */
.message-block p {
    margin: 10px 0;
    line-height: 1.8; /* 行間を広めに設定 */
    border-top: 1px solid #ccc; /* 上に罫線 */
}

.message-block p.left-align toggle-trigger {
    margin: 10px 0;
    line-height: 1.8; /* 行間を広めに設定 */
    border-top: 1px solid #ccc; /* 上に罫線 */
}

/* 特定の行に装飾を追加 */
.message-block p.left-alignB {
    color: #FF0000; /* レッド */
    border-top: 1px solid #ccc; /* 上に罫線 */
    padding-top: 10px;
}

.message-block p.left-alignC {
    border-top: 1px solid #ccc; /* 上に罫線 */
    padding-top: 10px;
    text-align: right;
}
.message-block p.left-alignD {
    border-top: none;
    text-align: center;
}

/* ご案内 */
.heading {
    position: relative;
    padding-top: 40px;
    padding-left: 30px;
    font-size: 26px;
}

.heading span {
    position: relative;
    text-align: left;
    z-index: 1;
}

.heading::before {
    content: attr(data-en);
    position: absolute;
    transform: rotate(-5peg);
    top: 0;
    left: 0;
    color: #FFD700;
    font-size: 48px;
    font-weight: 400;
    font-family: 'Fredericka the Great', cursive;
    padding: 5px 10px; /* 文字周りにスペース */
    display: inline-block;
}

/* フォーム */
form {
    display: inline-block;
    text-align: left;
    margin: 20px 0;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    margin-bottom: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.error-message {
    color: #D8000C; /* 赤色 */
    background-color: #FFBABA; /* 淡い赤 */
    border: 1px solid #D8000C;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}
/* ボタン */
button {
    background-color: #F9A825;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

/* 共通のギャラリースタイル */
.gallery .gallery-item img, 
.gallery .gallery-item video {

    max-width: 100%; /* コンテナ幅に合わせる */
    height: auto;    /* 縦横比を維持 */
    display: block;  /* 行内に余計なスペースが生じないように */
    margin: 0 auto;  /* コンテンツを中央揃え */
    border-radius: 8px; /* オプションで角を丸くする */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* オプションで軽い影をつける */
}

/* 画像ギャラリーと動画ギャラリーで共通化 */
.gallery.images, .gallery.videos {
    display: grid;
    gap: 10px;
    max-width: 100%;
}

/* カテゴリナビゲーション */
.category-nav {
    text-align: center;
    margin: 20px 0;
}

.category-link {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-link.active {
    color: #fff;
    background-color: #4B2E2E; /* 選択中のリンク色 */
    border-color: #4B2E2E;
    border-radius: 5px;
}

.category-link:hover {
    color: #4B2E2E;
    background-color: #f1f1f1;
    border-color: #4B2E2E;
    border-radius: 5px;
}

@media (min-width: 601px) {
    /* アコーディオンリンクは右寄せ */
    .accordion-links {
        flex: 1;
        text-align: right;
    }
}

/* メディアクエリで画面サイズに応じて列数を変更 */
@media (min-width: 801px) {
    .gallery.images, .gallery.videos {
        grid-template-columns: repeat(3, 1fr);
    }
    .message-block p:nth-child(1),
    .message-block p:nth-child(4),
    .message-block p:nth-child(7) {
         margin-bottom: 20px; /* 各ブロックの改行間隔を広く */
    }
}

@media (min-width: 601px) and (max-width: 800px) {
    .gallery.images, .gallery.videos {
        grid-template-columns: repeat(2, 1fr);
    }
    .message-block p:nth-child(3),
    .message-block p:nth-child(6) {
        margin-bottom: 20px; /* 改行箇所を調整 */
    }
}

@media (max-width: 600px) {
    .gallery.images, .gallery.videos {
        grid-template-columns: 1fr;
    }
    .header-content {
    flex-direction: row;
    }
    .left-align {
        margin-bottom: 15px; /* 全体的に少し詰める */
    }

    .message-block p:nth-child(2),
    .message-block p:nth-child(5) {
        margin-bottom: 20px; /* 必要に応じて改行箇所を追加 */
    }
}

/* モーダルウィンドウのスタイル */
.modal {
    display: none; /* デフォルトでは非表示 */
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* 必要に応じてスクロール */
    background-color: rgba(0, 0, 0, 0.8); /* 背景を半透明の黒に */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    position: relative;
}

.modal-content.swipe-left-out {
    transform: translateX(-100%);
    opacity: 0;
}

.modal-content.swipe-right-out {
    transform: translateX(100%);
    opacity: 0;
}

.modal-content.swipe-left-in {
    transform: translateX(100%);
    opacity: 0;
}

.modal-content.swipe-right-in {
    transform: translateX(-100%);
    opacity: 0;
}

.modal-content.active {
    transform: translateX(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px; /* フォントサイズを大きく */
    cursor: pointer;
    z-index: 1000;
    width: 50px; /* クリック範囲を広げる */
    height: 50px; /* 高さも指定 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明の背景を追加 */
    border-radius: 50%; /* 丸いボタンにする */
    transition: background-color 0.3s ease; /* ホバー時の効果をスムーズに */
}

.modal-navigation.prev {
    left: 20px; /* 左側に配置 */
}

.modal-navigation.next {
    right: 20px; /* 右側に配置 */
}

.modal-navigation:hover {
    background-color: rgba(0, 0, 0, 0.8); /* ホバー時の背景色を濃く */
    color: #f9f9f9; /* ホバー時の文字色を調整 */
}

/* メッセージ表示 */
.message {
    background-color: #DFF0D8; /* 緑がかった背景色 */
    color: #3C763D;            /* ダークグリーンの文字色 */
    border: 1px solid #D6E9C6; /* 薄い緑の枠線 */
    padding: 10px;
    margin: 20px;
    text-align: center;
    border-radius: 5px;
}

/* プログレスバーのスタイル */
#progress-container {
    margin-top: 10px;
}

#progress-bar {
    width: 100%;
    height: 20px;
}

#progress-text {
    display: block;
    text-align: center;
    margin-top: 5px;
}

/* pagetop */
#pageTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

#pageTop a {
  display: block;
  z-index: 999;
  padding: 8px 0 0 8px;
  border-radius: 30px;
  width: 35px;
  height: 35px;
  background-color: #9FD6D2;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
}

#pageTop a:hover {
  text-decoration: none;
  opacity: 0.7;
}

/* プレイリストリンクのスタイル */
.playlist-link {
    margin: 20px 0;
    text-align: center;
}

.playlist-link a {
    font-family: 'Fredericka the Great', cursive;
    font-size: 1.2em;
    color: #5a3e36;
    text-decoration: none;
    border-bottom: 2px solid #5a3e36;
    padding-bottom: 3px;
}

.playlist-link a:hover {
    color: #a67c52;
    border-color: #a67c52;
}

/* 楽曲リストのスタイル */
.spotify-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.spotify-list li {
    margin: 10px auto;
    max-width: 320px;
    padding: 10px;
    background-color: #fdf6e3;
    border: 2px solid #d6c6b1;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.spotify-list li iframe {
    display: block;
    margin: 0 auto;
}

/* アンティーク風フォント */
.spotify-list li {
    font-family: 'Dancing Script', cursive;
    font-size: 1em;
    color: #3e2723;
}

.fusen-1 {
    display: inline-block;
    position: relative;
    padding: .5em 1em;
    border-right: 27px solid #e66bbb;
    background-color: #f5f5f5;
    color: #333333;
    margin-bottom: 10px; /* 下方向に10pxの余白を追加 */
}

.fusen-1::before {
    position: absolute;
    bottom: 2px;
    right: -20px;
    z-index: -1;
    transform: rotate(5deg);
    width: 100%;
    height: 50%;
    background-color: #d0d0d0;
    content: "";
    filter: blur(4px);
}

.fusen-2 {
    display: inline-block;
    position: relative;
    padding: .5em 1em;
    border-right: 27px solid #c5e66b;
    background-color: #f5f5f5;
    color: #333333;
    margin-top: 10px; /* 上方向に10pxの余白を追加 */
}

.fusen-2::before {
    position: absolute;
    bottom: 2px;
    right: -20px;
    z-index: -1;
    transform: rotate(5deg);
    width: 100%;
    height: 50%;
    background-color: #d0d0d0;
    content: "";
    filter: blur(4px);
}

.fusen-3 {
    display: inline-block;
    position: relative;
    padding: .5em 1em;
    border-right: 27px solid #636466;
    background-color: #f5f5f5;
    color: #333333;
    margin-top: 10px; /* 上方向に10pxの余白を追加 */
}

.fusen-3::before {
    position: absolute;
    bottom: 2px;
    right: -20px;
    z-index: -1;
    transform: rotate(5deg);
    width: 100%;
    height: 50%;
    background-color: #d0d0d0;
    content: "";
    filter: blur(4px);
}

/* 各セクションのスクロール位置調整 */
#fusen-1, #fusen-2 {
    scroll-margin-top: 70px; /* 各要素が画面の上部から20px下がるように調整 */
}

/* フッターのスタイル */
footer {
    text-align: left;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto; /* フッターをページの下端に配置 */
}