/*
Theme Name: MOCAL Recruit Theme
Theme URI: https://recruit.mocal.co.jp/
Author: MOCAL Inc.
Author URI: https://mocal.co.jp/
Description: MOCAL株式会社採用サイト用カスタムテーマ。歯科・医科クリニックの経営実務をサポートするMOCAL株式会社の採用情報を掲載。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mocal-recruit
Tags: custom-logo, custom-menu, featured-images, full-width-template, theme-options

MOCAL株式会社採用サイト用WordPressテーマ
REST API対応、ブロックエディタ対応
*/

/* 見出しを明朝体に */
h1, h2, h3, h4, h5, h6 {
    font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", "HG明朝E", serif;
}

/* ブロックエディタの見出しブロック間の余白を詰める */
.entry-content h2,
.entry-content h3,
.entry-content h4,
.page-content h2,
.page-content h3,
.page-content h4,
main h2,
main h3,
main h4 {
    font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", "HG明朝E", serif;
    margin-bottom: 0.5rem;
}

/* 本文のスタイル（ゴシック体） */
main p {
    margin-bottom: 0.5rem;
    line-height: 1.75;
    font-family: "Noto Sans JP", "Yu Gothic", YuGothic, "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
    font-weight: 400;
    letter-spacing: .05em;
}

/* 連続する見出しブロックの間隔を詰める */
main h2 + h2,
main h2 + h3,
main h3 + h3,
main h3 + h4 {
    margin-top: 0;
}

/* 見出し内の不要なbrによる余白を抑制 */
h1 br, h2 br, h3 br, h4 br {
    line-height: 0;
}

/* wpautopによる見出し内の余分な改行を非表示 */
h1 br + br,
h2 br + br,
h3 br + br,
h4 br + br {
    display: none;
}

/* インタビュー本文 - ブロックエディタ変換後のスタイル */
.interview-content .interview-question {
    background: #f8f9fa;
    border-left: 4px solid #2490c6;
    padding: 1rem 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.6;
    color: #333;
}

.interview-content .wp-block-separator {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 2rem 0;
    opacity: 0.5;
}

.interview-content .wp-block-image {
    margin: 1rem 0;
}

.interview-content .wp-block-image img {
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

/* ニュース本文 - 見出しスタイル（ttl__interview-question準拠） */
.article-content h2,
.article-content h3 {
    position: relative;
    font-weight: bold;
    color: #444;
    border-left: solid 8px #2490c6;
    padding: 0.75em 1em;
    background: linear-gradient(
        135deg,
        transparent 25%,
        rgba(76, 190, 246, 0.05) 25%,
        rgba(76, 190, 246, 0.05) 50%,
        transparent 50%,
        transparent 75%,
        rgba(76, 190, 246, 0.05) 75%,
        rgba(76, 190, 246, 0.05)
    );
    background-size: 4px 4px;
    min-height: 1em;
    display: flex;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.15rem;
    border-left-width: 6px;
}

@media (max-width: 576px) {
    .article-content h2,
    .article-content h3 {
        border-left-width: 6px;
        padding: 0.5em 0.75em;
    }
}

/* ニュース本文 - ブロックエディタ変換後のスタイル */
.article-content .wp-block-gallery {
    margin: 1.5rem 0;
}

.article-content .wp-block-gallery .wp-block-image img {
    border-radius: 0.25rem;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-content .wp-block-image img {
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

.article-content .wp-block-buttons {
    margin: 1.5rem 0;
    text-align: center;
}

/* wp-block-tableのデフォルトスタイルをリセット（テーマのstyle.min.css内の.tableスタイルを優先） */
.wp-block-table {
    margin: 0;
    overflow-x: visible;
}

.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table figcaption {
    margin-top: 0.5em;
}

/* WordPressが付与するデフォルトのテーブルスタイルを無効化 */
.wp-block-table table.table td,
.wp-block-table table.table th {
    border: none;
    border-bottom: 1px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    padding: 12px 7px;
    vertical-align: middle;
}

/* プロフィール文（ゴシック体） */
.ttl__interviewee-profile {
    font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: .05em;
}

/* 会長・社長メッセージ Q&Aコンテンツ */
.interview-qa-content p {
    line-height: 1.75;
    font-size: 1em;
    letter-spacing: .05em;
    font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
    font-weight: 400;
    margin-bottom: 1.25rem;
}

.interview-qa-content a {
    color: #2490c6;
}

.interview-qa-content a:hover {
    color: #1a6d94;
}

.interview-qa-content .ttl__interview-question {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.interview-qa-content .ttl__interview-question:first-child {
    margin-top: 0;
}

/* カラムブロック画像グリッド */
.mocal-image-grid {
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mocal-image-grid .wp-block-column {
    margin-bottom: 0;
}

.mocal-image-grid .wp-block-image {
    margin-bottom: 0;
}

.mocal-image-grid .wp-block-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

/* 画像グリッド内の見出し */
.mocal-image-grid + .wp-block-columns.mocal-image-grid,
.page-content .wp-block-heading + .mocal-image-grid {
    margin-top: 0.5rem;
}

/* 見出しブロックのスタイル */
.page-content .wp-block-heading {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.page-content h2.wp-block-heading {
    font-size: 1.5rem;
    color: #2490c6;
}

.page-content h3.wp-block-heading {
    font-size: 1.1rem;
    color: #2490c6;
}

/* 画像キャプションのマージン */
.page-content .wp-block-image figcaption {
    margin-top: 20px;
}

@media (max-width: 781px) {
    .mocal-image-grid {
        flex-direction: column;
        gap: 1.5rem;
    }
}
