/* =====================================================
   Stories Archive 2025 - CSS
   上品な植物ショップの雰囲気: 余白多め / 角丸 / 淡い生成り背景 / 濃いグリーン系文字
   ===================================================== */

:root {
    --bg-cream: #f8f7f2;
    --bg-light: #fdfcf9;
    --text-green-dark: #2d5016;
    --text-green: #3d7021;
    --accent-green: #4a8528;
    --border-light: #e8e5dc;
    --shadow-soft: rgba(45, 80, 22, 0.08);
}

/* ページ全体 */
.stories-archive {
    background-color: var(--bg-cream);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ページヘッダー */
.page-header {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-cream) 100%);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-green-dark);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-green);
    letter-spacing: 0.1em;
}

@media (max-width: 600px) {
    .page-header {
        padding: 40px 0 30px;
    }
    .page-title {
        font-size: 1.75rem;
    }
}

/* 月フィルター */
.month-filter {
    padding: 20px 0 40px;
    position: sticky;
    top: 0;
    background-color: var(--bg-cream);
    z-index: 100;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.chip {
    padding: 10px 20px;
    border: 1.5px solid var(--border-light);
    border-radius: 30px;
    background-color: var(--bg-light);
    color: var(--text-green);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.chip:hover {
    border-color: var(--accent-green);
    background-color: #f0f5ec;
}

.chip.active {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    color: #fff;
}

@media (max-width: 600px) {
    .month-filter {
        padding: 15px 0 25px;
    }
    .filter-chips {
        gap: 8px;
    }
    .chip {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* ギャラリーセクション */
.gallery-section {
    padding-bottom: 80px;
}

/* 月セクション */
.month-section {
    margin-bottom: 60px;
}

.month-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.month-year {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-green-dark);
    letter-spacing: 0.1em;
}

.month-name {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-green);
    letter-spacing: 0.15em;
}

.month-count {
    font-size: 0.75rem;
    color: #888;
    margin-left: auto;
}

@media (max-width: 600px) {
    .month-heading {
        flex-wrap: wrap;
        gap: 8px;
    }
    .month-year {
        font-size: 1.25rem;
    }
    .month-name {
        font-size: 0.875rem;
    }
    .month-count {
        width: 100%;
        margin-left: 0;
    }
}

/* 画像グリッド */
.image-grid {
    display: grid;
    gap: 20px;
    /* デフォルト: PC 4列 */
    grid-template-columns: repeat(4, 1fr);
}

/* 大画面 5列 */
@media (min-width: 1200px) {
    .image-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* タブレット 3列 */
@media (max-width: 900px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* スマホ 2列 */
@media (max-width: 600px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* 画像カード */
.image-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--border-light);
    box-shadow: 0 4px 16px var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(45, 80, 22, 0.15);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.image-card:hover img {
    transform: scale(1.03);
}

/* ローディングプレースホルダー */
.image-card.loading {
    background: linear-gradient(110deg, #e8e5dc 8%, #f0ede5 18%, #e8e5dc 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ライトボックス */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.lightbox-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

/* スライドアニメーション */
.lightbox-content img.slide-out-left {
    transform: translateX(-100px);
    opacity: 0;
}

.lightbox-content img.slide-out-right {
    transform: translateX(100px);
    opacity: 0;
}

.lightbox-content img.slide-in-left {
    animation: slideInFromRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.lightbox-content img.slide-in-right {
    animation: slideInFromLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(80px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-80px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ライトボックス開閉アニメーション */
.lightbox-content img.zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: 16px;
    letter-spacing: 0.05em;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 60px;
    height: 80px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
    border-radius: 8px;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

@media (max-width: 600px) {
    .lightbox-close {
        top: 16px;
        right: 16px;
        font-size: 2.5rem;
    }
    .lightbox-nav {
        width: 44px;
        height: 60px;
        font-size: 1.75rem;
    }
    .lightbox-prev {
        left: 8px;
    }
    .lightbox-next {
        right: 8px;
    }
}

/* スクロールロック */
body.lightbox-open {
    overflow: hidden;
}

/* LINE通知ボタン (base.cssにない場合のフォールバック) */
.line-notification-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.line-notification-button a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #06C755;
    color: #fff;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(6, 199, 85, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.line-notification-button a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}

.line-notification-button .line-icon {
    width: 24px;
    height: 24px;
}

@media (max-width: 600px) {
    .line-notification-button {
        bottom: 16px;
        right: 16px;
    }
    .line-notification-button a {
        padding: 10px 16px;
        font-size: 0.75rem;
    }
    .line-notification-button span {
        display: none;
    }
    .line-notification-button .line-icon {
        width: 28px;
        height: 28px;
    }
}

/* 「戻る」リンク (オプション) */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-green);
    font-size: 0.875rem;
    margin-bottom: 20px;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-green-dark);
}

/* 画像なし時のメッセージ */
.no-images {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1rem;
}
