@charset "utf-8";

/* ========================================
   共通レスポンシブCSS
   ======================================== */

img {
    max-width: 100%;
    height: auto;
}

/* PC/スマホ表示切り替えユーティリティ */
.pc-only {
    display: block;
}
.mobile-only {
    display: none;
}

/* ========================================
   ハンバーガーボタン（PCでは非表示）
   ======================================== */
.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333;
    margin: 5px auto;
    transition: all 0.3s ease;
}

/* ハンバーガー → ✕ アニメーション */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* オーバーレイ（PCでは非表示） */
.nav-overlay {
    display: none;
}

/* ========================================
   固定フッターボタン（PCでは非表示）
   ======================================== */
.fixed-footer-buttons {
    display: none;
}

/* ========================================
   店舗選択モーダル（PCでは非表示）
   ======================================== */
.tel-modal-overlay {
    display: none;
}

/* ========================================
   スマートフォン・タブレット対応（768px以下）
   ======================================== */
@media screen and (max-width: 768px) {

    /* 表示切り替え */
    .pc-only {
        display: none !important;
    }
    .mobile-only {
        display: block;
    }
    .mobile-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    /* box-sizing をモバイルのみ適用 */
    * {
        box-sizing: border-box;
    }

    /* body */
    body {
        font-size: 16px;
        line-height: 1.9;
        color: #333;
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* wrapper全幅 */
    .wrapper {
        width: 100%;
    }

    /* header tagline非表示 */
    #header {
        display: none;
    }

    /* ----------------------------------------
       ヘッダー上部（ロゴ＋スマホボタン）
       ---------------------------------------- */
    #top .top_1st {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
    }

    #top .logo {
        float: none;
        margin: 0;
    }

    #top .logo img {
        max-width: 140px;
        height: auto;
    }

    /* top_2nd（MAP等サブリンク）非表示 */
    #top .top_2nd {
        display: none;
    }

    /* スマホ用事故連絡ボタン */
    .accident-btn-mobile {
        background-color: #c41e3a;
        color: #fff !important;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: bold;
        border-radius: 4px;
        text-decoration: none !important;
        white-space: nowrap;
    }

    /* ハンバーガーボタン表示 */
    .hamburger {
        display: block;
    }

    /* ----------------------------------------
       ナビゲーション（スライドイン）
       ---------------------------------------- */
    #navi {
        margin-bottom: 0;
        background: transparent;
    }

    #main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 60px;
    }

    #main-nav.active {
        right: 0;
    }

    #main-nav ul {
        display: block;
        width: 100%;
        text-align: left;
        margin: 0;
        padding: 0;
    }

    #main-nav ul li {
        display: block;
        border-bottom: 1px solid #eee;
        min-width: unset;
    }

    #main-nav ul li a {
        display: block;
        padding: 15px 20px;
        color: #333;
        font-size: 16px;
        width: 100%;
        min-height: 44px;
    }

    #main-nav ul li a:hover,
    #main-nav ul li a:active {
        background-color: #f5f5f5;
    }

    #main-nav ul li.current {
        background-color: #DEEBF7;
    }

    /* メニュー内電話ボタン */
    .nav-contact {
        padding: 20px;
        border-top: 2px solid #c41e3a;
        margin-top: 20px;
    }

    .tel-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background-color: #2e7d32;
        color: #fff !important;
        text-align: center;
        padding: 14px 15px;
        border-radius: 8px;
        margin-bottom: 10px;
        font-size: 15px;
        font-weight: bold;
        text-decoration: none !important;
        min-height: 44px;
    }

    /* オーバーレイ */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .nav-overlay.active {
        display: block;
    }

    /* ----------------------------------------
       固定フッターボタン
       ---------------------------------------- */
    .fixed-footer-buttons {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 900;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    }

    .fixed-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        text-decoration: none !important;
        font-size: 12px;
        font-weight: bold;
        min-height: 56px;
    }

    .fixed-btn .icon {
        font-size: 20px;
        margin-bottom: 3px;
    }

    .fixed-btn.tel {
        background-color: #2e7d32;
        color: #fff !important;
    }

    .fixed-btn.accident {
        background-color: #c41e3a;
        color: #fff !important;
    }

    /* ========================================
       ノートブックスタイル無効化
       ======================================== */

    /* 緑ボーダー・box-shadow を削除し全幅表示 */
    .note-style,
    .box_decoration_1,
    .nuno-style {
        border-left: none !important;
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 16px !important;
        background: #f9f9f9 !important;
    }

    /* コンテナ幅をモバイルに合わせてリセット */
    .concept-inner,
    #company-inner,
    #Company_Profile {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* ========================================
       会社概要テーブル修正（スマホ版）
       ======================================== */

    /* テーブル内リストのgrid解除 */
    #Company_Profile li,
    #Company_Profile .link li,
    #Company_Profile td li,
    table td li {
        display: block !important;
        line-height: 1.8;
        margin-bottom: 8px;
        padding: 4px 0;
    }

    /* テーブル全体 */
    #Company_Profile table {
        display: block;
        width: 100% !important;
    }

    /* tr を縦並びブロックに */
    #Company_Profile tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }

    /* th（見出しセル） */
    #Company_Profile th {
        display: block;
        width: 100%;
        padding: 12px 16px;
        background-color: #f5f5f5;
        border: none;
        border-bottom: 1px solid #ddd;
        font-weight: bold;
        font-size: 14px;
    }

    /* td（データセル） */
    #Company_Profile td {
        display: block;
        width: 100%;
        padding: 12px 16px;
        border: none;
        font-size: 15px;
        line-height: 1.8;
    }

    /* テーブル内のul */
    #Company_Profile td ul,
    #Company_Profile .link {
        display: block !important;
        width: 100%;
        padding: 0;
        margin: 0;
        text-align: left;
    }

    /* テーブル内のli（リンク一覧） */
    #Company_Profile td li,
    #Company_Profile .link li {
        display: block !important;
        min-width: unset;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        line-height: 1.6;
        height: auto;
    }

    #Company_Profile td li:last-child,
    #Company_Profile .link li:last-child {
        border-bottom: none;
    }

    /* リンクのスタイル */
    #Company_Profile .link a {
        display: block;
        color: #0066cc;
        text-decoration: none;
        padding: 4px 0;
    }

    /* ========================================
       本文読みやすさ改善
       ======================================== */

    /* 見出し */
    h1 {
        font-size: 24px;
        line-height: 1.4;
        margin: 0 0 20px 0;
        padding: 16px 0;
        color: #222;
        font-weight: bold;
        text-align: center;
        border-bottom: 3px solid #c41e3a;
    }

    h2 {
        font-size: 20px;
        line-height: 1.5;
        margin: 32px 0 16px 0;
        padding: 12px 16px;
        color: #333;
        font-weight: bold;
        background: linear-gradient(90deg, #f8f9fa 0%, #fff 100%);
        border-left: 4px solid #c41e3a;
        border-radius: 0 8px 8px 0;
    }

    h3 {
        font-size: 18px;
        line-height: 1.5;
        margin: 24px 0 12px 0;
        padding-bottom: 8px;
        color: #333;
        font-weight: bold;
        border-bottom: 2px dotted #ddd;
    }

    /* 段落 */
    p {
        font-size: 16px;
        line-height: 2.0;
        margin-bottom: 24px;
        color: #333;
        letter-spacing: 0.03em;
        text-align: justify;
        word-break: break-all;
    }

    p:last-child {
        margin-bottom: 0;
    }

    /* セクション区切り */
    section,
    .section {
        padding: 24px 0;
        margin-bottom: 16px;
    }

    section:nth-child(even),
    .section:nth-child(even) {
        background-color: #f9fafb;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* リスト（display:table, width:80%のグローバル設定をリセット） */
    ul, ol {
        display: block;
        width: 100%;
        padding-left: 24px;
        margin: 16px 0;
    }

    li {
        font-size: 16px;
        line-height: 1.9;
        margin-bottom: 12px;
        padding-left: 8px;
    }

    /* 強調 */
    strong, b {
        color: #c41e3a;
        font-weight: bold;
    }

    /* リンク */
    a {
        color: #0066cc;
        text-decoration: none;
    }

    p a, li a {
        text-decoration: underline;
        text-decoration-color: #0066cc40;
        text-underline-offset: 3px;
    }

    p a:active, li a:active {
        background-color: #e6f0ff;
    }

    /* 画像 */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

    /* 区切り線 */
    hr {
        border: none;
        height: 1px;
        background: linear-gradient(90deg, transparent, #ddd, transparent);
        margin: 32px 0;
    }

    /* テーブル */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 20px -20px;
        padding: 0 20px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }

    th, td {
        padding: 12px 10px;
        border: 1px solid #ddd;
        text-align: left;
    }

    th {
        background: #f8f9fa;
        font-weight: bold;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ユーティリティクラス */
    .emphasis-box {
        background: #fff8e6;
        border: 1px solid #ffc107;
        border-radius: 8px;
        padding: 16px 20px;
        margin: 20px 0;
    }

    .emphasis-box p {
        margin-bottom: 0;
    }

    .content-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        padding: 20px;
        margin: 20px 0;
    }

    .content-card h3 {
        margin-top: 0;
        padding-top: 0;
    }

    blockquote,
    .note {
        background: #f8f9fa;
        border-left: 4px solid #6c757d;
        padding: 16px 20px;
        margin: 20px 0;
        font-size: 15px;
        color: #555;
        border-radius: 0 8px 8px 0;
    }

    .readable-text {
        font-size: 17px;
        line-height: 2.1;
        color: #2c2c2c;
    }

    .readable-text p {
        margin-bottom: 28px;
    }

    .lead-text {
        font-size: 18px;
        font-weight: 500;
        color: #222;
        line-height: 1.9;
        margin-bottom: 24px;
    }

    /* ----------------------------------------
       フッター（固定ボタン分の余白）
       ---------------------------------------- */
    #footer {
        height: auto;
        margin-bottom: 0;
        padding: 16px 16px 70px;
        font-size: 14px;
        line-height: 1.8;
        text-align: center;
    }

    #footer p {
        text-align: center;
        margin: 0;
        padding: 8px 0;
    }

    /* ========================================
       電話店舗選択モーダル
       ======================================== */

    /* 固定ボタンの電話をボタン要素に対応 */
    .fixed-btn.tel {
        background-color: #2e7d32;
        color: #fff !important;
        border: none;
        cursor: pointer;
    }

    /* モーダルオーバーレイ */
    .tel-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 2000;
        align-items: flex-end;
        justify-content: center;
    }

    .tel-modal-overlay.active {
        display: flex;
    }

    /* モーダル本体（ボトムシート） */
    .tel-modal {
        background: #fff;
        width: 100%;
        max-width: 500px;
        border-radius: 16px 16px 0 0;
        padding: 24px 20px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    /* タイトル */
    .tel-modal-title {
        font-size: 16px;
        font-weight: bold;
        text-align: center;
        margin: 0 0 20px 0;
        color: #333;
    }

    /* 電話ボタン */
    .tel-modal-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 12px;
        text-decoration: none !important;
        color: #fff !important;
        font-weight: bold;
    }

    .tel-modal-btn.miyakonojo {
        background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    }

    .tel-modal-btn.kobayashi {
        background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    }

    .tel-modal-btn .shop-name {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .tel-modal-btn .shop-number {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .tel-modal-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* 閉じるボタン */
    .tel-modal-close {
        display: block;
        width: 100%;
        padding: 14px;
        margin-top: 8px;
        background: #f5f5f5;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        color: #666;
        cursor: pointer;
    }

    .tel-modal-close:active {
        background: #eee;
    }
}
