/* 全体のリセットと基本設定 */
body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    font-size: 18px;
    line-height: 1.9;
    color: #333;
    background-color: #f4f4f4;
}

/* レイアウト用コンテナ */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
}

/* ヘッダー */
header {
    width: 100%;
    background-color: #005f73; /* 深い海の青 */
    position: relative; /* スマホメニューの配置基準にするため */
    color: #fff;
    padding: 1.2rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #94d2bd; /* ホバー時に明るい色に */
}

/* ハンバーガーメニューボタン（PCでは非表示） */
.hamburger {
    display: none;
}

/* メインコンテンツ */
main {
    padding: 0;
    min-height: 50vh; /* フッターを下に押し下げるための高さ確保 */
}

.hero {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px); /* ヘッダーの高さを引いて画面いっぱいに */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column; /* 要素を縦並びにする */
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff; /* 背景が画像になるので文字は白に */
}

/* 画像を暗くするフィルター（文字を読みやすくするため） */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 全体を暗くしつつ、下部をテーマカラーで濃くして次のセクションへ繋げる */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.3) 85%, #0199b8 100%);
    z-index: 1;
}

/* サブページ（container内）のヒーローセクション調整 */
.container .hero {
    color: #333; /* 文字色を黒に */
}

.container .hero::after {
    display: none; /* グラデーションを消す */
}

/* スライドショーのコンテナ */
.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* 各画像の設定 */
.slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像の比率を保ったままトリミング */
    opacity: 0; /* 最初は透明 */
    animation: slideAnime 20s infinite; /* 20秒でループ */
}

/* 画像ごとのアニメーション開始時間をずらす */
.slideshow img:nth-child(1) { animation-delay: 0s; }
.slideshow img:nth-child(2) { animation-delay: 5s; }
.slideshow img:nth-child(3) { animation-delay: 10s; }
.slideshow img:nth-child(4) { animation-delay: 15s; }

/* 文字などのコンテンツ */
.hero-content {
    position: relative;
    z-index: 2; /* フィルターより上に表示 */
    padding: 20px;
    max-width: 800px;
}

/* 文字に黒縁をつけて読みやすくする */
.hero-content h2, .hero-content p {
    text-shadow: 
        1px 1px 0 #000,
        -1px 1px 0 #000,
        1px -1px 0 #000,
        -1px -1px 0 #000;
}

button,
.btn {
    background-color: #00a896; /* ターコイズブルー */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

button:hover,
.btn:hover {
    background-color: #00877a; /* 少し濃いターコイズ */
}

/* --- 新しいセクション（POINT紹介）のスタイル --- */
.feature-section {
    min-height: 100vh; /* 1画面分の高さ */
    display: flex;
    align-items: center;
    position: relative;
    background-attachment: fixed; /* パララックス効果（背景固定） */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 0; /* 上下の余白を削除して画面いっぱいに */
}

/* 背景画像の上に重ねるグラデーション */
.feature-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 95, 115, 0.3), rgba(0, 95, 115, 0.7)); /* 青系のグラデーション */
    z-index: 1;
}

/* セクションの上下（切り替えポイント）に濃いグラデーションを追加 */
.feature-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #0199b8 0%, transparent 15%, transparent 85%, #0199b8 100%);
    z-index: 2; /* 背景(before)より上、コンテンツより下 */
    pointer-events: none;
}

/* コンテンツ配置用コンテナ */
.feature-container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    position: relative;
    z-index: 3; /* グラデーションより手前に表示 */
    display: flex;
    /* デフォルトは右寄せ */
    justify-content: flex-end;
}

/* セクションごとの交互配置（HTMLの構造依存） */
/* POINT 1 (section 2番目) -> 右 */
/* POINT 2 (section 3番目) -> 左 */
/* POINT 3 (section 4番目) -> 右 */

section:nth-of-type(odd) .feature-container {
    justify-content: flex-start; /* 左寄せ */
}

section:nth-of-type(even) .feature-container {
    justify-content: flex-end; /* 右寄せ */
}

/* 白背景の文章ボックス */
.feature-box {
    padding: 5rem 3rem; /* 上下の余白を広げる */
    border-radius: 0;
    width: 50%; /* コンテナの半分の幅に設定 */
    min-height: 100vh; /* 高さを画面いっぱいに */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box; /* paddingを含めて幅を50%にする */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: #333;
}

/* 右側のボックス（偶数番目）のグラデーション */
section:nth-of-type(even) .feature-box {
    background: linear-gradient(to right, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.98) 100%);
}

/* 左側のボックス（奇数番目）のグラデーション */
section:nth-of-type(odd) .feature-box {
    background: linear-gradient(to left, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.98) 100%);
}

.feature-box h3 {
    color: #005f73;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #00a896;
    display: inline-block;
}

/* --- SNSとAccessセクション --- */
.access-section {
    min-height: 100vh;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 50px 0;
}

.sns-links {
    display: flex;
    flex-direction: row; /* 横並びにする */
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.sns-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px; /* アイコンの幅 */
    height: 60px; /* アイコンの高さ */
    background-color: #333;
    color: #fff;
    border-radius: 50%; /* 完全な丸にする */
    text-decoration: none;
    font-size: 1.8rem; /* アイコンの大きさ */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sns-btn:hover {
    transform: translateY(-5px); /* ホバー時に少し浮く */
    opacity: 0.9;
}

/* 各SNSのブランドカラー */
.sns-btn.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.sns-btn.twitter { background-color: #000; }
.sns-btn.facebook { background-color: #1877f2; }
.sns-btn.line { background-color: #06c755; }

.contact-details {
    margin-top: 2.5rem;
    color: #444;
    line-height: 1.8;
    font-size: 1rem;
}

.contact-details p {
    margin: 0.8rem 0;
}

.contact-details i {
    margin-right: 1rem;
    color: #005f73;
    width: 20px;
    text-align: center;
}

/* --- 修正後のAccessセクション --- */
.access-flex-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.sns-area {
    flex: 1; /* 1の比率 */
}

.map-area {
    flex: 2; /* 2の比率 */
    text-align: left;
}

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

/* フッター */
footer {
    background-color: #005f73; /* ヘッダーと同じ色 */
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* フェードイン・アウトのアニメーション定義 */
@keyframes slideAnime {
    0% { opacity: 0; }
    5% { opacity: 1; }  /* 1秒かけてフェードイン */
    25% { opacity: 1; } /* 4秒間表示 */
    30% { opacity: 0; } /* 1秒かけてフェードアウト */
    100% { opacity: 0; }
}

/* --- ローディング画面 --- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #005f73; /* テーマカラー */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transition: opacity 3.0s ease;
}

.loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: 'Kaushan Script', cursive; /* 特殊な筆記体フォント */
    font-size: 4rem;
    z-index: 10000; /* 波より手前に表示 */
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0; /* 最初は非表示 */
    animation: fadeInText 1s ease forwards; /* 1秒かけてフェードイン */
    animation-delay: 0.1s; /* 0.5秒遅らせる */
}

.loader {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
}

/* 2つの波を違う速度で動かす */
.loader .wave:nth-of-type(1) {
    animation: wave-move 15s linear infinite;
}

.loader .wave:nth-of-type(2) {
    animation: wave-move 10s linear infinite reverse;
}

@keyframes wave-move {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

#loader-wrapper.loaded {
    opacity: 0;
    pointer-events: none; /* クリックイベントを無効化 */
}

/* テキストのフェードインアニメーション */
@keyframes fadeInText {
    0% { opacity: 0; }


    100% { opacity: 1; }
}

@media (max-width: 768px) {
/* 全体の文字サイズを小さくする */
    body {
        font-size: 16px;
    }
    /* ヘッダーの調整 */
    header h1 {
        font-size: 1.5rem;
    }


    p {
        font-size: 0.9rem;
    }
        transform::after scale(0.8);
    }

/* --- ページトップへ戻るボタン --- */
.page-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #00a896;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    opacity: 0; /* 最初は隠しておく */
    pointer-events: none; /* 隠れている時はクリック不可 */
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-top-btn.active {
    opacity: 1;
    pointer-events: auto;
}

.page-top-btn:hover {
    background-color: #00877a;
    transform: translateY(-3px);
}

/* --- お問い合わせフォームのスタイル --- */
#contactForm {
    background:none;
    width: 100%;
    max-width: 600px;
    margin-left: auto;  /*  */
    margin-right: auto; /* 中央配置 */
    background-color: rgba(255, 255, 255, 0.95); /* 背景を白くして見やすく */
    border-radius: 0px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: left; /* 入力項目は左寄せ */
}

#contactForm label {
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    color:black;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    color:black;
    box-sizing: border-box;
}

/* --- スマートフォン・タブレット向けのレスポンシブ設定 --- */
@media (max-width: 768px) {
    /* 全体の文字サイズ調整 */
    body {
        font-size: 16px;
/* Style for success/error messages */
.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

        color:black;
    }

    /* ヘッダーのレイアウト変更 */
    header .container {
        flex-direction: row; /* ロゴとハンバーガーを横並びに */
        justify-content: space-between;
        align-items: center;
    }

    /* ハンバーガーボタンを表示 */
    .hamburger {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        color: #fff;
    }

    .hamburger i {
        transition: transform 0.3s ease;
    }

    .hamburger.active i {
        transform: rotate(180deg);
    }

    /* ナビゲーションメニューを隠す（デフォルト） */



    header nav {
        display: none;
        position: absolute;
        top: 100%; /* ヘッダーのすぐ下 */
        left: 0;
        width: 100%;
        background-color: #005f73; /* ヘッダーと同じ背景色 */
        z-index: 999;
        padding-bottom: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    /* クラスがついたら表示 */
    header nav.active {
        display: block;
    }

    header nav ul {
        flex-direction: column; /* 縦並び */
        align-items: center;
        gap: 20px;
    }

    /* ヒーローセクション（トップ画像）の調整 */
    .hero {
        height: 60vh; /* スマホでは高さを抑える */
    }

    .hero-content {
        padding: 10px;
        margin-top: 0;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    /* POINTセクションの縦並び調整 */
    .feature-section {
        padding: 3rem 0;
        min-height: auto; /* 高さを内容に合わせる */
        background-attachment: scroll; /* スマホでの背景固定（パララックス）の不具合回避 */
    }

    /* 左右交互の解除（すべて中央寄せ・縦並び） */
    section:nth-of-type(odd) .feature-container,
    section:nth-of-type(even) .feature-container {
        justify-content: center;
    }

    .feature-box {
        max-width: 100%;
        padding: 2rem;
        margin: 0;
        min-height: auto;
    }

    /* ACCESS & SNS セクションの縦並び調整 */
    .access-flex-container {
        flex-direction: column;
        gap: 3rem;
    }

    .map-area {
        width: 100%;
        text-align: center;
    }
    
    .map-container iframe {
        height: 300px;
    }

    .loading-text {
        font-size: 2.5rem; /* スマホでは文字サイズを少し小さく */
    }
}
