/**
 * 施工事例ページ専用スタイル（改良版）
 * ファイル名: works-style.css
 * 
 * 既存テーマのスタイルに影響を与えないよう、すべてのセレクタに
 * .riff-works-container のプレフィックスを付けています。
 */

/* 既存テーマのスタイルをリセット */
.riff-works-container * {
    box-sizing: border-box;
}
/* 横スクロール防止（グローバル設定） */
body.has-works-hero {
  overflow-x: hidden;
}

/* ヒーロー使用時のページ全体調整 */
.has-works-hero .site-main,
.has-works-hero .content-area {
  overflow-x: hidden;
}
/* ===================================================================
   施工事例ページ専用ヒーローセクション（横幅いっぱい版）
   ================================================================ */

/* ヒーローセクション全体 */
.riff-works-hero {
  position: relative;
  width: 100vw; /* ビューポート全体の幅 */
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: var(--works-hero-height, 400px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--works-hero-bg-color, #f8f9fa);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  margin-bottom: 0;
  margin-top: 0;
  padding: 0;
}

/* テーマのコンテナ制約を無効化 */
.riff-works-hero * {
  max-width: none;
}

/* オーバーレイ */
.riff-works-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-color: var(--works-hero-overlay, rgba(0, 0, 0, 0.5));
  z-index: 1;
}

/* ヒーローコンテナ */
.riff-works-hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヒーローコンテンツ */
.riff-works-hero-content {
  text-align: var(--works-hero-text-align, center);
  color: var(--works-hero-text-color, #ffffff);
  padding: 60px 20px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ヒーロータイトル */
.riff-works-hero-title {
  font-size: 3.5rem;
  font-weight: 300;
  margin: 0 0 20px 0;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: riff-hero-fade-in-up 1.2s ease-out;
  line-height: 1.2;
}

/* ヒーローサブタイトル */
.riff-works-hero-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 40px 0;
  line-height: 1.8;
  opacity: 0.95;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  animation: riff-hero-fade-in-up 1.2s ease-out 0.3s both;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ヒーローボタンラッパー */
.riff-works-hero-button-wrapper {
  margin-top: 40px;
  animation: riff-hero-fade-in-up 1.2s ease-out 0.6s both;
}

/* ヒーローボタン */
.riff-works-hero-button {
  display: inline-block;
  padding: 18px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.riff-works-hero-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.riff-works-hero-button:hover::before {
  left: 0;
}

.riff-works-hero-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
  color: #ffffff;
}

.riff-works-hero-button:active {
  transform: translateY(-1px);
}

/* ヒーローが有効な場合のコンテナ調整 */
.has-works-hero .riff-works-container {
  padding-top: 40px;
}

.has-works-hero .riff-works-title {
  margin-top: 0;
}

/* 通常のコンテナはそのまま */
.no-works-hero .riff-works-container {
  padding-top: 60px;
}

/* アニメーション定義 */
@keyframes riff-hero-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* デスクトップ用の視差効果 */
@media (min-width: 1200px) {
  .riff-works-hero {
    background-attachment: fixed;
  }
  
  .riff-works-hero-content {
    padding: 80px 30px;
  }
  
  .riff-works-hero-title {
    font-size: 4rem;
    letter-spacing: 4px;
  }
  
  .riff-works-hero-subtitle {
    font-size: 1.4rem;
  }
}

/* 大型画面用調整 */
@media (min-width: 1400px) {
  .riff-works-hero-title {
    font-size: 4.5rem;
    letter-spacing: 5px;
  }
  
  .riff-works-hero-subtitle {
    font-size: 1.5rem;
  }
  
  .riff-works-hero-content {
    padding: 100px 40px;
  }
}

/* iPadおよびタブレット用調整 */
@media (max-width: 1199px) and (min-width: 768px) {
  .riff-works-hero {
    background-attachment: scroll;
    min-height: calc(var(--works-hero-height, 400px) * 0.8);
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
  }
  
  .riff-works-hero-title {
    font-size: 3rem;
    letter-spacing: 2px;
  }
  
  .riff-works-hero-subtitle {
    font-size: 1.2rem;
  }
  
  .riff-works-hero-content {
    padding: 50px 25px;
  }
  
  .riff-works-hero-container {
    padding: 0 30px;
  }
}

/* スマートフォン用調整 */
@media (max-width: 767px) {
  .riff-works-hero {
    background-attachment: scroll;
    min-height: calc(var(--works-hero-height, 400px) * 0.7);
    background-position: center center;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    left: 50%;
    right: 50%;
  }
  
  .riff-works-hero-container {
    padding: 0 15px;
  }
  
  .riff-works-hero-content {
    padding: 40px 15px;
    text-align: center;
  }
  
  .riff-works-hero-title {
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    line-height: 1.3;
  }
  
  .riff-works-hero-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.6;
    padding: 0 10px;
  }
  
  .riff-works-hero-button {
    padding: 15px 30px;
    font-size: 1rem;
    letter-spacing: 0.5px;
  }
  
  .riff-works-hero-button-wrapper {
    margin-top: 30px;
  }
}

/* 極小画面用調整 */
@media (max-width: 480px) {
  .riff-works-hero {
    min-height: calc(var(--works-hero-height, 400px) * 0.6);
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
  }
  
  .riff-works-hero-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }
  
  .riff-works-hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding: 0 5px;
  }
  
  .riff-works-hero-button {
    padding: 12px 25px;
    font-size: 0.95rem;
  }
  
  .riff-works-hero-content {
    padding: 30px 10px;
  }
  
  .riff-works-hero-container {
    padding: 0 10px;
  }
}

/* テキスト配置オプション */
.riff-works-hero[data-text-align="left"] .riff-works-hero-content {
  text-align: left;
}

.riff-works-hero[data-text-align="right"] .riff-works-hero-content {
  text-align: right;
}

.riff-works-hero[data-text-align="center"] .riff-works-hero-content {
  text-align: center;
}

/* 横スクロール防止 */
body {
  overflow-x: hidden;
}

/* コンテナからのはみ出し対策 */
.riff-works-hero {
  box-sizing: border-box;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .riff-works-hero-title,
  .riff-works-hero-subtitle {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }
  
  .riff-works-hero-button {
    border: 2px solid #ffffff;
  }
}

/* 動きを減らす設定への対応 */
@media (prefers-reduced-motion: reduce) {
  .riff-works-hero-title,
  .riff-works-hero-subtitle,
  .riff-works-hero-button-wrapper {
    animation: none;
  }
  
  .riff-works-hero-button {
    transition: none;
  }
  
  .riff-works-hero-button:hover {
    transform: none;
  }
  
  .riff-works-hero {
    background-attachment: scroll;
  }
}

/* プリント用スタイル */
@media print {
  .riff-works-hero {
    background: #f8f9fa !important;
    color: #333 !important;
    min-height: auto !important;
    page-break-inside: avoid;
    width: 100% !important;
    margin: 0 !important;
    left: auto !important;
    right: auto !important;
  }
  
  .riff-works-hero-overlay {
    display: none;
  }
  
  .riff-works-hero-title {
    color: #333 !important;
    text-shadow: none !important;
    font-size: 24pt !important;
  }
  
  .riff-works-hero-subtitle {
    color: #666 !important;
    text-shadow: none !important;
    font-size: 14pt !important;
  }
  
  .riff-works-hero-button {
    display: none;
  }
}

/* ダークモード対応（将来のため） */
@media (prefers-color-scheme: dark) {
  .riff-works-hero {
    --works-hero-bg-color: #1a1a1a;
  }
}

/* フォーカス状態のアクセシビリティ対応 */
.riff-works-hero-button:focus {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

/* スクリーンリーダー用の隠しテキスト */
.riff-works-hero .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 特定のテーマやプラグインとの競合対策 */
.riff-works-hero,
.riff-works-hero * {
  box-sizing: border-box;
}

/* WordPressのデフォルトコンテナ制約を回避 */
.riff-works-hero {
  clear: both;
}

/* 一部のテーマで設定される可能性のある制約を無効化 */
.site-content .riff-works-hero,
.main-content .riff-works-hero,
.content-area .riff-works-hero {
  width: 100vw !important;
  max-width: none !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  left: 50% !important;
  right: 50% !important;
}

/* メインコンテナ */
.riff-works-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* ページタイトル */
.riff-works-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    letter-spacing: 2px;
}

.riff-works-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 説明文 */
.riff-works-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 60px;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* エリア切り替えタブ */
.riff-works-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.riff-works-tab {
    padding: 15px 30px;
    background: #ffffff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    color: #555;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.riff-works-tab::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.riff-works-tab span {
    position: relative;
    z-index: 2;
}

.riff-works-tab:hover::before,
.riff-works-tab.active::before {
    left: 0;
}

.riff-works-tab:hover,
.riff-works-tab.active {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 施工事例コンテンツエリア */
.riff-works-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.riff-works-area {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.riff-works-area.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* エリアタイトル */
.riff-works-area-title {
    font-size: 2.2rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    letter-spacing: 1px;
}

.riff-works-area-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 施工事例グリッド */
.riff-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
	margin-top: 4em;
}

/* 施工事例アイテム */
.riff-works-item {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.riff-works-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 20px;
}

.riff-works-item:hover::before {
    opacity: 1;
}

.riff-works-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* アイテム画像エリア */
.riff-works-item-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.riff-works-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.riff-works-item:hover .riff-works-item-image img {
    transform: scale(1.1);
}

/* アイテムコンテンツ */
.riff-works-item-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.riff-works-item .riff-works-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.riff-works-item .riff-works-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 400;
}

.riff-works-item h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.riff-works-item:hover h3 {
    color: #667eea;
}

.riff-works-item .riff-works-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.riff-works-item .riff-works-more {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.riff-works-item .riff-works-more::after {
    content: "→";
    font-weight: bold;
    transition: transform 0.3s ease;
}

.riff-works-item:hover .riff-works-more::after {
    transform: translateX(5px);
}

.riff-works-item .riff-works-more:hover {
    color: #764ba2;
}

/* 検索・フィルター機能 */
.riff-works-search {
    margin-bottom: 40px;
    text-align: center;
}

.riff-works-search-input {
    width: 100%;
    max-width: 500px;
    padding: 18px 25px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.riff-works-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.riff-works-search-input::placeholder {
    color: #aaa;
}

/* ページネーション */
.riff-works-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.riff-works-pagination a,
.riff-works-pagination span {
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.riff-works-pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.riff-works-pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ローディング状態 */
.riff-works-loading {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 1.1rem;
}

.riff-works-loading::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: riff-spin 1s linear infinite;
    margin-right: 15px;
    vertical-align: middle;
}

@keyframes riff-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 404メッセージ */
.riff-works-no-results {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 1.1rem;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 40px 0;
}

.riff-works-no-results::before {
    content: "🔍";
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
}

/* 検索結果なしメッセージ */
.riff-works-no-search-results {
    text-align: center;
    padding: 50px 20px;
    color: #888;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    margin-top: 30px;
}

.riff-works-no-search-results::before {
    content: "🔍";
    font-size: 2rem;
    display: block;
    margin-bottom: 15px;
}

/* レスポンシブデザイン */
@media (max-width: 1199px) {
    .riff-works-container {
        padding: 40px 15px;
    }
    
    .riff-works-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .riff-works-title {
        font-size: 2.5rem;
    }
    
    .riff-works-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .riff-works-tabs {
        padding: 20px 15px;
    }
    
    .riff-works-tab {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .riff-works-container {
        padding: 30px 15px;
    }
    
    .riff-works-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .riff-works-description {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .riff-works-tabs {
        flex-direction: column;
        align-items: center;
        padding: 20px 10px;
        gap: 10px;
    }
    
    .riff-works-tab {
        width: 100%;
        max-width: 250px;
        text-align: center;
        padding: 15px 25px;
    }
    
    .riff-works-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .riff-works-content {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .riff-works-area-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .riff-works-item-image {
        height: 200px;
    }
    
    .riff-works-item-content {
        padding: 20px;
    }
    
    .riff-works-search-input {
        width: 100%;
        max-width: none;
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    
    .riff-works-pagination {
        gap: 8px;
        margin-top: 40px;
    }
    
    .riff-works-pagination a,
    .riff-works-pagination span {
        padding: 10px 15px;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .riff-works-container {
        padding: 20px 10px;
    }
    
    .riff-works-title {
        font-size: 1.8rem;
    }
    
    .riff-works-item-image {
        height: 180px;
    }
    
    .riff-works-item h3 {
        font-size: 1.2rem;
    }
    
    .riff-works-pagination a,
    .riff-works-pagination span {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* アニメーション */
@keyframes riff-fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.riff-works-area.active {
    animation: riff-fadeIn 0.6s ease-in-out;
}

/* スムーズスクロール */
.riff-works-container {
    scroll-behavior: smooth;
}

/* アクセシビリティ対応 */
.riff-works-tab:focus,
.riff-works-search-input:focus,
.riff-works-more:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .riff-works-container {
        color: #000;
        background: #fff;
    }
    
    .riff-works-tab {
        border-color: #000;
    }
    
    .riff-works-item {
        border-color: #000;
    }
}

/* 動きを減らす設定への対応 */
@media (prefers-reduced-motion: reduce) {
    .riff-works-tab,
    .riff-works-item,
    .riff-works-more,
    .riff-works-search-input,
    .riff-works-pagination a {
        transition: none;
    }
    
    .riff-works-area.active {
        animation: none;
    }
    
    .riff-works-loading::before {
        animation: none;
    }
    
    .riff-works-item:hover {
        transform: none;
    }
}

/* プリント用スタイル */
@media print {
    .riff-works-container {
        color: #000;
        background: #fff;
        font-size: 12pt;
        padding: 0;
    }
    
    .riff-works-tabs,
    .riff-works-search,
    .riff-works-pagination {
        display: none;
    }
    
    .riff-works-item {
        border: 1px solid #ccc;
        margin-bottom: 15px;
        break-inside: avoid;
        box-shadow: none;
    }
    
    .riff-works-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .riff-works-item-image {
        height: auto;
        max-height: 200px;
    }
}

/* ===================================================================
   オプション1: ヘッダー直下から開始（上部余白削除）
   ================================================================ */

/* ページ上部の余白をリセット */
.has-works-hero .site-main,
.has-works-hero .main-content,
.has-works-hero .content-area,
.has-works-hero .primary {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ヒーローセクションの上部マージンを削除 */
.riff-works-hero {
  margin-top: 0 !important;
  padding-top: 0;
}

/* ヘッダー直下に配置 */
.has-works-hero .site-header + .site-main .riff-works-hero,
.has-works-hero .header + .main .riff-works-hero,
.has-works-hero .site-header ~ * .riff-works-hero {
  margin-top: 0 !important;
}

/* 一般的なテーマのコンテンツエリア上部余白を無効化 */
.has-works-hero .site-content,
.has-works-hero .main-content,
.has-works-hero .content-wrap,
.has-works-hero .container {
  padding-top: 0 !important;
}

/* RIFFテーマ専用の調整 */
.has-works-hero .riff-works-container {
  margin-top: 4em !important;
  padding-top: 0 !important;
}

/* その他の可能性のあるクラスの上部余白を削除 */
.has-works-hero .page-content,
.has-works-hero .entry-content,
.has-works-hero .post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}