@charset "utf-8";
/*
Theme Name: Clinic WP
Author: hiraipcc
Version: 1.0
Description: Clinic WP
*/

/* ==========================================
   1. リセット & 基本設定（文字や余白の初期化）
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 余白を含めたサイズ計算にする（レイアウト崩れ防止） */
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #fcfcfc; /* 院内の清潔感をイメージした明るい背景色 */
    -webkit-text-size-adjust: none;
}

a {
    color: #1c487d; /* クリニックのテーマカラー：誠実なブルー */
    text-decoration: none;
    transition: color 0.3s ease; /* 色の変化をふわっと滑らかに */
}

a:hover, a:active {
    color: #6f6f6f;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* ==========================================
   2. 全体構造（1カラム用レイアウト設定）
   ========================================== */
#wrapper, .inner {
    margin: 0 auto;
    width: 100%;
    max-width: 800px; /* 1カラムで文章が一番読みやすいとされる最適な横幅 */
    padding: 0 20px;   /* スマホ画面で見たときの端のクッション余白 */
}

/* メインコンテンツエリア */
#content {
    width: 100%;
    /* 全体の上下余白を50pxから25pxへ、上側を10pxから5pxへギュッと縮小 */
    padding: 5px 0 25px;
}

/* フッター */
#footer {
    width: 100%;
    border-top: 1px solid #e5e5e5;
    padding: 20px 0 25px; /* フッターの余白も少しスリムに */
    text-align: center;
    background-color: #fff;
}

#footer ul {
    list-style: none;
    margin-bottom: 10px; /* 15pxから10pxへ */
}

#footer li {
    display: inline-block;
    padding: 0 15px;
    border-left: 1px solid #d5d5d5;
}

#footer li:first-child {
    border-left: none; /* 最初のメニューの左線は消す */
}

#copyright {
    font-size: 12px;
    color: #777;
}

/* ==========================================
   3. 各パーツのデザイン（ヘッダー・メニュー・投稿・お知らせ）
   ========================================== */

/* ヘッダーエリア */
#header {
    padding: 15px 0; /* 上下の余白を25pxから15pxへ縮小 */
}

/* 左側：ロゴ・タイトルエリア */
.logo-area {
    float: left;
}

.site-description {
    font-size: 13px;
    color: #666;
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 2px;
}

#header h2 {
    font-size: 26px;
    font-weight: bold;
    color: #414141;
    line-height: 1.2;
}

/* 右側：連絡先・電話番号エリア */
.contact {
    float: right;
    text-align: right;
    color: #333;
}

.contact .tel {
    font-size: 24px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #1c487d;
}

.contact p.time {
    font-size: 13px;
    color: #555;
    margin-top: 3px;
}

/* ヘッダーの横並び（float）をクリア */
#header::after {
    content: "";
    display: block;
    clear: both;
}

/* グローバルナビゲーション（メインメニュー） */
nav#mainNav {
    background-color: #1c487d;
    margin-bottom: 15px; /* 下の隙間を25pxから15pxへ */
    border-radius: 4px;
}

nav#mainNav ul {
    display: flex; /* メニュー項目を横並びにする最新記述 */
    list-style: none;
}

nav#mainNav ul li {
    flex: 1; /* メニューの幅を均等に割り振る */
}

nav#mainNav ul li a {
    display: block;
    text-align: center;
    color: #fff;
    padding: 12px 0; /* メニューの上下クッションを15pxから12pxへ */
    font-weight: bold;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

nav#mainNav ul li a:hover {
    background-color: #3167aa; /* マウスを乗せたときに明るい青に */
}

/* トップページメイン画像 */
#mainImg {
    text-align: center;
    margin-bottom: 20px; /* 下の隙間を30pxから20pxへ */
}

/* 最上部に移動した「お知らせ」エリア（高さをスリム化） */
#sidebar {
    width: 100%;
    margin-bottom: 15px; /* 下の隙間を20pxから15pxへ */
}

.widgetInfo {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #1c487d; /* 左側に太い青線をアクセントとして配置 */
    padding: 10px 15px 5px; /* 箱の内側の余白を一回りタイトに */
    border-radius: 4px;
}

.newsTitle {
    display: flex;
    justify-content: space-between; /* タイトルと一覧リンクを左右に綺麗に振り分け */
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 4px; /* 隙間を少し詰める */
    margin-bottom: 8px;
}

.newsTitle h3 {
    font-size: 17px; /* ほんの少しスマートに */
    font-weight: bold;
    color: #1c487d;
}

.newsTitle p a {
    font-size: 12px;
    color: #666;
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.news p {
    padding: 5px 0; /* お知らせ同士の上下間隔を詰める */
    border-bottom: 1px dashed #eee;
    font-size: 15px;
    line-height: 1.5;
}

/* 一番下のお知らせの下側スペースを限界までカット */
.news p:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* 本文（固定ページや投稿）の白い箱 */
.post {
    background: #fff;
    padding: 18px 20px; /* 内側の余白を30pxから、上下18px・左右20pxへと一気に狭く引き締め */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* 本文内の見出し装飾 */
.post h2.title, #content h2.title {
    font-size: 19px;
    color: #333;
    border-bottom: 2px solid #1c487d;
    padding-bottom: 6px; /* 8pxから6pxへ */
    margin-bottom: 15px; /* 20pxから15pxへ */
    font-weight: bold;
}

.post p {
    margin-bottom: 15px; /* 段落ごとの隙間を20pxから15pxへ */
}

/* 診療時間表などのテーブル装飾 */
.post table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0; /* 表の上下の隙間を20pxから15pxへ */
}

.post table th, .post table td {
    padding: 8px 10px; /* 表の中の文字まわりの余白を12pxから狭くしてコンパクトに */
    border: 1px solid #e0e0e0;
    text-align: center;
}

.post table th {
    background-color: #f5f7fa;
    font-weight: bold;
    color: #1c487d;
}

/* 個別ページ・一覧用のナビゲーション隙間微調整 */
.pagenav {
    margin-top: 20px !important;
}

/* ==========================================
   4. レスポンシブ設定（スマートフォン表示への切り替え）
   ========================================== */
@media only screen and (max-width: 768px) {
    #wrapper, .inner {
        padding: 0 15px;
    }

    /* ヘッダー情報をスマホ用に縦並び・中央揃えに */
    .logo-area, .contact {
        float: none;
        width: 100%;
        text-align: center;
    }
    .logo-area { margin-bottom: 12px; }
    
    /* 【調整済】スマホ表示時のキャッチフレーズ（h2）と医院名（h1）の文字サイズバランス */
    .logo-area h2 { font-size: 12px; }
    .logo-area h1 { font-size: 22px; }
    .contact .tel { font-size: 22px; }

    /* --- CSSだけで動くヘッダーメニュー開閉設定 --- */
    
    /* 隠しスイッチ（チェックボックス）は画面に見せない */
    .menu-checkbox {
        display: none !important;
    }
    
    /* スマホ用の「MENU」ボタン（クリックできる領域） */
    .menu-button {
        display: block;
        width: 100%;
        height: 40px; /* 45pxから40pxへスリムに */
        line-height: 40px;
        font-weight: bold;
        text-align: center;
        color: #fff;
        background-color: #1c487d;
        cursor: pointer;
        border-radius: 4px;
        margin-bottom: 5px;
    }

    /* スマホの時はメニューの箱を「最初だけ完全に隠す」 */
    #navPanel {
        display: none; 
        width: 100%;
        background-color: #1c487d;
        border-radius: 4px;
        overflow: hidden;
        padding: 5px 0;
    }

    /* スイッチがON（:checked）になったら、メニューを表示 */
    .menu-checkbox:checked ~ #navPanel {
        display: block;
    }
    
    .menu-checkbox:checked ~ .menu-button {
        background-color: #12345d;
    }

    /* メニュー項目をスマホ用に縦一列に並べる */
    nav#mainNav ul {
        flex-direction: column;
    }
    nav#mainNav ul li {
        border-bottom: 1px solid #3167aa;
    }
    nav#mainNav ul li:last-child {
        border-bottom: none;
    }
    nav#mainNav ul li a {
        display: block;
        text-align: center;
        padding: 10px 0; /* 12pxから10pxへ */
        color: #fff;
        font-size: 15px;
    }
}

/* PC（769px以上）の時はスマホ用のボタンを隠し、メニューを常に出す */
@media only screen and (min-width: 769px) {
    .menu-checkbox, .menu-button {
        display: none !important;
    }
    #navPanel {
        display: block !important;
    }
}

/* ==========================================================================
   本文内（.post）のリスト表示（箇条書き）の余白調整
   ========================================================================== */

/* 箇条書き（ul）と数字リスト（ol）全体の調整 */
.post ul, .post ol {
    margin: 10px 0 15px 22px; /* 上に10px、下に15px、左に22pxの余白を作って右に寄せます */
    padding: 0;
}

/* リストの各項目（li）の調整 */
.post ul li, .post ol li {
    margin-bottom: 5px;       /* 箇条書きの項目ごとに少し隙間をあけて読みやすく */
    line-height: 1.6;         /* 行間を綺麗に整える */
}

/* 箇条書き（ul）のときは標準の黒丸（•）を表示 */
.post ul {
    list-style-type: disc;
}

/* 数字リスト（ol）のときは数字（1. 2. 3.）を表示 */
.post ol {
    list-style-type: decimal;
}

/* リストの中にさらにリストがネスト（階層化）した場合の左余白 */
.post ul ul, .post ul ol, .post ol ul, .post ol ol {
    margin: 5px 0 5px 20px;
}
