/* ==========================================================================
   311はなしかたり 共通洗練スタイリング（完全統合版）
   ========================================================================== */

/* 全体リセットと基本フォント設定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333333;
    background-color: #fcfcf9;
    line-height: 1.7;
    font-size: 1.063rem; /* 約17pxベース。シニアに見やすく、拡大しても崩れにくい */
}

a {
    color: #2d5a27;
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}
a:hover {
    opacity: 0.8;
}

/* ==========================================================================
   1. ヘッダー ＆ 背景スライドショー構造
   ========================================================================== */
.main-header {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; 
    background-color: #fcfcf9;
}

/* 背景スライドショーの配置コンテナ */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 400px; /* PC閲覧時のしっかりとした高さを確保 */
    overflow: hidden;
    background-color: #afdaa994; /* 画像背後の仙台青葉イメージグリーン */
}

/* 各スライド（重なり合ってフェード切り替え） */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover; /* 枠いっぱいに綺麗にカバー表示 */
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* アクティブな画像のみ表示 */
.hero-slide.active {
    opacity: 1;
}

/* ナビゲーションエリア */
.header-nav-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    background: #ffffff;
    border-top: 4px solid #d4af37; /* ゴールドのアクセントライン */
    border-bottom: 1px solid #e6e6e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

/* サイトタイトル */
.site-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin: 0;
}
.site-title a {
    color: #2d5a27;
    text-decoration: none;
}
.site-subtitle {
    font-size: 1.1rem;
    color: #555;
    font-weight: normal;
    margin-left: 5px;
}

/* ナビゲーションリンク */
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.site-nav a {
    font-size: 1.15rem;
    font-weight: bold;
    color: #444;
    padding: 10px 16px;
    border-radius: 6px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #2d5a27;
    background-color: rgba(45, 90, 39, 0.08);
}

/* ==========================================================================
   2. トップページ（index.php）NEWSセクション ＆ スクロール枠
   ========================================================================== */
.home-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.catchphrase-section {
    text-align: center;
    margin: 50px 0;
}
.catchphrase {
    font-size: 1.8rem;
    color: #2d5a27;
    line-height: 1.6;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* 固定お知らせボックス */
.notice-box {
    background: #fffdf0;
    border: 2px solid #d4af37;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.notice-box h3 {
    color: #2d5a27;
    font-size: 1.3rem;
    margin-bottom: 15px;
}
.notice-content-text {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
}
.notice-content-text a {
    color: #2d5a27;
    font-weight: bold;
    text-decoration: underline;
    word-break: break-all;
}
.notice-content-text a:hover {
    color: #d4af37;
    text-decoration: none;
}

/* NEWSエリア・上下スワイプ／スクロール対応コンテナ */
.news-section h3 {
    font-size: 1.5rem;
    color: #2d5a27;
    border-bottom: 2px solid #2d5a27;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.news-scroll-container {
    max-height: 400px;          /* ボックスの最大高さ（記事約4〜5件分） */
    overflow-y: auto;           /* 縦方向にはみ出た分をスクロール可能に */
    border: 1px solid #e6e6e0;
    border-radius: 8px;
    padding: 0 20px;
    background: #ffffff;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
    -webkit-overflow-scrolling: touch; /* iOSでの滑らかなスワイプを有効化 */
}

/* スクロールバーのデザイン最適化 */
.news-scroll-container::-webkit-scrollbar {
    width: 8px;
}
.news-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.news-scroll-container::-webkit-scrollbar-track {
    background: #f7f7f5;
}

.news-item {
    border-bottom: 1px solid #e6e6e0;
    padding: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.news-item:last-child {
    border-bottom: none;
}
.news-date {
    font-size: 0.95rem;
    color: #666;
}
.news-title {
    font-size: 1.125rem;
    font-weight: 700;
}
.label-talk {
    color: #d4af37;
    margin-right: 5px;
}
.label-blog {
    color: #2d5a27;
    margin-right: 5px;
}

/* ==========================================================================
   3. フッター構造
   ========================================================================== */
.main-footer {
    background-color: #222222;
    color: #ffffff;
    padding: 40px 20px;
    margin-top: 60px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.footer-nav a {
    color: #ffffff;
    font-size: 1rem;
}
.footer-sub-nav {
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.footer-sub-nav a {
    color: #999;
}
.copyright {
    font-size: 0.85rem;
    color: #888;
}

/* ==========================================================================
   4. スマートフォン・タブレット向けレスポンシブ（最適化統合版）
   ========================================================================== */
@media (max-width: 850px) {
    /* ヘッダー画像が極端に縮小・潰れてしまうのを防ぐ調整 */
    .hero-slideshow {
        height: 240px !important; /* スマホ画面でもしっかり見える適切な高さを確保 */
    }
    
    .hero-slide {
        background-size: cover !important; /* 横幅一杯に埋めつつ、中央を綺麗に保持 */
        background-position: center !important;
    }

    .header-inner {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    
    .site-title {
        font-size: 1.5rem;
    }

    .site-nav ul {
        justify-content: center;
        gap: 5px;
    }
    
    .site-nav a {
        font-size: 1.05rem;
        padding: 8px 12px;
    }

    /* キャッチコピーと表示の微調整 */
    .catchphrase {
        font-size: 1.4rem;
    }
    
    .notice-box {
        padding: 20px;
    }
}