.navbar{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    background-color: #fafafa;
}

.nav-links{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    padding: 8px 10px;
    box-sizing: border-box;
}

.nav-links a{
    text-decoration: none;
    color: #f07d42;
    font-weight: 500;
    padding: 8px 12px;
    transition: 0.3s;
    margin: 0;
    white-space: nowrap;
}

.nav-links a:hover{
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
}

.memorial-tag {
    margin: 50px auto 0 auto;
    padding: 0 5vw;
    text-align: center;
}
.memorial-contents{
    background-color: transparent;
    color: #fafafa;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 1.75vw;
    font-weight: 750;
    margin: 1% auto 2% auto;
    width: fit-content;
    box-sizing: border-box;
}

.nikki-link{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    box-sizing: border-box;
    width: 80%;
    margin: 5px auto 5px auto;

    /* flex-wrap: wrap; */
}
.nikki-link a{
    background: #f07d42; 
   color: #fafafa; 
   padding: 5px 30px; 
   border-radius: 8px; 
   text-decoration: none;
   font-weight: bold;
   margin: 10px 20px; 
   white-space: nowrap; 
}
.nikki-link a:hover {
    opacity: 1.25; 

 }
 /* 画面幅が 800px 以下 */
@media (max-width: 800px) {
    .nikki-link a {
        font-size: 16px;
    }
}

/* 画面幅が 600px 以下） */
@media (max-width: 600px) {
    .nikki-link a {
        font-size: 14px;
        margin: 0 10px; 
    }
} 
/* 画面幅が 1000px 以下になったとき */
@media (max-width: 1000px) {
    .nikki-link {
        width: 90%; 
        flex-wrap: wrap;
    }
    /* 2行に収まるようにする */
    .nikki-link a {
        flex-basis: calc(20% - 20px); 
        max-width: none; 
        margin: 5px 10px; 
        padding: 15px 10px; 
    }
}


.inpage-link-for-nikki{
    max-width: 18vw;
    min-width: none;
    background: #f07d42;
  position: relative; 
  
}
.memorial-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.memorial-item {
    max-width: 800px;          
    width: 100%;               
    padding: 0 1rem;
    box-sizing: border-box;
}

.memorial-item img { 
    width: 100%;
    height: auto; 
    display: block; 
}


/*日記画像の現在位置表示設定*/

.inpage-link-for-nikki.active {
    background: #4CAF50;  
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
    opacity: 1; 
}

.inpage-link-for-nikki.active:hover {
    background: #4CAF50; 
    opacity: 1; 
}
.inpage-link-for-nikki.active p {
    color: #ffffff; 
}



/* ページタイトル */
.section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: left; 
    margin: 20px 0 30px 10%;
    color: #fafafa;
}

/* --- コラージュコンテナのスタイル --- */
.collage-container {
    width: 80%; 
    margin: 0 auto 50px auto;
    position: relative; 
    height: 1150px; 
}

/* 紙のような背景の質感（オプション） */
.paper-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent; 
    z-index: 0; 
}

/* コラージュ内の写真・キャプションの共通スタイル */
.collage-item {
    position: absolute; 
    margin: 0;
    padding: 0;
    z-index: 10;
    background-color: #fff; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); 
    padding: 10px; 
}

.collage-item img {
    display: block;
    width: 100%;
    height: auto;
}

.collage-item figcaption {
    font-size: 0.8em;
    text-align: center;
    line-height: 1.4;
    padding-top: 5px;
}

/* --- 各写真の個別位置と傾きの設定 --- */

/* 中央のメイン写真 */
.main-photo {
    width: 55%;
    height: 350px;
    top: 150px;
    left: 20%;
    z-index: 5;
    transform: rotate(0deg); 
    padding: 0; 
    box-shadow: none; 
    overflow: hidden; 
}
.main-photo img {
    object-fit: cover;
    height: 100%;
}

/* 写真 1: 左上 */
.photo-1 {
    width: 25%;
    top: 100px;
    left: 5%;
    transform: rotate(-5deg); 
}

/* 写真 2: 左下 */
.photo-2 {
    width: 30%;
    top: 400px;
    left: 10%;
    transform: rotate(3deg); 
}

/* 写真 3: 右上 */
.photo-3 {
    width: 30%;
    top: 50px;
    right: 5%;
    left: auto; 
    transform: rotate(10deg); 
}

/* 写真 4: 右下 */
.photo-4 {
    width: 35%;
    top: 450px;
    right: 10%;
    left: auto;
    transform: rotate(-8deg); 
}

figcaption{
    text-align: center;
    font-size: 1.2vw;
    font-weight: 750;
    color: black;
    background-color: #fafafa;
    border-radius: 5px;
}