@charset "utf-8";

.ig-more {
    text-align: center;
    margin-top: 28px;
}
.ig-more a {
    display: inline-block;
    padding: 10px 32px;
    border: 1.5px solid #dbdbdb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.ig-more a:hover {
    background: #f5f5f5;
    border-color: #bbb;
}
.ig-load-more-btn {
    padding: 10px 36px;
    border: 1.5px solid #dbdbdb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.ig-load-more-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #bbb;
}
.ig-load-more-btn:disabled {
    color: #aaa;
    cursor: default;
}
.ig-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.ig-header-icon {
    display: flex;
    align-items: center;
    color: #1a7a4a;
    font-size: 20px;
    font-weight: 700;
}

.ig-header-icon::before {
    content: "▶";
    font-size: 14px;
    margin-right: 6px;
    color: #1a7a4a;
}

.ig-header a {
    margin-left: auto;
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.ig-header a:hover { text-decoration: underline; }

/* ===== グリッド ===== */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .ig-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* スマホでは矢印を非表示にしてスワイプ操作に任せる（本家インスタと同じ） */
    .ig-arrow {
        display: none;
    }

    /* ドットを少し大きくして見やすく */
    .ig-dots {
        bottom: 8px;
        gap: 5px;
    }
    .ig-dot {
        width: 7px;
        height: 7px;
    }
}

/* =========================================================
   style.css の旧レイアウト用指定を打ち消すための上書き
   （.f-home-instagram img / a { width:25vw } などが
     新しいグリッド・カルーセルに干渉するのを止める）
   ========================================================= */

/* コンテナ：80vwのflex中央寄せ → 幅いっぱいのブロックに */
.f-home-instagram .instagram-items {
    width: 100%;
    display: block;
}

/* グリッド自体を幅いっぱいに */
.f-home-instagram .ig-grid {
    width: 100%;
}

/* カルーセルのリンク枠：25vw正方形の強制を解除して
   セル幅いっぱいの正方形にする */
.f-home-instagram a.ig-carousel-wrap,
.f-home-instagram .ig-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

/* スライド・サムネイルの画像：25vw強制を解除して枠いっぱいに */
.f-home-instagram .ig-slide img,
.f-home-instagram .ig-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* フォローボタンのリンクには影響させない（枠指定を戻す） */
.f-home-instagram a.f-button1 {
    width: 100%;
    height: 7.2rem;
    aspect-ratio: auto;
}

/* ===== カード ===== */
.ig-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative; /* 基準にする */
}
/*
.ig-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}
*/

/* ===== サムネイル ===== */
.ig-thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #eee;
}

.ig-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
/*
.ig-card:hover .ig-thumb img {
    transform: scale(1.04);
}
*/
/* 動画バッジ */
.ig-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
}

/* ===== テキストエリア ===== */
.ig-body {
    padding: 14px 16px 16px;
}

.ig-date {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.ig-caption {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ig-caption.empty {
    color: #bbb;
    font-style: italic;
}

/* ===== ローディング・エラー ===== */
.ig-status {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

.ig-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top-color: #1a7a4a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== カルーセル ===== */
.ig-carousel-wrap {
    display: block;
    position: relative;
    text-decoration: none;
    aspect-ratio: 1;
    overflow: hidden;
    background: #eee;
}

/* スライドトラック：横並びにしてtranslateXで動かす */
.ig-slide-track {
    display: flex;
    width: 100%;
    height: 100%;
    transform: translateX(0);
    will-change: transform;
}

.ig-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.ig-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* 矢印ボタン */
.ig-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    z-index: 2;
    transition: background 0.15s;
    padding: 0;
}

.ig-arrow:hover {
    background: rgba(255,255,255,1);
}

.ig-arrow-prev { left: 8px; }
.ig-arrow-next { right: 8px; }

/* ドットインジケーター */
.ig-dots {
    position: absolute;
    bottom: 10px;          /* 画像の下から10pxの位置 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 4px;
    pointer-events: none;  /* コンテナは透過（画像リンクを邪魔しない） */
}

.ig-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);   /* 画像上でも見えるように白系 */
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.35); /* 明るい画像対策の影 */
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
    pointer-events: auto;  /* ドット自体はクリック可能にする */
}

.ig-dot.active {
    background: #fff;
}