@charset "UTF-8";

/* ==========================================================
   PHOTO PAGE STYLES (Optimized & Animated)
   ========================================================== */

/* ----------------------------------------------------------
   共通アニメーション (Fade In)
   ---------------------------------------------------------- */
@keyframes tnsbFadeIn {
    from { opacity: 0; transform: scale(1.02); }
    to   { opacity: 1; transform: scale(1); }
}

/* ----------------------------------------------------------
   PHOTO ARCHIVE (一覧ページ)
   ---------------------------------------------------------- */
.photo-archive-wrap {
    /* inner--cts--wrap のスタイルに準拠 */
}

/* カード型リスト */
.photo-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 8em;
}
.photo-card:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* 画像エリア */
.photo-card__figure {
    width: 100%;
    height: 400px;
    margin: 0 0 1em;
    padding: 0;
    overflow: hidden;
    background-color: #f0f0f0;
}

.photo-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    
    /* ▼ アニメーション適用 */
    opacity: 0; /* 最初は隠す */
    animation: tnsbFadeIn 0.8s ease-out forwards; /* フワッと表示 */
}

/* テキストエリア */
.photo-card__body {
    line-height: 1.6;
}

.photo-card__title {
    font-size: 1.7em;
    font-weight: 600;
    margin: 0;
}

.photo-card__meta {
    font-size: 1em;
    font-weight: 600;
    margin: 0;
}

/* ----------------------------------------------------------
   PHOTO SINGLE (詳細ページ)
   ---------------------------------------------------------- */
.photo-gallery-grid {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px;
    align-items: flex-start;
}

.photo-img-wrap {
    width: calc(33.333% - 2px);
    height: 331px;
    overflow: hidden;
    position: relative;
    background-color: #e9e9e9;
}

.photo-img-wrap.wide {
    width: 1000px;
    height: 500px;
}

.photo-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    
    /* ▼ アニメーション適用（ロード完了後に発火） */
    opacity: 0;
    animation: tnsbFadeIn 0.8s ease-out forwards;
}

/* Lazy Load 待機中（JSでクラス制御） */
.photo-img-wrap img.lazy-load {
    opacity: 0;
    animation: none; /* ロード中はアニメーションさせない */
}

.photo-img-wrap img:hover {
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s; /* ホバー時は即座に反応 */
}

/* ----------------------------------------------------------
   POPUP SLIDE (詳細ページ用)
   ---------------------------------------------------------- */
.popup-slide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-slide img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    user-select: none;
    /* ポップアップ画像もフワッと出す */
    animation: tnsbFadeIn 0.4s ease-out forwards;
}

.popup-slide-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
}

.popup-slide-prev,
.popup-slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    padding: 20px;
    z-index: 10;
    user-select: none;
}
.popup-slide-prev { left: 10px; }
.popup-slide-next { right: 10px; }


/* ----------------------------------------------------------
   RESPONSIVE (スマホ対応)
   ---------------------------------------------------------- */
@media (max-width: 1232px) {
    .photo-img-wrap { height: 26.8vw; }
    .photo-img-wrap.wide { width: 100%; height: 60vw; }
}

@media (max-width: 1029px) {
    .photo-gallery-grid {
        width: 100%;
        gap: 1px;
    }
    .photo-img-wrap {
        width: calc(33.333% - 1px);
        height: 32vw;
    }
    .photo-img-wrap.wide {
        width: 100%;
        height: 46vw;
    }
}

@media (max-width: 780px) {
    /* Archive */
    .photo-card__figure {
        width: 120%;
        height: 60vw;
        margin-left: -10%;
    }
    .photo-card__title {
        font-size: 1.6em;
        line-height: 1.3;
        margin-bottom: 0.2em;
    }
    .photo-card__meta {
        font-size: 1em;
    }
    .photo-card {
        margin-bottom: 4em;
    }

    /* Single / Popup */
    .popup-slide img {
        max-width: 100%;
        max-height: 80%;
    }
    .popup-slide-prev, .popup-slide-next {
        font-size: 24px;
        padding: 10px;
    }
}