/* ==========================================================================
   Instagram表示システム - ホームページ用（横スクロール実装）
   
   管理画面用: instagram-cards.css へ完全移行済み
   ホームページ用: このファイルで継続使用中
   ========================================================================== */

@layer components {

/* =============================================================================
 * パブリック表示（横スクロール） - ホームページ用
 * ============================================================================= */

/* Instagram投稿セクション全体 */
.instagram-posts-section {
  width: 100%;
  margin-bottom: 64px; /* ニュースセクションとの十分な間隔 */
  position: relative;
}

/* Instagram投稿横スクロールコンテナ */
.instagram-posts-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 40px 0; /* 下パディングを増加してスクロールバーとの間隔確保 */
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
}

.instagram-posts-scroll.is-loading,
.instagram-posts-scroll.is-empty,
.instagram-posts-scroll.is-error {
  justify-content: center;
  align-items: center;
  min-height: 320px;
  gap: 0;
}

/* スクロールバーのスタイリング */
.instagram-posts-scroll::-webkit-scrollbar {
  height: 8px;
}

.instagram-posts-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.instagram-posts-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.instagram-posts-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* =============================================================================
 * Instagram投稿カード（ホームページ用）
 * ============================================================================= */

/* Instagram投稿カード */
.news-card.instagram-item {
  min-width: 320px;
  max-width: 400px;
  width: 340px;
  aspect-ratio: 4 / 5;
  height: auto;
  flex-shrink: 0;
  background: white;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.news-card.instagram-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Instagram埋め込み部分 */
.news-card.instagram-item .post-embed {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

/* Instagram埋め込み要素のスタイル調整 */
.news-card.instagram-item .post-embed blockquote,
.news-card.instagram-item .post-embed .instagram-media {
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  aspect-ratio: 4 / 5 !important;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  opacity: 1 !important;
  visibility: visible !important;
}

/* =============================================================================
 * Instagram投稿オーバーレイ
 * ============================================================================= */

.news-card.instagram-item .instagram-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
  border-radius: 12px;
}

.news-card.instagram-item:hover .instagram-overlay {
  opacity: 1;
}

.news-card.instagram-item .instagram-overlay-content {
  text-align: center;
  color: white;
  transform: scale(0.9);
  transition: all 0.2s ease;
}

.news-card.instagram-item:hover .instagram-overlay-content {
  transform: scale(1);
}

.news-card.instagram-item .instagram-overlay-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
  opacity: 0.9;
}

.news-card.instagram-item .instagram-overlay-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.news-card.instagram-item .instagram-overlay-subtext {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  opacity: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

}
