/*
Theme Name: BENTEN Web Works
Description: 大阪市港区を拠点とするWeb制作会社BENTEN Web WorksのWordPressテーマ
Version: 1.0.0
Author: BENTEN Web Works
Text Domain: benten
*/

/* CSS リセット・基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'BIZ UDGothic', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 変数定義 */
:root {
    --main-color: #ffffff;
    --accent-color: #2d8f47;
    --accent-light: #4da661;
    --text-color: #333333;
    --text-gray: #666666;
    --section-padding: 80px 0;
    --container-max-width: 1200px;
    --dark-bg: #1a2332;
    --dark-secondary: #2d3748;
    --dark-text-primary: #ffffff;
    --dark-text-secondary: #a0aec0;
    --dark-text-muted: #718096;
}

/* ヘッダースタイル */
.header-bg {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-bg.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

/* ロゴの表示調整 */
.logo-image {
    opacity: 1 !important;
    max-width: 150px;
    height: auto;
}

/* ロゴのホバー効果 */
header a:hover img {
    transform: scale(1.05);
}

/* ナビゲーションリンクのスタイル */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* フッタースタイル */
.footer-bg {
    background-color: rgba(45, 64, 86, 1) !important;
    z-index: 2 !important;
    position: relative;
}

/* WordPress用の追加スタイル */
.wp-content {
    margin-top: 80px;
    /* 固定ヘッダーの分だけマージンを追加 */
}

.current-menu-item a {
    color: var(--accent-color) !important;
}

.current-menu-item a::after {
    width: 100% !important;
}

/* ブログ記事カードのスタイル */
.blog-card {
    transition: all 0.3s ease;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* カテゴリータグのスタイル */
.category-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
    margin-bottom: 6px;
}

/* DX - グレー系 */
.category-dx {
    background-color: #f3f4f6;
    color: #374151;
}

/* WEBデザイン - 青系 */
.category-web-design,
.category-webdesign {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* Security - 赤系 */
.category-security {
    background-color: #ffebee;
    color: #c62828;
}

/* お知らせ - ピンク系 */
.category-news,
.category-oshirase {
    background-color: #fce7f3;
    color: #be185d;
}

/* 制作実績 - 黄色/オレンジ系 */
.category-works,
.category-seisaku-jisseki {
    background-color: #fef3c7;
    color: #d97706;
}

/* ブログ - 緑系 */
.category-blog {
    background-color: #d1fae5;
    color: #059669;
}

/* 旧カテゴリ（互換性のため残す） */
.category-design {
    background-color: #e3f2fd;
    color: #1976d2;
}

.category-marketing {
    background-color: #fff3e0;
    color: #f57c00;
}

.category-technology {
    background-color: #d1fae5;
    color: #059669;
}

/* WordPress投稿・ページのスタイル */
.entry-content {
    line-height: 1.8;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.entry-content h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.entry-content h2 {
    font-size: 2rem;
    color: var(--accent-color);
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-gray);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.entry-content a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-content a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* 投稿メタ情報 */
.entry-meta {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: var(--accent-color);
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* コメントフォーム */
.comment-form {
    margin-top: 2rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(45, 143, 71, 0.2);
}

.comment-form .error {
    border-color: #e53e3e;
}

/* ウィジェット */
.widget {
    margin-bottom: 2rem;
}

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

.widget li {
    margin-bottom: 0.5rem;
}

.widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--accent-color);
}

/* 検索フォーム */
.search-form {
    display: flex;
    margin-bottom: 1rem;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.search-form input[type="submit"] {
    padding: 0.75rem 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form input[type="submit"]:hover {
    background-color: var(--accent-light);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .wp-content {
        margin-top: 60px;
    }

    .entry-content h1 {
        font-size: 2rem;
    }

    .entry-content h2 {
        font-size: 1.5rem;
    }

    .entry-content h3 {
        font-size: 1.25rem;
    }

    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
    }

    .mobile-menu ul {
        flex-direction: column;
        padding: 1rem 0;
    }

    .mobile-menu li {
        margin: 0.5rem 0;
    }

    .mobile-menu a {
        display: block;
        padding: 0.75rem 1rem;
        color: white;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .mobile-menu a:hover {
        color: var(--accent-color);
    }
}

/* アクセシビリティ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* プリント用スタイル */
@media print {

    .header,
    .footer,
    .mobile-menu-toggle,
    .back-to-top {
        display: none !important;
    }

    .wp-content {
        margin-top: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }

    p,
    li {
        orphans: 3;
        widows: 3;
    }
}