/* ブラウザのデフォルトの余白をリセット */
body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li {
    margin: 0;
    /* 外側の余白 (マージン) を0にする */
    padding: 0;
    /* 内側の余白 (パディング) を0にする */
}

/* リストの装飾をリセット */
ul,
ol {
    list-style: none;
}

/* 画像を扱いやすくする */
img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
    /* 画像の下にできるわずかな隙間をなくす */
}

/* ==================================== */
/* 共通設定 (PC・SP共通) */
/* ==================================== */

.site-header {
    background-color: #000;
    /* 背景を黒に */
    color: #fff;
    /* テキストを白に */
    padding: 10px 20px;
    position: relative;
    /* ハンバーガーメニューとの関連で設定 */
}

.header-inner {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    /* ロゴと右側コンテンツを左右に配置 */
    align-items: center;
    /* 縦方向の中央揃え */
}

/* ロゴのスタイル */
.header-logo img {
    height: 40px;
    /* ロゴの高さ (調整してください) */
    width: auto;
    display: block;
}

/* 右側コンテンツ全体の配置 */
.header-right-content {
    display: flex;
    flex-direction: column;
    /* 縦方向に並べる */
    align-items: flex-end;
    /* 右寄せ */
    text-align: right;
}

/* 営業時間と電話番号 */
.header-contact {
    margin-bottom: 5px;
    /* メニューとの間に少しスペース */
    font-size: 14px;
}

.header-hours {
    margin: 0;
    line-height: 1.5;
}

.header-tel {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    line-height: 1.2;
    display: block;
}

/* メニューのスタイル */
.header-nav {
    margin-top: 5px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    /* メニュー項目を横並びに */
    gap: 15px;
    /* メニュー項目間のスペース */
}

.header-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    /* メニュー項目が折り返さないように */
}

/* ハンバーガーボタン (PCでは非表示) */
.hamburger-menu-button {
    display: none;
}

/* SP用のドロワーメニュー (現時点では非表示) */
.drawer-menu {
    display: none;
}

@media (max-width: 768px) {
    .drawer-menu {
        display: block;
    }

    .header-inner {
        padding: 5px 0;
    }

    .header-right-content {
        display: none;
    }

    .header-logo img {
        height: auto;
        width: 65%;
        display: block;
    }

    .hamburger-menu-button {
        display: block;
        width: 30px;
        height: 30px;
        background: none;
        border: none;
        position: relative;
        cursor: pointer;
        padding: 0;
        z-index: 100;
        /* ロゴの上に表示するため */
    }

    .hamburger-menu-button span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #fff;
        position: absolute;
        left: 0;
        transition: transform 0.3s, opacity 0.3s;
    }

    .hamburger-menu-button span:nth-child(1) {
        top: 4px;
    }

    .hamburger-menu-button span:nth-child(2) {
        top: 14px;
    }

    .hamburger-menu-button span:nth-child(3) {
        top: 24px;
    }

    .drawer-menu {
        /* 初期状態は画面外に隠しておく */
        position: fixed;
        top: 0;
        right: -300px;
        /* 右側に隠す */
        width: 300px;
        /* メニューの幅 */
        height: 100vh;
        background-color: #333;
        /* メニューの色を少し変えてもOK */
        padding: 80px 20px 20px;
        box-sizing: border-box;
        transition: right 0.3s ease-in-out;
        z-index: 99;
    }

    .drawer-nav-list {
        list-style: none;
        padding: 0;
        margin: 0 0 30px 0;
    }

    .drawer-nav-list a {
        display: block;
        color: #fff;
        text-decoration: none;
        padding: 15px 0;
        font-size: 16px;
    }

    .drawer-contact {
        padding-top: 20px;
        border-top: 1px solid #555;
    }

    .drawer-tel {
        color: #fff;
        text-decoration: none;
        font-size: 18px;
        display: block;
        margin-top: 10px;
    }

    .drawer-menu.is-active {
        right: 0;
        /* 右からスライドインして表示 */
    }

    /* アイコンをX印に変えるアニメーション */
    .hamburger-menu-button.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger-menu-button.is-active span:nth-child(2) {
        opacity: 0;
        /* 真ん中の線を消す */
    }

    .hamburger-menu-button.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .is-drawer-open {
        overflow: hidden;
    }
}

/** メインビジュアル **/
/* ==================================== */
/* メインビジュアル */
/* ==================================== */

.main-visual {
    width: 100%;
    height: 717px;
    position: relative; /* バナー絶対配置の基準点 */
    overflow: hidden; /* 要素がはみ出さないように */
    background-color: #000; /* 画像表示エリア外の背景色 */
}

/* PC用の画像コンテナ（PCで表示） */
.visual-image-pc {
    width: 100%;
    height: 100%;
    display: flex; /* 画像を中央に配置するためにFlexboxを使用 */
    justify-content: center;
    align-items: center;
}

.visual-image-pc img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* SP用の画像コンテナ（PCで非表示） */
.visual-image-sp {
    display: none;
}

/* バナーのPC表示時のスタイル（右下に重ねる） */
.visual-banner-link {
    position: absolute;
    bottom: 30px; /* 下端からの距離 */
    right: 30px; /* 右端からの距離 */
    display: block;
    z-index: 50;
    /* PCでは幅の指定は不要（imgタグの元のサイズが適用される） */
}

.visual-banner-link img {
    height: auto;
    display: block;
}

/* ==================================== */
/* SP表示 (768px以下の時) のブロック内 */
/* ==================================== */

@media (max-width: 768px) {
    .main-visual {
        height: 520px;
        display: flex; 
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
    }

    /* PC用の画像を非表示 */
    .visual-image-pc {
        display: none;
    }

    /* SP用の画像コンテナを表示 */
    .visual-image-sp {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1;
    }

    .visual-image-sp img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
    }

    /* バナーのSP表示時のスタイル（下寄せ、左右中央） */
    .visual-banner-link {
        position: relative;
        margin-bottom: 0;
        right: 0;
        z-index: 10;
    }

    .visual-banner-link img {
        max-width: 80%;
        margin: 0 auto;
    }
}


/**環境への取り組み**/
.environment-section {
    width: 100%;
    min-height: 600px;
    padding: 60px 20px;
    box-sizing: border-box;
    color: #333333;
    position: relative;
    z-index: 1;
    background-image: url('../img/environment.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}
.environment-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5); 
    z-index: -1;
}

.environment-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.environment-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
}

.policy-list {
    list-style: none;
    padding: 0;
}

.policy-list li {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
    text-align: left; /* 箇条書きは左寄せに戻す */
}

.policy-list li::before {
    content: "●";
    color: #333;
    font-size: 14px;
    position: absolute;
    left: 0;
    top: 0;
}

@media (max-width: 768px) {
    .environment-section {
        min-height: 500px;
        padding: 0 15px;
        background-attachment: scroll;
        background-image: url('../img/environment.jpg'); 
    }
    
    .environment-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .policy-list li {
        font-size: 16px;
        line-height: 1.7;
    }
}


/* ==================================== */
/* サービス紹介セクション */
/* ==================================== */

.service-section {
    padding: 80px 20px; /* 上下の余白 */
    background-color: #f7f7f7; /* 背景色 */
}

.section-title-wrap {
    text-align: center;
    margin-bottom: 40px;
}

.service-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex; 
    justify-content: space-between;
    gap: 30px;
}

.service-item {
    width: calc(100% / 3 - 20px);
    background-color: #fff;
    overflow: hidden;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

h3 {
    margin-top: 20px;
}
.item-image {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: auto;
    display: block;
}

.item-text {
    padding: 20px 15px;
    line-height: 1.6;
    flex-grow: 1;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}
.item-text a {
    text-decoration: none;
    color: rgb(51, 85, 220);
}

.item-link-button {
    display: inline-block;
    margin-top: auto;
}

@media (max-width: 768px) {
    .service-section {
        padding: 40px 15px;
    }

    .service-container {
        flex-direction: column; /* ↓↓↓ ボックスを縦に並べる ↓↓↓ */
        gap: 30px; /* 縦の隙間を維持 */
    }

    .service-item {
        width: 100%; /* 横幅いっぱいに広げる */
        padding-bottom: 20px;
    }

    .item-text {
        flex-grow: 0; /* SPでは高さを揃える必要がないので解除 */
    }
}


/* ==================================== */
/* 会社概要セクション */
/* ==================================== */

.company-section {
    padding: 80px 20px;
    color: #fff; /* 文字色を白に */
    position: relative;
    z-index: 1;
    background-image: url('../img/company.jpg');
    background-size: cover;
    background-position: center;
}

.company-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.company-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.detail-title {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 2px solid #fff; /* 白の線で区切る */
    text-align: left;
}
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 50px;
}

.detail-table th,
.detail-table td {
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    text-align: left;
    line-height: 1.6;
}
.detail-table tbody tr:last-child th,
.detail-table tbody tr:last-child td {
    border-bottom: none;
}
.detail-table th {
    width: 150px;
    min-width: 120px;
    font-weight: bold;
    color: #fff;
}
.business-list ul {
    list-style: disc;
    margin-left: 20px;
}
.business-list li {
    margin-bottom: 5px;
}
.history-table th {
    width: 120px;
    font-weight: normal;
    color: #fff;
    white-space: nowrap;
}
.vertical-align-top {
    vertical-align: top;
}


/* ==================================== */
/* SP表示 (768px以下の時) のブロック内 */
/* ==================================== */

@media (max-width: 768px) {
    /* ... 既存のSP用CSS ... */

    /* 会社概要セクションのSP設定 */
    .company-section {
        padding: 40px 15px;
        background-attachment: scroll; /* 背景固定を解除 */
        background-image: url('../img/company.jpg'); /* SP用背景画像に切り替え */
    }

    .company-section h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .detail-title {
        font-size: 20px;
    }

    .detail-table th,
    .detail-table td {
        padding: 10px 0;
        font-size: 14px;
        display: block; /* SPでは項目名と内容を縦に積み重ねる */
        width: 100% !important; /* 幅指定を解除 */
    }

    /* 会社情報テーブルの調整 */
    .detail-table th {
        font-weight: bold;
        padding-bottom: 0; /* 項目名と内容の間隔を詰める */
        text-align: left;
    }
    .detail-table td {
        padding-top: 5px; /* 項目名と内容の間隔を詰める */
        padding-left: 10px; /* 内容を少しずらして見やすくする */
    }

    /* 会社沿革の調整 */
    .history-table th {
        font-weight: normal;
        padding-bottom: 0;
        text-align: left;
    }
    .history-table td {
        padding-top: 5px;
        padding-left: 10px;
    }
    
    /* 営業品目のリスト */
    .business-list ul {
        margin-left: 10px;
    }
}

/* ==================================== */
/* ロゴスペースセクション */
/* ==================================== */

.logo-space-section {
    background-color: #000; /* 背景を黒に */
    height: 300px; /* セクションの高さ（任意で調整してください） */
    width: 100%;
    
    /* ↓↓↓ 上下左右中央寄せを実現 ↓↓↓ */
    display: flex;
    justify-content: center; /* 横方向の中央寄せ */
    align-items: center; /* 縦方向の中央寄せ */
    /* ↑↑↑ Flexboxで中央寄せ ↑↑↑ */
}

.logo-container {
    /* 必要であればロゴの最大幅をここで制御できます */
    max-width: 300px; 
    padding: 20px;
}

.logo-container img {
    /* 画像が親要素を超えないようにする */
    max-width: 100%; 
    height: auto;
    display: block;
    /* ロゴが目立つように、画像を少し明るく見せたい場合は shadow を追加 */
    /* filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5)); */
}
@media (max-width: 768px) {
    /* ... 既存のSP用CSS ... */

    /* ロゴスペースセクションのSP設定 */
    .logo-space-section {
        height: 200px; /* SP向けに高さを少し下げる */
    }

    .logo-container {
        max-width: 200px; /* SPでロゴのサイズを小さくする */
    }
}


/* ==================================== */
/* 所在地・マップセクション */
/* ==================================== */

.location-section {
    padding: 80px 20px; /* 上下の余白と左右のパディング */
    text-align: center;
    background-color: #f7f7f7;
}

.location-container {
    max-width: 1000px;
    margin: 0 auto;
}

.location-item {
    margin-bottom: 60px; /* 各拠点間の縦のスペース */
}

.location-name {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
    text-align: left;
}

.map-container {
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
    /* マップの境界線を薄く表示 */
    border: 1px solid #ddd; 
}

.map-container iframe {
    /* 埋め込みマップを親要素の幅いっぱいに広げる */
    width: 100%;
    /* 高さ300pxはHTMLで設定済み */
    display: block;
}

.address-details {
    padding: 0 15px; /* マップの幅からはみ出さないように左右にパディング */
    text-align: left;
    color: #555;
    font-size: 16px;
    line-height: 1.8;
}

.address-details strong {
    font-size: 18px;
    color: #333;
}

/* ==================================== */
/* SP表示 (768px以下の時) のブロック内 */
/* ==================================== */

@media (max-width: 768px) {
    /* ... 既存のSP用CSS ... */

    .location-section {
        padding: 40px 15px;
    }
    
    .location-item {
        margin-bottom: 40px;
    }

    .location-name {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .map-container iframe {
        height: 250px; /* SPでマップの高さを調整 */
    }

    .address-details {
        font-size: 14px;
        padding: 0; /* SPではパディングを解除して画面いっぱいに広げる */
    }

    .address-details strong {
        font-size: 16px;
    }
}


/* ==================================== */
/* フッターセクション */
/* ==================================== */
.site-footer {
    background-color: #000;
    color: #fff;
    padding: 30px 20px;
    font-size: 14px;
}

/* ---------------------------------- */
/* 1. トップ行: ロゴ, 連絡先, 注釈 */
/* ---------------------------------- */
.footer-top {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.footer-left-info {
    display: flex;
    align-items: end;
    gap: 30px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.footer-contact {
    text-align: right;
    line-height: 1.2;
}

.footer-address {
    font-size: 10px;
    opacity: 0.8;
    margin: 0;
}

.footer-tel {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: block;
}

.footer-hours {
    font-size: 12px;
    opacity: 0.7;
    margin: 0;
}

/* ---------------------------------- */
/* 2. ナビゲーション行 (4列 Grid) */
/* ---------------------------------- */
.footer-nav {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    
    /* 4列 Grid 設定 */
    display: grid;
    /* 1列目:1.2fr, 2列目:1.2fr, 3列目:1fr, 4列目(ボタン):0.8fr */
    grid-template-columns: 1.2fr 1.2fr 1fr 0.8fr; 
    gap: 20px; 
}

.nav-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav-group h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    white-space: nowrap;
}

.nav-group ul {
    list-style: none;
    padding: 0;
}

.nav-group li {
    margin-bottom: 5px;
}

.nav-group a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
}

/* 4列目: お見積りボタンのスタイル */
.footer-button-column {
    /* 縦位置の調整は不要 */
    display: block;
    text-align: right; /* 右端に寄せる */
    padding-top: 15px; /* H3の高さに合わせるための微調整 */
}

.footer-estimate-button {
    display: inline-block;
    width: 100%;
    max-width: 150px; /* ボタンの最大幅 */
}

.footer-estimate-button img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------------------------------- */
/* 3. コピーライト行 */
/* ---------------------------------- */
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.copyright {
    font-size: 12px;
    opacity: 0.5;
    margin: 0;
}

/* ---------------------------------- */
/* SP表示 (768px以下の時) のブロック内 */
/* ---------------------------------- */

@media (max-width: 768px) {
    
    /* 1. トップ行のSP設定 */
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
    }
    .footer-left-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }
    .footer-contact {
        text-align: left;
    }
    
    /* 2. ナビゲーション行のSP設定 */
    .footer-nav {
        /* 1列に設定して縦積みを実現 */
        grid-template-columns: 1fr; 
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .nav-column {
        gap: 20px;
    }
    
    .nav-group {
        margin-bottom: 0;
    }

    /* 4列目: お見積りボタンのSP設定 */
    .footer-button-column {
        padding-top: 0;
        margin-top: 20px;
        text-align: center;
    }
    
    .footer-estimate-button {
        width: 100%;
    }
}