﻿@charset "utf-8";

/* 1. Masonryコンテナの設定 */
.gmg-masonry {
    /* display: flex; 削除 */
    max-width: 960px;
    margin: 0 auto;
    position: relative; /* Masonry.jsのレイアウト計算用 */
}

/* 2. カラム幅の基準となるsizer */
.gmg-masonry-sizer {
    width: 33.333%; /* デフォルト3カラム */
}

/* 3. 各マasonryアイテムの設定 */
.gmg-masonry-item {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px; /* 下部のギャップ */
    overflow: hidden;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    border-radius: 3px;
    border: 0;
}

/* レスポンシブデザインの調整 */
/* ---- タブレット幅 ---- */
@media (min-width: 768px) and (max-width: 959px) { /* タブレットで2カラム */
/*    .gmg-masonry-sizer,
    .gmg-masonry-item {
        width: 48%; 
    }　*/
}
/* ---- タブレット幅 ---- */
@media (max-width: 959px) {
    .gmg-masonry-sizer,
    .gmg-masonry-item {
        width: 48%; /* タブレットで2カラム */
    }
}

/* ---- デスクトップ幅 ---- */
@media (min-width: 960px) {
    .gmg-masonry-sizer,
    .gmg-masonry-item {
        width: 31%; /* 3カラム */
    }
}

/* ---- モバイル幅 ---- */
@media (max-width: 767px) { /* 1カラム */
 /*   .gmg-masonry-sizer,
    .gmg-masonry-item {
        width: 100%; 
    }*/
}

/* 4. タイトルボックスの設定 */
.gmg-title-box {
    width: 100%;
    aspect-ratio: var(--gmg-aspect-ratio, 1/1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    padding: 0.5em;
    border-radius: 3px;
    border: 1px solid #666;
    box-sizing: border-box;
    transition: background-color 0.3s ease-in-out;
}

/* 5. タイトルリンクの設定 */
.gmg-title-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* 6. タイトルコンテンツの設定 */
.gmg-title-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

/* 7. Glightboxの虫メガネアイコンを非表示 */
.glightbox-zoom,
.glightbox-toolbar-button[data-gallery="zoom"] {
    display: none !important;
}

/* 8. Glightboxの画像の設定 */
.gmg-glightbox img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover; /* 必要に応じて contain に変更可 */
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

/* 9. プレイアイコンの設定（動画） */
.gmg-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 2;
}

/* 10. キャプションの設定 */
.gmg-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 5px;
    box-sizing: border-box;
    text-align: center;
    font-size: 0.9em;
    z-index: 1;
}

/* 11. ホバー効果の設定 */
.gmg-masonry-item:hover img {
    transform: scale(1.02);
    filter: brightness(0.95);
}

.gmg-masonry-item:hover {
    transform: scale(1.01);
    filter: brightness(0.98);
}

/* 12. Glightboxナビゲーション矢印の設定 */
.gnext.gbtn,
.gprev.gbtn {
    width: 70px;
    height: 200px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gprev.gbtn { left: 10px; }
.gnext.gbtn { right: 10px; }

.gnext.gbtn:hover::after,
.gprev.gbtn:hover::after {
    transform: scale(1.1);
    color: #ddd;
}


/* === Masonry 用「行送りスペーサー」 ===================== */
.gmg-post-divider {
	width:100%!important;
	height:1px;
	margin:5px 0;
}