/* --- 全体のリセットと共通設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #FAF9F6;       /* オフホワイト */
    --main-color: #8FA89B;     /* セージグリーン（オリーブ） */
    --accent-color: #E6DFD3;   /* リネンベージュ */
    --text-color: #333F48;     /* チャコールグレー */
    --white: #FFFFFF;
}

body {
    /* 全体の基本フォントを「はんなり明朝」に設定（読み込めない場合の予備に一般的な明朝体を指定） */
    font-family: "Hannari", "Shippori Mincho", "Noto Serif JP", serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: inherit;
}

.hero-sub {
    /* 英語のウェルカムメッセージ部分を「ひな明朝」に設定 */
    font-family: "Hina Mincho", serif;
    color: var(--main-color);
    font-size: 1.1rem; /* ひな明朝に合わせて少しだけサイズを調整 */
    letter-spacing: 0.15em;
    margin-bottom: 15px;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* --- ヘッダー --- */
.header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid rgba(143, 168, 155, 0.1);
}

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

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

.logo-img {
    height: 60px; /* ロゴの高さです。見栄えに合わせて 40px〜60px ほどで調整してください */
    width: auto;  /* 横幅は自動で綺麗に縮尺されます */
    display: block;
}

/* 🌿 PCメニュー：間隔を広げて上品なゆとりを持たせます */
.header-nav {
    display: flex;
    font-size: 0.95rem;
    font-weight: 500;
}

.header-nav a {
    margin-left: 35px !important; /* 項目同士の間隔を35pxに拡張 */
    letter-spacing: 0.05em;       /* 文字同士の間隔もほんのり広げて洋書風に */
    transition: color 0.3s ease;
}

.header-nav a:first-child {
    margin-left: 0 !important;    /* 一番左の項目だけ余白をカットして左揃えに */
}

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

/* --- メインビジュアル (Hero) --- */
.hero {
    position: relative;
    width: 100vw;       /* 画面の横幅いっぱいに広げる */
    height: 100vh;      /* 画面の縦幅いっぱいに広げる */
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* 背景スライダーの枠 */
.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* 文字より後ろに配置 */
}

/* 輝度調整用レイヤー（画像が明るすぎて文字が消えるのを防ぐ薄いフィルター） */
.hero-bg-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2); /* 画像の上にうっすら白を重ねる */
    z-index: 2;
}

/* コンテンツを囲むコンテナ（左側に寄せるためのガイド線） */
.hero-content-wrapper {
    position: relative;
    z-index: 3; /* 画像とフィルターより前面に出す */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* 【重要】文字を読みやすくする「半透明の白いリネン」のようなボックス */
.hero-content {
    max-width: 540px; /* ボックスの横幅 */
    background-color: rgba(255, 255, 255, 0.85); /* 85%の不透明度の白 */
    backdrop-filter: blur(8px); /* 背景の画像がすりガラス状に優しく透けるモダンな効果 */
    padding: 60px 50px;
    border-radius: 60px 20px 60px 20px; /* もともとの大人かわいい角丸をここに移植 */
    box-shadow: 0 20px 40px rgba(51, 63, 72, 0.08); /* 柔らかい影 */
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 25px;
}

.hero-desc {
    font-size: 0.95rem;
    color: #4A5560;
    margin-bottom: 35px;
}

.btn {
    display: inline-block;
    background-color: var(--main-color);
    color: var(--white);
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(143, 168, 155, 0.2);
}

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

/* スライド画像共通の設定 */
.slide-img {
    position: absolute; /* 画像を同じ位置に重ねる */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0px 0px 20px 20px; /* 特徴的なアシンメトリー角丸を維持 */
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    opacity: 0; /* 最初は透明にしておく */
    
    /* アニメーションの指定（20秒かけてループ、無限に繰り返す） */
    animation: fadeSlider 20s infinite;
}

/* 各画像のアニメーション開始タイミングをずらす（合計20秒） */
.slide-img:nth-child(1) { animation-delay: 0s; }
.slide-img:nth-child(2) { animation-delay: 5s; }
.slide-img:nth-child(3) { animation-delay: 10s; }
.slide-img:nth-child(4) { animation-delay: 15s; }

/* ふわっと切り替わるフェードイン・アウトのアニメーション設定 */
@keyframes fadeSlider {
    0% {
        opacity: 0;
        transform: scale(1.02); /* 切り替わり時にわずかにズーム */
    }
    5% {
        opacity: 1; /* ふわっと表示 */
        transform: scale(1);
    }
    33% {
        opacity: 1; /* 静止して見せている時間 */
    }
    38% {
        opacity: 0; /* ふわっと消える */
    }
    100% {
        opacity: 0;
    }
}

/* --- お知らせセクション --- */
.news-section {
    background-color: var(--white);
    padding: 80px 0;
}

.container-small {
    max-width: 900px; /* お知らせは少し横幅を狭くすると読みやすい */
    margin: 0 auto;
    padding: 0 20px;
}

/* セクションの見出し */
.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    font-family: "Hina Mincho", serif;
    color: var(--main-color);
    font-size: 0.9rem;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

/* リスト全体の枠 */
.news-list {
    border-top: 1px solid rgba(143, 168, 155, 0.2);
    margin-bottom: 40px;
}

/* 1件のお知らせの枠 */
.news-item {
    border-bottom: 1px solid rgba(143, 168, 155, 0.2);
}

.news-link {
    display: flex;
    align-items: center;
    padding: 20px 10px;
}

.news-link:hover {
    background-color: rgba(143, 168, 155, 0.03); /* マウスを乗せるとごく薄い緑背景に */
}

/* 日付 */
.news-date {
    font-size: 0.9rem;
    color: #888;
    width: 100px;
    flex-shrink: 0;
}

/* タグの共通設定 */
.news-tag {
    font-size: 0.75rem;
    padding: 3px 9px;
    border-radius: 4px;
    margin-right: 20px;
    width: 90px;
    text-align: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* タグの色分け設定（大人かわいいくすみカラー） */
.tag-notice {
    background-color: #E2EAD9; /* 薄い黄緑 */
    color: #4A6338;
}

.tag-event {
    background-color: #F6E7E2; /* 薄いピンクベージュ */
    color: #8C5343;
}

.tag-important {
    background-color: #F1E3A8; /* 薄いマスタードゴールド */
    color: #705B1B;
}

/* 件名 */
.news-title {
    font-size: 0.95rem;
    font-weight: normal;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 長すぎる件名を「...」にする */
    flex-grow: 1;
}

/* もっと見るボタン */
.news-more {
    text-align: center;
}

.btn-secondary {
    display: inline-block;
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 10px 35px;
    border-radius: 50px;
    font-size: 0.9rem;
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: var(--main-color);
    color: var(--white);
}

/* --- お知らせ詳細ページ専用スタイル --- */
.detail-body {
    background-color: var(--bg-color);
    padding-top: 40px;
}

.detail-header {
    padding: 20px 0;
    margin-bottom: 20px;
}

.back-home {
    font-size: 0.9rem;
    color: var(--main-color);
    font-weight: bold;
}

.back-home:hover {
    text-decoration: underline;
}

.detail-container {
    max-width: 740px; /* 本文が一番読みやすい横幅 */
    margin: 0 auto 100px;
    padding: 0 20px;
}

.news-detail-article {
    background-color: var(--white);
    padding: 50px 40px;
    border-radius: 16px; /* 普通の角丸 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-date {
    font-size: 0.9rem;
    color: #888;
}

.detail-title {
    font-size: 1.8rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 40px;
    border-bottom: 2px solid rgba(143, 168, 155, 0.1);
    padding-bottom: 20px;
}

.detail-image {
    margin-bottom: 40px;
    text-align: center;
}

.detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px; /* 写真も優しい角丸に */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.detail-content {
    font-size: 1rem;
    line-height: 2;
    color: #444;
    white-space: pre-wrap; /* スペースや改行を維持 */
}

/* --- カードセクション --- */
.info-section {
    background-color: var(--white);
    padding: 100px 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-color);
    padding: 40px 30px;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(143, 168, 155, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(143, 168, 155, 0.1);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card p {
    font-size: 0.9rem;
    color: #667580;
    margin-bottom: 25px;
}

.card-link {
    font-size: 0.9rem;
    color: var(--main-color);
    font-weight: bold;
}

.card-link:hover {
    letter-spacing: 0.05em;
}

/* --- フッター --- */
.footer {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 80px 20px 40px; /* 余白を少し広げてゆったりと */
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 50px; /* 左右の隙間 */
    align-items: center;
}

/* 左側：情報エリア */
.footer-info {
    flex: 1;
    text-align: left; /* 左寄せに変更 */
}

.footer-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start; /* ロゴも左寄せ */
}

.footer-logo-img {
    height: 55px;
    width: auto;
    display: block;
}

.footer-address {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 25px; /* 下の連絡先との間に少し余白を作る */
}

/* 連絡先全体の枠 */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px; /* 各項目の縦の隙間 */
}

/* 各項目（TELやMAIL）の並び */
.contact-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* アイコンの調整 */
.contact-icon {
    font-size: 1rem;
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* 「TEL」「FAX」などの文字の幅を統一して綺麗に揃える */
.contact-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--main-color); /* セージグリーンにしてアクセントに */
    background-color: rgba(143, 168, 155, 0.1); /* ごく薄いセージの背景 */
    border-radius: 4px;
    margin-right: 12px;
    display: inline-block;
    width: 42px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* 電話やメールのリンクにマウスを乗せたときの色 */
.contact-item a:hover {
    color: var(--main-color);
    text-decoration: underline;
}

/* 右側：マップエリア */
.footer-map {
    flex: 1;
    height: 300px; /* マップの高さ */
    border-radius: 12px; /* マップの角を丸くして「大人かわいい」ニュアンスに */
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* 最下部：コピーライト */
.footer-bottom {
    max-width: 1000px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(51, 63, 72, 0.1); /* 薄い区切り線 */
    text-align: center;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- オンライン案内セクション --- */
.online-section {
    background-color: var(--bg-color); /* 薄いオフホワイト背景 */
    padding: 100px 0;
}

.online-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.online-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(143, 168, 155, 0.05);
    border: 1px solid rgba(143, 168, 155, 0.05);
}

.online-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(143, 168, 155, 0.1);
}

.online-icon-box {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.online-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.online-card p {
    font-size: 0.9rem;
    color: #667580;
    line-height: 1.6;
}

/* --- イベント案内セクション --- */
.events-section {
    background-color: var(--white);
    padding: 100px 0;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.event-card {
    background-color: var(--bg-color);
    border-radius: 12px; /* 今回ご指定の「普通の角丸」 */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

/* 画像を綺麗に収めるボックス */
.event-img-box {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* ホバー時に写真がじわっと拡大するモダン演出 */
.event-card:hover .event-img-box img {
    transform: scale(1.05);
}

.event-content {
    padding: 25px 20px;
}

.event-date {
    display: block;
    font-size: 0.85rem;
    color: var(--main-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.event-title {
    font-size: 1.1rem;
    font-weight: normal;
    color: var(--text-color);
    line-height: 1.5;
    /* 2行を超える場合は自動で三点リーダーにする */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 所属・安心案内セクション --- */
.assurance-section {
    background-color: var(--white);
    padding: 60px 0 80px; /* フッターへ繋がるクッションとして程よい余白 */
}

/* 文字を中央にきゅっと収めるための極小コンテナ */
.container-micro {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.assurance-box {
    text-align: center;
    /* 上下に薄いセージグリーンの繊細な境界線を引く */
    border-top: 1px solid rgba(143, 168, 155, 0.25);
    border-bottom: 1px solid rgba(143, 168, 155, 0.25);
    padding: 25px 0;
}

.assurance-text {
    font-size: 0.85rem; /* そんなに大きくない、上品で控えめなサイズ */
    color: #55626b;    /* 文字色を少しだけ優しく */
    line-height: 2;    /* 改行の幅をゆったりとって読みやすく */
    letter-spacing: 0.05em;
}

.not-home {
    padding-top: 120px !important; /* 少し広めの120pxにして、強制適用させます */
}

/* --- ローディング画面のスタイル（上品な文字ベース） --- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color); /* サイト共通のオフホワイト */
    z-index: 9999; /* 一番手前に表示 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease; /* 消えるときのフワッとした効果 */
}

/* LOADING...の文字スタイル */
.loader-text {
    font-family: "Hina Mincho", serif; /* 英語に映えるひな明朝 */
    color: var(--main-color);          /* 優しいセージグリーン */
    font-size: 1rem;                  /* 主張しすぎない小さめサイズ */
    letter-spacing: 0.2em;             /* 文字の間隔を広げて上品に */
    animation: pulseLoader 2s infinite ease-in-out; /* 2秒周期で優しく明滅 */
}

/* 文字がじわーっと浮き沈みするアニメーション */
@keyframes pulseLoader {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 読み込み完了後に消すためのクラス */
.loader-loaded {
    opacity: 0;
    visibility: hidden;
}

/* --- 📱 レスポンシブ（スマホ対応）一元統合管理 --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    /* スマホナビゲーション：縦並び時の微微調整 */
    .header-nav {
        gap: 20px;
    }
    
    .header-nav a {
        margin-left: 0 !important;
        font-size: 0.9rem;
    }

    /* 1. トップページのHeroエリア：高さを固定せず、カードの大きさに合わせて自動で伸び縮みさせます */
    .hero {
        padding-top: 150px !important; 
        padding-bottom: 40px !important; /* 💡 カードの下側にもしっかり余白を作って、絶対に切れないようにします */
        height: auto !important;
        min-height: none !important; /* 💡 画面の高さに縛られるのを解除します */
        display: block !important; /* 縦に自然に流します */
    }

    .hero-content-wrapper {
        padding: 0 20px;
    }

    /* 2. 白い文字ボックス：上下左右に綺麗な余白を持って配置 */
    .hero-content-wrapper,
    .hero-content {
        position: relative !important;
        top: 0 !important;
        transform: none !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 90% !important; 
        box-sizing: border-box;
        padding: 40px 30px;
        border-radius: 40px 15px 40px 15px;
        text-align: center; /* スマホでは中央寄せ */
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .slide-img {
        border-radius: 0px 0px 20px 20px; /* スマホ用の角丸 */
    }

    /* 3. トップ以外の全下層ページの上部余白 */
    body.not-home {
        padding-top: 160px !important; 
    }

    /* 4. 下層ページ内の二重余白カット */
    .not-home .detail-container,
    .not-home .container,
    .not-home main {
        padding-top: 0 !important; 
    }

    /* 💡 5. 【スマホ限定】ロゴ透過バグのCSS側での強制解決策 */
    .header-logo img,
    .logo img {
        background-color: transparent !important;
        mix-blend-mode: multiply; /* 💡 白や透過を背景（白）に綺麗に馴染ませ、黒くなるのを防ぎます */
    }

    .news-link {
        flex-direction: column; /* スマホでは縦並びに */
        align-items: flex-start;
        gap: 8px;
        padding: 15px 5px;
    }
    
    .news-date {
        width: auto;
    }
    
    .news-tag {
        margin-right: 0;
    }
    
    .news-title {
        white-space: normal; /* スマホでは長文を折り返す */
        font-weight: bold;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column; /* スマホでは縦並びに */
        gap: 40px;
    }
    
    .footer-info {
        text-align: center; /* スマホでは中央寄せ */
        width: 100%;
    }
    
    .footer-logo {
        justify-content: center; /* ロゴもスマホでは中央 */
    }
    
    .footer-map {
        width: 100%;
        height: 250px; /* スマホ用のマップ高さ */
    }
    
    .contact-item {
        justify-content: center; /* スマホの時は中央寄せにする */
    }

    .news-detail-article {
        padding: 30px 20px;
    }
    
    .detail-title {
        font-size: 1.4rem;
    }
    
    .event-grid {
        grid-template-columns: 1fr; /* スマホでは1列に */
    }
    
    .assurance-text {
        font-size: 0.8rem; /* スマホではさらに一回り小さくしてすっきりと */
        text-align: justify; /* 文字の左右の端を揃える（中央寄せだとスマホで読みづらいため） */
        text-align-last: center; /* 最後の行だけ中央寄せ */
    }
}