/*
=================================================
Modern Design Enhancement for Meijie2023
モダンデザイン強化 CSS
=================================================

このファイルをテーマに追加することで、
元のデザインを大きく変えずに現代的な見た目にアップグレードします。

使用方法:
1. このファイルを /css/modern-enhancement.css として保存
2. functions.php に以下を追加:

wp_enqueue_style( 'meijie2023-modern', 
    get_template_directory_uri() . '/css/modern-enhancement.css', 
    array('meijie2023-style'), 
    '1.0.0' 
);
*/

/* ========================================
   1. モダンカラーパレット
   ======================================== */
:root {
    /* メインカラー - 洗練されたブルー */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    
    /* アクセントカラー */
    --accent-color: #8b5cf6;
    
    /* ニュートラルカラー - より柔らかく */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* 背景色 - 温かみのあるグレー */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-hover: #f3f4f6;
    
    /* ボーダー - 控えめに */
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    /* シャドウ - 奥行き感 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    
    /* トランジション */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   2. タイポグラフィの改善
   ======================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", 
                 "Hiragino Sans", "Hiragino Kaku Gothic ProN", 
                 "Yu Gothic", "Meiryo", sans-serif !important;
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(1.875rem, 5vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

/* ========================================
   3. リンクの改善
   ======================================== */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

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

a:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: 2px;
}

/* リンク下線エフェクト */
.entry-content a:not(.button),
.comment-content a:not(.button) {
    background-image: linear-gradient(var(--primary-light), var(--primary-light));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s;
}

.entry-content a:not(.button):hover,
.comment-content a:not(.button):hover {
    background-size: 100% 2px;
}

/* ========================================
   4. ボタンの刷新
   ======================================== */
button,
.button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--border-radius-sm);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

button:hover,
.button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

button:active,
.button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* ボタンリップルエフェクト */
button::before,
.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
.button:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   5. カードスタイル（投稿、ページ）
   ======================================== */
.entry,
article {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.entry:hover,
article:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title a {
    color: var(--text-primary);
    font-weight: 700;
}

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

/* ========================================
   6. フォームの改善
   ======================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: var(--bg-primary);
}

/* ========================================
   7. ナビゲーションの改善
   ======================================== */
.main-navigation {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

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

/* サブメニュー */
.main-navigation ul ul {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-sm);
    margin-top: 0.5rem;
}

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

.site-branding {
    padding: 1.5rem 0;
}

.site-title {
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0;
    letter-spacing: -0.02em;
}

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

/* ========================================
   9. フッターの改善
   ======================================== */
.site-footer {
    background: linear-gradient(to bottom, var(--bg-secondary) 0%, #e5e7eb 100%);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

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

/* ========================================
   10. ウィジェットの改善
   ======================================== */
.widget {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.widget a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.widget a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* ========================================
   11. 検索フォームの改善
   ======================================== */
.search-form {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.search-submit {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    padding: 0.75rem 1.5rem;
}

/* ========================================
   12. コメントの改善
   ======================================== */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.comment-content {
    color: var(--text-secondary);
}

.reply a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-hover);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.reply a:hover {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   13. ページネーションの改善
   ======================================== */
.navigation,
.pagination {
    margin: 2rem 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   14. アイキャッチ画像の改善
   ======================================== */
.post-thumbnail {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

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

/* ========================================
   15. テーブルの改善
   ======================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background: var(--bg-hover);
}

/* ========================================
   16. レスポンシブ調整
   ======================================== */
@media screen and (max-width: 768px) {
    :root {
        --border-radius: 8px;
    }
    
    .entry,
    article {
        padding: 1.5rem;
    }
    
    button,
    .button,
    input[type="button"],
    input[type="reset"],
    input[type="submit"] {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* ========================================
   17. アニメーション
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.entry,
article {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   18. スクロールバーのカスタマイズ
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   19. 選択テキストのスタイル
   ======================================== */
::selection {
    background: var(--primary-light);
    color: white;
}

::-moz-selection {
    background: var(--primary-light);
    color: white;
}

/* ========================================
   20. ダークモード対応（オプション）
   ======================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-hover: #374151;
        --border-color: #374151;
    }
    
    .site-header {
        background-color: rgba(31, 41, 55, 0.95);
    }
}

/* ========================================
   終了
   ======================================== */
