/* ==========================================
   株式会社 白井鋼業 共通＆メインCSS (style.css)
   ========================================== */

/* ベーススタイル */
html {
    scroll-behavior: smooth;
}
:root {
    --primary-color: #0f2b5c;   /* 軸となる「深いロイヤルブルー」 */
    --secondary-color: #1d4ed8; /* アクセントとなる鮮やかな青 */
    --accent-color: #60a5fa;    /* 暗い背景でもハッキリ見える明るい青 */
    --alert-color: #e11d48;     /* 注意書き用のハッキリした赤 */
    --dark-color: #1e293b;      /* 通常文字用の濃いグレー（ほぼ黒） */
    --light-color: #f0f4f8;     /* 薄い背景用の爽やかな淡いブルーグレー */
    --border-color: #e2e8f0;
}
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
body { 
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif; 
    line-height: 1.7; 
    color: var(--dark-color); 
    background: #fff; 
    padding-top: 75px !important;
}
a { 
    text-decoration: none; 
    color: inherit; 
    transition: 0.2s; 
}
ul { 
    list-style: none; 
}
.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* セクションタイトル */
.section-title { 
    text-align: center !important; 
    margin-bottom: 40px; 
    font-size: 1.8rem; 
    font-weight: bold; 
    position: relative; 
    padding-bottom: 15px; 
    color: #0f2b5c; 
}
.section-title::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 50px; 
    height: 3px; 
    background-color: #1d4ed8; 
    border-radius: 2px; 
}
section { 
    padding: 80px 0; 
}
section, 
.container, 
section h2.section-title:first-child {
    margin-top: 0 !important;
}

/* ------------------------------------------
   ヘッダー (半透明ガラスモーフィズム対応)
   ------------------------------------------ */
header { 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(5px); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    position: fixed; 
    width: 100%; 
    top: 0; 
    left: 0;
    z-index: 100; 
    height: 75px !important;
}
.header-wrap { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 75px; 
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; 
}
.logo { 
    font-weight: bold; 
    font-size: 1.35rem; 
    color: var(--primary-color); 
    letter-spacing: 0.5px; 
    z-index: 110; 
}
.logo a { color: var(--primary-color); }

/* PC用ナビゲーション */
.nav-links { display: flex; gap: 20px; font-weight: bold; font-size: 0.95rem; }
.nav-links a { color: #334155; }
.nav-links a:hover { color: var(--secondary-color); }

/* スマホ用メニューボタン */
.menu-btn { 
    display: none; 
    flex-direction: column; 
    justify-content: space-between; 
    width: 30px; 
    height: 20px; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    z-index: 110; 
}
.menu-btn span { 
    width: 100%; 
    height: 3px; 
    background-color: var(--primary-color); 
    border-radius: 2px; 
    transition: all 0.3s ease; 
}

/* ------------------------------------------
   メインビジュアル & ボタン
   ------------------------------------------ */
.hero { background: #f8fafc; padding: 150px 0 100px; text-align: center; margin-top: 75px; }
.fade-in-up { 
    opacity: 0; 
    transform: translateY(20px); 
    animation: popUp 1.2s ease-out forwards; 
    max-width: 900px; 
    width: 90%; 
    height: auto; 
    margin: 0 auto; 
    display: block; 
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25)); 
    border-radius: 8px;
}
@keyframes popUp { to { opacity: 1; transform: translateY(0); } }

.hero-btns { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 35px; }
.btn { display: inline-block; padding: 14px 35px; font-weight: bold; border-radius: 6px; transition: 0.3s; cursor: pointer; font-size: 0.95rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-corporate { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.btn-corporate:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.btn-individual { background: #fff; color: var(--primary-color); border: 2px solid #fff; }
.btn-individual:hover { background: var(--light-color); border-color: var(--light-color); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.2); }

/* ------------------------------------------
   事業内容セクション
   ------------------------------------------ */
#business { 
    background: var(--primary-color); 
    color: #fff; 
    padding-top: 40px !important; 
    scroll-margin-top: 75px; 
}
#business .container {
    position: relative;
    z-index: 1;
}
#business .section-title { color: #fff; }
#business .section-title::after { background: var(--accent-color); }

.business-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 15px; margin-bottom: 40px; }
.business-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); padding: 22px; border-radius: 8px; text-align: center; font-weight: bold; color: #f8fafc; font-size: 1rem; display: flex; align-items: center; justify-content: center; min-height: 70px; }

.business-btn-wrap { text-align: center; margin-top: 20px; }
.btn-business-detail { display: inline-block; background: #fff; color: var(--primary-color); padding: 16px 50px; border-radius: 30px; font-weight: bold; font-size: 1.05rem; transition: 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn-business-detail:hover { background: var(--light-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }

.individual-note { text-align: center; margin-top: 25px; font-size: 0.85rem; color: #94a3b8; }

/* ------------------------------------------
   下層ページ用コンポーネント (共通枠組み)
   ------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 25px; margin-bottom: 40px; }
.card { background: #fff; padding: 30px 25px; border-radius: 8px; box-shadow: 0 4px 15px rgba(15,23,42,0.04); border: 1px solid #e2e8f0; }
.card h3 { margin-bottom: 15px; color: var(--primary-color); font-size: 1.2rem; font-weight: bold; }
.step-num { display: inline-block; background: var(--secondary-color); color: #fff; width: 24px; height: 24px; text-align: center; line-height: 24px; border-radius: 50%; margin-right: 10px; font-size: 0.85rem; font-weight: bold; }

.alert-text { color: var(--alert-color); font-weight: bold; margin-top: 15px; font-size: 0.95rem; background: rgba(225,29,72,0.06); padding: 12px; border-radius: 6px; border-left: 4px solid var(--alert-color); }

/* 取り扱い品目 */
#items { background-color: var(--light-color); }
.items-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.item-box { border: 1px solid #e2e8f0; padding: 22px; border-radius: 8px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.02); transition: 0.3s; border-left: 5px solid var(--secondary-color); }
.item-box:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.item-title { font-size: 1.2rem; font-weight: bold; color: var(--primary-color); margin-bottom: 6px; }
.item-desc { font-size: 0.95rem; color: #475569; }

/* 会社概要 */
#about { background-color: var(--light-color); padding-top: 60px; padding-bottom: 80px; }
.about-container { max-width: 800px; margin: 0 auto; padding: 0 15px; }

.profile-card { background: #fff; padding: 10px 15px; border-radius: 8px; margin-bottom: 25px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.profile-item { display: flex; align-items: center; border-bottom: 1px solid #e2e8f0; padding: 12px 0; }
.profile-item:last-child { border-bottom: none; }
.profile-label { width: 25%; background: #f1f5f9; color: #0f2b5c; font-size: 0.85rem; font-weight: bold; padding: 8px; text-align: center; border-radius: 4px; flex-shrink: 0; }
.profile-val { width: 75%; padding-left: 15px; font-size: 0.85rem; color: #334155; line-height: 1.5; }

.business-hours { display: flex; align-items: flex-start; gap: 8px; }
.business-hours .day { flex-shrink: 0; }
.business-hours .time { line-height: 1.5; }
.business-hours small { color: #64748b; font-size: 0.8rem; }

/* ISO認証 */
.iso-box { background: #fff; border: 2px solid var(--secondary-color); padding: 20px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); margin: 30px 0; font-weight: bold; }
.iso-badge { background: var(--secondary-color); color: #fff; padding: 5px 12px; font-weight: bold; border-radius: 4px; font-size: 0.85rem; }
.iso-text { font-size: 1.3rem; font-weight: bold; color: var(--primary-color); }

/* 取得許可カード */
.license-card { background: #fff; padding: 20px 15px; border-radius: 8px; margin-bottom: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.license-title { font-size: 1.1rem; color: #0f2b5c; margin-bottom: 15px; font-weight: bold; padding-left: 10px; border-left: 4px solid #0f2b5c; text-align: left; }
.license-item { display: flex; align-items: center; border-bottom: 1px solid #e2e8f0; padding: 12px 0; }
.license-item:last-child { border-bottom: none; }
.license-label { width: 35%; background: #f1f5f9; color: #0f2b5c; font-size: 0.85rem; font-weight: bold; padding: 8px 6px; text-align: center; border-radius: 4px; flex-shrink: 0; line-height: 1.3; }
.license-val { width: 65%; padding-left: 15px; font-size: 0.85rem; color: #334155; line-height: 1.5; word-break: break-all; }

/* アクセス */
.access-section { margin-top: 60px; }
.map-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); margin-top: 15px; }
.map-container iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }

/* お問い合わせ・フッター */
.contact-box { background: #fff; padding: 45px 30px; border-radius: 12px; box-shadow: 0 8px 25px rgba(15,23,42,0.06); text-align: center; border: 1px solid #e2e8f0; }
.tel-card { background: var(--light-color); padding: 25px 20px; border-radius: 8px; border: 2px solid var(--secondary-color); max-width: 600px; margin: 25px auto 20px auto; }
.tel-card label { display: block; font-size: 0.95rem; color: var(--secondary-color); font-weight: bold; margin-bottom: 8px; }
.tel-number { font-size: 3.2rem; font-weight: bold; color: var(--primary-color); line-height: 1.2; font-family: Arial, sans-serif; }
.tel-number a { color: var(--primary-color); text-decoration: none; }
.sub-contact-line { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 25px; font-size: 1.15rem; color: #334155; }
.sub-contact-line span strong { color: var(--primary-color); }

footer { background: #0f2b5c; color: #94a3b8; text-align: center; padding: 30px 0; font-size: 0.85rem; border-top: 4px solid #1d4ed8; margin-top: 50px; }

/* ------------------------------------------
   アコーディオン (事業内容)
   ------------------------------------------ */
.accordion-container { max-width: 800px; margin: 0 auto; }
.accordion-item { background: #fff; border-radius: 8px; margin-bottom: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.04); overflow: hidden; border: 1px solid #e2e8f0; }
.accordion-header { width: 100%; padding: 16px 20px; background: #fff; border: none; display: flex; align-items: center; cursor: pointer; text-align: left; transition: background 0.2s; }
.accordion-header:hover { background: #f1f5f9; }
.acc-num { font-size: 1.1rem; font-weight: bold; color: #1d4ed8; margin-right: 15px; flex-shrink: 0; }
.acc-title { font-size: 1.05rem; font-weight: bold; color: #0f2b5c; flex-grow: 1; display: flex; flex-direction: column; }
.acc-title small { font-size: 0.8rem; color: #64748b; font-weight: normal; margin-top: 2px; }
.acc-icon { font-size: 1.2rem; font-weight: bold; color: #0f2b5c; transition: transform 0.3s; margin-left: 10px; }
.accordion-item.active .acc-icon { transform: rotate(45deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: #fafafa; border-top: 1px solid transparent; }
.accordion-item.active .accordion-content { max-height: 1000px; border-top-color: #e2e8f0; }
.acc-body { padding: 20px; }

.acc-img-grid { display: flex; flex-direction: row; gap: 12px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.acc-img { width: 85%; flex-shrink: 0; height: 200px; object-fit: cover; border-radius: 6px; }

@media screen and (min-width: 769px) {
    .acc-img-grid { display: flex !important; flex-wrap: nowrap !important; gap: 15px !important; overflow-x: visible !important; align-items: flex-start !important; }
    .acc-img-grid .acc-img { flex: 1 1 0% !important; width: 100% !important; min-width: 0 !important; height: auto !important; aspect-ratio: 16 / 9 !important; object-fit: cover !important; border-radius: 6px !important; }
}

/* ------------------------------------------
   📱 スマホ専用表示調整 (768px以下)
   ------------------------------------------ */
@media screen and (max-width: 768px) {
    section { padding: 20px 0 !important; }
    .section-title { font-size: 1.2rem !important; margin-top: 10px !important; margin-bottom: 12px !important; }
    
    .hero { padding: 110px 0 60px; margin-top: 75px; }
    .hero-btns { flex-direction: column; align-items: center; gap: 15px; margin-top: 25px; }
    .btn { width: 100%; max-width: 280px; padding: 14px; text-align: center; }
    .btn-business-detail { width: 100%; max-width: 320px; padding: 15px 20px; }

    .menu-btn { display: flex; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 75px; left: 0; width: 100%; background: #fff; padding: 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); gap: 15px; text-align: center; border-top: 1px solid var(--border-color); }
    .nav-links.active { display: flex; }
    .menu-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-btn.active span:nth-child(2) { opacity: 0; }
    .menu-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    .license-item, .profile-item { display: block; }
    .license-label, .profile-label { width: auto; display: inline-block; margin-bottom: 8px; padding: 4px 10px; text-align: left; }
    .license-val, .profile-val { width: 100%; padding-left: 4px; }
    
    .iso-box { flex-direction: column; text-align: center; gap: 8px; padding: 15px; }
    .iso-text { font-size: 1.1rem; }

    .grid { display: flex !important; flex-direction: column !important; gap: 6px !important; }
    .card { margin: 0 !important; padding: 8px 10px !important; border-radius: 6px !important; }
    .card h3 { font-size: 0.9rem !important; margin-bottom: 2px !important; }
    .card p { font-size: 0.78rem !important; line-height: 1.35 !important; color: #475569 !important; }

    .step-num { width: 18px !important; height: 18px !important; font-size: 0.75rem !important; margin-right: 6px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; line-height: 1 !important; flex-shrink: 0 !important; }

    .items-list { display: flex !important; flex-direction: column !important; gap: 6px !important; }
    .item-box { margin: 0 !important; padding: 6px 10px !important; border-radius: 5px !important; }
    .item-title { font-size: 0.88rem !important; margin-bottom: 1px !important; }
    .item-desc { font-size: 0.75rem !important; line-height: 1.25 !important; }

    #business .grid, #business .business-grid, #business .business-list { display: flex !important; flex-direction: column !important; gap: 5px !important; }
    #business .card, #business .business-card { margin: 0 !important; padding: 6px 8px !important; border-radius: 5px !important; }
    #business h3, #business .business-card h3 { font-size: 0.8rem !important; font-weight: 600 !important; line-height: 1.2 !important; margin: 0 !important; }
}


/* ------------------------------------------
   📱 スマホ専用：事業内容 ＆ 新着情報のサイズ微調整 (768px以下)
   ------------------------------------------ */
@media screen and (max-width: 768px) {

    /* --- 事業内容セクション --- */
    /* 「確かな信頼と各種許認可に基づき…」の文言 */
    #business p {
        font-size: 0.85rem !important; /* 少し小さくスッキリ */
        margin-bottom: 20px !important;
        line-height: 1.5 !important;
    }
    
    /* 事業内容カード（8つのマス） */
    #business .business-card-grid {
        grid-template-columns: 1fr 1fr !important; /* 2列配置 */
        gap: 8px !important;
    }
    #business .business-card {
        font-size: 0.85rem !important; /* マスの中身も控えめなサイズに */
        padding: 10px 6px !important;
        min-height: 55px !important;
        line-height: 1.3 !important;
    }

    /* 「個人のお客様は…」の注意書き */
    .individual-note {
        font-size: 0.8rem !important;
        margin-top: 15px !important;
    }

    /* 「初めてお持ち込みされる方へ」のボタン枠 */
    #business div[style*="border: 2px solid"] {
        padding: 12px 15px !important; /* 枠のパディングをコンパクトに */
    }
    #business div[style*="border: 2px solid"] a {
        font-size: 0.88rem !important; /* 文字サイズを大きすぎず統一 */
        line-height: 1.4 !important;
    }


    /* --- 新着情報（お知らせ）セクション --- */
    /* お知らせ枠全体 */
    .news-frame {
        padding: 16px 14px !important;
    }

    /* 日付とタイトルの行 */
    .news-list li {
        padding: 10px 0 !important;
        font-size: 0.88rem !important; /* お知らせの本文サイズをスッキリ化 */
        line-height: 1.4 !important;
    }

    /* 日付の部分 */
    .news-list li span[style*="min-width"] {
        font-size: 0.8rem !important; /* 日付は少し控えめに */
        min-width: 85px !important;
    }

    /* 「お知らせ一覧を見る ＞」リンク */
    .news-frame a {
        font-size: 0.85rem !important;
    }
}


/* ------------------------------------------
   📱 スマホ専用のお問い合わせ調整 (768px以下)
   ------------------------------------------ */
@media screen and (max-width: 768px) {

    /* お問い合わせ枠全体 */
    .contact-box { 
        padding: 20px 15px !important; 
    }
    
    /* 「お見積もり・ご相談は無料です」の文言 */
    .contact-box > p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    /* 電話番号の白いカード枠 */
    .tel-card { 
        padding: 15px 10px !important; 
        margin: 15px 0 !important; 
        border-radius: 8px !important; 
    }
    .tel-card label {
        font-size: 0.85rem !important;
    }

    /* 電話番号本体のサイズをスマホ用にスッキリ調整 */
    .tel-number { 
        font-size: 1.8rem !important; 
        line-height: 1.2 !important;
    }
    .tel-number a { 
        font-size: 1.8rem !important; /* でかすぎず小さすぎないちょうど良いサイズ */
        color: var(--primary-color) !important;
        text-decoration: none !important;
    }

    /* FAX と E-MAIL の行 */
    .sub-contact-line { 
        flex-direction: column !important; 
        gap: 6px !important; 
        font-size: 0.88rem !important; 
        align-items: center !important; 
        margin-top: 15px !important;
        margin-bottom: 10px !important; 
    }

    /* 受付時間の注意書き */
    .contact-box p:last-child {
        font-size: 0.8rem !important;
        margin-top: 15px !important;
    }
}

/* ==========================================
   受付時間：8:00と13:00を縦綺麗に揃える
   ========================================== */
.contact-hours-box {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 8px; /* 「月～土」と「08:00」の間の余白 */
    margin-top: 25px;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hours-title {
    flex-shrink: 0; /* 「受付時間： 月～土」が折り返されないように保持 */
}

.hours-time-list {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.hours-time-list .holiday {
    font-size: 0.9em;
}

/* 📱 スマホ用調整（画面幅に合わせてスッキリ収める） */
@media screen and (max-width: 768px) {
    .contact-hours-box {
        font-size: 0.8rem !important; /* スマホ画面で1行に収まるサイズ */
        gap: 6px !important;
        margin-top: 20px !important;
    }
}
/* ==========================================
   お問い合わせ欄：PC/スマホ表示切り替え
   ========================================== */

/* 通常時（PC）：スマホ用を非表示 */
.sp-contact-info {
    display: none;
}

/* スマホ用テーブル基本CSS */
.contact-info-table {
    display: table;
    margin: 18px auto 0 auto;
    font-size: 0.82rem;
    color: #334155;
    text-align: left;
}
.info-row {
    display: table-row;
    line-height: 1.8;
}
.info-label {
    display: table-cell;
    font-weight: bold;
    color: var(--primary-color);
    text-align: justify;
    text-align-last: justify;
    padding-right: 4px;
    vertical-align: top;
}
.info-colon {
    display: table-cell;
    font-weight: bold;
    color: var(--primary-color);
    padding: 0 6px;
    vertical-align: top;
}
.info-value {
    display: table-cell;
    vertical-align: top;
    color: #334155;
}
.info-value a {
    color: #334155;
    word-break: break-all;
}
.hours-inner {
    display: flex;
    flex-direction: column;
}
.hours-inner .holiday {
    color: #64748b;
    font-size: 0.88em;
}

/* 📱 スマホ表示時（768px以下）：PC用を隠してスマホ用を表示 */
@media screen and (max-width: 768px) {
    .pc-contact-info {
        display: none !important; /* PC用を完全に隠す */
    }
    .sp-contact-info {
        display: block !important; /* スマホ用を表示する */
    }
}

/* 📱 スマホ時：三本線ボタンの位置を直接固定指定で調整 */
@media screen and (max-width: 768px) {
    .menu-btn {
        position: relative !important;
        right: 8px !important; /* ←★数字を大きくすると「左」に、小さくすると「右」に移動します */
        margin-left: auto !important;
    }
}