/* --- 全体のリセットと基本設定 --- */
html {
    scroll-behavior: smooth; /* ページ内リンクをスムーズに */
}
body, h1, h2, h3, h4, p, ul, li, dl, dt, dd, table, th, td {
    margin: 0;
    padding: 0;
    line-height: 1.8; /* 行間を読みやすく */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; /* シンプルなフォント */
}

body {
    background-color: #FFFFFF; /* ベースカラー（白） */
    color: #333333; /* メインカラー（濃いグレー） */
    font-size: 16px;
}

a {
    color: #0055A4; /* アクセントカラー（青） */
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom; /* 画像下の余白消し */
}

/* サイトの横幅を制御するコンテナ */
.container {
    max-width: 1000px;
    margin: 0 auto; /* 中央寄せ */
    padding: 0 20px; /* スマホ用の左右余白 */
    box-sizing: border-box;
}

/* --- ヘッダー（サイトの看板） --- */
.header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo a {
    font-size: 24px;
    font-weight: bold;
    color: #333333;
    text-decoration: none;
}

.header-nav-pc ul {
    display: flex;
    list-style: none;
}
.header-nav-pc li {
    margin-left: 30px;
}
.header-nav-pc a {
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
}
.header-nav-pc a:hover {
    color: #333;
}

.header-nav-sp-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.header-nav-sp-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
}
.header-nav-sp-btn span:last-child {
    margin-bottom: 0;
}

/* --- メインコンテンツ --- */
main {
    padding-top: 80px;
}

/* メインビジュアル（ヒーロー） */
.hero {
    background-color: #f4f8fb; /* 背景色に戻す */
    padding: 60px 0;
    z-index: 1;
}

/* ★2カラムレイアウト用のコンテナ★ */
.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; /* テキストと画像の隙間 */
}

/* ★カラム1：テキスト側★ */
.hero-text {
    flex: 1; /* テキストが残りのスペースを埋める */
}

/* ★カラム2：画像側★ */
.hero-image {
    flex-basis: 40%; /* 画像が幅の40%を占める */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.hero-image img {
    width: 100%;
    display: block;
}

/* テキストの色をデフォルト（グレー）に戻す */
.hero h2 {
    font-size: 28px;
    line-height: 1.6;
    color: #333333;
    text-shadow: none; /* 影を削除 */
}
.hero-subtext {
    font-size: 16px;
    max-width: 800px;
    margin: 20px 0 0 0; /* 中央寄せ(auto)を解除 */
    color: #333333;
    text-shadow: none; /* 影を削除 */
}
.hero-contact {
    margin-top: 30px;
}
.hero-contact p {
    font-size: 14px;
    margin-top: 10px;
    color: #333333; /* 文字色を戻す */
}
.tel-button {
    font-size: 24px;
    padding: 15px 40px;
}
/* ★スマホ対応：ヒーロー（2カラムを縦積みに）★ */
    .hero-container {
        flex-direction: column-reverse; /* 画像が上、テキストが下に来る */
        gap: 30px;
    }
    .hero-text {
        text-align: center; /* スマホではテキストを中央揃えに */
    }
    .hero-image {
        flex-basis: auto;
        width: 90%; /* 画像を少し小さくして余白を作る */
    }
    .hero h2 {
        font-size: 20px;
    }
    .tel-button {
        font-size: 18px;
    }
/* 各セクション共通設定 */
.section {
    padding: 60px 0;
}
.bg-light {
    background-color: #f9f9f9;
}
.section-title {
    font-size: 24px;
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 30px;
    border-bottom: 3px solid #0055A4;
}
.section-title.white {
    color: #fff;
    border-bottom-color: #fff;
}
.section-lead {
    text-align: center;
    font-size: 16px;
    margin-bottom: 30px;
}
.section p {
    margin-bottom: 20px;
}
.mt-20 {
    margin-top: 20px;
}

/* 3つの強み */
.point-list {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 40px 0;
}
.point-item {
    width: 31%;
    border: 1px solid #eee;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.point-item h4 {
    font-size: 18px;
    border-left: 5px solid #0055A4;
    padding-left: 10px;
    margin-bottom: 15px;
}
.point-item p {
    font-size: 15px;
    margin-bottom: 0;
}

/* --- ★ 事業内容・料金（アコーディオン）★ --- */
.service-notes {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 25px;
}
.service-notes h4 {
    font-size: 18px;
    border-left: 5px solid #0055A4;
    padding-left: 10px;
    margin-bottom: 15px;
}
.service-notes .notes-list {
    list-style-position: inside;
}

.accordion {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: #fff;
    overflow: hidden;
}
.accordion-title {
    font-size: 18px;
    font-weight: bold;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: block;
    position: relative;
    transition: background-color 0.3s;
}
.accordion-title:hover {
    background-color: #f9f9f9;
}
.accordion-title::after { /* 開閉マーク */
    content: '＋';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #0055A4;
    font-weight: bold;
}
.accordion[open] > .accordion-title {
    border-bottom-color: #0055A4;
}
.accordion[open] > .accordion-title::after {
    content: '－';
}
.accordion-content {
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #eee;
}
.accordion-content h4 {
    font-size: 17px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.table-wrapper {
    overflow-x: auto;
}
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.table-wrapper th,
.table-wrapper td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}
.table-wrapper thead th {
    background-color: #f4f4f4;
    font-weight: bold;
}
.table-wrapper tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* --- 会社概要 (dl) --- */
.profile-greeting-title {
    font-size: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #0055A4;
    padding-left: 10px;
}
.profile-dl {
    margin-top: 30px;
    border-top: 1px solid #eee;
}
.profile-dl dt {
    font-weight: bold;
    padding: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}
.profile-dl dd {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

/* --- 注意事項 (ul) --- */
.notes-list {
    margin-left: 20px;
    list-style: disc;
}
.notes-list li {
    margin-bottom: 10px;
}
.notes-list ul {
    margin-top: 10px;
    margin-left: 20px;
    list-style: circle;
}

/* --- お問い合わせボタン --- */
.cta-section {
    background-color: #333;
    color: #fff;
    text-align: center;
}
.cta-button {
    display: inline-block;
    background-color: #0055A4;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    transition: opacity 0.3s;
    margin: 10px;
}
.cta-button:hover {
    opacity: 0.8;
    text-decoration: none;
}
.line-button {
    background-color: #06C755;
}
.link-group {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #555;
}
.link-group p {
    margin-bottom: 15px;
    font-weight: bold;
}
.link-group a {
    color: #fff;
    text-decoration: underline;
    margin: 0 10px;
    display: inline-block;
}

/* --- フッター --- */
.footer {
    background-color: #333333;
    color: #FFFFFF;
    padding: 30px 0;
    text-align: center;
}
.footer-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.footer-nav li {
    margin: 5px 15px;
}
.footer-nav a {
    color: #FFFFFF;
    text-decoration: none;
}
.copyright {
    font-size: 12px;
}

/* --- スマホ対応（レスポンシブ） --- */
@media (max-width: 768px) {
    main {
        padding-top: 72px;
    }
    
    .header-nav-pc {
        display: none;
    }
    .header-nav-sp-btn {
        display: block;
    }
    .header-logo a {
        font-size: 20px;
    }

    .hero h2 {
        font-size: 20px;
    }
    .tel-button {
        font-size: 18px;
    }
    
    .point-list {
        display: block;
    }
    .point-item {
        width: 100%;
        margin-bottom: 20px;
    }

    .profile-dl dt, .profile-dl dd {
        padding: 12px 15px;
    }

    .cta-button {
        display: block;
        width: 90%;
        margin: 15px auto;
        padding: 15px 20px;
    }
    .link-group a {
        display: block;
        margin-bottom: 10px;
    }

    /* --- スマホの文字サイズ調整 --- */
    body {
        font-size: 15px;
        line-height: 1.7;
    }
    .section-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    .point-item h4 {
        font-size: 17px;
    }
    .profile-greeting-title {
        font-size: 18px;
    }
    .notes-list {
        margin-left: 15px;
    }

    /* --- ★スマホ対応（事業内容・料金）--- */
    .service-notes {
        padding: 15px;
    }
    .service-notes h4 {
        font-size: 17px;
    }
    .accordion-title {
        font-size: 16px;
        padding: 15px 20px;
    }

    /* ▼★ このブロックを追記 ★▼ */
    .table-wrapper table {
        min-width: 650px; /* テーブルの最小幅を指定 */
    }
    /* ▲★ 追記ここまで ★▲ */

    .table-wrapper th,
    .table-wrapper td {
        padding: 10px;
        font-size: 14px;
    }
}

/* --- ★ 施工事例ギャラリー（ハイブリッド版） ★ --- */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PCでは3列 */
    gap: 20px; /* アイテム間のスキマ */
    align-items: start; /* ボックスを上に揃える */
}

.gallery-item {
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden; /* 角丸を適用 */
}

/* ▼ 共通の画像ボックス・ラベル ▼ */
.gallery-item .ba-image-box {
    position: relative;
}
.gallery-item .ba-image-box img {
    width: 100%;
    display: block;
}
.ba-label {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 0 0 5px 0; /* 右下だけ角丸 */
}
.ba-label.after {
    background-color: #0055A4; /* Afterは青色に */
}

/* ▼ 1. B/A（縦積み）用スタイル ▼ */
.gallery-item .ba-image-wrapper.stacked {
    display: block;
}
.gallery-item .ba-image-wrapper.stacked .ba-image-box {
    width: 100%;
}
.gallery-item .ba-image-wrapper.stacked .ba-image-box:first-child {
    margin-bottom: 2px;
}

/* ▼ 2. B/A（横並び）用スタイル ▼ */
.gallery-item .ba-image-wrapper.side-by-side {
    display: flex;
    gap: 2px;
    background-color: #ddd;
}
.gallery-item .ba-image-wrapper.side-by-side .ba-image-box {
    width: 50%;
}

/* ▼ 3. 通常（1枚）用スタイル ▼ */
.gallery-item .single-image-box img {
    width: 100%;
    display: block;
}

/* ▼ 共通の説明文 ▼ */
.gallery-item p {
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}


/* --- ★ スマホ対応（施工事例）★ --- */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(1, 1fr); /* スマホでは1列 */
    }
}
/* --- ★ お問い合わせボタンの横並び設定 ★ --- */
.contact-buttons-wrapper {
    display: flex;
    justify-content: center; /* 中央寄せ */
    align-items: center;
    gap: 20px; /* ボタン間の隙間 */
    margin-bottom: 10px;
}

/* スマホ対応：ボタンを縦に並べる（横並びだと狭すぎるため） */
@media (max-width: 768px) {
    .contact-buttons-wrapper {
        flex-direction: column; /* 縦並びにする */
        gap: 15px;
    }
    .contact-buttons-wrapper .cta-button {
        width: 80%; /* スマホでは幅を広げて押しやすく */
        margin: 0 auto; /* 中央寄せ */
    }
}
/* ページ全体の基本設定 */
html {
    /* これを入れると、アンカーリンクで飛んだ時にヘッダーに隠れなくなります */
    scroll-padding-top: 100px; 
}

body {
    /* 画面の端でビヨーンとなる（バウンドする）のを防ぐ */
    overscroll-behavior-y: none;
    
    /* ページの上下左右にできる変な隙間を消す */
    margin: 0;
    padding: 0;
}
/* --- ★ スマホメニューの動き（追記分） ★ --- */
@media (max-width: 768px) {
    /* メニューが開いた時のスタイル */
    .header-nav-pc.active {
        display: block; /* 表示する */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* 画面全体 */
        background-color: rgba(255, 255, 255, 0.98); /* 白背景 */
        z-index: 90; /* ヘッダーの下 */
        padding-top: 80px; /* ヘッダーの分あける */
        text-align: center;
        animation: fadeIn 0.3s ease; /* ふわっと出す */
    }

    .header-nav-pc.active ul {
        display: block; /* 縦並び */
    }

    .header-nav-pc.active li {
        margin: 25px 0; /* 項目の間隔 */
    }
    
    .header-nav-pc.active a {
        font-size: 18px;
        font-weight: bold;
        color: #333;
        display: block;
        padding: 10px;
    }

    /* ボタンが押された時の×印アニメーション */
    .header-nav-sp-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .header-nav-sp-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .header-nav-sp-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .header-nav-sp-btn span {
        transition: all 0.3s; /* なめらかに動く */
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}