/*
Theme Name: simplemodern_bnc
Theme URI: 
Author: Trae AI
Author URI: 
Description: 各記事をカード形式でトップページに表示するWordPressテーマです。各記事カテゴリ毎にカードが一覧で表示され、各カテゴリ毎のトップページ最大表示記事数を管理画面で設定出来ます。カテゴリの表示順序をドラッグ&ドロップで変更できる機能も搭載しています。
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.0
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simplemodern_bnc
Tags: blog, fashion, portfolio, custom-colors, custom-logo, custom-menu, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, dark-mode, category-ordering
*/

/* Base Styles */
:root {
    --primary-color: #888888; /* グレーに変更 */
    --secondary-color: #666666; /* ダークグレーに変更 */
    --text-color: #333;
    --background-color: #fff;
    --light-gray: #f8f8f8;
    --dark-gray: #333333;
    --footer-bg: #f8f8f8;
    --footer-text: #333;
}

/* ダークモード用の変数 */
[data-theme="dark"] {
    --primary-color: #aaaaaa; /* ダークモード用の明るいグレーに変更 */
    --secondary-color: #888888; /* ダークモード用のグレーに変更 */
    --text-color: #f8f8f8;
    --background-color: #222;
    --light-gray: #444;
    --dark-gray: #ddd;
    --footer-bg: #333;
    --footer-text: #f8f8f8;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

/* レイアウト設定 - デフォルトは2カラム */
.content-area {
    width: 70%;
    margin-right: 0;
}

.widget-area {
    width: 25%;
    margin-left: 0;
}

/* 1カラムレイアウト用のスタイル */
.one-column .content-area {
    width: 100%;
    float: none;
}

.one-column .widget-area {
    display: none;
}

/* Header Styles - 2段レイアウト */
.site-header {
    background-color: var(--background-color);
    position: relative;
    z-index: 100;
}

/* 上部ヘッダー */
.header-top {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 15px 0;
}

/* 下部ヘッダー */
.header-bottom {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 10px 0;
}

.header-bottom .container {
    justify-content: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex: 1;
    text-align: center;
}

.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    max-height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover {
    color: var(--primary-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

/* 固定ページメニュー */
.fixed-pages-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.fixed-page-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.fixed-page-link:hover {
    color: var(--primary-color);
}

.menu-separator {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* カテゴリナビゲーション - パイプ区切りスタイル */
.category-navigation {
    background-color: var(--background-color);
}

.category-menu {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.category-menu-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.category-menu-link:hover {
    color: var(--primary-color);
}



/* ダークモード対応 */
[data-theme="dark"] .category-navigation {
    border-bottom-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .category-menu-link:hover {
    background-color: rgba(255,255,255,0.05);
}

/* ダークモードボタン - よりシンプルに */
.dark-mode-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0.7;
    flex-shrink: 0;
    min-width: 34px;
}

.dark-mode-toggle:hover {
    background-color: rgba(0,0,0,0.05);
    opacity: 1;
}

/* 削除されたメニュー関連のスタイル - 不要になったため削除 */

/* Article Card Styles */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--category-border-color, var(--primary-color));
    padding-bottom: 10px;
}

.resource-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, var(--card-width-pc, 300px));
    gap: 20px;
}

.resource-card {
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    background-color: var(--background-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.resource-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.resource-thumbnail {
    margin-bottom: 15px;
    text-align: center; /* 画像を中央揃えにする場合 */
}

.resource-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px; /* 画像の角を少し丸める */
}

.resource-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.resource-description {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 15px;
    height: 60px; /* 3行分程度の高さを確保 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 表示する行数を3行に制限 */
    -webkit-box-orient: vertical;
}

.resource-links a {
    display: inline-block;
    background-color: var(--button-color, var(--primary-color));
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

.resource-links a:hover {
    background-color: var(--button-hover-color, var(--secondary-color));
    color: #fff;
}

/* レスポンシブデザイン - シンプルなヘッダー用 */
@media (max-width: 767px) {
    .header-container {
        padding: 0 15px;
        min-height: 60px;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
}

/* Footer Styles */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    margin-bottom: 30px;
}

.footer-widget-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-widget {
    width: 30%;
    margin-bottom: 20px;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    width: 100%;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.footer-menu li {
    margin: 0 10px;
}

/* ダークモード切替ボタン */
.dark-mode-toggle {
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--text-color);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 101;
}

.dark-mode-toggle:hover {
    color: var(--primary-color);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* ダークモード時のアイコン表示切り替え */
[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: none;
}

[data-theme="light"] .dark-mode-toggle .moon-icon,
.dark-mode-toggle .moon-icon /* 初期状態（JS未処理またはlightモード）で月を非表示 */ {
    display: none;
}

[data-theme="light"] .dark-mode-toggle .sun-icon {
    display: inline-block;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
    display: inline-block;
}


/* レスポンシブスタイル */
@media (max-width: 767px) {
    .header-top .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .header-controls {
        align-self: flex-end;
        gap: 12px;
        flex-wrap: wrap;
    }

    .fixed-pages-menu {
        gap: 6px;
    }

    .fixed-page-link {
        font-size: 0.85rem;
    }

    .header-bottom .container {
        padding: 0 20px;
        justify-content: flex-start;
    }

    .category-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: max-content;
    }

    .category-menu-link {
        font-size: 0.9rem;
    }


}

/* Removed duplicate media query - consolidated above */
@media screen and (max-width: 768px) {
    .resource-cards-container {
        grid-template-columns: repeat(auto-fit, var(--card-width-mobile, 100%));
        flex-direction: column;
    }
    
    .content-area,
    .one-column .content-area {
        width: 100%;
        float: none;
    }
    
    /* スマートフォン表示時はサイドバーを非表示にする */
    .widget-area {
        display: none;
    }
    
    .footer-widget {
        width: 100%;
    }
    
    /* スマホ表示でのヘッダーレイアウト調整 */
    .site-branding {
        text-align: left;
    }
    
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-controls {
        align-self: flex-end;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    

    
    .category-menu-link {
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    /* 削除されたナビゲーション関連のスタイル */
    
    .dark-mode-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 0;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 101;
        background-color: rgba(255, 255, 255, 0.7);
        border-radius: 8px;
        width: auto;
        min-width: 30px;
        height: 30px;
    }
    
    .dark-mode-toggle .dark-mode-label {
        font-size: 0.8rem;
        font-weight: bold;
        margin-left: 2px;
    }
    
    /* アイコンを表示するために削除 */
    
    [data-theme="dark"] .dark-mode-toggle {
        background-color: rgba(50, 50, 50, 0.7);
    }
}

/* 追加のキャッシュバスティング対策 */
body * {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* シンプルな区切り文字スタイル */
.category-separator {
    display: inline-block;
    color: #333333;
    margin: 0 5px;
    font-size: 1.2rem;
    font-weight: 700;
}