/* 発達支援DB フロントエンド用スタイル */

.edu-welfare-search-container {
    padding: 20px 0;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.edu-welfare-title {
    background: #006699;
    color: #fff;
    padding: 15px 10px;
    margin: 0 0 20px;
    font-size: 1.4em;
}

.edu-welfare-description {
    background: #f5f5f5;
    padding: 20px 10px;
    margin-bottom: 20px;
    text-align: left;
}

/* 検索フォーム */
.edu-welfare-search-form {
    border: 1px solid #ddd;
    padding: 20px 10px;
    margin-bottom: 30px;
}

.edu-welfare-keyword-search {
    margin-bottom: 20px;
}

.edu-welfare-keyword-search label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.edu-welfare-keyword-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.edu-welfare-keyword-row input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 1em;
}

/* ボタン - .entry-content a によるcolor上書き防止のため詳細度を上げる */
.entry-content a.edu-welfare-btn,
.edu-welfare-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #666;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
}

.entry-content a.edu-welfare-btn:hover,
.edu-welfare-btn:hover {
    background: #555;
    color: white;
    text-decoration: none;
}

.edu-welfare-btn-primary {
    background: #006699;
}

.edu-welfare-btn-primary:hover {
    background: #005580;
}

.entry-content a.edu-welfare-btn-back,
.edu-welfare-btn-back {
    background: #000000;
}

.entry-content a.edu-welfare-btn-back:hover,
.edu-welfare-btn-back:hover {
    background: #333333;
}

.entry-content a.edu-welfare-btn-top,
.edu-welfare-btn-top {
    background: #006699;
}

.entry-content a.edu-welfare-btn-top:hover,
.edu-welfare-btn-top:hover {
    background: #005580;
}

/* OR/AND トグル */
.edu-welfare-mode-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.edu-welfare-mode-toggle span {
    color: #999;
}

.edu-welfare-mode-toggle span.active {
    color: #006699;
    font-weight: bold;
}

.edu-welfare-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.edu-welfare-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.edu-welfare-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #006699;
    transition: .3s;
    border-radius: 26px;
}

.edu-welfare-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.edu-welfare-switch input:checked + .edu-welfare-slider:before {
    transform: translateX(24px);
}

/* 条件検索 */
.edu-welfare-condition-search {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.edu-welfare-condition-label {
    font-weight: bold;
    margin-bottom: 15px;
}

.edu-welfare-condition-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.edu-welfare-condition-field {
    flex: 1;
    min-width: 200px;
}

.edu-welfare-condition-field > label {
    display: block;
    padding: 8px 15px;
    color: #333;
    font-weight: bold;
    margin-bottom: 0;
}

.edu-welfare-field-type > label {
    background: #fcf;
}

.edu-welfare-field-region > label {
    background: #ccebff;
}

.edu-welfare-field-tag {
    flex: 1;
    min-width: 200px;
}

.edu-welfare-field-tag > label {
    background: #cfc;
}

/* ドロップダウン */
.edu-welfare-dropdown {
    position: relative;
}

.edu-welfare-dropdown-toggle {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccc;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edu-welfare-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.edu-welfare-dropdown.open .edu-welfare-dropdown-menu {
    display: block;
}

.edu-welfare-dropdown-menu label {
    display: block;
    padding: 8px 10px;
    cursor: pointer;
}

.edu-welfare-dropdown-menu label:hover {
    background: #f5f5f5;
}

.edu-welfare-select-all {
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

/* タグアコーディオン */
.edu-welfare-dropdown-accordion .edu-welfare-dropdown-menu {
    max-height: 350px;
}

.edu-welfare-tag-group {
    border-bottom: 1px solid #eee;
}

.edu-welfare-tag-group:last-child {
    border-bottom: none;
}

.edu-welfare-tag-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    cursor: pointer;
    font-weight: bold;
    background: #f9f9f9;
    user-select: none;
}

.edu-welfare-tag-group-header:hover {
    background: #f0f0f0;
}

.edu-welfare-tag-group-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.edu-welfare-tag-group-header.open .edu-welfare-tag-group-arrow {
    transform: rotate(180deg);
}

.edu-welfare-tag-group-items {
    padding-left: 10px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.edu-welfare-tag-group-items.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

.edu-welfare-tag-group-items label {
    padding: 6px 10px;
}

.edu-welfare-condition-submit {
    text-align: center;
}

/* 検索結果 */
.edu-welfare-results {
    margin-top: 30px;
}

.edu-welfare-results-title {
    background: #006699;
    color: #fff;
    padding: 10px 15px;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.edu-welfare-search-conditions {
    background: #f9f9f9;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.edu-welfare-results-count {
    margin-bottom: 20px;
    font-weight: bold;
}

/* 結果一覧 */
.edu-welfare-result-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
}

.edu-welfare-result-meta {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.edu-welfare-result-meta span {
    background: #f5f5f5;
    padding: 3px 10px;
    font-size: 0.9em;
}

.edu-welfare-meta-name {
    font-weight: bold;
}

.edu-welfare-result-title {
    margin: 0 0 10px;
    font-size: 1.1em;
}

.edu-welfare-result-title a {
    color: #006699;
    text-decoration: underline;
}

.edu-welfare-result-title a:hover {
    color: #004466;
}

.edu-welfare-result-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.edu-welfare-tags-label {
    color: #666;
    font-size: 0.9em;
}

.edu-welfare-tag {
    display: inline-block;
    padding: 3px 8px;
    margin: 4px 4px;
    background: #e8f4f8;
    color: #333;
    font-size: 0.85em;
    text-decoration: none;
    border-radius: 3px;
}

.edu-welfare-tag:hover {
    background: #d0e8f0;
}

.edu-welfare-tag.active {
    background: #006699;
    color: #fff;
}

.edu-welfare-filter-display {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    background: #006699;
    color: #fff;
    border-radius: 3px;
    font-size: 0.9em;
}

/* ページネーション */
.edu-welfare-pagination {
    margin-top: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.edu-welfare-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 3px;
    flex-wrap: wrap;
}

.edu-welfare-pagination li {
    display: inline-block;
    margin-top: 10px;
}

.edu-welfare-pagination a,
.edu-welfare-pagination > ul > li > span {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.edu-welfare-pagination a:hover {
    background: #f5f5f5;
}

.edu-welfare-pagination .current {
    background: #006699;
    color: #fff;
    border-color: #006699;
}

.edu-welfare-no-results {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
}

/* 詳細ページ */
.edu-welfare-detail {
    padding: 20px 0;
}

.edu-welfare-detail th {
    white-space: nowrap;
    font-weight: 500;
}

.edu-welfare-detail h2,
.edu-welfare-detail h3,
.edu-welfare-detail h4,
.edu-welfare-detail h5,
.edu-welfare-detail h6 {
    font-weight: 600;
}

h2.edu-welfare-detail-title {
    background: #006699;
    color: #fff;
    padding: 15px 20px;
    margin: 0 0 20px;
    font-size: 1.3em;
}

h3.edu-welfare-detail-title {
    border-left: 5px solid #006699;
    background-color: #f2f2f2;
    color: #333333;
    padding: 12px 20px;
    margin: 0;
    font-size: 1.1em;
}

.edu-welfare-detail-header {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 20px;
}

.edu-welfare-detail-meta {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.edu-welfare-detail-meta th,
.edu-welfare-detail-meta td {
    padding: 10px;
    background: #006699;
    color: #fff;
    text-align: left;
    border-bottom: 1px solid #fff;
}

.edu-welfare-detail-meta th {
    width: 100px;
    font-weight: bold;
}

.edu-welfare-detail-meta td {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.edu-welfare-detail-tags {
    margin-bottom: 15px;
}

.edu-welfare-detail-summary {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    overflow-wrap: break-word;
    word-break: break-all;
}

.edu-welfare-detail-summary h2 {
    background: #006699;
    color: #fff;
    padding: 8px 15px;
    margin: -15px -15px 15px;
    font-size: 1em;
}

.edu-welfare-detail-section {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 20px;
}

.edu-welfare-detail-section .edu-welfare-detail-summary {
    margin-bottom: 20px;
}

.edu-welfare-detail-info {
    margin-bottom: 20px;
}

.edu-welfare-detail-info:last-child {
    margin-bottom: 0;
}

.edu-welfare-detail-info h4 {
    padding: 8px 15px;
    font-size: 1em;
    margin-bottom: 0;
    background: #006699;
    color: #fff;
}

.edu-welfare-info-table {
    width: 100%;
    border-collapse: collapse;
}

.edu-welfare-info-table th,
.edu-welfare-info-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.edu-welfare-info-table th {
    background: #006699;
    color: #fff;
    width: 20%;
    text-align: left;
}

.edu-welfare-info-table td {
    background: #fff;
    width: 30%;
}

.edu-welfare-initiative-table th {
    width: 4%;
}

.edu-welfare-initiative-table td {
    width: auto;
}

/* 自由書式HTMLコンテンツ共通スタイル
   対象: 教育機関, 福祉機関, 圏域と市町村, 本文 */
.edu-welfare-detail-education,
.edu-welfare-detail-content {
    line-height: 1.8;
}

.edu-welfare-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.edu-welfare-detail-content {
    padding: 20px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

/* table */
.edu-welfare-detail-education table,
.edu-welfare-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.edu-welfare-detail-education th,
.edu-welfare-detail-education td,
.edu-welfare-detail-content th,
.edu-welfare-detail-content td {
    padding: 10px;
    border: 1px solid #ddd;
}

.edu-welfare-detail-education th,
.edu-welfare-detail-content th {
    color: #ffffff;
    background: #006699;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.edu-welfare-detail-education tbody th,
.edu-welfare-detail-content tbody th {
    width: 80px;
}

.edu-welfare-detail-education tbody td,
.edu-welfare-detail-content tbody td {
    background: #fff;
    text-align: left;
    overflow-wrap: break-word;
    word-break: break-all;
}

.edu-welfare-detail-education caption,
.edu-welfare-detail-content caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    padding: 8px 0;
}

/* h2〜h6 */
.edu-welfare-detail-education h2 {
    border-left: 5px solid #006699;
    background: #f2f2f2;
    padding: 10px 15px;
    font-size: 1.2em;
    margin: 1.5em 0 0.8em;
}

.edu-welfare-detail-content h2 {
    border-top: double 4px #27acd9;
    border-bottom: double 4px #27acd9;
    padding: 0.5rem 0;
    font-size: 1.2rem;
}

.edu-welfare-detail-education h3,
.edu-welfare-detail-content h3 {
    border-left: 4px solid #006699;
    padding: 8px 15px;
    font-size: 1.1em;
    margin: 1.3em 0 0.6em;
}

.edu-welfare-detail-education h4,
.edu-welfare-detail-content h4 {
    border-bottom: 2px solid #006699;
    padding-bottom: 5px;
    font-size: 1em;
    margin: 1.2em 0 0.5em;
}

.edu-welfare-detail-education h5,
.edu-welfare-detail-content h5 {
    color: #006699;
    font-size: 0.95em;
    margin: 1em 0 0.5em;
}

.edu-welfare-detail-education h6,
.edu-welfare-detail-content h6 {
    color: #666;
    font-size: 0.9em;
    margin: 1em 0 0.5em;
}

/* p */
.edu-welfare-detail-education p,
.edu-welfare-detail-content p {
    margin: 0 0 1em;
}

/* ul, ol */
.edu-welfare-detail-education ul,
.edu-welfare-detail-content ul {
    list-style: disc;
    padding-left: 2em;
    margin: 0 0 1em;
}

.edu-welfare-detail-education ol,
.edu-welfare-detail-content ol {
    list-style: decimal;
    padding-left: 2em;
    margin: 0 0 1em;
}

.edu-welfare-detail-education li,
.edu-welfare-detail-content li {
    margin-bottom: 0.3em;
}

/* dl, dt, dd */
.edu-welfare-detail-education dl,
.edu-welfare-detail-content dl {
    margin: 0 0 1em;
}

.edu-welfare-detail-education dt,
.edu-welfare-detail-content dt {
    font-weight: bold;
    margin-top: 0.5em;
}

.edu-welfare-detail-education dd,
.edu-welfare-detail-content dd {
    margin-left: 2em;
    margin-bottom: 0.3em;
}

/* blockquote */
.edu-welfare-detail-education blockquote,
.edu-welfare-detail-content blockquote {
    border-left: 4px solid #ccc;
    background: #f9f9f9;
    padding: 15px 20px;
    margin: 0 0 1em;
    color: #555;
    font-style: italic;
}

/* img */
.edu-welfare-detail-education img,
.edu-welfare-detail-content img {
    max-width: 100%;
    height: auto;
    margin: 0.5em 0;
}

/* figure, figcaption */
.edu-welfare-detail-education figure,
.edu-welfare-detail-content figure {
    margin: 1em 0;
    text-align: center;
}

.edu-welfare-detail-education figcaption,
.edu-welfare-detail-content figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

/* hr */
.edu-welfare-detail-education hr,
.edu-welfare-detail-content hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 1.5em 0;
}

/* a */
.edu-welfare-detail-education a,
.edu-welfare-detail-content a {
    color: #006699;
    text-decoration: underline;
}

.edu-welfare-detail-education a:hover,
.edu-welfare-detail-content a:hover {
    color: #004466;
}

/* strong, em */
.edu-welfare-detail-education strong,
.edu-welfare-detail-content strong {
    font-weight: bold;
}

.edu-welfare-detail-education em,
.edu-welfare-detail-content em {
    font-style: italic;
}

.edu-welfare-detail-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

/* アクセシビリティ: スクリーンリーダー専用テキスト */
.edu-welfare-search-container .screen-reader-text,
.edu-welfare-detail .screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal;
}

/* アクセシビリティ: フォーカスインジケーター */
.edu-welfare-search-container a:focus,
.edu-welfare-search-container button:focus,
.edu-welfare-search-container input:focus,
.edu-welfare-search-container select:focus,
.edu-welfare-detail a:focus,
.edu-welfare-detail button:focus,
.edu-welfare-detail input:focus {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

.edu-welfare-switch input:focus + .edu-welfare-slider {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

/* 横スクロール案内 */
.edu-welfare-scroll-hint {
    display: none;
}

/* レスポンシブ */
@media screen and (max-width: 767px) {
    .edu-welfare-detail-section,
    .edu-welfare-detail-header {
        padding: 20px 10px;
    }

    .edu-welfare-condition-row {
        flex-direction: column;
    }

    .edu-welfare-keyword-row {
        flex-direction: column;
    }

    .edu-welfare-keyword-row input[type="text"] {
        width: 100%;
    }

    .edu-welfare-result-meta {
        flex-direction: column;
        gap: 3px;
    }

    .edu-welfare-info-table th,
    .edu-welfare-info-table td {
        display: block;
        width: 100%;
    }

    .edu-welfare-detail-content {
        padding: 20px 10px;
    }

    .edu-welfare-detail-meta,
    .edu-welfare-detail-meta tbody,
    .edu-welfare-detail-meta tr,
    .edu-welfare-detail-meta th,
    .edu-welfare-detail-meta td {
        display: block;
        width: 100%;
    }

    .edu-welfare-detail-education td,
    .edu-welfare-detail-content td {
        white-space: nowrap;
    }

    .edu-welfare-scroll-hint {
        display: block;
        text-align: center;
        font-size: 0.8em;
        color: #999;
        margin-bottom: 4px;
    }
}

/* テーマのスタイル上書き */
.page-numbers li::before {
    display: none;
}

.edu-welfare-search-container ul li::before {
    display: none !important;
}
