/* --- 全体のスタイル --- */
*, *::before, *::after {
    box-sizing: border-box; /* サイズ計算を簡単にする */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 0;
}
h1, h2, h3 {
    font-weight: 600;
}
h2 {
    font-size: 28px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #00bcd4; /* メインの青色 */
    margin: 10px auto 0;
}
a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}
a:hover {
    opacity: 0.8;
}

/* 汎用ボタンスタイル */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-primary {
    background-color: #00bcd4;
    color: #fff;
}
.btn-primary:hover {
    background-color: #0097a7;
    color: #fff;
}
.btn-secondary {
    background-color: #fff;
    color: #00bcd4;
    border: 2px solid #00bcd4;
}
.btn-secondary:hover {
    background-color: #f4f4f4;
    color: #00bcd4;
}

/* --- 1. ヘッダー --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: #fff; /* 背景は白 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* 薄い影 */
    position: relative; /*
    /* (ヒーロー画像の上に重ねる場合は position: absolute; background: transparent; にする) */
}
.logo {
    font-size: 20px;
    font-weight: bold;
}
.logo a {
    color: #333;
}
.logo span {
    font-size: 12px;
    color: #555;
    display: block;
}
/* WordPressメニューのCSS */
header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
header nav li {
    margin-left: 25px;
}
header nav a {
    font-weight: 500;
    color: #333;
}

/* --- 2. ヒーローセクション --- */
.hero {
    /* (front-page.php専用) */
    padding: 150px 5% 150px; /* ヘッダー分padding-topを少し減らす */
    /* !!! 画像の指定 !!! */
    background-image: url('https://dummyimage.com/1600x800/e0f7fa/ffffff.png&text=Hero+Image');
    background-color: #e0f7fa;
    background-size: cover;
    background-position: center;
}
.hero-content {
    max-width: 550px;
}
.hero h1 {
    font-size: 40px;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.3;
}
.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    text-align: left;
}
.hero .hero-buttons .btn {
    margin-right: 15px;
}

/* --- 3. 記事検索 --- */
.search-section {
    background-color: #fff;
}
.search-bar {
    width: 80%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center; /* アイコンを中央揃え */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.search-bar i {
    padding: 0 15px;
    color: #aaa;
}
.search-bar input {
    flex-grow: 1;
    border: none;
    padding: 15px;
    font-size: 16px;
}
.search-bar input:focus {
    outline: none;
}
.category-tabs {
    text-align: center;
}
.category-tabs .tab {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 20px;
    background-color: #eee;
    color: #555;
    font-size: 14px;
    cursor: pointer;
}
.category-tabs .tab.active,
.category-tabs .tab:hover {
    background-color: #00bcd4;
    color: #fff;
}
.category-tabs .tab.active a,
.category-tabs .tab:hover a {
    color: #fff;
}

/* --- 4. 選ばれる理由 --- */
.features {
    background-color: #f9f9f9;
}
.features-subtitle {
    text-align: center; 
    margin-top: -30px; 
    margin-bottom: 40px; 
    color: #555;
}
.features-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}
.feature-box {
    flex: 1;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-color: #00bcd4;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin: 0 auto 20px;
}
.feature-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
}
.feature-box p {
    font-size: 15px;
    text-align: left;
}
.features-hp-button {
    text-align: center; 
    margin-top: 40px;
}

/* --- 5. 最新記事 (と 記事一覧) --- */
.latest-posts,
.archive-posts {
    background-color: #fff;
}
.posts-grid {
    display: grid; /* FlexboxよりGridが均等配置に便利 */
    grid-template-columns: repeat(3, 1fr); /* 3カラム */
    gap: 30px;
}
.post-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column; /* 中身を縦に積む */
}
.post-card a {
    display: block;
}
.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #ccc;
    display: block;
}
.post-content {
    padding: 20px;
    flex-grow: 1; /* カードの高さを揃えるためにflex-grow */
    display: flex;
    flex-direction: column;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.post-category a {
    background-color: #00bcd4;
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}
.post-time {
    font-size: 13px;
    color: #888;
}
.post-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}
.post-content h3 a {
    color: #333;
}
.post-content h3 a:hover {
    color: #00bcd4;
}
.post-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1; /* 抜粋文の長さを揃える */
}
.post-tags {
    margin-bottom: 15px;
}
.post-tags .tag {
    display: inline-block;
    font-size: 12px;
    color: #777;
    margin-right: 10px;
}
.read-more {
    font-size: 14px;
    color: #00bcd4;
    font-weight: bold;
    margin-top: auto; /* 「続きを読む」を一番下に固定 */
}

/* --- 6. CTAセクション --- */
.cta-section {
    background-color: #00bcd4;
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.cta-section h2 {
    color: #fff;
    font-size: 24px;
}
.cta-section h2::after {
    display: none;
}
.cta-section p {
    font-size: 16px;
    margin-bottom: 40px;
}
.cta-boxes {
    display: flex;
    justify-content: center;
    gap: 30px;
}
.cta-box {
    flex-basis: 400px;
    background-color: rgba(255,255,255, 0.1);
    padding: 25px;
    border-radius: 10px;
}
.cta-box h3 {
    font-size: 22px;
    margin-bottom: 10px;
    text-align: center;
    color: #fff;
}
.cta-box .sub-text {
    font-size: 14px;
    margin-bottom: 25px;
    text-align: center;
}
.cta-box .btn {
    background-color: #fff;
    color: #00bcd4;
    width: 100%;
}
.all-posts-btn {
    margin-top: 40px;
    background-color: rgba(0,0,0, 0.2);
    color: #fff;
}
.all-posts-btn:hover {
    background-color: rgba(0,0,0, 0.3);
    color: #fff;
}

/* --- 7. フッター --- */
footer {
    background-color: #263238;
    color: #ccc;
    padding: 60px 5%;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 30px;
}
.footer-about, .footer-links, .footer-contact {
    flex: 1;
}
.footer-about h4 a {
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
}
.footer-about p {
    font-size: 14px;
    padding-right: 20px;
}
.footer-links h4, .footer-contact h4 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 15px;
}
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #ccc;
}
.footer-links a:hover {
    color: #fff;
}
.footer-contact p {
    font-size: 14px;
    margin-bottom: 20px;
}
.footer-contact .btn {
    background-color: #00bcd4;
    color: #fff;
    border: none;
}

/* --- 8. アーカイブページ用スタイル --- */
.archive-hero {
    padding: 80px 5%;
    background-color: #e0f7fa; /* ヒーロー画像と似た色 */
    text-align: center;
}
.archive-hero h1 {
    font-size: 36px;
    margin-bottom: 10px;
}
.archive-description {
    font-size: 16px;
    color: #555;
}
.archive-filter {
    background-color: #fff;
    padding-top: 40px;
}
.search-results-count {
    text-align: left;
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
/* ページネーション */
.navigation.pagination {
    margin-top: 40px;
}
.page-numbers {
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.page-numbers.current {
    background-color: #00bcd4;
    color: #fff;
    border-color: #00bcd4;
}

/* --- 9. 記事詳細 (single.php) / 固定ページ (page.php) --- */
.single-post-container,
.page-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    max-width: 800px; /* 本文の幅を制限 */
    margin: 40px auto;
}
.single-post-container h1,
.page-container h1 {
    text-align: left;
    font-size: 32px;
}
.post-thumbnail {
    margin: 20px 0;
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.post-content-area,
.page-content-area {
    font-size: 16px;
    line-height: 1.8;
}
.post-content-area h2,
.page-content-area h2 {
    font-size: 24px;
    margin: 30px 0 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
    text-align: left;
}
.post-content-area h2::after,
.page-content-area h2::after {
    display: none; /* 記事本文中のh2の下線は消す */
}
.post-content-area p,
.page-content-area p {
    margin-bottom: 20px;
}

/* --- レスポンシブ対応 (簡易) --- */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr); /* 2カラム */
    }
    .features-grid, .cta-boxes, .footer-container {
        flex-direction: column; /* 縦積み */
    }
}
@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr; /* 1カラム */
    }
    header {
        flex-direction: column;
        gap: 15px;
    }
    .hero-content {
        padding-top: 60px; /* ヘッダーが縦積みになった分 */
    }
}