@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* ==========================================================================
   思い出箱（MEMORIES）専用スタイルシート
   みずち OFFICIAL WEBSITE - MEMORIES STYLE
   ========================================================================== */

/* ─────────────────────────────────────────────────────────────
   セクション共通見出し（PROFILE / NEWS 完全準拠）
   ───────────────────────────────────────────────────────────── */
.section-head {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
}

.section-tag,
h2.section-tag {
    display: block;
    font-size: 2.8rem;
    color: #065fd4;
    text-align: center;
    letter-spacing: .05em;
    font-family: Montserrat, "Noto Sans JP", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 20px;
    margin: 0px auto;
    background: none;
    border: none;
    border-radius: 0;
    line-height: 1.2;
}

.section-title,
h3.section-title {
    font-family: "Noto Sans JP", "Hiragino Sans", "Meiryo", sans-serif;
    font-size: 1.65rem;
    font-weight: 500;
    color: #333333;
    letter-spacing: 0.15em;
    text-indent: 0.15em;
    margin: 14px auto 8px;
    padding: 0;
    line-height: 1.5;
}

.section-desc {
    font-size: 0.95rem;
    color: #555555;
    margin: 0 auto;
    line-height: 1.75;
    letter-spacing: 0.05em;
    max-width: 640px;
}

@media (max-width: 768px) {
    .section-head {
        margin-top: 20px;
        margin-bottom: 28px;
    }
    .section-tag,
    h2.section-tag {
        font-size: 2.4rem;
        line-height: 2.8rem;
        padding: 0 10px;
    }

    .section-title,
    h3.section-title {
        font-size: 1.35rem;
        margin: 10px auto 6px;
        padding: 0;
    }
    .section-desc {
        font-size: 0.88rem;
        padding: 0 16px;
    }
}

/* ─────────────────────────────────────────────────────────────
   思い出箱 コンテナ・背景
   ───────────────────────────────────────────────────────────── */
.memories-bg {
    background-image: url(../imgs/repoo3e.png);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    text-align: center;
}

.toumei {
    background-color: rgba(255, 255, 255, 0.81);
}

/* ─────────────────────────────────────────────────────────────
   フィルター＆コントロールバー（Sticky・透過・スリムスタイル）
   ───────────────────────────────────────────────────────────── */
:root {
    --site-header-height: 75px;
}

@media (max-width: 768px) {
    :root {
        --site-header-height: 60px;
    }
}

.memories-controls-wrap {
    position: -webkit-sticky;
    position: sticky;
    top: var(--site-header-height, 75px);
    z-index: 850;
    max-width: 1400px;
    margin: 10px auto 22px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.memories-controls-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}



.filter-divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: rgba(148, 163, 184, 0.4);
    margin: 0 4px;
}

.control-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 2px 4px;
}

.control-label i {
    font-size: 0.78rem;
    color: #0284c7;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

/* ピル型ボタン（スリム・シェイプアップ） */
.tab-btn {
    padding: 4px 12px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.35;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #0284c7;
    border-color: #7dd3fc;
    background: rgba(240, 249, 255, 0.95);
    transform: translateY(-1px);
}

/* アクティブボタン（ソフトなパステルトーン＆アウトライン） */
.tab-btn.active {
    color: #0369a1;
    background: #ebf5ff;
    border: 1.5px solid #38bdf8;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(56, 189, 248, 0.2);
}

/* 全部見る ボタン（ソフトなコーラルパステル＆アウトライン） */
.action-buttons-group {
    display: flex;
    align-items: center;
}

.btn-show-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 13px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #e11d48;
    background: #fff1f2;
    border: 1.5px solid #fda4af;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.35;
    white-space: nowrap;
}

.btn-show-all:hover {
    transform: translateY(-1px);
    background: #ffe4e6;
    border-color: #fb7185;
    color: #be123c;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.15);
}

.btn-show-all:active {
    transform: translateY(0);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .memories-controls-wrap {
        padding: 8px 10px;
        margin: 5px 6px 16px;
        border-radius: 12px;
    }

    .memories-controls-inner {
        gap: 8px;
        justify-content: flex-start;
    }

    .filter-divider {
        display: none;
    }

    .filter-group {
        width: 100%;
        justify-content: flex-start;
    }

    .action-buttons-group {
        margin-left: auto;
        padding-top: 2px;
    }

    .tab-btn {
        padding: 3px 9px;
        font-size: 0.76rem;
    }

    .btn-show-all {
        padding: 4px 10px;
        font-size: 0.76rem;
    }
}

/* ─────────────────────────────────────────────────────────────
   写真一覧グリッド（レスポンシブ 5列・4列・3列・2列）
   ───────────────────────────────────────────────────────────── */
ul.memories {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 16px 25px;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 画面幅広め: 5列 */
    gap: 16px;
    box-sizing: border-box;
    list-style: none;
}

li.memory {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

li.memory a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 140px;
    background: rgba(226, 232, 240, 0.4);
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

li.memory a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

li.memory img {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* 追加表示時のフェードイン */
li.memory.is-new {
    animation: memoryFadeIn 0.4s ease forwards;
}

@keyframes memoryFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────
   グリッド・レスポンシブブレイクポイント
   画面幅広め＝5列 (>1200px)
   標準PC＝4列 (960px〜1200px)
   タブレット＝3列 (600px〜959px)
   スマホ＝2列 (〜599px)
   ───────────────────────────────────────────────────────────── */

/* 標準PC (960px〜1200px) -> 4列 */
@media (max-width: 1200px) {
    ul.memories {
        max-width: 1120px;
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
        padding: 10px 14px 22px;
    }

    li.memory img {
        max-height: 220px;
    }
}

/* タブレット (600px〜959px) -> 3列 */
@media (max-width: 959px) {
    ul.memories {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 10px 12px 20px;
    }

    li.memory img {
        max-height: 240px;
    }
}

/* スマホ (〜599px) -> 2列 */
@media (max-width: 599px) {
    ul.memories {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 8px 10px 18px;
    }

    li.memory a {
        min-height: 90px;
        border-radius: 8px;
    }

    li.memory img {
        max-height: 180px;
        border-radius: 8px;
    }
}

/* ─────────────────────────────────────────────────────────────
   もっと見る ボタン
   ───────────────────────────────────────────────────────────── */
.memories-load-more-wrap {
    text-align: center;
    padding: 30px 10px 40px;
    clear: both;
}

.btn-memories-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 38px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #1ca0ce 0%, #065fd4 100%);
    border: none;
    border-radius: 9999px;
    box-shadow: 0 4px 15px rgba(6, 95, 212, 0.28);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-memories-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 95, 212, 0.38);
    background: linear-gradient(135deg, #22b4e6 0%, #086bf0 100%);
}

.btn-memories-more:active {
    transform: translateY(0);
}

.btn-memories-more .more-count {
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 10px;
    border-radius: 9999px;
    font-weight: 500;
}

.btn-memories-more i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.btn-memories-more:hover i {
    transform: translateY(2px);
}

/* ─────────────────────────────────────────────────────────────
   Lightbox キャプション調整
   ───────────────────────────────────────────────────────────── */
.page-memories .lightbox .lb-data,
body .lightbox .lb-data {
    position: relative;
    padding-bottom: 20px;
}

.page-memories .lightbox .lb-data .lb-details,
body .lightbox .lb-data .lb-details {
    width: 100% !important;
    text-align: center !important;
    float: none !important;
}

.page-memories .lightbox .lb-data .lb-close,
body .lightbox .lb-data .lb-close {
    position: absolute !important;
    top: 0;
    right: 4px;
    float: none !important;
}
