@charset "UTF-8";

html {
    scroll-behavior: smooth;
}

body {
    /* font-family: initial; */
    background: #f9f8f4;
}

.bg {
    width: 100%;
    /* margin-bottom: 115px; */
}

.inner {
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    padding-bottom: 50px;
}

.gallery-wrapper {
    margin: 0 auto;
    padding: 90px 0px;
    /* font-family: "Yu Gothic"; */
    font-weight: bold;
}

/* ▼ 利用規約エリア */

.rules-section {
    background: #f3efe9;
    padding: 10px;
}

.rules-section h2 {
    font-size: 20px;
    margin-bottom: 8px;
    margin-left: 5px;
}

/* ▼ 利用規約ボックス */
.rules-box {
    background: #f3efe9;
    padding: 65px 65px 41px 55px;
    height: 300px;
    overflow-y: scroll;
    scrollbar-width: thin; 
    scrollbar-color: #c6bba5 #fff;
}

/* ▼ Webkit系（Chrome / Safari / Edge） */
.rules-box::-webkit-scrollbar {
    width: 10px;   /* スクロールバーの幅 */
}

.rules-box::-webkit-scrollbar-track {
    background: #e5e2d3;  /* 背景 */
    border-radius: 10px;
}

.rules-box::-webkit-scrollbar-thumb {
    background-color: #a5a08f; /* つまみ（色） */
    border-radius: 10px;
    border: 2px solid #e5e2d3; /* 余白をつけてキレイにする */
}

.rules-box::-webkit-scrollbar-thumb:hover {
    background-color: #8f8a7a; /* ホバー時 */
}


.rules-box h3 {
    font-size: 16px;
    font-weight: bold;
}

.rules-txt {
    margin-bottom: 20px;
}

.rules-txt p {
    margin-left: 1rem;
}

.rules-txt ul {
    margin-left: 1rem;
    counter-reset: my-counter;
}
.rules-txt ul li {
    list-style: none;
    counter-increment: my-counter;
    position: relative;
    padding-left: 1.2rem;
}

.rules-txt ul li::before {
    content: counter(my-counter) ". ";
    position: absolute;
    left: 0;
    top: 0;
}

.rules-txt .ban {
    counter-reset: my-counter;
    margin-left: 2rem;
}
.rules-txt .ban li {
    list-style: none;
    counter-increment: my-counter;
    position: relative;
    padding-left: 2.2em; /* 左の余白調整 */
}
.rules-txt .ban li::before {
    content: "(" counter(my-counter) ") ";
    position: absolute;
    left: 0;
    top: 0;
}



/* ▼ アンカーリンク（タグ風） */
.area-links {
    margin: 32px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.area-links a {
    display: inline-block;
    background: #43543C;
    padding: 8px 36px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
    border: solid 2px #43543C;
    transition: background 0.2s;
}

.area-links a:hover {
    background: #fff;
    color: #43543C;
}

/* ▼ 各エリアのギャラリー */
.gallery-area {
    margin-top: 60px;
}

.area-title {
    font-size: 18px;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 0.5em; /* 必要なら調整: 文字と線の間隔 */
}

.area-title::after {
    content: "";
    display: block;
    width: 3.5em;          /* 線の長さ（文字3.5個ぶん） */
    height: 3px;           /* 線の太さ */
    background: #43533c;   /* 緑色にする例 */
    margin-top: 0.6em;     /* 見出しとの差分 */
}

/* ▼ 画像グリッド */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.photo-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.photo-grid img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ▼ モーダル背景 */
.lightbox {
    display: flex; /* アニメーションを使うため display:none は使わない */
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.35s ease; /* フェード */
}

/* 表示状態 */
.lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

/* ▼ モーダル内部（ふわっと表示） */
.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

/* 表示アニメ */
.lightbox.show .lightbox-content {
    transform: scale(1);
    opacity: 1;
}

/* ▼ 閉じるボタン */
.lightbox-close {
    position: absolute;
    top: -55px;
    right: -20px;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.lightbox-close b {
    font-size: 35px;
}

.lightbox-image-cnt {
    width: 925px;
    height: 70vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ▼ 画像 */
.lightbox-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* ▼ 矢印 */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    transition: opacity 0.2s ease;
}

.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.8;
}

/* ▼ サムネイルホバー */
.photo-grid img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.photo-grid img:hover {
    transform: scale(1.05);
    opacity: 0.9;
}





@media screen and (max-width:1024px) {
    .gallery-wrapper {
        padding: 90px 20px;
    }
    .photo-grid img {

    }
    .lightbox-image-cnt {
        width: 800px;
    }
}

@media screen and (max-width:820px) {
    .lightbox-image-cnt {
        width: 650px;
    }
}

@media screen and (max-width:768px) {
    .lightbox-image-cnt {
        width: 600px;
    }
    .photo-grid img {
        height: 230px;
    }
}

@media screen and (max-width:430px) {
    #area-inabayama,
    #area-miyajima,
    #area-try,
    #area-kitchen,
    #area-ichigo,
    #area-tulip,
    #area-sankyo,
    #area-torigoe,
    #area-takase,
    #area-gifu,
    #area-jewel,
    #area-uchikawa,
    #area-kaioumaru,
    #area-cafe,
    #area-kokuhou,
    #area-amaharashi,
    #area-kaneya,
    #area-coffee,
    #area-himionsen,
    #area-manga,
    #area-gallery,
    #area-gyokou,
    #area-syokudou {
        scroll-margin-top: 80px;
    }

    /* デフォルト（同一ページ内アンカー）では何もしない */
    [id^="area-"] {
        /* scroll-margin-top: 0; */
    }

    .anchor-offset {
      scroll-margin-top: 0; /* デフォは何もしない */
  }

    /* 絶対パスで遷移したときだけ margin を適用 */
    .absolute-anchor [id^="area-"] {
        /* scroll-margin-top: -530px; */
    }
    .bg {
        /* margin-bottom: 330px; */
    }
    .inner {
        max-width: 1160px;
        width: 100%;
        margin: 0 auto;
    }

    .gallery-wrapper {
        padding: 0;
    }

    .rules-box {
        padding: 0;
    }

    .rules-section {
        padding: 30px 20px;
    }

    .lightbox-image-cnt {
        width: 100%;
    }

    .lightbox-prev { 
        left: -35px; 
        font-size: 30px;
        padding: 0;
    }
    .lightbox-next {
        right: -35px; 
        font-size: 30px;
        padding: 0;
    }
    .area-links {
        padding: 0px 20px;
    }

    .gallery-area {
        padding: 0 20px;
    }

    .photo-grid img {
        height: 180px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
        gap: 15px;
        /* margin-bottom: 50px; */
    }
}


@media screen and (max-width:400px) {
    .photo-grid img {
        height: 160px;
    }

}

@media screen and (max-width:375px) {

    .photo-grid img {
        height: 150px;
    }

}

@media screen and (max-width:375px) {

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

}
