/*
Theme Name: Fukasawa Child
Theme URI: https://wordpress.org/themes/fukasawa/
Template: fukasawa
Author: Your Name
Author URI: https://example.com
Description: This is a child theme for Fukasawa
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fukasawa-child
*/

/* ここにカスタムCSSを追加 */

/* 全幅ページテンプレート用の調整 */
.page-template-template-home .full-width-wrapper article {
    background-color: transparent;
}

.page-template-template-home .full-width-wrapper .post-content {
    background-color: transparent;
    padding: 40px;
}

/* トップページで最近の投稿ウィジェットを非表示にする */
.home .widget_fukasawa_recent_posts {
    display: none;
}


/* 全幅レイアウト */
.full-width-content .post-inner.thin,
.full-width-content .post-inner {
    width: 100%;
    max-width: 100% !important;
    padding: 40px;
    margin: 0 auto;
}

.full-width-content .entry-content {
    width: 100%;
    max-width: 100% !important;
}

.full-width-content .book-list-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 40px 0;
}

.full-width-content .book-list {
    width: 100%;
    max-width: 100%;
    padding: 0 40px;
    margin: 0 auto;
}
.widget + .widget:before{
    background-color: #fff;
}
    .blog-title a {
    letter-spacing: 0!important;
}
@media (max-width: 600px) {
    .blog-title a {
        padding: 5px 4px 5px 4px;
        
}
}
/* 強制的に幅を上書き */
.page-template-page-portfolio .post-inner,
.page-template-page-portfolio .entry-content,
.page-template-page-portfolio .book-list-wrapper,
.page-template-page-portfolio .book-list {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    margin: 1.5em 0 0 !important;
}


/* 著書一覧 - 全幅4カラムレイアウト */
.book-list-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 40px 0;
    background: #f9f9f9;
}

.book-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 0 auto;
    max-width: 1600px;
    padding: 0 20px;
    box-sizing: border-box;
}

.book-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.book-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.book-thumbnail {
    height: 0;
    padding-bottom: 90%;
    position: relative;
    overflow: hidden;
}

.book-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.book-content {
    padding: 20px;
}

.book-title {
    margin: 0 0 10px;
    font-size: 1.1em;
    line-height: 1.4;
}

.book-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.book-title a:hover {
    color: #4fbcd1;
}

.book-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.book-link {
    text-align: center;
    margin-top: 15px;
}

.book-link a {
    display: inline-block;
    padding: 8px 20px;
    background: #4fbcd1;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.book-link a:hover {
    background: #fff;
    color: #4fbcd1;
    border-color: #4fbcd1;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .book-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .book-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .book-list {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

/* TOPページヘッダー画像 */
.top-header-image {
    width: 100%;
    margin: 0 0 2em 0;
    overflow: hidden;
}

.top-header-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px; /* 必要に応じて調整 */
    object-fit: cover;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .top-header-image {
        margin: 0 0 1.5em 0;
    }
    
    .top-header-image img {
        max-height: 250px; /* モバイル用の高さ調整 */
    }
}


/* 個別記事のアイキャッチ画像を非表示 */
.single-post .post-header .featured-media {
    display: none !important;
}

/* 個別記事の画像の最大幅を600pxに制限 */
.single-post .featured-media img,
.single-post .post-content img {
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 1.5em;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .single-post .featured-media img,
    .single-post .post-content img {
        max-width: 100%;
        height: auto;
    }
}


/* サイドバーの幅を300pxに設定 */
.sidebar {
    width: 300px;
}

/* メインコンテンツの幅を調整（必要に応じて） */
.content-area {
    width: calc(100% - 300px);
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .sidebar,
    .content-area {
        width: 100%;
    }
}


/* 固定ページメニューのスタイリング */
.main-menu {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    width: 100%;
}

.main-menu li {
    margin-bottom: 8px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 6px;
    overflow: hidden;
}

.main-menu li:last-child {
    margin-bottom: 0;
}

.main-menu li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    background: #f8f9fa;
    border-left: 4px solid transparent;
}

.main-menu li a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #4fbcd1, #6a9ef5);
    transition: all 0.3s ease;
    z-index: -1;
    opacity: 0;
}

.main-menu li a:hover,
.main-menu li.current_page_item > a {
    color: #fff;
    padding-left: 25px;
    border-left-color: #4fbcd1;
}

.main-menu li a:hover:before,
.main-menu li.current_page_item > a:before {
    width: 100%;
    opacity: 1;
}
.form-submit #submit {
    padding: 14px 20px 16px 20px;
    border: none;
    margin: none;
    background: #999;
}
/* 入力フィールドのスタイル */
input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]) {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s ease;
}

input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]):focus {
    border-color: #4fbcd1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 188, 209, 0.2);
}

/* サイドバーのアーカイブウィジェット */
.widget_archive {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.widget_archive h2.widget-title {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

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

.widget_archive li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

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

.widget_archive li a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 5px 0;
    transition: all 0.2s ease;
}

.widget_archive li a:hover {
    color: #4fbcd1;
    padding-left: 5px;
}

.widget_archive select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.widget_archive select:hover {
    border-color: #4fbcd1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget_archive select:focus {
    outline: none;
    border-color: #4fbcd1;
    box-shadow: 0 0 0 2px rgba(79, 188, 209, 0.2);
}


.widget_archive select#archives-dropdown-2:hover {
    border-color: #4fbcd1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.widget_archive select#archives-dropdown-2:focus {
    outline: none;
    border-color: #4fbcd1;
    box-shadow: 0 0 0 3px rgba(79, 188, 209, 0.2);
}

/* ドロップダウンのオプションのスタイル */
.widget_archive select#archives-dropdown-2 option {
    padding: 8px 15px;
    background: #fff;
    color: #333;
}

/* 選択中のオプションのスタイル */
.widget_archive select#archives-dropdown-2 option:checked {
    background-color: #f5f5f5;
    color: #4fbcd1;
    font-weight: 500;
}

/* モバイル対応 */
@media screen and (max-width: 600px) {
    .widget_archive select#archives-dropdown-2 {
        padding: 10px 12px;
        font-size: 13px;
    }
}


/* 検索フォームのスタイリング */
.wp-block-search {
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
}

.wp-block-search__label {
    display: none; /* ラベルを非表示 */
}

.wp-block-search__inside-wrapper {
    display: flex;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.wp-block-search__input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    outline: none;
}

.wp-block-search__input::placeholder {
    color: #999;
    opacity: 0.8;
}

.wp-block-search__button {
    background: #4fbcd1;
    color: white !important;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-block-search__button:hover {
    background: #3ea8bd;
    transform: translateY(-1px);
}

.wp-block-search__button:active {
    transform: translateY(0);
}

.wp-block-search__button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ホバー時のエフェクト */
.wp-block-search__inside-wrapper:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* フォーカス時のスタイル */
.wp-block-search__input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 188, 209, 0.3);
}

.wp-block-search__input::placeholder {
    color: #999;
    opacity: 0.8;
}

.wp-block-search__button {
    background: #4fbcd1;
    color: white !important;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-block-search__button:hover {
    background: #4fbcd1;
    transform: translateY(-1px);
}

.wp-block-search__button:active {
    transform: translateY(0);
}

.wp-block-search__button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ホバー時のエフェクト */
.wp-block-search__inside-wrapper:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* フォーカス時のスタイル */
.wp-block-search__input:focus {
    outline: none;
}

.wp-block-search__inside-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.3);
    border-color: #4fbcd1;
}

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
    .blog-title {
        width: 240px;
        margin: 0 auto;
    }
    .wp-block-search {
        max-width: 100%;
    }
    
    .wp-block-search__button {
        padding: 0 20px;
    }
}


/* サイトタイトルとブログタイトルの改行を有効にする */
.site-title,
.blog-title {
    white-space: pre-line;
    word-wrap: break-word;
    text-align: center;
}

/* サイトタイトルのリンクスタイル */
.site-title a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}


/* ポストコンテナのサイズを固定 */
.post-container {
    height: 320px; /* お好みの高さに調整可能 */
    overflow: hidden;
    position: relative;
}

/* サムネイル画像のスタイル調整 */
.post-container .featured-media {
    height: 200px; /* サムネイルの高さを固定 */
    overflow: hidden;
}

.post-container .featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像をコンテナにフィットさせる */
}

/* テキスト部分のスタイル調整 */
.post-container .post-inner {
    padding: 15px;
    height: calc(100% - 200px); /* サムネイルの高さを引いた残りをテキストエリアに */
    display: flex;
    flex-direction: column;
}

.post-container .post-header {
    margin-bottom: 10px;
    text-align: center;
}

.post-container .post-title {
    text-align: center;
}

.post-container .post-meta {
    margin-bottom: 10px;
}

.post-container .post-excerpt {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* モバイル表示の調整 */
@media screen and (max-width: 720px) {
    .post-container {
        height: auto; /* モバイルでは高さを自動調整 */
    }
    
    .post-container .featured-media {
        height: 180px;
    }
    
    .post-container .post-inner {
        height: auto;
    }
}
