/*
Theme Name: AI Secretary
Theme URI: https://example.com/ai-secretary
Author: AI Secretary Team
Author URI: https://example.com
Description: モダンでSEOに強い女性AI秘書のブログテーマ。AIクローラーが理解しやすい構造化データとセマンティックHTML5を採用。洗練された親しみやすいデザインで、最新のWordPress機能に完全対応。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-secretary
Tags: blog, ai, modern, seo, accessibility-ready, custom-colors, custom-menu, editor-style, featured-images, microformats, post-formats, responsive-design, rtl-language-support, threaded-comments, translation-ready
*/

/* ========================================
   カスタムプロパティ（CSS変数）
   ======================================== */
:root {
  /* カラーパレット - 柔らかく優しい女性的なイメージ */
  --primary-color: #E6B8C3; /* 優しいローズピンク */
  --secondary-color: #F3D5E0; /* 淡いピンク */
  --accent-color: #B8D4E6; /* ソフトブルー */
  --background-color: #FFF9F5;
  --surface-color: #FFFFFF;
  --text-primary: #5A4A42;
  --text-secondary: #8B7B73;
  --text-muted: #B3A9A3;
  --border-color: #F0E8E4;
  --shadow-color: rgba(230, 184, 195, 0.15);

  /* グラデーション */
  --gradient-primary: linear-gradient(135deg, #E6B8C3 0%, #F3D5E0 100%);
  --gradient-soft: linear-gradient(135deg, #FFF9F5 0%, #FFF0F5 100%);
  --gradient-accent: linear-gradient(135deg, #B8D4E6 0%, #E6B8C3 100%);

  /* タイポグラフィ - 柔らかく丸みのあるフォント */
  --font-primary: 'Zen Maru Gothic', 'Rounded Mplus 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-heading: 'Zen Maru Gothic', var(--font-primary);
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;

  /* サイズ */
  --max-width: 1200px;
  --content-width: 760px;
  --sidebar-width: 360px;
  --spacing-unit: 8px;

  /* トランジション */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* シャドウ */
  --shadow-sm: 0 2px 8px var(--shadow-color);
  --shadow-md: 0 4px 16px var(--shadow-color);
  --shadow-lg: 0 8px 32px var(--shadow-color);

  /* ボーダー半径 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* ========================================
   リセット & ベーススタイル
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--background-color);
  overflow-x: hidden;
}

/* ========================================
   タイポグラフィ
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-color);
}

strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.2em 0.4em;
  background: var(--gradient-soft);
  border-radius: var(--radius-sm);
  color: var(--primary-color);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  padding: 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

/* ========================================
   レイアウト
   ======================================== */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヒーロー画像エリア */
.hero-section {
  width: 100%;
  height: 400px;
  background: var(--gradient-soft);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--surface-color);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--surface-color);
}

.hero-description {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--surface-color);
}

/* 2カラムレイアウト */
.site-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 8);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: calc(var(--spacing-unit) * 4);
  align-items: start;
}

.content-area {
  width: 100%;
}

/* サイドバーを右側に固定 */
.widget-area {
  position: sticky;
  top: calc(var(--spacing-unit) * 10);
}

/* ========================================
   ヘッダー
   ======================================== */
.site-header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
}

.site-title {
  font-size: 1.5rem;
  margin: 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.site-title a {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   ナビゲーション
   ======================================== */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  align-items: center;
}

.main-navigation a {
  font-weight: 500;
  color: var(--text-primary);
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  background: var(--gradient-soft);
  color: var(--primary-color);
}

/* ========================================
   記事一覧
   ======================================== */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 4);
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.post-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  padding-top: 60%;
  background: var(--gradient-soft);
}

.post-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-card-content {
  padding: calc(var(--spacing-unit) * 3);
}

.post-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
}

.post-card-title {
  font-size: 1.25rem;
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.4;
}

.post-card-title a {
  color: var(--text-primary);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9375rem;
}

.read-more:hover {
  gap: calc(var(--spacing-unit) * 2);
}

/* ========================================
   個別記事
   ======================================== */
.single-post-header {
  margin-bottom: calc(var(--spacing-unit) * 6);
  text-align: center;
}

.entry-title {
  font-size: 2.5rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.2;
}

.entry-meta {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 3);
  font-size: 0.9375rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: calc(var(--spacing-unit) * 4) 0;
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content h2 {
  margin-top: calc(var(--spacing-unit) * 6);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 2px solid var(--border-color);
}

.entry-content h3 {
  margin-top: calc(var(--spacing-unit) * 5);
}

.entry-content ul,
.entry-content ol {
  padding-left: calc(var(--spacing-unit) * 4);
  margin-bottom: 1.5rem;
}

.entry-content li {
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.entry-content blockquote {
  margin: calc(var(--spacing-unit) * 4) 0;
  padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
  background: var(--gradient-soft);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  font-style: italic;
}

/* ========================================
   フッター
   ======================================== */
.site-footer {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  margin-top: calc(var(--spacing-unit) * 10);
  padding: calc(var(--spacing-unit) * 6) 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  text-align: center;
  color: var(--text-secondary);
}

.footer-branding {
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.footer-branding .site-title {
  font-size: 1.25rem;
}

.footer-navigation ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 3);
  flex-wrap: wrap;
}

.site-info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========================================
   ウィジェット & サイドバー
   ======================================== */
.widget {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: calc(var(--spacing-unit) * 4);
  margin-bottom: calc(var(--spacing-unit) * 3);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 3px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: calc(var(--spacing-unit) * 2);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.widget a {
  color: var(--text-primary);
  display: block;
  transition: color var(--transition-fast);
}

.widget a:hover {
  color: var(--primary-color);
}

/* プロフィールウィジェット */
.profile-widget {
  text-align: center;
}

.profile-widget img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto calc(var(--spacing-unit) * 2);
  border: 4px solid var(--primary-color);
}

.profile-widget .profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.profile-widget .profile-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

/* 最新記事ウィジェット */
.recent-posts-widget li {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  align-items: flex-start;
}

.recent-posts-widget .post-thumbnail {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.recent-posts-widget .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-posts-widget .post-info {
  flex: 1;
}

.recent-posts-widget .post-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.recent-posts-widget .post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================
   パンくずリスト
   ======================================== */
.breadcrumbs {
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding: calc(var(--spacing-unit) * 2) 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs li a:hover {
  color: var(--primary-color);
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: calc(var(--spacing-unit) * 1);
  color: var(--text-muted);
  font-size: 1.125rem;
}

.breadcrumbs li.separator {
  display: none;
}

/* ========================================
   ページネーション
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 2);
  margin: calc(var(--spacing-unit) * 6) 0;
}

.pagination a,
.pagination span {
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.pagination a:hover,
.pagination .current {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
}

/* ========================================
   レスポンシブデザイン
   ======================================== */
@media (max-width: 1024px) {
  .site-content {
    grid-template-columns: 1fr;
  }

  .widget-area {
    position: static;
    order: 2;
  }

  .content-area {
    order: 1;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .hero-section {
    height: 300px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .header-inner {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }

  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .entry-title {
    font-size: 2rem;
  }

  .site-content {
    padding: 0 calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 6);
  }

  .widget {
    padding: calc(var(--spacing-unit) * 3);
  }
}

/* ========================================
   アクセシビリティ
   ======================================== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

.screen-reader-text:focus {
  background-color: var(--surface-color);
  clip: auto !important;
  clip-path: none;
  color: var(--text-primary);
  display: block;
  font-size: 1rem;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ========================================
   ユーティリティクラス
   ======================================== */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  background: var(--gradient-accent);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.highlight-box {
  padding: calc(var(--spacing-unit) * 3);
  background: var(--gradient-soft);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--radius-md);
  margin: calc(var(--spacing-unit) * 3) 0;
}
