/*
 Theme Name:   Astra Child - Thank Law
 Theme URI:    https://thank-law.jp
 Description:  Astra Child Theme for Thank Law
 Author:       Thank Law
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/

/* ==========================================================================
   共通
   ========================================================================== */

a:hover {
    opacity: 0.7;
}

/* Elementorボタン最小タップサイズ確保 */
@media (max-width: 767px) {
    .elementor-button.elementor-size-sm {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
}

/* ==========================================================================
   本文・タイポグラフィ（H2・H3・H4）
   ========================================================================== */

.entry-content h2 {
    padding: 0.2em 0.5em;
    border-left: 10px solid #00A9E7;
    background: none;
    line-height: 1.3;
    margin-bottom: 1.2em;
    font-weight: bold;
}

/* h3：固定ページ共通（水色背景） */
.entry-content h3 {
    display: flex;
    padding: 4px 10px;
    align-items: flex-start;
    gap: 26px;
    align-self: stretch;
    border-radius: 5px;
    background: #BEE4FA;
    margin-bottom: 1.2em;
    font-weight: bold;
}

/* h3：記事ページ（青四角＋下線） */
body.single-post .entry-content h3 {
    background: none !important;
    border-radius: 0 !important;
    border-bottom: 2px solid #00ADEE !important;
    padding: 0 0 8px 0 !important;
    gap: 10px !important;
    align-items: center !important;
}
body.single-post .entry-content h3::before {
    content: "" !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    background-color: #00ADEE !important;
    flex-shrink: 0 !important;
}

/* h3：トップページはスタイルリセット */
.home .entry-content h3 {
    background: none !important;
    border-bottom: none !important;
}
.home .entry-content h3::before {
    display: none !important;
}

/* h4 */
.entry-content h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    padding: 0 0 8px 0;
    margin-bottom: 1.2em;
}
.entry-content h4::before {
    content: "" !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    background-color: #BEE4FA !important;
    flex-shrink: 0 !important;
}

/* ==========================================================================
   記事パーツ（監修者・強み・メリデメ・強調・関連記事・参考リンク・蛍光ペン）
   ========================================================================== */

/* 監修者ブロック（小） */
.supervisors-block {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    box-shadow: 2px 2px 8px 0px rgba(51, 51, 51, 0.1);
    overflow: hidden;
}
.supervisors-label {
    font-size: 0.75rem;
    background: #185FA5;
    color: #fff;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    margin-bottom: 4px;
}
.supervisors-img img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: none !important;
}
.supervisors-firm,
.supervisors-lawyer {
    display: grid;
    grid-template-columns: 5em 1fr;
    gap: 0 8px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

/* 監修者ボックス（目次上） */
.supervisor_area {
    display: block !important;
    max-width: 480px;
    margin: 32px auto !important;
    padding: 20px 24px !important;
    background: #fff;
    border: 1px solid #e5ebf2;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(20, 40, 80, 0.06);
    text-decoration: none !important;
    color: #1a2740 !important;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
    position: relative;
    overflow: hidden;
}
.supervisor_area:hover {
    box-shadow: 0 8px 24px rgba(20, 40, 80, 0.12);
    border-color: #c9d6e6;
    transform: translateY(-2px);
}
.supervisor_area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #1f4f9c 0%, #2c6cd1 100%);
}
.supervisor_info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.supervisor_info .box_l {
    flex: 1;
    min-width: 0;
}
.supervisor_ttl {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 14px;
    background: #1f4f9c;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    border-radius: 4px;
    line-height: 1.4;
}
.supervisor_name {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #1a2740;
    font-weight: 500;
}
.supervisor_ph {
    flex-shrink: 0;
    margin: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f0f4fa;
    background: #f7f9fc;
    box-shadow: 0 2px 8px rgba(20, 40, 80, 0.08);
}
.supervisor_ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media screen and (max-width: 768px) {
    .supervisor_area {
        margin: 24px auto !important;
        padding: 16px 18px !important;
        border-radius: 10px !important;
    }
    .supervisor_info { gap: 14px; }
    .supervisor_ttl {
        font-size: 12px;
        padding: 3px 12px;
        margin-bottom: 8px;
    }
    .supervisor_name {
        font-size: 13.5px;
        line-height: 1.6;
    }
    .supervisor_ph { width: 72px; height: 72px; }
}

@media screen and (max-width: 375px) {
    .supervisor_area { padding: 14px !important; }
    .supervisor_name { font-size: 13px; }
    .supervisor_ph { width: 60px; height: 60px; }
}

/* 強みブロック */
.strengths-block {
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    background: #1a3a6b;
}
.strengths-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    padding: 12px;
}
.strengths-body {
    display: flex;
    align-items: stretch;
    background: #00ADEE;
}
.strengths-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.strengths-item {
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}
.strengths-item.check {
    background: #fff;
    color: #1a3a6b;
    padding: 8px 10px;
}
.strengths-item.check::before { content: '✓'; color: #1a3a6b; font-weight: bold; }
.strengths-item.heart { background: none; color: #fff; padding: 2px 10px; }
.strengths-item.heart::before { content: '♡'; color: #fff; }

@media screen and (min-width: 768px) {
    .strengths-block {
        display: grid;
        grid-template-columns: 40% 1fr;
        grid-template-rows: auto 1fr;
        background: #00ADEE;
    }
    .strengths-body { display: contents; }
    .strengths-title {
        grid-column: 2;
        grid-row: 1;
        background: #1a3a6b;
    }
    .strengths-img {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 100%;
    }
    .strengths-content {
        grid-column: 2;
        grid-row: 2;
        flex: 1;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        padding: 8px;
        align-content: start;
        align-items: start;
        background: #00ADEE;
    }
    .strengths-item.check {
        grid-column: span 2;
        justify-content: center;
        align-self: start;
        align-items: flex-start;
        padding: 15px 10px;
    }
    .strengths-item.heart:nth-child(4) { grid-column: 1 / 4; justify-self: end; width: auto; }
    .strengths-item.heart:nth-child(5) { grid-column: 4 / 7; justify-self: start; width: auto; }
}

@media screen and (max-width: 767px) {
    .strengths-body { flex-direction: row; }
    .strengths-img { flex: 1; width: auto; }
    .strengths-img img { object-position: center center; }
    .strengths-content {
        flex: 0 0 auto;
        width: fit-content;
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 8px;
        align-items: stretch;
        background: #00ADEE;
    }
    .strengths-item { white-space: nowrap; }
    .strengths-item.check + .strengths-item.heart { margin-top: 8px; }
    .strengths-item.heart + .strengths-item.heart { margin-top: -1px; }
    .pc-only-br { display: none; }
}

/* メリット・デメリット */
.merit-box,
.demerit-box {
    width: 90% !important;
    margin: 16px auto !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.merit-box { background: #F6FAE8 !important; }
.demerit-box { background: #F7F7F7 !important; }

.merit-header,
.demerit-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 6px !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    color: #fff !important;
    gap: 8px;
    width: 100% !important;
    box-sizing: border-box !important;
}
.merit-header { background: #A8CD1D !important; }
.demerit-header { background: #C5C5C5 !important; }

.merit-header::before,
.demerit-header::before {
    content: "" !important;
    width: 18px;
    height: 18px;
    background-color: #fff;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.merit-header::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E"); }
.demerit-header::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E"); }

.merit-box ul,
.demerit-box ul {
    border: none !important;
    padding: 10px 20px 20px 30px !important;
    margin: 0 !important;
}
.merit-box ul { background-color: #F6FAE8 !important; }
.demerit-box ul { background-color: #F7F7F7 !important; }
.merit-box ul li,
.demerit-box ul li {
    margin-bottom: 8px !important;
    line-height: 1.5 !important;
}
.merit-box.wp-block-group,
.demerit-box.wp-block-group { padding: 0 !important; }

@media screen and (max-width: 767px) {
    .merit-box, .demerit-box { width: 100% !important; border-radius: 5px !important; }
}

/* 強調ボックス（オレンジ） */
.condition-box-yellow {
    width: 90% !important;
    margin: 16px auto !important;
    border: 1px solid #f5a623;
    border-radius: 8px !important;
    background-color: #FFF9EA !important;
    padding: 0 !important;
    overflow: hidden;
}
.condition-title-yellow {
    display: block !important;
    margin: 12px !important;
    padding: 6px 20px !important;
    background-color: #f5a623 !important;
    color: #fff !important;
    font-weight: bold !important;
    border-radius: 50px !important;
    width: fit-content !important;
    line-height: 1.2 !important;
}
.condition-list-yellow {
    margin: 0 !important;
    padding: 0 20px 20px 3.2em !important;
    list-style: disc !important;
    color: #333 !important;
}
.condition-list-yellow li { margin-bottom: 10px !important; line-height: 1.6 !important; }

@media screen and (max-width: 767px) {
    .condition-box-yellow { width: 100% !important; border-radius: 5px !important; }
    .condition-list-yellow { padding: 0 15px 15px 2.5em !important; }
}

/* 関連記事パターン */
.related-link-block {
    background: #fff !important;
    padding: 0 !important;
    border: 1.5px solid #BEE4FA !important;
    border-radius: 6px;
    width: 90% !important;
    margin: 20px auto !important;
    overflow: hidden;
}
.related-link-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
    background-color: #BEE4FA !important;
    padding: 10px !important;
    margin: 0 !important;
}
.related-link-header::before { content: none !important; display: none !important; }
.related-link-label { font-weight: bold !important; color: #1a3a6b !important; }
.related-link-list { margin: 0 !important; padding: 15px 20px !important; list-style: none !important; }
.related-link-list li { position: relative; padding-left: 1.5em !important; margin-bottom: 8px !important; }
.related-link-list li::before {
    content: "" !important;
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background-color: #00ADEE !important;
    border-radius: 1px;
}
.related-link-list li a {
    text-decoration: none !important;
    color: #333 !important;
    line-height: 1.4 !important;
    display: inline-block;
}

@media screen and (max-width: 767px) {
    .related-link-block { width: 100% !important; border-radius: 5px !important; }
    .related-link-list li a { line-height: 1.2 !important; }
}

/* 参考リンクバッジ */
p.reference-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    background-color: #fbfbfb !important;
    margin: 20px auto !important;
    padding: 10px 15px !important;
    width: 95% !important;
    text-indent: 0 !important;
    flex-wrap: nowrap !important;
}
p.reference-link .reference-label {
    background-color: #A8CD1D !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: bold !important;
    padding: 3px 10px !important;
    border-radius: 50px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}
p.reference-link a {
    color: #333 !important;
    font-weight: bold !important;
    font-size: 12px !important;
}

/* 蛍光ペン */
.entry-content mark {
    background: linear-gradient(transparent 60%, #BEE4FA 60%) !important;
    background-color: transparent !important;
    color: inherit !important;
    font-weight: bold !important;
    padding: 0 2px !important;
}

/* 汎用ボタン */
.more-link-btn {
    display: block;
    border: 1.5px solid #185FA5;
    background: #fff;
    color: #185FA5;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
}
.more-link-btn:hover { background: #185FA5; color: #fff; }

/* ==========================================================================
   固定ページ：弁護士一覧
   ========================================================================== */

.lawyer-section {
    padding: 0 !important;
    margin-bottom: 80px;
}
.lawyer-section > .lawyer-card:first-child + .lawyer-card {
    margin-top: 0 !important;
}

figure.lawyer-photo { text-align: center; }
.lawyer-photo img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 768px) {
    .lawyer-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }
}

/* ==========================================================================
   固定ページ：Q&Aアコーディオン
   ========================================================================== */

.wp-block-accordion-heading__toggle {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}
.wp-block-accordion-panel p {
    margin-block-start: 0 !important;
    margin-bottom: 0.5em;
}
.wp-block-accordion-panel > :last-child {
    margin-block-end: 2em !important;
}

/* ==========================================================================
   内部リンクスタイル（使用箇所要確認）
   ========================================================================== */

.is-style-internal-link-label {
    display: inline-block !important;
    background: #3399ff;
    padding: 5px 10px;
    color: #ffffff !important;
    font-weight: bold;
    margin-bottom: 0 !important;
}
.is-style-internal-link-box {
    background: #ffffff;
    padding: 10px;
    border: 2px solid #3399ff;
    margin-top: 0 !important;
}


/* =========================================
   投稿編集画面用スタイル(ブロックエディタ)
   ========================================= */

/* テキスト選択時のハイライト */
.editor-styles-wrapper ::selection,
.block-editor-block-list__block ::selection,
.block-editor-rich-text__editable ::selection,
.editor-post-title__input::selection {
    background-color: #ffe082 !important;
    color: #1a2740 !important;
}

/* H2 見出し: 左に青いバー */
.editor-styles-wrapper h2.wp-block-heading {
    position: relative;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 16px !important;
    border-left: 6px solid #3399FF !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    font-size: 1.6em !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-top: 1.6em !important;
    margin-bottom: 0.8em !important;
    color: #1a2740 !important;
    background: transparent !important;
}

/* H3 見出し: 下線 */
.editor-styles-wrapper h3.wp-block-heading {
    border-bottom: 2px solid #3399FF !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    padding-bottom: 6px !important;
    padding-left: 0 !important;
    font-size: 1.3em !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-top: 1.4em !important;
    margin-bottom: 0.6em !important;
    color: #1a2740 !important;
    background: transparent !important;
}

/* H4 見出し: 左にライン */
.editor-styles-wrapper h4.wp-block-heading {
    border-left: 4px solid #3399FF !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    padding-left: 10px !important;
    font-size: 1.1em !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    margin-top: 1.2em !important;
    margin-bottom: 0.5em !important;
    color: #1a2740 !important;
    background: transparent !important;
}

/* =========================================
   テーブルデザイン(Gutenberg wp-block-table)
   ========================================= */
.wp-block-table {
    margin: 1.5em 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #cce4ff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(51, 153, 255, 0.08);
    background: #ffffff;
}

.wp-block-table table {
    width: 100%;
    margin: 0 !important;
    padding: 0;
    border-collapse: collapse;
    border-spacing: 0;
    background: #ffffff;
    font-size: 0.95em;
    line-height: 1.7;
    color: #1a2740;
}

.wp-block-table thead,
.wp-block-table tbody,
.wp-block-table tfoot {
    margin: 0;
    padding: 0;
}

.wp-block-table th,
.wp-block-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #e5eef9;
    border-right: 1px solid #e5eef9;
    vertical-align: middle;
    text-align: left;
}

.wp-block-table tr:last-child th,
.wp-block-table tr:last-child td {
    border-bottom: none;
}
.wp-block-table th:last-child,
.wp-block-table td:last-child {
    border-right: none;
}

.wp-block-table thead th {
    background: #3399FF;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
    border-right-color: rgba(255,255,255,0.3);
    border-bottom: none;
}

.wp-block-table tbody th,
.wp-block-table tbody td:first-child {
    background: #eef6ff;
    color: #1a4d80;
    font-weight: 700;
    text-align: center;
    width: 28%;
    min-width: 140px;
}

.wp-block-table td a {
    color: #3399FF;
    text-decoration: underline;
}
.wp-block-table td a:hover {
    color: #1a7fd9;
}

.wp-block-table strong {
    color: #d9534f;
}

.wp-block-table figcaption {
    margin: 8px 0 0;
    padding: 0 4px;
    font-size: 0.85em;
    color: #6b7a90;
    text-align: center;
    background: transparent;
}

@media (max-width: 767px) {
    .wp-block-table table {
        font-size: 0.88em;
    }
    .wp-block-table th,
    .wp-block-table td {
        padding: 10px 12px;
    }
    .wp-block-table tbody th,
    .wp-block-table tbody td:first-child {
        width: 35%;
        min-width: 100px;
    }
}