/* ページ全体の背景色を、すっきりした薄いグレーに設定 */
body {
    font-family: 'Noto Sans JP', sans-serif; /* フォントをNoto Sans JPに指定 */
    background: #f8f9fa !important; /* 背景を単色に強制的に設定 */
    min-width: 0 !important; /* bodyの最小幅の制限を解除 */
}

/* ヘッダーの幅を画面全体に広げる (テーブルレイアウト版) */
#hpb-header {
    width: 100% !important;
    height: auto !important;
    background-image: none !important;
    background-color: #063271 !important;
    box-sizing: border-box;
    display: table !important; /* flexboxからtableに変更 */
    table-layout: auto !important; /* fixedからautoに変更 */
}

/* ヘッダータイトル（左側） */
.header-title {
    display: table-cell !important; /* table-cellに変更 */
    width: 100%; /* 利用可能なスペースを最大限使用する */
    text-align: left;
    vertical-align: middle; /* 垂直中央揃え */
}

/* 電話番号（右側） */
#hpb-headerExtra1 {
    display: table-cell !important; /* table-cellに変更 */
    white-space: nowrap; /* 電話番号が改行しないようにする */
    text-align: right;
    vertical-align: middle; /* 垂直中央揃え */
    background: none !important;
    padding-left: 5px; /* タイトルとの間に最低限の余白を確保 */
    padding-right: 5px;
    padding-top: 15px;
}
#hpb-headerExtra1 p.tel {
    margin: 0; /* pタグのデフォルトマージンをリセット */
}

@media (min-width: 769px) {
    #hpb-header {
        padding: 20px !important;
    }    
}

@media (max-width: 768px) {
    #hpb-header {
        padding: 20px 5px !important;
    }
    .header-title {
        font-size: 80%;
    }
    #hpb-headerExtra1 {
        font-size: 80%;
    }
}

/* メインコンテンツエリアの背景を白にし、影をつけて立体感を出す */
#hpb-wrapper {
    background-color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); /* 周りにうっすらと影を付ける */
    border-radius: 5px; /* 角を少しだけ丸くする */
    width: 95% !important;
    margin: 20px auto !important;
    padding: 20px !important;
    box-sizing: border-box;
}

/* リンクの色を、視認性の高い青色に変更 */
a {
    color: #007bff;
}

/* コンテナの固定幅を解除し、画面全体に広げる */
#hpb-container {
    width: 100% !important;
}

/* 既存のレイアウト指定を上書きして、縦積みレイアウトを実現 */
.hpb-layoutset-01 #hpb-wrapper,
.hpb-layoutset-01 #hpb-aside {
    float: none !important;
    width: 95% !important; /* 幅を画面の95%に設定 */
    margin: 20px auto !important; /* 上下にマージンを設け、左右は自動で中央揃え */
    padding: 20px !important;
    box-sizing: border-box;
}

/* 内側のコンテンツ幅も調整 */
#hpb-main {
    width: 100% !important;
}

.top-image {
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.renewal_open_notice {
    width: 80%;
    background-color: #fff; /* 背景色 */
    padding: 10px; /* 内側の余白 */
    border-radius: 5px; /* 角を少し丸くする */
    text-align: center; /* テキストを中央揃え */
    margin: 10px auto; /* 余白 */
}

.daily-info-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 70%;
    height: 220px;
    padding: 20px 5%;
    margin: 0 auto auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.daily-info-card iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.hpb-photomotion {
    width: 70% !important; /* 幅を70%に縮小 */
    margin: 0 auto 20px; /* 上下マージンはそのまま、左右を自動で中央揃え */
    padding: 20px 0;
    float: none !important;
}

@media (max-width: 768px) {
        .top-image {
        width: 95%;
    }

    .renewal_open_notice {
        width: 95%;
    }

    .daily-info-card {
        width: 85%;
    }

    .hpb-photomotion {
        width: 95% !important; /* 幅を70%に縮小 */
        margin: 0 auto 20px; /* 上下マージンはそのまま、左右を自動で中央揃え */
        padding: 20px 0;
        float: none !important;
    }
}

#toppage-news h3 {
    text-align: left;
}

#toppage-news {
    float: none !important;
    width: 100% !important;
    clear: both;
}

.news-body {
    padding: 20px;
    background-color: #f8f9fa; /* 背景色 */
    border: 1px solid #ddd; /* ボーダー */
    border-radius: 5px; /* 角丸 */
}

#toppage-topics {
    float: none !important;
    width: 100% !important;
    clear: both;
}

#topics-body {
    padding: 20px;
    background-color: #f8f9fa; /* 背景色 */
    border: 1px solid #ddd; /* ボーダー */
    border-radius: 5px; /* 角丸 */
}

/* ページ上部の要素の背景も無効化 */
#pagetop {
    background-image: none !important;
}

/* --- ナビゲーションメニューの改修 --- */

/* デスクトップ表示時のナビゲーションスタイル */
@media (min-width: 769px) {
    #hpb-nav {
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: rgba(52, 58, 64, 0.9) !important; /* モダンなダークグレー（少し透明に） */
        text-align: center !important; /* メニュー項目を中央揃え */
        position: sticky !important;
        top: 0 !important;
        z-index: 1020 !important;
        display: block; /* デスクトップでは表示 */
    }

    /* 「ナビゲーション」のタイトルを非表示に */
    #hpb-nav h3 {
        display: none !important;
    }

    /* メニューリストのスタイル */
    #hpb-nav ul {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none;
    }

    /* メニュー項目のスタイル */
    #hpb-nav ul li {
        display: inline-block !important; /* 横並びに変更 */
        width: 14% !important;
        margin: 0 !important;
        border: none !important;
    }

    /* メニューリンクのスタイル */
    #hpb-nav ul li a {
        display: block !important;
        padding: 15px 10px !important;
        width: 85% !important;
        height: auto !important;
        color: #f8f9fa !important; /* 明るい文字色 */
        text-decoration: none !important;
        background-image: none !important; /* 元の背景画像を削除 */
        font-weight: bold;
    }

    /* 元の日本語表記を非表示に */
    #hpb-nav ul li a span.ja {
        display: none !important;
    }

    /* 英語表記のスタイル調整 */
    #hpb-nav ul li a span.en {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 1em !important;
    }

    /* マウスを乗せた時のスタイル */
    #hpb-nav ul li a:hover {
        background-color: rgba(85, 95, 105, 0.45) !important;
        color: #ffffff !important;
    }
}


/* --- モバイル表示時のナビゲーションスタイル --- */
@media (max-width: 768px) {
    /* ハンバーガーメニューをモバイルでのみ表示 */
    .hamburger-menu {
        display: flex;
    }

    /* 通常のナビゲーションを非表示にし、サイドメニューとして設定 */
    #hpb-nav {
        position: fixed;
        top: 0;
        left: 0; /* 画面左端に固定 */
        width: 250px;
        height: 100%;
        background-color: rgba(52, 58, 64, 0.98); /* 少し濃い背景 */
        padding-top: 60px; /* ハンバーガーボタンの高さ分 */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* 左からの影 */
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; /* transformとopacityをトランジション */
        z-index: 1025; /* ハンバーガーボタンより奥 */
        overflow-y: auto; /* メニューが多い場合にスクロール可能に */
        transform: translateX(-100%); /* 画面外に完全に隠す */
        opacity: 0; /* 初期状態では透明 */
        pointer-events: none; /* 非表示時はクリック不可 */
        text-align: left; /* テキストを左寄せ */
    }

    /* サイドメニューが開いた時のスタイル */
    #hpb-nav.hpb-nav-open {
        transform: translateX(0); /* 画面内にスライドイン */
        opacity: 1; /* 表示時は不透明 */
        pointer-events: auto; /* 表示時はクリック可能 */
    }

    #hpb-nav ul {
        flex-direction: column; /* 縦並びにする */
        width: 100% !important;
    }

    #hpb-nav ul li {
        display: block !important; /* ブロック要素にして縦並び */
        width: 100% !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 区切り線 */
    }

    #hpb-nav ul li:last-child {
        border-bottom: none;
    }

    #hpb-nav ul li a {
        padding: 15px 20px !important;
        text-align: left; /* リンクテキストを左寄せ */
    }
}

/* --- フッターの改修 --- */

#hpb-footer {
    display: table;
    width: 100% !important;
    background: #063271 !important; /* ヘッダーと同じ色に統一 */
    color: #f8f9fa !important; /* 明るい文字色 */
    padding: 20px 0 !important;
    table-layout: fixed;
}

#hpb-footerMain, #hpb-footerExtra1 {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    color: #f8f9fa !important;
    padding: 5px 0;
    background: none !important;
}

#hpb-footer a {
    color: #a9d8ff !important; /* リンクの色を調整 */
}

#hpb-footer a:hover {
    text-decoration: underline;
}

#hpb-footerExtra1 {
    font-size: 1.2em; /* 更新日の文字サイズを調整 */
}

/* --- スマートフォン表示時のフッター調整 --- */
@media (max-width: 768px) {
    #hpb-footer {
        display: block !important;
        padding: 15px !important;
        table-layout: auto; /* table-layoutをリセット */
        box-sizing: border-box; /* box-sizingを明示的に指定 */
    }

    #hpb-footerMain,
    #hpb-footerExtra1 {
        display: block !important;
        width: 100% !important; /* 幅を100%に */
        text-align: center !important; /* 中央揃えを維持 */
        padding: 5px 0; /* 上下の余白を調整 */
        box-sizing: border-box; /* box-sizingを明示的に指定 */
    }

    #hpb-footerMain {
        margin-top: 10px; /* 上の要素との間に余白を追加 */
        word-wrap: break-word; /* 長いメールアドレスを折り返す */
    }
}

/* --- バナーと会社情報のレイアウト調整 --- */

/* aside全体のスタイルをリセット */
#hpb-aside {
    display: block;
}

/* 「バナースペース」のタイトルを非表示に */
#hpb-aside > h3 {
    display: none !important;
}

/* バナーリストを横並びに */
#banner ul {
    text-align: center; /* 中央揃え */
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important; /* 下にマージンを追加 */
    border-bottom: 1px solid #eee; /* 区切り線 */
    padding-bottom: 20px !important; /* 区切り線とのスペース */
}

/* バナー各項目のスタイル */
#banner ul li {
    display: inline-block; /* 横並びに変更 */
    margin: 5px !important; /* 各バナーの周りに少し余白を設定 */
    width: 200px; /* バナーの幅を固定 */
    vertical-align: top; /* 上揃え */
    background: none !important;
    border: none !important;
}

/* 会社情報セクションのスタイル */
#companyinfo {
    width: 100% !important;
    text-align: center; /* テキストを中央揃え */
    margin-top: 20px; /* 上部にマージンを追加 */
    background-color: #f0f0f0; /* 背景色を追加 */
    padding: 20px 0; /* 上下のパディングを追加 */
    box-sizing: border-box;
}

#companyinfo h3 {
    text-align: left; /* タイトルを左寄せ */
    width: 100%;
    margin-left: 0; /* 左からの余白 */
    margin-top: 0; /* 上の余白をなくす */
    padding-top: 0; /* 上のパディングをなくす */
}

#companyinfo img[src*="daycount.cgi"] {
    /* スタイルをリセットし、元の表示に戻す */
}

.companyinfo-content {
    display: flex; /* Flexboxコンテナに設定 */
    flex-wrap: wrap;
    justify-content: center; /* 子要素を水平方向の中央に寄せる */
    align-items: flex-start;
    width: 95%; /* 親要素の幅いっぱいに広げる */
    max-width: 1000px; /* 最大幅を設定して中央寄せを強調 */
    margin: 0 auto; /* 中央寄せ */
}

.companyinfo-text {
    flex: 1; /* テキスト情報の幅の比率 */
    min-width: 300px; /* 最小幅を設定 */
    padding: 10px;
    box-sizing: border-box;
}

.companyinfo-map {
    flex: 1.8; /* Google Mapの幅の比率をさらに大きくする */
    min-width: 320px; /* 最小幅を設定 */
    padding: 10px;
    box-sizing: border-box;
}

.companyinfo-map iframe {
    width: 100%;
    height: 300px; /* マップの高さを調整 */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #ccc; /* 薄いグレーの境界線を追加 */
}

/* 画面幅が768px以下の場合のレスポンシブ対応 */
@media (max-width: 768px) {
    .companyinfo-content {
        flex-direction: column !important; /* 縦積みに変更 */
        align-items: center !important; /* 中央揃え */
    }

    .companyinfo-text{
        width: 100%; /* 幅を100%に */
        max-width: 500px; /* 最大幅を設定 */
        margin-bottom: 20px; /* 下にマージンを追加 */
    }
    
    .companyinfo-map {
        display: none;
    }
}

.btn-gradient {
    display: inline-block;
    padding: 0.2em 1.25em;
    text-decoration: none !important;
    border-radius: 3px;
    font-weight: bold;
    color: #FFF !important;
    background-image: linear-gradient(45deg, #709dff 0%, #b0c9ff 100%);
    transition: .2s;
}

.btn-gradient:hover {
    background-image: linear-gradient(45deg, #709dff 50%, #b0c9ff 100%);
}

.btn-square {
    font-size: 170%;
    position: relative;
    display: inline-block;
    padding: 0.3em 0.8em;
    text-decoration: none !important;
    color: #FFF !important;
    background: #2A5C9A;/*色*/
    border-radius: 4px;/*角の丸み*/
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.05);
    font-weight: bold;
    border: solid 2px #063271;/*線色*/
}

.btn-square:hover {
    /*押したとき*/
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.30);
}

.btn-shosai {
    font-size: 120%;
    position: relative;
    display: inline-block;
    padding: 0.3em 1.2em;
    margin: 0.8em 0;
    text-decoration: none !important;
    color: #FFF !important;
    background: #2A5C9A;/*色*/
    border-radius: 4px;/*角の丸み*/
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.05);
    font-weight: bold;
    border: solid 2px #063271;/*線色*/
}

.btn-shosai:hover {
    /*押したとき*/
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.30);
}

.btn-flat {
    position: relative;
    display: inline-block;
    font-weight: bold;
    padding: 0.15em 0.5em;
    text-decoration: none !important;
    color: #fff !important;
    background: #2A5C9A;
    border-radius: 2px;/*角の丸み*/
}

/* --- ハンバーガーメニューのスタイル --- */
.hamburger-menu {
    display: none; /* デフォルトでは非表示 */
    position: fixed;
    top: 0.5px;
    left: 0.5px;
    width: 40px;
    height: 40px;
    background-color: #063271;
    opacity: 0.85;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1030; /* ナビゲーションより手前に表示 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.hamburger-menu:hover {
    opacity: 1;
}

.hamburger-menu .bar {
    display: block;
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background-color: #fff;
    margin: 4px 0;
    transition: 0.5s;
}

/* メニューが開いた時のハンバーガーアイコンのアニメーション */
.hamburger-menu.open {
    opacity: 1;
}

.hamburger-menu.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(7.5px, 7.5px) scaleX(1.41);
}


.hamburger-menu.open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7.5px, -7.5px) scaleX(1.41);
}

/* --- モバイル表示時のナビゲーションスタイル --- */
@media (max-width: 768px) {
    /* ハンバーガーメニューをモバイルでのみ表示 */
    .hamburger-menu {
        display: flex;
    }

    /* 通常のナビゲーションを非表示にし、サイドメニューとして設定 */
    #hpb-nav {
        position: fixed;
        top: 0;
        left: 0; /* 画面左端に固定 */
        width: 250px;
        height: 100%;
        background-color: rgba(52, 58, 64, 0.98); /* 少し濃い背景 */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* 左からの影 */
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; /* transformとopacityをトランジション */
        z-index: 1025; /* ハンバーガーボタンより奥 */
        overflow-y: auto; /* メニューが多い場合にスクロール可能に */
        transform: translateX(-100%); /* 画面外に完全に隠す */
        opacity: 0; /* 初期状態では透明 */
        pointer-events: none; /* 非表示時はクリック不可 */
        text-align: left; /* テキストを左寄せ */
    }

    /* サイドメニューが開いた時のスタイル */
    #hpb-nav.hpb-nav-open {
        transform: translateX(0); /* 画面内にスライドイン */
        opacity: 1; /* 表示時は不透明 */
        pointer-events: auto; /* 表示時はクリック可能 */
    }

    #hpb-nav ul {
        flex-direction: column; /* 縦並びにする */
        width: 100% !important;
    }

    #hpb-nav ul li {
        display: block !important; /* ブロック要素にして縦並び */
        width: 100% !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 区切り線 */
    }

    #hpb-nav ul li:last-child {
        border-bottom: none;
    }

    #hpb-nav ul li a {
        padding: 15px 20px !important;
        text-align: left; /* リンクテキストを左寄せ */
    }
}

.jigyou-table {
    letter-spacing: normal; 
    orphans: 2; 
    text-transform: none; 
    widows: 2;
    word-spacing: 0px; 
    -webkit-text-stroke-width: 0px; 
    text-decoration-thickness: initial; 
    text-decoration-style: initial; 
    text-decoration-color: initial; 
    width: 50%;
}

.calender-table {
    margin: 0px 10px 10px; 
    border-collapse: collapse; 
    border-width: 1px; 
    border-color: rgb(204, 204, 204); 
    border-style: solid; 
    color: rgb(0, 0, 0); 
    font-size: 12px; 
    font-style: normal; 
    font-variant-ligatures: normal; 
    font-variant-caps: normal; 
    font-weight: 400; 
    letter-spacing: normal; 
    orphans: 2; 
    text-align: left; 
    text-transform: none; 
    widows: 2; 
    word-spacing: 0px; 
    -webkit-text-stroke-width: 0px; 
    white-space: normal; 
    background-color: rgb(255, 255, 255); 
    text-decoration-thickness: initial; 
    text-decoration-style: initial; 
    text-decoration-color: initial;
    width: 50%;
}

.calender-day-table {
    margin: 0px 10px 10px; 
    border-collapse: collapse; 
    border-width: 1px; 
    border-color: rgb(204, 204, 204); 
    border-style: solid; 
    color: rgb(0, 0, 0); 
    font-size: 12px; 
    font-style: normal; 
    font-variant-ligatures: normal; 
    font-variant-caps: normal; 
    font-weight: 400; 
    letter-spacing: normal; 
    orphans: 2; 
    text-align: left; 
    text-transform: none; 
    widows: 2; 
    word-spacing: 0px; 
    -webkit-text-stroke-width: 0px; 
    white-space: normal; 
    background-color: rgb(255, 255, 255); 
    text-decoration-thickness: initial; 
    text-decoration-style: initial; 
    text-decoration-color: initial;
    width: 60%;
}

.book-frame {
    width: 85%;
    height: 700px;
}

.hpb-cnt-tb1 {
    width: 85%;
}

.MsoNormalTable {
    width: 85%;
}

.new-flexible-table {
    width: 85%;
}

.youtube-frame {
    padding: 10px 0;
    width: 45%;
    aspect-ratio: 16 / 9; 
}

@media (max-width: 768px) {
    .jigyou-table {
        width: 100%;
    }

    .calender-table {
        width: 85%;
    }

    .calender-day-table {
        width: 100%;
    }

    .book-frame {
        width: 100%;
    }

    .hpb-cnt-tb1 {
        width: 100%;
    }

    .MsoNormalTable {
        width: 100%;
    }

    .new-flexible-table {
        width: 100%;
    }

    .youtube-frame {
        width: 85%;
        aspect-ratio: 16 / 9; 
    }
}

@media (min-width: 769px) {
    :root { --header-height: 110px; } /* 固定ヘッダーの高さを設定 */

    [id] {
        scroll-margin-top: var(--header-height);
    }
}