/*
Theme Name: リツアンWiki
Theme URI: https://example.com/
Description: 社内Wiki用カスタムテーマ
Author: リツアン
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: simple-theme
*/

/* ========================================
   リセット & ベーススタイル
======================================== */

/* CSS変数 - 色の一元管理 */
:root {
    --link-color: #0080ec; /* 爽やかな青色 */
    --link-hover-color: #005edf; /* ホバー時の濃い青 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
}

/* ========================================
   ヘッダー
======================================== */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
@media (max-width: 768px) {
.site-header {
    padding: .4rem .6rem .4rem 1rem;
}
}
.header-container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.site-logo {
    height: 18px;
    width: auto;
    display: block;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    position: relative;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
    display: block;
}

/* メニューが開いている時 */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   ナビゲーションメニュー
======================================== */
.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s;
}

.main-nav.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s;
}

.nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background-color: #222;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
}

.main-nav.active .nav-content {
    transform: translateX(0);
}

.nav-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
.nav-header {
    padding: .4rem .7rem;
}
}
.nav-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    font-size: 0;
    opacity: 0;
    transform: rotate(-90deg);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.nav-close::before,
.nav-close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #fff;
}

.nav-close::before {
    transform: rotate(45deg);
}

.nav-close::after {
    transform: rotate(-45deg);
}

.main-nav.active .nav-close {
    opacity: 1;
    transform: rotate(0deg);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.3rem;
    color: #fff !important;
    text-decoration: none;
    font-size: 1.125rem;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.submenu-toggle {
    font-size: 0.875rem;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
}

.submenu-toggle img {
    width: 14px;
    height: auto;
    display: block;
}

.nav-item.submenu-active .submenu-toggle {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.nav-item.submenu-active .submenu {
    max-height: 500px;
}

.submenu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submenu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9) !important;
}

.submenu-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.submenu-icon img {
    width: 100%;
    height: 100%;
    filter: invert(1) brightness(1.2);
}

/* ========================================
   TOPページ
======================================== */
.top-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #999;
}

/* お知らせエリア */
.news-area {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 0;
}

.news-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* カルーセル */
.news-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.news-slides {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.news-slide {
    display: none;
    animation: fadeIn 0.5s;
}

.news-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.news-slide a {
    display: block;
    padding: 1rem .5em;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s;
}

.news-slide a:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--link-hover-color);
}

.news-date {
    font-size: 0.7rem;
    color: #888;
}

.news-title {
    font-size: 1rem;
}

.news-nav {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem 0.4rem;
    line-height: 1;
    transition: color 0.3s;
}

.news-nav:hover {
    color: #333;
}

.news-nav img {
    width: 10px;
    height: auto;
    display: block;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.news-nav:hover img {
    opacity: 1;
}

.news-dots {
    position: absolute;
    bottom: -1.3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s;
}

.news-dot.active {
    background-color: #333;
}

.news-dot:hover {
    background-color: #999;
}

/* 検索エリア */
.search-area {
    margin: 1.5rem 0 3rem;
}

.search-area h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: .7rem;
}

.search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: #333;
    background-color: #fff;
}

.search-form input[type="search"]::placeholder {
    color: #ccc;
}

.search-form button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

.search-form button img {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

/* PC版：検索窓を大きく目立たせる */
@media (min-width: 768px) {
    .search-area h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .search-form {
        width: 60%;
        max-width: none;
    }

    .search-form input[type="search"] {
        padding: 1.5rem 4rem 1.5rem 2rem;
        font-size: 1.25rem;
        background-color: #fff;
        border: 2px solid #ddd;
    }

    .search-form input[type="search"]:focus {
        border-color: #333;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .search-form button {
        right: 1.5rem;
    }

    .search-form button img {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* メインメニュー */
.main-menu {
    margin-bottom: 3rem;
}

.menu-grid {
    display: grid;
    gap: .6rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-item:hover {
    border-color: var(--link-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.menu-icon {
    font-size: 3rem;
    min-width: 40px;
    text-align: center;
}

.menu-icon img {
    width: 2.5rem;
    height: 2.5rem;
    display: block;
    margin: 0 auto;
}

.menu-label {
    font-size: 1.125rem;
    font-weight: 500;
    color: #000;
    transition: color 0.3s;
}

.menu-item:hover .menu-label {
    color: var(--link-hover-color);
}

/* PC版：ボタンを大きく、縦に積む */
@media (min-width: 768px) {
    .menu-item {
        flex-direction: column;
        justify-content: center;
        padding: 3rem 2rem;
        gap: 7px;
        min-height: 200px;
    }

    .menu-icon {
        font-size: 4rem;
        min-width: auto;
    }

    .menu-icon img {
        width: 5rem;
        height: 5rem;
    }

    .menu-label {
        font-size: 1.5rem;
    }
}

/* よく使う手続き */
.quick-links {
    margin-bottom: 3rem;
}

.quick-links h2 {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.tag-item {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--link-color);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--link-color);
    transition: all 0.3s;
}

.tag-item:hover {
    background-color: var(--link-color);
    color: #fff !important;
    border-color: var(--link-color);
}

/* AI相談ボタン */
.ai-button-area {
    text-align: center;
    margin-bottom: 2rem;
}

.ai-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: 2px solid #ff4444;
    border-radius: 50px;
    color: #ff4444;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.ai-button:hover {
    background-color: #ff4444;
    color: #fff;
}

/* ========================================
   記事ページ
======================================== */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: .5rem 1rem 2rem;
}

/* パンくずリスト */
.breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    font-size: 0.8rem;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '-';
    margin-left: 0.5rem;
    color: #999;
}

.breadcrumb-item a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--link-hover-color);
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 500;
}

.breadcrumb-home-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.article-content {
    background-color: #fff;
    padding: 1rem 1rem 2.5rem;
    line-height: 1.8;
    margin-left: -0.7rem;
    margin-right: -0.7rem;
}
.article-content details {
    overflow: visible!important;
}

@media (min-width: 768px) {
    .article-content {
        padding: 1rem 2rem 3rem;
        margin-left: 0;
        margin-right: 0;
    }
}

.article-content h2:not(.faq-title) {
    font-size: 1.6rem;
    margin: 2.4rem 0 .8rem;
    padding: .1em 0 .1em 1.5rem;
    border-left: 1px solid #000;
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 2.2rem 0 -.5rem;
}
.article-content h3:before {
    content: "▼ ";
    display: inline-block;
    font-size: .8em;
    margin: -.3em .5em 0 0;
}

.article-content h4 {
    margin: 1.7em 0 -.5rem;
    padding: 0;
    font-size: 1.2rem;
}
.article-content h5 {
    font-size: 1rem;
    margin: 1.5em 0 -.5rem;
    padding: 0;
    color: #555;
    font-weight: 300;
}
.article-content h5:before {
    content: "● ";
    display: inline-block;
    font-size: .6em;
    margin: -.2em .3em 0 0;
    vertical-align: middle;
}
.article-content h6 {
    font-size: .8rem;
    margin: 1.5em 0 -.5rem;
    padding: 0;
    font-weight: 300;
}

.article-content p {
    margin: 1.2rem 0;
    padding: 0;
}

.article-content ul,
.article-content ol {
    margin: 1.2rem 0;
    padding: 0 0 0 1.5rem;
    list-style-position: outside;
}

.article-content details ul,
.article-content details ol {
    padding-left: 1.5rem;
    list-style-position: inside;
}

.article-content li {
    margin: 0 0 0.1em 0;
}

.article-content a {
    color: var(--link-color);
    text-decoration: underline;
    transition: color 0.2s;
}

.article-content a:hover {
    color: var(--link-hover-color);
}

.article-content a[target="_blank"]::after {
    content: '';
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-left: 0.2em;
    margin-right: .2em;
    vertical-align: middle;
    background-color: currentColor;
    mask-image: url('images/blank.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('images/blank.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

/* ボタン */
.wp-block-buttons {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}
.wp-block-buttons .wp-block-button__link {
    background-color: var(--link-color);
    color: #fff !important;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    border: 2px solid var(--link-color);
}

.wp-block-buttons .wp-block-button__link:hover {
    background-color: var(--link-hover-color);
    color: #fff !important;
    border-color: var(--link-hover-color);
}

/* アウトラインボタン */
.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--link-color) !important;
    border: 2px solid var(--link-color);
}

.wp-block-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--link-color);
    color: #fff !important;
    border-color: var(--link-color);
}

/* 引用 */
.article-content blockquote {
    margin: 1.2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #ccc;
    background-color: #f9f9f9;
    font-style: italic;
    color: #666;
}

/* コードブロック */
.article-content .wp-block-code,
.article-content pre {
    margin: 1.2rem 0;
    padding: 1rem;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
}

/* テーブル */
.article-content table {
    width: auto;
    border-collapse: collapse;
    margin: 1.2rem 0;
    padding: 0;
    border: 1px solid #ddd;
    table-layout: auto;
}

.article-content table.has-fixed-layout {
    margin: 0;
    table-layout: fixed;
    width: auto;
}

/* スマホでは100%幅 */
@media (max-width: 767px) {
    .article-content table {
        width: 100%;
    }
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
    line-height: 1.4em;
}

.article-content th {
    background-color: #f5f5f5;
    font-weight: 600;
    border-bottom: 1px solid #ddd !important;
}

.article-content .wp-block-table thead {
    border-bottom: none;
}

/* スマホ版：横スクロール対応 */
@media (max-width: 767px) {
    .article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        /* スクロールシャドウ - スクロール可能な部分に影を表示 */
        background-image:
            linear-gradient(to right, white, white),
            linear-gradient(to right, white, white),
            linear-gradient(to right, rgba(0, 0, 0, .15), rgba(255, 255, 255, 0)),
            linear-gradient(to left, rgba(0, 0, 0, .15), rgba(255, 255, 255, 0));
        background-position: left center, right center, left center, right center;
        background-repeat: no-repeat;
        background-color: white;
        background-size: 20px 100%, 20px 100%, 10px 100%, 10px 100%;
        background-attachment: local, local, scroll, scroll;
    }

    .article-content th,
    .article-content td {
        white-space: nowrap;
    }
}

/* 詳細表示（details/summary） */
.article-content details,
.wp-block-details {
    margin: 1.2rem 0;
    padding: 0 1.5rem;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.article-content details[open],
.wp-block-details[open] {
    background-color: #fff;
    border-color: #333;
}

.article-content summary {
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3em;
    cursor: pointer;
    user-select: none;
    list-style: none;
    position: relative;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.article-content summary::-webkit-details-marker {
    display: none;
}

.article-content summary:not(.faq-question)::before {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-60%);
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    transition: all 0.3s ease;
}

.article-content details[open] summary:not(.faq-question)::before,
.wp-block-details[open] summary::before {
    content: '×';
    transform: translateY(-40%) rotate(180deg);
}

.article-content summary:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.article-content details > *:not(summary) {
    animation: slideDown 0.3s ease;
}
.article-content details ul,
.article-content details ol  {
    padding-left: 1.2rem;
}
.article-content details  li {
    text-indent: -1.2rem;
}}
.article-content details li:marker {
    margin-right: .5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* アコーディオンブロック */
.wp-block-accordion-heading {
    position: relative;
    padding: 1.2rem 3rem 1.2rem 1.5rem;
    cursor: pointer;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none !important;
}

.wp-block-accordion-heading span {
    text-decoration: none !important;
}

.wp-block-accordion-heading .wp-block-accordion-heading__icon {
    display: none;
}

.wp-block-accordion-heading::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    font-weight: 300;
    transition: all 0.3s ease;
}

.wp-block-accordion-heading[aria-expanded="true"]::after {
    content: '×';
    font-size: 2.5rem;
    transform: translateY(-50%) rotate(180deg);
}

.wp-block-accordion-heading:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ========================================
   FAQ セクション
======================================== */
.faq-section {
    margin-top: 5rem;
    padding: 2rem;
    background-color: #eefdfb;
    border-radius: 8px;
    border: 1px solid #b7e6e1;
}
.faq-section p {
    margin-bottom: 0;
}
@media (max-width: 768px) {
.faq-section {
    padding: 1.5rem 1rem 2rem;
}
}

.faq-title {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    text-align: center;
    margin-top: 0!important;
    padding: 0!important;
    background: none!important;
    color: #2ba79a;
}

.faq-item {
    background-color: transparent!important;
    border-left: 0!important;
    border-right: 0!important;
    padding-left: 0!important;
    padding-right: 0!important;
    margin: -1px 0 0!important;
    border-color: #b7e6e1!important;
    border-radius: 0!important;
}

.faq-item[open] {
    background-color: #fff;
    border-color: #888;
}

.faq-question {
    padding: 1rem 3rem 1rem 1.5rem!important;
    font-size: 1em!important;
    font-weight: 300!important;
    cursor: pointer;
    position: relative;
    list-style: none;
    user-select: none;
    display: flex;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::marker {
    display: none;
}
.faq-question:hover {
    background-color: transparent!important;
}

.faq-question::before {
    content: 'Q.';
    width: 1em;
    margin-right: 0.3rem;
}

.faq-item[open] .faq-question {
    font-weight: bold!important;
}

.faq-question::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url('images/ic_arw_down.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1rem 1.5rem;
    color: #333;
    line-height: 1.8;
    display: flex;
}
.faq-answer p {
    margin-top: 0;
}

.faq-answer::before {
    content: 'A. ';
    font-weight: bold;
    margin-right: 0.3rem;
}

/* ========================================
   アーカイブページ
======================================== */
.archive-container {
    max-width: 800px;
    margin: 0 auto;
    padding: .5rem 1rem 2rem;
}

.archive-header {
    margin: 2rem 0 1.5rem;
    text-align: left;
}

.archive-title {
    font-size: 1.8rem;
    font-weight: normal;
    text-align: center;
    font-weight: bold;
}

.search-result-header {
    margin-bottom: 10px;
}

.search-result-title {
    font-size: 1rem;
    font-weight: normal;
    text-align: left;
    margin: 0;
}

/* 検索結果のハイライト */
.search-highlight {
    background-color: #fff8dc;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    font-weight: inherit;
}

.post-list {
    list-style: none;
}

.post-item {
    background-color: #fff;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-item-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.post-item-meta {
    font-size: 0.875rem;
    color: #666;
}

.post-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-item-link:hover {
    opacity: 0.8;
}

.post-item-content {
    flex: 1;
}

.post-item-arrow {
    margin-left: 1rem;
    color: #000;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.post-item-title a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   アコーディオン
======================================== */
.accordion-container {
    margin-bottom: 2rem;
}

.accordion-item {
    background-color: #f8f8f8;
    margin-bottom: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .accordion-header {
        padding: 1.25rem 1.5rem;
    }
}

.accordion-header:hover {
    background-color: #f0f0f0;
}

.accordion-header:hover .accordion-count {
    background-color: #d0d0d0;
}

.accordion-header[aria-expanded="true"] {
    background-color: #e1e1e1;
}

.accordion-header[aria-expanded="true"] .accordion-count {
    background-color: #c0c0c0;
}

.accordion-title {
    font-weight: 500;
    font-size: 1.125rem;
    flex: 1;
}

.accordion-count {
    font-size: 0.75rem;
    color: #666;
    background-color: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-right: 1rem;
    transition: background-color 0.2s;
}

.accordion-category-icon {
    display: flex;
    align-items: center;
    margin-right: calc(0.75rem + 3px);
}

.accordion-category-icon img {
    width: 36px;
    height: 36px;
    display: block;
}

.accordion-icon {
    transition: transform 0.3s;
    color: #000;
    display: flex;
    align-items: center;
}

.accordion-icon img {
    width: 17px;
    height: auto;
    display: block;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0;
}

/* カードグリッド */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 767px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.category-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    border-color: var(--link-hover-color);
}

.category-card:hover .card-title {
    color: var(--link-hover-color);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-title {
    font-size: 0.95625rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.post-card .card-icon img {
    opacity: 0.6;
}

/* 記事一覧カード */
.article-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: .8rem 0 2rem;
}

.article-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.article-card:hover .article-card-title {
    color: var(--link-hover-color);
}

.article-card-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.article-card-arrow {
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    color: var(--link-color);
    font-size: 1.25rem;
}

@media (max-width: 767px) {
    .article-card-link {
        flex-direction: column;
    }
}

.article-card-thumbnail {
    width: 240px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f5f5f5;
}

@media (max-width: 767px) {
    .article-card-thumbnail {
        width: 100%;
        height: 200px;
    }
}

.article-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8e8e8;
    color: #999;
    font-size: 0.875rem;
}

.article-card-content {
    padding: 1.5rem;
    flex: 1;
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: normal;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    color: var(--link-color);
    transition: color 0.3s;
}

.article-card-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #666;
}

.article-card-meta {
    font-size: 0.875rem;
    color: #999;
}

.accordion-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-post-item {
    border-bottom: 1px solid #f0f0f0;
}

.accordion-post-item:last-child {
    border-bottom: none;
}

.accordion-post-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    transition: all 0.3s;
}

.accordion-post-item a:hover {
    background-color: #f9f9f9;
}

.accordion-post-item .post-title {
    flex: 1;
    font-size: 1.125rem;
}

.accordion-post-item .post-arrow {
    font-size: 1.2rem;
    color: var(--link-color);
    margin-left: 1rem;
}

.no-posts {
    padding: 1.5rem;
    text-align: center;
    color: #999;
}

/* ========================================
   困ったときページ - 横スクロールフィルター
======================================== */
.filter-nav-container {
    margin: 3rem 0 1rem;
    position: relative;
}

.filter-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 0.5rem;
}

.filter-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.filter-btn {
    flex-shrink: 0;
    padding: 0.5rem 1.25rem;
    border: 1px solid #333;
    border-radius: 50px;
    background-color: #fff;
    color: #333;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: #f5f5f5;
}

.filter-btn.active {
    background-color: #333;
    color: #fff;
}

/* ========================================
   困ったときページ - 記事リスト
======================================== */
.articles-list {
    margin-bottom: 2rem;
}

.article-item {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.article-item.hidden {
    display: none;
}

.article-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

.article-link:hover {
    color: var(--link-hover-color);
    background-color: #f9f9f9;
}

.article-title-text {
    flex: 1;
    font-size: 1rem;
}

.article-arrow {
    margin-left: 1rem;
    color: currentColor;
    font-size: 1.25rem;
}

.no-articles {
    padding: 2rem;
    text-align: center;
    color: #999;
}

/* ========================================
   フッター
======================================== */
.site-footer {
    background-color: #f5f5f5;
    padding: 2rem 1rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content p {
    margin: 0;
    color: #666;
    font-size: 0.7875rem;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.5rem;
    }
}
