@charset "UTF-8";
/*
Theme Name: YOYOYA BLOG
Author: Your Name
Version: 1.0
Description: ニューモーフィズムを採用したモダンな自作テーマ
*/

/* ==========================================================================
   Variables (変数定義)
   ========================================================================== */
:root {
  --color-base: #E9E9EE;
  --color-accent: #58BCDE;
  --font-family-base: 'Futura', sans-serif;

  /* Font Sizes */
  --text-12: 12px;
  --text-14: 14px;
  --text-18: 18px;
  --text-24: 24px;
  --text-32: 32px;
  --text-40: 40px;
  --text-48: 48px;
  --text-56: 56px;
  --text-64: 64px;
}

/* ==========================================================================
   Base & Utilities (ベース・汎用クラス)
   ========================================================================== */
body {
  background-color: var(--color-base);
  font-family: var(--font-family-base);
  color: #333333;
  margin: 0;
  padding: 0;
}

/* WordPress標準クラス（body_class）との競合リセット */
body.tag, body.archive, body.category {
  display: block !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background-color: var(--color-base) !important;
}

/* ページ全体のスムーススクロール */
html { scroll-behavior: smooth; }

.font-normal { font-weight: normal; }
.font-bold { font-weight: bold; }
.text-12 { font-size: var(--text-12); }
.text-14 { font-size: var(--text-14); }
.text-18 { font-size: var(--text-18); }
.text-24 { font-size: var(--text-24); }
.text-32 { font-size: var(--text-32); }
.text-40 { font-size: var(--text-40); }
.text-48 { font-size: var(--text-48); }
.text-56 { font-size: var(--text-56); }
.text-64 { font-size: var(--text-64); }
.text-accent { color: var(--color-accent); }

/* エフェクト */
.effect-float {
  box-shadow: -4px -6px 13px #ffffff, 4px 4px 18px rgba(0, 0, 0, 0.20);
  background-color: var(--color-base);
}
.effect-sink {
  box-shadow: inset -4px -4px 2px rgba(255, 255, 255, 0.33), inset 4px 4px 7px rgba(0, 0, 0, 0.07);
  background-color: var(--color-base); 
}

/* ==========================================================================
   Header Layout (ヘッダー)
   ========================================================================== */
.site-header {
  width: 100%;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1440px;
  height: 160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between; 
  padding: 0 60px;
  box-sizing: border-box;
}

.site-logo {
  font-size: var(--text-48);
  color: #333333;
  text-decoration: none;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.global-nav {
  padding: 16px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 16px;
  align-items: center;
}

.nav-item {
  display: block;
  font-size: var(--text-24);
  color: #333333;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
}

.nav-item.active {
  background-color: var(--color-accent);
  color: #ffffff;
  box-shadow: inset -4px -4px 2px rgba(255, 255, 255, 0.33), inset 4px 4px 7px rgba(0, 0, 0, 0.07);
}

/* PC表示時はモバイル用アイコンを確実に隠す */
.mobile-icon-btn { display: none; }

/* ==========================================================================
   Main Layout & Container (レイアウトの大枠)
   ========================================================================== */
.site-main { padding: 40px 0; }
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 60px;
  box-sizing: border-box;
  display: flex;
  gap: 40px;
}
.main-content {
    flex: 1;
    max-width: 912px;
    padding-right: 40px;
    border-right: 2px solid #D1D1D8;
    box-sizing: border-box; /* コメントアウト(/* */)を外して有効化！ */
    /* min-width: 800px; は削除（はみ出しの最大の原因です） */
}

.sidebar {
    width: 420px; /* flex: 1 の代わりに、サイドバーの基本の太さを指定します */
    max-width: 420px;
    flex-shrink: 1; /* 0から1に変更！ これで画面幅に合わせて縮小してくれます */
    min-width: 0;
}

/* ==========================================================================
   Common Components (共通パーツ：ボタン、タグ、見出し)
   ========================================================================== */
/* カテゴリボタン＆セクションヘッダー */
.top-category-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}
.cat-btn {
  flex: 1;
  text-align: center;
  padding: 16px 0;
  border-radius: 20px;
  color: #333333;
  text-decoration: none;
  transition: opacity 0.2s;
}
.cat-btn:hover { opacity: 0.7; }
.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.section-header-flex .section-title { margin-bottom: 0; }
.view-more-link {
  font-size: var(--text-14);
  color: #333333;
  text-decoration: none;
  opacity: 0.6;
  font-weight: bold;
}
.view-more-link:hover { opacity: 1; }
.section-title { margin-bottom: 24px; }

/* タグ共通デザイン */
.tag, .tag-small, .category-tag {
  padding: 8px 16px;
  border-radius: 999px;
  color: #333333;
  text-decoration: none;
  white-space: nowrap;    
  flex-shrink: 0;        
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-14); 
}
.category-list .category-tag { font-size: var(--text-18); }
.post-tags, .grid-tags, .recent-post-tags {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  gap: 16px;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  min-width: 0; 
  width: 100%;
}
.post-tags { flex: 1; }
.category-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}
.post-tags::-webkit-scrollbar,
.grid-tags::-webkit-scrollbar,
.category-list::-webkit-scrollbar,
.recent-post-tags::-webkit-scrollbar { display: none; }

/* ==========================================================================
   Post Cards (記事カード)
   ========================================================================== */
.post-card {
  position: relative;
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 30px 32px;
  border-radius: 32px;
  width: 100%;            
  max-width: 872px;
  align-items: center;
  box-sizing: border-box;
}
.post-card .read-more::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10;
}
.post-title {
  width: 100%;
  font-size: var(--text-32);
  margin: 0;
  line-height: 1.5;
  color: #333333;
}
.post-content {
  flex: 1;                
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0; 
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;  
  min-width: 0; 
}
.post-date {
  color: #333333;
  flex-shrink: 0; 
}
.post-excerpt {
  width: 100%;
  margin: 0;
  line-height: 1.6;
}
.read-more {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 40px;
  border-radius: 999px;
  color: #333333;
}
.post-thumbnail {
  width: 350px;
  height: 195px;
  flex-shrink: 0; 
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.post-thumbnail::after, .single-thumbnail::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  box-shadow: inset -4px -4px 2px rgba(255, 255, 255, 0.33), inset 4px 4px 7px rgba(0, 0, 0, 0.07);
  pointer-events: none;   
  z-index: 2;             
}
.post-thumbnail::after { border-radius: 16px; }
.single-thumbnail::after { border-radius: 20px; }
.post-thumbnail img, .single-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
}

/* ==========================================================================
   Grid Cards (下部の2連カード)
   ========================================================================== */
.design-posts-section { margin-top: 48px; }
.post-grid {
  display: flex;
  gap: 24px;
  width: 100%;            
  max-width: 872px;
}
.grid-card {
  width: calc(50% - 12px);
  padding: 32px 24px;
  border-radius: 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.grid-thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 376 / 280; 
  border-radius: 16px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.grid-title, .grid-excerpt { margin: 0; }

/* ==========================================================================
   Sidebar Widgets (サイドバー)
   ========================================================================== */
.search-widget, .category-widget, .recent-posts-widget { margin-bottom: 40px; }
.search-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-radius: 999px;
  width: 100%;
  box-sizing: border-box;
}
.search-input {
  appearance: none; -webkit-appearance: none;
  border: none !important;
  background: transparent !important;
  outline: none; box-shadow: none;
  font-size: var(--text-18);
  font-family: var(--font-family-base);
  color: #333333;
  width: 100%; margin-right: 16px;
}
.search-input::-webkit-search-decoration, .search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-input::placeholder { color: #999999; }
.search-submit {
  appearance: none; -webkit-appearance: none;
  border: none !important; background: transparent !important;
  padding: 0; cursor: pointer; flex-shrink: 0;
}
.search-icon-svg { width: 18px; height: 18px; transition: opacity 0.2s ease; }
.search-submit:hover .search-icon-svg { opacity: 0.7; }
.widget-title { margin: 0 0 18px 0; line-height: 1.2; }
.recent-posts-list { display: flex; flex-direction: column; gap: 24px; }
.recent-post-card {
  padding: 24px; border-radius: 24px;
  display: flex; flex-direction: column; gap: 12px; box-sizing: border-box;
}
/* サイドバーのテキスト溢れ対策・行数省略 */
.recent-post-title, .recent-post-excerpt {
  margin: 0; line-height: 1.4; color: #333333;
  width: 100%; max-width: 100%;
  word-break: break-all !important;
  overflow-wrap: break-word !important;
}
.recent-post-excerpt {
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; 
}

/* ==========================================================================
   Archive Page (一覧ページ)
   ========================================================================== */
.archive-header { margin-bottom: 40px; }
.archive-divider { border: none; border-top: 2px dashed rgba(0,0,0,0.2); margin-top: 16px; }
.archive-list { display: flex; flex-direction: column; gap: 24px; }
.archive-item {
  display: flex; gap: 24px; padding: 24px;
  border-radius: 24px; text-decoration: none; color: inherit;
}
.archive-thumb {
  width: 200px; aspect-ratio: 16 / 9;
  border-radius: 12px; flex-shrink: 0; overflow: hidden;
}
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.archive-info { display: flex; flex-direction: column; justify-content: space-between; flex: 1; }
.archive-post-title { margin: 0; line-height: 1.5; }
.archive-post-date { align-self: flex-end; opacity: 0.6; }

/* ==========================================================================
   Single Post (記事詳細ページ)
   ========================================================================== */
.single-article {
  padding: 60px;
  border-radius: 40px;
  background-color: var(--color-base);
  width: 100%;
  box-sizing: border-box;
}
.single-title { margin: 0 0 32px 0; line-height: 1.4; color: #333333; }
.single-thumbnail {
  width: 100%; height: auto; aspect-ratio: 16 / 9;
  border-radius: 20px; overflow: hidden; margin-bottom: 56px; position: relative;
}
.single-content { color: #333333; }
.single-content p {
  font-size: var(--text-18);
  line-height: 1.8;  letter-spacing: 0.05em;
	margin-top:0px;
}
/* 見出しとスクロール位置調整 */
.single-content h2, .single-content h3 {
  font-weight: bold;
  border-radius: 999px;
  background-color: var(--color-base);
  scroll-margin-top: 60px; 
}
.single-content h2 {
  font-size: var(--text-24);
  padding: 8px 16px; 
  box-shadow: -4px -6px 13px #ffffff, 4px 4px 18px rgba(0, 0, 0, 0.20);
}
.single-content h3 {
  font-size: var(--text-18);
  padding: 12px 24px; margin: 8px 0 8px 0;
  box-shadow: inset -4px -4px 2px rgba(255, 255, 255, 0.33), inset 4px 4px 7px rgba(0, 0, 0, 0.07);
  display: inline-block;
}

/* 目次デザインと装飾リセット */
.single-toc, .sidebar-toc-widget { text-align: center; }
.single-toc {
  padding: 32px 48px; border-radius: 24px;
  width: fit-content; min-width: 300px; margin: 0 auto 56px;
}
.sidebar-toc-widget { padding: 32px; border-radius: 32px; margin-top: 32px; }
.single-toc .toc-title, .sidebar-toc-widget .toc-title { margin-bottom: 24px; }
.single-toc ul, .sidebar-toc-widget ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.single-toc li { font-size: var(--text-14); margin-bottom: 12px; }
.sidebar-toc-widget li { font-size: var(--text-12); margin-bottom: 12px; }
.single-toc ul ul, .sidebar-toc-widget ul ul { padding-left: 24px; margin-top: 12px; margin-bottom: 0; }
.single-toc a, .sidebar-toc-widget a { color: #333333; text-decoration: none; transition: opacity 0.2s ease; }
.single-toc a:hover, .sidebar-toc-widget a:hover { opacity: 0.5; }

/* ==========================================================================
   Mobile Overlay Menus (スマホ用オーバーレイ画面)
   ========================================================================== */
.mobile-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background-color: rgba(233, 233, 238, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 9999; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-overlay.is-active { opacity: 1; visibility: visible; }
.mobile-close-btn {
  position: absolute; top: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%; border: none; padding: 0;
  background-color: var(--color-base);
  box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px rgba(0, 0, 0, 0.15);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mobile-close-btn:active { box-shadow: inset -4px -4px 4px rgba(255, 255, 255, 0.5), inset 4px 4px 4px rgba(0, 0, 0, 0.1); }
.mobile-nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; text-align: center; }
.mobile-nav-item {
  display: block; padding: 16px 48px; border-radius: 999px;
  font-size: var(--text-24); font-weight: bold; color: #333333; text-decoration: none;
  background-color: var(--color-base);
  box-shadow: -4px -4px 10px #ffffff, 4px 4px 10px rgba(0, 0, 0, 0.15);
}
.mobile-nav-item:active { box-shadow: inset -4px -4px 4px rgba(255, 255, 255, 0.5), inset 4px 4px 4px rgba(0, 0, 0, 0.1); }

/* ==========================================================================
   Footer Layout
   ========================================================================== */
/* --- フッター --- */
.site-footer {
    padding: 32px 20px;
    margin-top: 60px; /* メインコンテンツとの余白 */
	background-color:#58BCDE;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 14px;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
/* 	align-content:right; */
}

.footer-links a {
    font-size: 14px;
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* ▼ スマホ用（レスポンシブ対応） ▼ */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column-reverse; /* コピーライトを一番下にする */
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: 32px; /* スマホではタップしやすいように間隔を広げる */
    }
}

/* --- 作品ページ用グリッド --- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.work-card {
    padding: 20px;
    border-radius: 20px;
}
.work-thumbnail {
    width: 100%;
    height: 180px; /* 長方形の高さ */
    border-radius: 12px;
}

/* ==========================================================================
   Responsive (モバイル用レイアウトの統合)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  /* ヘッダー周りとアイコン表示 */
  .header-inner { height: 80px; padding: 0 20px; position: relative; justify-content: center; }
  .site-logo img { height: 32px !important; }
  .global-nav { display: none; }
  .mobile-icon-btn {
    display: flex; align-items: center; justify-content: center;
    background-color: var(--color-base) !important; border: none; padding: 0;
    width: 44px; height: 44px; border-radius: 50%;
    position: absolute; top: 50%; transform: translateY(-50%); cursor: pointer;
    box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease;
  }
  .mobile-icon-btn:active { box-shadow: inset -4px -4px 4px rgba(255, 255, 255, 0.5), inset 4px 4px 4px rgba(0, 0, 0, 0.1); }
  .mobile-search-btn { left: 16px; }
  .mobile-menu-btn { right: 16px; }

  /* コンテナとサイドバー非表示 */
  .container { padding: 0 16px; flex-direction: column; }
  .main-content { border-right: none; padding-right: 0; width: 100% !important; max-width: 100%; }
  .sidebar { display: none; }

  /* 記事カード（縦並びへ） */
  .section-title { font-size: var(--text-18); margin-bottom: 16px; }
  .post-card { padding: 20px 16px; border-radius: 20px; gap: 16px; flex-direction: column !important; }
  .post-content { gap: 12px; width: 100%; }
  .post-title { font-size: var(--text-18); }
  .post-meta { gap: 16px; }
  .post-date, .post-excerpt { font-size: var(--text-14); }
  .read-more { font-size: var(--text-14); padding: 6px 24px; }
  
  /* サムネイルを上部に強制移動（Flex order） */
  .post-thumbnail {
    order: -1; width: 100% !important; height: auto !important;
    aspect-ratio: 16 / 9; border-radius: 12px; margin-bottom: 8px;
  }
  .post-thumbnail::after { border-radius: 12px; }

  /* 2連グリッド（縦1列へ） */
  .design-posts-section { margin-top: 32px; }
  .post-grid { gap: 24px; flex-direction: column !important; }
  .grid-card { width: 100% !important; padding: 20px 16px; border-radius: 20px; gap: 16px; }
  .grid-thumbnail { width: 100% !important; height: auto !important; aspect-ratio: 376 / 280; }
  .grid-title { font-size: var(--text-24); }
  .grid-excerpt { font-size: 12px; line-height: 1.5; }
  .tag, .tag-small { font-size: 12px; padding: 6px 12px; }

  /* アーカイブ（一覧）ページ */
  .archive-item { flex-direction: column; padding: 16px; gap: 16px; }
  .archive-thumb { width: 100%; }

  /* 記事詳細ページ (single) */
  .single-article { padding: 24px 16px; border-radius: 24px; }
  .single-title { font-size: var(--text-24); margin-bottom: 24px; }
  .single-thumbnail { margin-bottom: 32px; }
  .single-content p { font-size: 16px; line-height: 1.8; }
  .single-toc { width: 100%; box-sizing: border-box; padding: 24px; }
}

@media screen and (max-width: 768px) {
  /* 上部カテゴリボタンを2列に折り返し */
  .top-category-buttons { flex-wrap: wrap; gap: 12px; }
  .cat-btn { width: calc(50% - 6px); flex: none; font-size: 14px; padding: 12px 0; }
}

/* --- コンタクトフォーム用スタイル --- */
.contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto; /* フォーム全体を中央寄せ */
}

.form-label {
    display: block;
    margin-bottom: 32px;
    cursor: pointer;
}

/* 入力欄（テキスト・メール・題名・本文）共通 */
.form-input {
    width: 100%;
    padding: 16px 20px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    background-color: transparent; /* effect-sinkの背景色を活かす */
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    color: inherit;
}

/* 複数行テキストエリアの高さ */
textarea.form-input {
    min-height: 180px;
    resize: vertical; /* 縦方向のみリサイズ可能にする */
}

/* 送信ボタンのレイアウト */
.form-submit-wrap {
    text-align: center;
    margin-top: 48px;
}

.submit-btn {
    padding: 16px 56px;
    border: none;
    border-radius: 30px;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* ボタンをクリックした時の凹みアクション（ニューモーフィズム特有） */
.submit-btn:active {
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.1), 
                inset -4px -4px 8px rgba(255,255,255,0.7) !important;
    transform: translateY(2px);
}

/* ==========================================
   ニューモーフィズム：表（テーブル）スタイル
   大項目（全体）：浮き / 各項目（セル）：沈み
   ========================================== */

/* 1. テーブル全体のラッパー（浮きエフェクト） */
.single-content figure.wp-block-table {
    margin: 32px 0;
    overflow-x: auto;
    border-radius: 48px;
    background: #e3e6ec; /* サイトの背景色に合わせて調整してください */
    box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px #ffffff;
    padding: 16px;
}

/* 2. テーブル本体のレイアウト調整 */
.single-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 8px; /* セルとセルの間に隙間を開けて立体感を際立たせます */
    font-size: 15px;
    line-height: 1.6;
    border: none;
}

/* 3. 各項目（見出しセル th / データセル td）に「沈み」エフェクト */
.single-content table th,
.single-content table td {
    padding: 14px 18px;
    color: #4a4a4a;
    background: #e3e6ec; /* テーブル全体と同じ背景色 */
    border-radius: 9999px;
    /* 内側のシャドウ（inset）で「沈み（凹み）」を表現 */
    box-shadow: inset 4px 4px 8px #bebebe, inset -4px -4px 8px #ffffff;
    border: none; /* 古い境界線を削除 */
}

/* 見出し（th）の文字設定 */
.single-content table th {
    font-weight: bold;
    color: #333333;
}

/* ホバー時の微調整（お好みで） */
.single-content table tr:hover td {
    background: #e8ecf2;
    transition: background 0.2s ease;
}

/* ▼ スマホ用調整 ▼ */
@media (max-width: 768px) {
    .single-content figure.wp-block-table {
        padding: 10px;
    }
    .single-content table th,
    .single-content table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}