/* =========================
     Common Card Grid
  ========================= */
  
  .post-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  
  .post-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;

    display: flex;
    flex-direction: column; /* 画像上、メタ情報下 */
    height: auto;           /* 高さ自動 */
    position: relative;     /* NEWタグ用 */
  }
  
  .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  }
  
  .thumb {
    overflow: hidden;
    aspect-ratio: 4 / 3; /* 横長比率 */
  }
  
  .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
  }
  
  .post-card:hover img {
    transform: scale(1.05);
  }
  
  .meta {
    padding: 0.75rem 0.75rem 1rem;
    font-size: 0.85rem;
  }
  
  .meta .title {
    font-weight: 500;
  }

  /* =========================
   Mobile Horizontal Scroll
    ========================= */

    @media (max-width: 768px) {
        .home .post-list {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        }
    
         /* スクロールバー：出すなら削除、隠すなら残す */
         .home .post-list::-webkit-scrollbar {
            height: 3px;
          }
        
          .home .post-list::-webkit-scrollbar-track {
            background: transparent;
          }
        
          .post-list::-webkit-scrollbar-thumb {
            background: rgba(0,0,0,0.25);
            border-radius: 999px;
          }
    
        .home .post-card,
        .home .portfolio-card {
            flex: 0 0 70%;
            max-width: 70%;
            scroll-snap-align: start;
        }
    }

        @media (max-width: 480px) {
            .home .post-card,
            .home .portfolio-card {
              flex: 0 0 42%;
              max-width: 42%;
            }
    }

  /* =========================
     Lightbox
  ========================= */
  
  #lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
  }
  
  #lightbox.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  #lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
  }
  
  #lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
  }
  
  .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: #fff;
    background: rgba(0,0,0,0.3);
    border: none;
    width: 48px;
    height: 64px;
    cursor: pointer;
  }
  
  .arrow.left { left: 8px; }
  .arrow.right { right: 8px; }
  
  .arrow:hover {
    background: rgba(0,0,0,0.5);
  }

  /* =========================
   Lightbox Caption (Mobile)
========================= */

.lightbox-caption {
    margin-top: 0.8rem;
    text-align: center;
    color: #ebddaf;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    display: none; /* ← PCでは非表示 */
  }

.lightbox-caption .caption-horse {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f1e6c6;
    margin-bottom: 0.3rem;
    letter-spacing: 0.04em;
}
  
  .lightbox-caption .caption-date {
    font-size: 0.85rem;
    opacity: 0.85;
  }
  
  .lightbox-caption .caption-race {
    font-size: 1.1rem;
    font-weight: 600;
  }
  
  /* スマホだけ表示 */
  @media (max-width: 768px) {
    #lightbox {
      flex-direction: column;
    }
  
    .lightbox-caption {
      display: block;
    }
  }

  #lightbox-img {
    touch-action: pan-x pan-y pinch-zoom;
  }
  

 /* =========================
   View All Button
========================= */

.view-all-wrapper {
    text-align: left;        /* 中央揃え */
    margin-top: 2.5rem;
    margin-left: 1.5rem;        /* 上に余白 */
}

.view-all-button {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--card);        /* 白色 */
    background-color: var(--accent); /* アクセントカラー */
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.view-all-button:hover {
    background-color: #5a94bd; /* accentの少し濃い色 */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* モバイル用調整 */
@media (max-width: 480px) {
    .view-all-button {
        padding: 0.55rem 1.2rem;
        font-size: 0.9rem;
    }
}
 

    .new {
        position: absolute;
        top: 10px;
        left: 10px;
        font-size: 0.65rem;
        letter-spacing: 0.12em;
        padding: 0.35em 0.6em;
        background: rgba(121, 174, 200, 0.85);
        color: #ffffff;
        border-radius: 999px;
        font-family: 'Inter', sans-serif;
        font-weight: 500;
        backdrop-filter: blur(4px);
      }
    
/* =========================
   Tag link / static
========================= */
/* タグ全体の箱 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }

/* タグ1個 */
.tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
  }
  
  /* リンクあり */
  .tag-link {
    color: #6a4e3c;
    background: rgba(210,180,140,0.2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .tag-link:hover {
    background: #6a4e3c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
  
  /* リンクなし */
  .tag-static {
    color: #8a7a6a;
    background: rgba(210,180,140,0.1);
    cursor: default;
  }

  /* =========================
   Section Titles
========================= */

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #555;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
  }

  .section-title::after {
    content: "";
    display: block;
    width: 32px;
    height: 1px;
    background: rgba(0,0,0,0.12);
    margin: 1rem auto 0;
  }
  