/* ================================================
   Anemone Blog - BLOG Layout Styles
   BLOGタブのマソナリーレイアウト・カードスタイル
   ================================================ */

/* ==========================================
   CSSカラムレイアウト（ジグザグ表示）
   ========================================== */

/* Xタブ: 3カラムレイアウト */
.article-list.x-masonry {
  column-count: 3;
  column-gap: 20px;
  display: block; /* flexを無効化 */
}

/* BLOGタブ: 2カラムレイアウト（画面を埋める） */
.article-list.blog-masonry {
  column-count: 2;
  column-gap: 30px;
  display: block; /* flexを無効化 */
  padding: 20px;
  max-width: 100%;
}

.article-list.x-masonry .article-container,
.article-list.x-masonry article[data-source="x"] {
  break-inside: avoid;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
}

/* BLOG記事: カード間隔を広めに */
.article-list.blog-masonry article[data-source="blog"] {
  break-inside: avoid;
  margin-bottom: 30px;
  display: inline-block;
  width: 100%;
}

/* X投稿 & BLOG記事カード: 幅100%、高さ自動 */
.article-list.x-masonry .article-card,
.article-list.blog-masonry .article-card {
  width: 100% !important;
  height: auto !important;
  position: static !important;
}

/* ==========================================
   レスポンシブ対応
   ========================================== */

/* タブレット (1024px以下) */
@media (max-width: 1024px) {
  .article-list.x-masonry {
    column-count: 2;
  }
  .article-list.blog-masonry {
    column-count: 2;
    padding: 15px;
    column-gap: 20px;
  }

  /* BLOG記事: カード間隔を狭く */
  .article-list.blog-masonry article[data-source="blog"] {
    margin-bottom: 20px;
  }
}

/* スマホ (640px以下) */
@media (max-width: 640px) {
  .article-list.x-masonry,
  .article-list.blog-masonry {
    column-count: 1;
    padding: 10px;
    column-gap: 0;
  }

  /* BLOG記事: スマホ用カード間隔 */
  .article-list.blog-masonry article[data-source="blog"] {
    margin-bottom: 15px;
  }

  /* BLOG記事: スマホ用タイトルサイズ */
  .article-card[data-source="blog"] .article-title {
    font-size: clamp(0.85rem, 4vw, 1.1rem);
    line-height: 1.5;
  }

  /* BLOG記事: スマホ用字幕パディング */
  .article-card[data-source="blog"] .article-card-content {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
  }

  /* BLOG記事: スマホ用カード角丸 */
  .article-card[data-source="blog"] {
    border-radius: 8px;
  }
}

/* ==========================================
   BLOG記事専用スタイル - シネマティックデザイン
   ========================================== */

/* BLOG記事カード: 4:3サイズ（1:1と16:9の中間） */
.article-card[data-source="blog"] {
  position: relative; /* 字幕の絶対配置の基準 */
  aspect-ratio: 4 / 3; /* クラシックTV比率 */
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: block;
  text-decoration: none;
  width: 100%;
}

.article-card[data-source="blog"]:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

/* BLOG記事: 画像コンテナ（カード全体を埋める） */
article[data-source="blog"] .article-image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background: #000;
}

article[data-source="blog"] .article-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card[data-source="blog"]:hover .article-image {
  transform: scale(1.05);
}

/* BLOG記事: シネマ字幕風タイトル配置 */
.article-card[data-source="blog"] .article-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 2rem 2rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.85) 40%,
    rgba(0, 0, 0, 0.5) 70%,
    rgba(0, 0, 0, 0.2) 85%,
    transparent 100%
  );
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* BLOG記事: タイトルスタイル（字幕風・適度なサイズ） */
.article-card[data-source="blog"] .article-title {
  font-size: clamp(0.95rem, 2.5vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  text-align: center;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  margin: 0;
}

.article-card[data-source="blog"]:hover .article-title {
  color: rgba(255, 255, 255, 1);
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(255, 255, 255, 0.3);
}

/* ==========================================
   Glitch Text Style
   ========================================== */

.glitch-char {
  display: inline-block;
  transition: opacity 0.05s ease;
}
