/* --- 基本設定 --- */
:root {
    --main-color: #0077cc;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ヘッダー --- */
header {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    /* ロゴの高さ調整 */
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.nav-menu li {
    border-right: 1px solid #ccc;
}

.nav-menu li:last-child {
    border-right: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 15px;
    transition: color 0.3s;
    display: block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--main-color);
}

.nav-contact {
    background: var(--main-color);
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px;
}

.nav-contact:hover {
    background: #005fa3 !important;
    color: white !important;
}

.hamburger-menu {
    display: none;
    font-size: 30px;
    cursor: pointer;
}

/* --- 文字サイズトグル --- */
.header-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.font-toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    position: relative;
    font-weight: bold;
    color: var(--text-color);
}

/* モバイル（ハンバーガーメニュー表示時）は左側に表示 */
.font-toggle-switch::after {
    content: "クリックで文字を大きくできます";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
    background: var(--main-color);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.font-toggle-switch::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 4px;
    border: 6px solid transparent;
    border-left-color: var(--main-color);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.font-toggle-switch:hover::after,
.font-toggle-switch:hover::before {
    opacity: 1;
}

/* PC（ハンバーガーメニュー非表示時）は右側に表示 */
@media (min-width: 769px) {
    .font-toggle-switch::after {
        right: auto;
        left: 100%;
        margin-right: 0;
        margin-left: 10px;
    }

    .font-toggle-switch::before {
        right: auto;
        left: 100%;
        margin-right: 0;
        margin-left: 4px;
        border-left-color: transparent;
        border-right-color: var(--main-color);
    }
}

.font-toggle-switch .toggle-label {
    font-size: 0.9rem;
    display: none;
}

.font-toggle-switch .toggle-slider-wrap {
    position: relative;
    width: 40px;
    height: 20px;
}

.font-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.font-toggle-switch .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: 0.4s;
}

.font-toggle-switch .slider:before {
    position: absolute;
    content: "A";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
    font-size: 10px;
    font-weight: bold;
    color: #777;
    text-align: center;
    line-height: 16px;
}

.font-toggle-switch input:checked+.slider {
    background-color: var(--main-color);
}

.font-toggle-switch input:checked+.slider:before {
    content: "あ";
    color: var(--main-color);
    transform: translateX(20px);
}

/* --- 文字サイズ大のスタイル --- */
body.font-large {
    font-size: 130%;
    line-height: 1.8;
    font-weight: 500;
}

body.font-large .logo {
    font-size: 28px;
    font-weight: bold;
}

body.font-large .nav-menu a {
    font-size: 18px;
    font-weight: 600;
}

body.font-large .hero h1 {
    font-size: 3rem;
    font-weight: bold;
}

body.font-large h2 {
    font-size: 2.2rem;
    font-weight: bold;
}

body.font-large .btn {
    font-size: 1.3rem;
    padding: 18px 40px;
    font-weight: bold;
}

body.font-large .page-title {
    font-size: 2.6rem;
    font-weight: bold;
}

body.font-large h3 {
    font-size: 1.7rem;
    font-weight: bold;
}

body.font-large p {
    font-size: 1.1rem;
    font-weight: 500;
}

body.font-large li {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

body.font-large .footer-info p {
    font-size: 1rem;
    font-weight: 500;
}

body.font-large .footer-nav a {
    font-weight: 600;
}

body.font-large td,
body.font-large th {
    font-weight: 500;
}

/* --- メインビジュアル --- */
.hero {
    background: linear-gradient(135deg, var(--main-color), #005fa3);
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background: white;
    color: var(--main-color);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* --- セクション共通 --- */
section {
    padding: 60px 0;
}

h2 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--main-color);
}

/* --- トラブル一覧 --- */
.trouble-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.trouble-item {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.trouble-item:hover {
    transform: translateY(-5px);
}

.trouble-item img {
    margin-bottom: 20px;
}

.trouble-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--main-color);
}

.trouble-item p {
    color: #666;
    line-height: 1.6;
}

/* --- 選ばれる理由 --- */
.reason-section {
    background: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
    margin: 40px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.reason-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* --- フッター --- */
footer {
    background: #333;
    color: white;
    padding: 40px 20px 20px;
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--main-color);
}

.footer-info {
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 5px;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
    border-top: 1px solid #555;
    padding-top: 20px;
}

/* --- モバイルメニュー --- */
.nav-menu.mobile-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    z-index: 100;
    align-items: stretch;
    /* 縦並びで幅いっぱいに */
    animation: slideDown 0.3s ease-out forwards;
    transform-origin: top center;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: scaleY(0);
    }

    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* バックドロップ（背景暗転） */
body.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    /* ヘッダーより下、コンテンツより上 */
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* メニューオープン時はスクロール禁止 */
body.menu-open {
    overflow: hidden;
}

/* ヘッダーをバックドロップより上に */
header {
    /* position: relative;  <-- 削除: stickyを維持するため */
    z-index: 1000;
    background: white;
    /* 背景色がないと透けるため */
}

.nav-menu.mobile-active li {
    border-right: none;
    /* デスクトップ用のボーダーを消す */
    border-bottom: 1px solid #eee;
    /* モバイル用のボーダーを追加 */
    text-align: center;
}

.nav-menu.mobile-active li:last-child {
    border-bottom: none;
}

.nav-menu.mobile-active a {
    padding: 15px 0;
    display: block;
}

.hamburger-menu.active {
    color: var(--main-color);
}

/* --- ページタイトル --- */
.page-title {
    font-size: 2rem;
    text-align: center;
    margin: 60px 0 50px 0;
    color: var(--main-color);
}

/* --- パンくずリスト --- */
.breadcrumb {
    margin-top: 30px;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--main-color);
    border-bottom: 2px solid var(--main-color);
    padding-bottom: 5px;
}

/* --- 対応エリア --- */
.area-info {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.area-list p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.map-container {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 8px;
}

/* --- 事業所概要テーブル --- */
.profile-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-table th,
.profile-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.profile-table th {
    background: var(--bg-color);
    font-weight: bold;
    color: var(--main-color);
    width: 150px;
}

.profile-table tr:last-child th,
.profile-table tr:last-child td {
    border-bottom: none;
}

/* --- レスポンシブ --- */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .header-inner {
        padding: 10px 15px;
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
    }

    .logo {
        font-size: 20px;
    }

    .header-right-group {
        gap: 10px;
    }

    .font-toggle-switch .toggle-label {
        display: inline;
        font-size: 0.8rem;
    }

    .header-controls {
        gap: 10px;
    }

    .hero {
        padding: 60px 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .trouble-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }

    .page-title {
        font-size: 1.6rem;
        margin: 40px 0 30px 0;
    }

    .area-info {
        padding: 20px;
    }

    .profile-table th {
        width: 120px;
        font-size: 0.9rem;
    }

    .profile-table th,
    .profile-table td {
        padding: 12px 15px;
    }
}

/* --- 通知スタイルのポップアップ --- */
.notification-toast {
    position: fixed;
    top: 80px;
    right: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    max-width: 280px;
    z-index: 2000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

/* 矢印を追加 */
.notification-toast::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    border: 10px solid transparent;
    border-left-color: white;
    filter: drop-shadow(2px 0 2px rgba(0, 0, 0, 0.1));
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    position: relative;
}

.notification-close {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #666;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.notification-close:hover {
    background: #333;
}

.notification-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.notification-icon img {
    width: 24px;
    height: 24px;
    display: block;
}

.notification-text {
    margin-bottom: 10px;
}

.notification-text strong {
    display: block;
    color: var(--main-color);
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.notification-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #333;
    line-height: 1.3;
}

.notification-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.notification-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.notification-checkbox span {
    cursor: pointer;
}

/* PC用のサイズ調整 */
@media (min-width: 769px) {
    .notification-toast {
        max-width: 320px;
        padding: 16px;
    }

    .notification-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .notification-text strong {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .notification-text p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .notification-checkbox {
        font-size: 0.85rem;
        gap: 6px;
    }

    .notification-close {
        width: 24px;
        height: 24px;
        font-size: 18px;
    }
}