/* リセットとベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #555;
    --secondary-color: #777;
    --text-color: #333;
    --light-bg: #f0f0f0;
    --border-color: #ddd;
    --accent-color: #c00;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAPElEQVQoU2NkYGD4z4AHMDIM0w2MRCvCphCbQmyKsSnEphCbQmyKsSnEphCbQmyKsSnEphCbQlyKAACzVwUK0dM8YQAAAABJRU5ErkJggg==') repeat;
    background-color: #e8e8e8;
}

/* ヘッダー */
header {
    background-color: #f5f5f5;
    background-image: url('../images/gif/header1.gif');
    background-repeat: repeat;
    padding: 15px 0 10px 0;
    position: relative;
}

.header-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.header-icons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.header-icons img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.header-title-bar {
    padding: 5px 15px;
    margin: 0 -15px 10px -15px;
    position: relative;
    width: 75%;
}

.header-title-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1.5%;
    background-color: #000;
    z-index: 0;
}

.header-title-bar-inner {
    position: absolute;
    left: 1.5%;
    top: 0;
    bottom: 0;
    right: 1.5%;
    background-color: #444;
    z-index: 0;
}

.header-title-bar-end {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1.5%;
    background-color: #ccc;
    z-index: 0;
}

.site-title {
    font-size: 1.6rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    color: #fff;
    margin: 0;
    position: relative;
    z-index: 1;
    display: inline;
}

.site-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

/* ナビゲーション */
nav {
    background-color: #e8e8e8;
    margin: 0;
}

nav ul {
    max-width: 980px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
    background-color: white;
}

/* PC専用：grid表示 - 3カテゴリドロップダウンで11列 */
@media (min-width: 769px) {
    nav ul {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    }
    nav li {
        background-image: url('../images/gif/28.gif');
        background-repeat: repeat-x;
    }
}

nav li:first-child,
nav li:last-child {
    background-color: white;
}

nav li {
    background-color: #555;
    border-right: 1px solid rgba(255,255,255,0.2);
    position: relative;
}

nav li:first-child,
nav li:last-child,
nav li.nav-sp-hide {
    background-image: none;
    background-color: white;
    border: none;
}

nav li:nth-child(10) {
    border-right: none;
}

nav a {
    display: block;
    padding: 0.4rem 0.3rem;
    text-decoration: none;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: normal;
    white-space: nowrap;
}

nav li:first-child a,
nav li:last-child a {
    cursor: default;
    color: transparent;
    user-select: none;
}

.main-nav li:not(:first-child):not(:last-child) a:hover {
    background-color: #ccc;
    color: #000;
    cursor: pointer;
}

/* ===== ドロップダウンナビ ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a::after {
    content: ' ▼';
    font-size: 0.65rem;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background-color: #444;
    border-top: 2px solid #c00;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
    display: block;
}

.nav-dropdown-menu li {
    display: block !important;
    width: 100% !important;
    background-color: #444 !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.15) !important;
    border-right: none !important;
    grid-column: unset !important;
}

.nav-dropdown-menu li:last-child {
    border-bottom: none !important;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 0.8rem;
    text-align: left !important;
    font-size: 0.82rem;
    white-space: nowrap;
    color: white !important;
}

.nav-dropdown-menu a:hover {
    background-color: #c00 !important;
    color: white !important;
}

.sitemap-list a:hover {
    color: #007a7a !important;
    font-weight: bold;
    text-decoration: underline !important;
    cursor: pointer !important;
    background-color: transparent !important;
}

/* メインコンテンツ */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 15px;
    background-color: white;
    min-height: 600px;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-top: 0;
}

section {
    margin-bottom: 2rem;
}

h2 {
    color: #000;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(to bottom, #d0d0d0 0%, #f0f0f0 100%);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, #900 0%, #c44 100%) 1;
    font-weight: normal;
    position: relative;
}

.content-section {
    background: white;
    padding: 0;
    margin-bottom: 2rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-box {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    padding: 0;
    border: 1px solid var(--border-color);
}

.sidebar-card img {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.sidebar-card-content {
    padding: 15px;
}

.sidebar-card h3 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.7rem;
    padding: 10px 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h3::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('../images/gif/05h3icon.gif');
    background-size: contain;
    background-repeat: no-repeat;
}

.sidebar-card ul {
    list-style: none;
    padding: 10px;
}

.sidebar-card li {
    padding: 0.4rem 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 0.95rem;
}

.sidebar-card li:last-child {
    border-bottom: none;
}

.sidebar-card a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-card a:hover {
    color: #003d7a;
    text-decoration: underline;
}

.topics-list {
    background-color: white;
    padding: 15px;
    border: 1px solid var(--border-color);
    max-height: 300px;
    overflow-y: auto;
}

.topics-list p {
    font-size: 0.9rem;
    line-height: 1.8;
    padding: 0.2rem 0;
    border-bottom: 1px dotted #ddd;
}

/* フッター */
footer {
    background-color: #e8e8e8;
    padding: 0 0 20px 0;
    margin-top: 0;
}

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0;
    background-color: white;
}

.contact-info {
    margin: 0 auto;
    background-color: white;
    width: fit-content;
    text-align: left;
    display: block;
    padding-left: 0;
}

.contact-info h3 {
    font-size: 1rem;
    margin: 0;
    color: #000;
    font-weight: normal;
    padding: 0.2rem 0.5em;
    background: linear-gradient(to bottom, #d0d0d0 0%, #f0f0f0 100%);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, #900 0%, #c44 100%) 1;
    display: block;
    width: auto;
}

.contact-info-details {
    padding: 15px 0;
    margin: 0;
    background-color: white;
    padding-left: 0;
}

.contact-info-details p {
    margin: 0.3rem 0;
    font-size: 1rem;
    color: #000;
    line-height: 1.6;
}

.phone-number {
    color: #c00;
    font-size: 1.2rem;
    font-weight: bold;
}

.phone-link {
    color: inherit;
    text-decoration: none;
}

.phone-link:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin: 0;
    padding: 15px 0 0 0;
    background-color: white;
}

footer address {
    font-style: normal;
    font-size: 0.9rem;
    color: #000;
    background-color: white;
    padding: 10px 20px;
    margin: 0 auto;
    display: block;
    width: fit-content;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        order: 2;
    }

    .main-content > div:not(.sidebar) {
        order: 1;
    }
    
    /* ハンバーガーボタン */
    .hamburger-btn {
        display: flex !important;
    }

    /* モバイルナビ：デフォルトは非表示 */
    .main-nav {
        position: relative;
    }

    /* 直下のulのみ非表示（ドロップダウンの子ulは対象外） */
    .main-nav > ul {
        display: none !important;
        width: 100% !important;
        max-width: 100% !important;
        background-color: #555 !important;
        padding: 0 !important;
        margin: 0 !important;
        grid-template-columns: none !important;
    }

    /* JS で .nav-open クラスが付いたら表示 */
    .main-nav.nav-open > ul {
        display: block !important;
    }

    nav li {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        border-right: none !important;
        border-bottom: 2px solid rgba(255,255,255,0.35) !important;
        background-image: none !important;
        background: linear-gradient(to bottom, #333 0%, #555 100%) !important;
    }

    /* トップレベルのダミーliのみ非表示 */
    nav li.nav-sp-hide {
        display: none !important;
    }

    nav a {
        display: block;
        text-align: left !important;
        padding: 0.75rem 1.2rem;
        width: 100%;
    }

    .nav-dropdown > a::after {
        content: ' ▶';
        float: right;
        font-size: 0.7rem;
    }

    .nav-dropdown.open > a::after {
        content: ' ▼';
    }

    .nav-dropdown {
        position: static !important;
    }

    /* ドロップダウンの子ul：デフォルト非表示 */
    .nav-dropdown-menu {
        display: none !important;
        position: static !important;
        border-top: none !important;
        box-shadow: none !important;
        background-color: transparent !important;
        height: auto !important;
    }

    /* .open クラスで表示 */
    .nav-dropdown.open > .nav-dropdown-menu {
        display: block !important;
        position: static !important;
        height: auto !important;
        overflow: visible !important;
        visibility: visible !important;
    }

    .nav-dropdown-menu li {
        background: linear-gradient(to bottom, #2a2a2a 0%, #444 100%) !important;
        border-bottom: 1px solid rgba(255,255,255,0.2) !important;
        padding-left: 1.5rem !important;
    }

    .nav-dropdown-menu a {
        font-size: 0.82rem !important;
        padding: 0.5rem 1rem !important;
        text-align: left !important;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .header-icons {
        justify-content: center;
    }
    
    h2 {
        font-size: 0.95rem;
    }
    
    footer address {
        display: block;
        width: 100%;
    }
}

/* ユーティリティクラス */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

.info-box {
    background-color: #fffbf0;
    border: 1px solid #f0e68c;
    padding: 15px;
    margin: 20px 0;
}

.info-box h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

header {
    background-image: url('../images/gif/header1.gif') !important;
    background-repeat: repeat !important;
    background-position: top left !important;
}

.header-content {
    background: transparent !important;
}

h2 {
    display: inline-block;
    max-width: 100%;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #444;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #c00;
    transform: translateY(-5px);
}

.breadcrumb {
    padding: 5px 0 10px 0;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #0066cc;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #666;
    margin: 0 5px;
}

.business-hours {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.business-hours strong {
    color: #c00;
}

@media (max-width: 768px) {
    .header-title-bar {
        width: 100% !important;
    }
    
    .price-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #c00;
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    padding: 10px 15px 20px 15px;
}

h2 {
    margin-top: 0.5rem;
}

.price-category:first-of-type {
    margin-top: 0rem;
}

/* ============================================================
   スマートフォン表示改善
   ============================================================ */
@media (max-width: 768px) {
    h2 {
        font-size: 1.05rem !important;
        line-height: 1.5;
    }
    h3 { font-size: 0.95rem; }
    .site-title {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }
    .site-description { display: none; }
    .content-box { padding: 0.8rem; }
    .price-table th,
    .price-table td {
        font-size: 0.82rem;
        padding: 0.4rem 0.5rem;
    }
    .cta-box .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .cta-box a.btn-tel,
    .cta-box a.btn-mail {
        width: 100%;
        max-width: 320px;
        text-align: center;
        font-size: 0.95rem;
        padding: 0.9rem 1rem;
    }
    .cta-box .cta-tel { font-size: 1.3rem; }
    .sidebar-card { margin-bottom: 0.8rem; }
    .flow-steps li {
        font-size: 0.88rem;
        padding-left: 2.8rem;
    }
    .breadcrumb {
        font-size: 0.8rem;
        word-break: break-all;
    }
    .note-box { font-size: 0.82rem; }
    .page-links { font-size: 0.85rem; }
    .hojo-card-grid { grid-template-columns: 1fr !important; }
    .form-group select { font-size: 0.95rem; }
    .profile-container { flex-direction: column; }
    footer address { font-size: 0.75rem; }
    .cta-box a.btn-tel {
        background-color: #c00;
        box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    }
}

/* ============================================================
   フッターナビゲーション専用スタイル
   ============================================================ */
.footer-nav {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 10px 40px;
    background-color: #e8e8e8;
}

.footer-nav ul {
    display: flex !important;
    justify-content: center;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    max-width: none !important;
    grid-template-columns: none !important;
}

.footer-nav li {
    display: block !important;
    width: auto !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    padding: 0 !important;
    grid-column: unset !important;
    position: static !important;
}

.footer-nav li:first-child,
.footer-nav li:last-child {
    display: block !important;
    background-color: transparent !important;
}

.footer-nav a {
    display: inline !important;
    color: #c00 !important;
    text-decoration: underline !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    white-space: normal !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    width: auto !important;
    height: auto !important;
}

.footer-nav a:hover {
    color: #800020 !important;
    text-decoration: underline !important;
    background: transparent !important;
    cursor: pointer !important;
}

@media (max-width: 768px) {
    .footer-nav {
        display: block !important;
        width: 100% !important;
        padding: 10px 0 !important;
        background-color: #e8e8e8 !important;
    }
    .footer-nav ul {
        display: flex !important;
        justify-content: center !important;
        background-color: transparent !important;
    }
    .footer-nav li {
        display: block !important;
        width: auto !important;
        background: transparent !important;
        background-image: none !important;
        border: none !important;
        padding: 0 !important;
    }
    .footer-nav a {
        display: inline !important;
        color: #c00 !important;
        text-decoration: underline !important;
        font-size: 1rem !important;
        background: transparent !important;
        padding: 0 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        width: auto !important;
        height: auto !important;
    }
}

/* ===== ハンバーガーメニュー ===== */
.hamburger-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: #555;
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.hamburger-btn:hover {
    background: #c00;
}

.hamburger-btn .hamburger-icon {
    font-size: 1.3rem;
    line-height: 1;
}

/* ===== tel:リンク スマホのみ有効 ===== */
.phone-link,
a[href^="tel:"] {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

@media (max-width: 768px) {
    .phone-link,
    a[href^="tel:"] {
        pointer-events: auto;
        cursor: pointer;
        color: inherit;
        text-decoration: underline;
    }
}

/* ===== スマホ最適化追加 (2026-03) ===== */

/* CTAボタン スマホ時縦並び */
@media (max-width: 600px) {
    .cta-box .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .cta-box a.btn-tel,
    .cta-box a.btn-mail {
        width: 100%;
        max-width: 280px;
        text-align: center;
        box-sizing: border-box;
    }
    .cta-box .cta-tel {
        font-size: 1.3rem;
    }
}

/* 価格テーブル スマホ時横スクロール対応 */
@media (max-width: 640px) {
    .price-table {
        font-size: 0.85rem;
    }
    .price-table th,
    .price-table td {
        padding: 0.4rem 0.5rem;
    }
}

/* パンくずリスト スマホ時 */
@media (max-width: 640px) {
    .breadcrumb {
        font-size: 0.82rem;
        white-space: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }
}

/* フォーム スマホ時のsubmitボタン */
@media (max-width: 600px) {
    .submit-btn {
        width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem;
    }
    .confirm-buttons {
        flex-direction: column;
    }
    .back-btn,
    .send-btn {
        width: 100%;
    }
}

/* サイドバー画像 スマホ時非表示（オプション：コンテンツ優先） */
@media (max-width: 768px) {
    .sidebar-card img {
        display: none;
    }
}

/* フッター 電話番号リンク強調（スマホのみ） */
@media (max-width: 768px) {
    .phone-link .phone-number {
        font-size: 1.1rem;
        font-weight: bold;
        color: #c00;
    }
}

/* FAQカテゴリータイトル スマホ時 */
@media (max-width: 600px) {
    .faq-category-title {
        font-size: 0.95rem;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .faq-toc ul {
        flex-direction: column;
    }
}

/* サイトマップページ専用スタイル */
#sitemap-body a {
    color: #0066cc !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    background-color: transparent !important;
    display: inline !important;
    padding: 0 !important;
    white-space: normal !important;
}
#sitemap-body a:hover {
    text-decoration: underline !important;
    color: #004499 !important;
}
#sitemap-body li {
    display: list-item !important;
    color: #333 !important;
}
