/*
Theme Name: My Custom Theme
Author: Self
Description: Final Fixed Version (Block Widget Support)
Version: 7.0
*/

/* --- 基本設定 --- */
body { 
    margin: 0; 
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; 
    line-height: 1.8; 
    color: #333; 
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; transition: 0.3s; color: #333; }
a:hover { opacity: 0.7; }
img { max-width: 100%; height: auto; vertical-align: bottom; }

/* --- ヘッダーレイアウト --- */
header {
    padding-top: 50px; padding-bottom: 40px; 
    margin-bottom: 0 !important; 
    background-color: #e5e5e5; 
}
.header-flex-wrapper {
    display: flex; justify-content: space-between; align-items: flex-end; width: 100%;
}
.site-branding { max-width: 70%; }
.site-title { margin: 0; font-size: 28px; font-weight: bold; line-height: 1.2; }
.site-description { margin: 5px 0 0 0; font-size: 14px; opacity: 0.8; }

/* --- AIボタン --- */
.header-ai-area { padding-bottom: 5px; }
.ai-sphere-btn {
    display: flex; justify-content: center; align-items: center;
    width: 60px; height: 60px;
    border-radius: 50% !important;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.8) 0%, rgba(50,50,50,1) 40%, rgba(0,0,0,1) 100%);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 -5px 15px rgba(255,255,255,0.1);
    color: #fff !important; font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2);
}
.ai-sphere-btn:hover { transform: scale(1.1); }

/* --- ナビゲーション --- */
nav {
    width: 100%; margin-top: 0 !important; padding: 5px 0 !important;
    line-height: 1.2 !important; display: block;
}
nav ul { 
    list-style: none; padding: 0; margin: 0; 
    display: flex; align-items: center; gap: 30px; 
}
nav ul li a { font-weight: bold; display: block; padding: 5px 0; }

/* --- レイアウト枠 --- */
.site-content { display: flex; justify-content: space-between; padding: 50px 0; }
.main-area { width: 70%; }
.sidebar { width: 25%; }

/* --- 投稿記事のデザイン --- */
article, .post, .type-post {
    border-bottom: 1px solid #ccc;
    padding-bottom: 40px; margin-bottom: 40px; display: block;
}
article:last-child { border-bottom: none; margin-bottom: 0; }

h2.entry-title, .entry-title a {
    font-size: 24px; margin-bottom: 15px; margin-top: 0;
    border-left: 5px solid #333; padding-left: 15px; display: block;
}
.read-more a { color: #e57373; font-weight: bold; display: inline-block; margin-top: 10px; }

/* --- サイドバー（★ここを強力に修正しました） --- */
.sidebar .widget, 
.sidebar > div { /* ブロックウィジェットの箱 */
    margin-bottom: 40px; 
}

/* ありとあらゆるサイドバーのタイトルに線を引く指定 */
.sidebar .widget-title, 
.sidebar h2, 
.sidebar h3, 
.sidebar .wp-block-search__label, /* 検索ブロックのラベル */
.sidebar .wp-block-group__inner-container h2 {
    font-size: 18px;
    border-bottom: 2px solid #333 !important; /* 強制的に線を引く */
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: block;
    width: 100%;
    font-weight: bold;
}

/* リストの見た目調整 */
.sidebar ul { padding-left: 20px; }

/* --- フッター --- */
.site-footer { padding: 30px 0; margin-top: 50px; }

/* --- スマホ対応 --- */
@media (max-width: 768px) {
    .site-content, .header-flex-wrapper { flex-direction: column; }
    .header-flex-wrapper { align-items: center; text-align: center; }
    .main-area, .sidebar { width: 100%; }
    nav { width: 100%; }
}