/* --- 基本設定 --- */
html {
    height: 100%; /* フッター固定のために追加 */
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    line-height: 1.8;
    margin: 0;
    font-size: 16px;
    
    /* ▼▼▼ フッター固定のために追加・変更 ▼▼▼ */
    display: flex;
    flex-direction: column;
    min-height: 100%;
    /* ▲▲▲ ここまで ▲▲▲ */
}

/* 管理画面のbodyには適用しないように除外 */
body.admin-bg {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: bold;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: #007bff;
    font-weight: normal;
    margin-top: 5px;
}

.text-center { text-align: center; }
.mt-40 { margin-top: 40px !important; }
.bg-light { background-color: #f8f9fa; padding: 60px 0; }

/* --- ヘッダー --- */
/* --- ヘッダー --- */
.header {
    /* ヘッダーの基本設定（固定表示とアニメーション） */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.4s, padding 0.4s;
    padding: 20px 0; /* 透明時の初期パディング */
}

/* ★トップページ（homeクラスを持つbody）のヘッダー初期スタイル */
.home .header {
    background-color: transparent; /* 背景を透明に */
}

/* ★スクロール後や下層ページのヘッダースタイル */
.header.scrolled,
body:not(.home) .header {
    background-color: #fff; /* 背景を白に */
    padding: 10px 0; /* 細めのパディングに変更 */
    border-bottom: 1px solid #e9e9e9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.header-logo a {
    font-size: 1.5rem; /* ロゴのサイズ調整 */
    font-weight: bold;
    transition: color 0.4s;
}

.header-nav ul {
    display: flex;
    align-items: center;
}

.header-nav li {
    margin-left: 30px; /* 少し間隔を広げる */
}

.header-nav a {
    font-weight: 500;
    transition: color 0.4s;
}

/* ★トップページのヘッダー文字色（背景が透明なので白） */
.home .header a {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* 読みやすくするため少し影を付ける */
}
.home .header a.contact-button {
    border: 1px solid #fff;
    background-color: transparent;
}
.home .header a.contact-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ★スクロール後や下層ページのヘッダー文字色（背景が白なので黒系） */
.header.scrolled a,
body:not(.home) .header a {
    color: #555;
    text-shadow: none; /* 影を消す */
}
.header.scrolled .header-logo a,
body:not(.home) .header .header-logo a {
    color: #333;
}
.header.scrolled a.contact-button,
body:not(.home) .header a.contact-button {
    background-color: #007bff;
    color: #fff;
    border: none;
}
.header.scrolled a.contact-button:hover,
body:not(.home) .header a.contact-button:hover {
    background-color: #0056b3;
}

/* 汎用ボタン */
.header-nav a.contact-button {
    padding: 8px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

/* --- メインコンテンツ --- */
main {
    flex-grow: 1; /* フッター固定のために追加（利用可能なスペースを埋める）*/
    
    /* 下層ページ用のヘッダー分の余白を広げる */
    padding-top: 110px; 
}
/* トップページではmainのpaddingをなくす */
body.home main {
    padding-top: 0;
}
/* ファーストビュー */
#hero {
    /* 基本的に画面いっぱいに表示 */
    height: 100vh;
    background-image: url('images/DJI_0442 (1).jpg'); /* 画像パスを再度ご確認ください */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.37); /* 文字を読みやすくするオーバーレイ */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h2 {
    font-size: 2.8rem;
    margin: 0 0 20px 0;
    line-height: 1.5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* お知らせ */
#news {
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}

.news-list li {
    padding: 15px 10px;
    border-bottom: 1px dotted #ccc;
    display: flex;
    align-items: center;
}
.news-list li:first-child {
    border-top: 1px dotted #ccc;
}

.news-date {
    margin-right: 20px;
    font-weight: bold;
    color: #555;
    font-size: 0.9em;
}

.news-category {
    background-color: #007bff;
    color: #fff;
    padding: 3px 10px;
    font-size: 0.8em;
    border-radius: 3px;
    margin-right: 20px;
    white-space: nowrap;
}

/* 強み */
#about {
    padding: 60px 0;
}
.about-flex {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}
.about-item {
    flex-basis: 31%;
    text-align: center;
}
.about-item h3 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* サービス紹介 */
#services {
    padding: 60px 0;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
.service-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.service-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}
.service-card-content {
    padding: 20px;
}
.service-card-content h3 {
    margin-top: 0;
    color: #333;
}
.service-card-content p {
    margin-bottom: 0;
    color: #666;
    font-size: 0.9em;
}

/* 汎用ボタン */
.button-primary {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}
.button-primary:hover {
    background-color: #0056b3;
    color: #fff;
    opacity: 1;
}

/* --- 下層ページ --- */
.page-title {
    background-color: #f1f8ff;
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}
.page-title h1 { margin: 0; }
.page-title p { margin: 0; color: #777; }

.service-details, #company-profile, #contact-form {
    padding: 60px 0;
}

/* 料金表・会社概要表 */
.price-table, .info-table {
    width: 100%;
    border-collapse: collapse;
}
.price-table th, .price-table td,
.info-table th, .info-table td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: left;
}
.price-table th, .info-table th {
    background-color: #f8f9fa;
    width: 30%;
}
.note {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
}
.business-content {
    padding-left: 20px;
    list-style: disc;
}

/* お問い合わせバナー */
#contact-banner {
    background-color: #007bff;
    color: #fff;
    padding: 50px 0;
    text-align: center;
}
#contact-banner h3 {
    font-size: 1.8rem;
    margin: 0;
}
#contact-banner p {
    margin: 10px 0 25px 0;
}
#contact-banner .button-primary {
    background-color: #fff;
    color: #007bff;
}
#contact-banner .button-primary:hover {
    background-color: #eee;
}

/* お問い合わせフォーム */
.form-wrapper {
    max-width: 800px;
    margin: 30px auto 0;
}
.form-item {
    margin-bottom: 25px;
}
.form-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
.form-item .required {
    background-color: #dc3545;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 5px;
}
.form-item input[type="text"],
.form-item input[type="email"],
.form-item input[type="tel"],
.form-item textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}
.checkbox-group label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
}
.checkbox-group input {
    margin-right: 5px;
}
.form-submit {
    text-align: center;
}

/* --- フッター --- */
.footer {
    background-color: #212529;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.footer-nav li {
    margin: 0 15px;
}
.footer-nav a {
    color: #fff;
}
.copyright {
    font-size: 0.9em;
    color: #aaa;
    margin: 0;
}



/* --- 管理画面・ログイン画面用スタイル --- */
.admin-bg {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

.login-wrapper {
    max-width: 400px;
    width: 100%;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-wrapper h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

.login-wrapper .error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
}

.admin-wrapper {
    width: 100%;
    max-width: 1000px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.admin-header h1 {
    margin: 0;
    font-size: 1.8rem;
}
.admin-header a {
    font-size: 0.9rem;
}

.admin-section {
    margin-bottom: 40px;
}
.admin-section h2 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.admin-table th {
    background-color: #f8f9fa;
}
.admin-table .content-cell {
    width: 50%;
}
.admin-table .action-cell {
    width: 150px;
    text-align: center;
}
.action-cell form {
    display: inline-block;
    margin-left: 10px;
}
.button-edit, .button-delete, .button-secondary {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}
.button-edit { background-color: #28a745; }
.button-delete { background-color: #dc3545; }
.button-secondary { background-color: #6c757d; color: #fff; }
.button-secondary:hover { color: #fff; opacity: 0.9; }

/* フォームのボタン位置調整 */
.form-submit a.button-secondary {
    margin-left: 10px;
}



@media (max-width: 768px) {
    /* ▼▼▼ スマホ用ヘッダーのスリム化 ▼▼▼ */
    .header,
    .header.scrolled, 
    body:not(.home) .header {
        padding: 0 15px;
    }
    .header-inner {
        height: 49px;
        min-height: auto;
        /* この align-items: center で中の要素が垂直中央になる */
        align-items: center; 
    }
    .header-logo a {
        font-size: 1rem;
        /* line-heightを固定値からリセットし、親のflexboxに中央揃えを任せる */
        line-height: 1.2; 
    }

    /* お問い合わせボタンの表示を調整 */
    .header-nav {
        margin-left: auto; 
        display: flex;
        align-items: center;
        height: 44px;
    }
    .header-nav ul {
        display: none; 
    }
    .header-nav a.contact-button {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* ▼▼▼ スマホ用メインコンテンツの調整 ▼▼▼ */
    main {
        padding-top: 44px; /* ヘッダーの高さに合わせる */
    }
    body.home main {
        padding-top: 0;
    }
    .hero-content h2 { font-size: 1.8rem; }
    .hero-content p { font-size: 1rem; }
    .about-flex { flex-direction: column; }
    .service-grid { grid-template-columns: 1fr; }
    .news-list li { flex-direction: column; align-items: flex-start; }
    .news-date, .news-category { margin-bottom: 5px; }
    .price-table th, .price-table td,
    .info-table th, .info-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .price-table th, .info-table th {
        text-align: center;
        background-color: #e9ecef;
    }
    .price-table tr, .info-table tr {
        margin-bottom: 10px;
        display: block;
        border: 1px solid #ddd;
    }

    /* ▼▼▼ スマホ用フッターの調整 ▼▼▼ */
    .footer {
        padding: 20px 0;
    }
    .footer-nav ul {
        flex-wrap: nowrap;
        white-space: nowrap;
        justify-content: center;
        padding: 0 10px;
    }
    .footer-nav li {
        margin: 0;
    }
    .footer-nav li + li::before {
        content: '|';
        margin: 0 10px;
        color: #888;
    }
    .footer-nav a {
        font-size: 0.75rem;
    }
    .copyright {
        font-size: 0.7rem;
        margin-top: 15px;
    }

    /* ▼▼▼ LINE予約の追従ボタン（スマホで表示） ▼▼▼ */
    .line-fab {
        display: flex; /* flex に上書きして表示 */
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        right: 15px;
        z-index: 1010;
        width: 130px;
        height: 48px;
        background-color: #06C755;
        color: #fff;
        font-size: 0.9rem;
        font-weight: bold;
        border-radius: 50px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        transition: opacity 0.3s;
    }
    .line-fab:hover {
        opacity: 0.9;
    }
    .line-fab .line-icon {
        width: 30px;
        height: 30px;
        margin-right: 6px;
    }
}

/* PCではLINEボタンを非表示にする（デフォルト）*/
.line-fab {
    display: none;
}

/* ▼▼▼ LINE予約の追従ボタンのスタイル ▼▼▼ */
.line-fab {
    display: flex; /* スマホでのみ表示 */
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 15px;
    z-index: 1010;
    width: 130px; /* ボタンの横幅 */
    height: 48px; /* ボタンの高さ */
    background-color: #06C755; /* LINEグリーン */
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
}



.line-fab:hover {
    opacity: 0.9;
}
.line-fab .line-icon {
    width: 30px; /* アイコンのサイズ */
    height: 30px;
    margin-right: 6px;
}