/* Custom Properties (Variables) */
:root {
    --bg-color: #e4f1cf;
    --green: #00693e;
    --red: #e8204e;
    --orange: #ed6d46;
    --yellow: #e4c068;
    --text-color: #2d3748;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    text-align: center;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 400;
    font-style: normal;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
}

/* Header */
.header {
    background-color: var(--bg-color);
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

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

.site-logo {
    height: 3rem;
    width: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.nav-link {
    color: var(--orange);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.nav-link:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .nav ul {
        gap: 2rem;
    }
    .nav-link {
        font-size: 1rem;
    }
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    min-height: 50vh;
    background-image: url(../image/top.png);
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20rem;
}

.hero-content {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.main-title {
    font-size: 2rem;
    color: var(--green);
    margin: 0.5rem 0;
}

.sub-title {
    font-size: 1.25rem;
    color: var(--green);
}

.tagline {
    font-size: 1rem;
    color: var(--orange);
    font-weight: bold;
}

@media (min-width: 768px) {
    .hero {
        min-height: 500px;
    }
    .main-title {
        font-size: 4rem;
    }
    .sub-title {
        font-size: 1.5rem;
    }
}

/* Common Section Styles */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 800;
    text-align: center;
    color: var(--red);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

/* Card Common Styles */
.card {
    background-color: #FFF;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--red);
    transform: scale(1);
    transition: transform 0.3s ease-in-out;
}

.card:hover {
    transform: scale(1.05);
}

.card-title,
.card-subtitle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--yellow);
    margin-bottom: 0.5rem;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    gap: 2rem;
}

@media (max-width: 767px) {
    .grid-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* News & Map Section */
/* --- 【追加】更新履歴エリアのスタイル --- */
.news-list {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: left;
}

.news-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--yellow);
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-date {
    font-weight: bold;
    color: var(--orange);
    font-size: 0.85rem;
}

.news-text {
    color: var(--text-color);
}

@media (min-width: 600px) {
    .news-item {
        flex-direction: row;
        align-items: baseline;
        gap: 1rem;
    }
    .news-date {
        white-space: nowrap;
    }
}
/* --- 2. チラシ表裏切り替えタブのスタイル（両面チラシの時使用） --- */
.flyer-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.flyer-tab-btn {
    background-color: #f8fafc;
    color: var(--text-color);
    border: 2px solid var(--orange);
    padding: 0.4rem 1.25rem;
    border-radius: 9999px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.flyer-tab-btn:hover {
    background-color: #ffedd5;
}

.flyer-tab-btn.active {
    background-color: var(--orange);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flyer-image-container {
    display: none;
}

.flyer-image-container.active {
    display: block;
}
/* --- ここまで --- */
/* --- 旧コードの控え（コメントアウト） --- */
/*
       /* .news-list {
            width: 100%;
            margin-bottom: 1.5rem;
            text-align: left;
        }

        .news-item {
            display: flex;
            flex-direction: column;
            padding: 0.5rem 0;
            border-bottom: 1px dashed var(--yellow);
            font-size: 0.95rem;
            line-height: 1.6;
        }

        .news-date {
            font-weight: bold;
            color: var(--orange);
            font-size: 0.85rem;
        }

        .news-text {
            color: var(--text-color);
        }

        @media (min-width: 600px) {
            .news-item {
                flex-direction: row;
                align-items: baseline;
                gap: 1rem;
            }
            .news-date {
                white-space: nowrap;
            }
        } */
.news-map-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* カードの高さを揃えて中身を縦いっぱいに広げる */
.news-flyer,
.map-card {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.news-flyer img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain; /* 文字や画像が潰れずに全体が綺麗に収まる指定 */
    border-radius: 1rem;
    background-color: #f8f9fa; /* 画像の上下左右に余白が出た際の背景色 */
}

/* ★★★ ここに新しく「表裏タブ」や「ボタン」のコードを追加します！ ★★★ */
.flyer-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.flyer-tab-btn {
    background-color: #f8fafc;
    color: var(--text-color);
    border: 2px solid var(--orange);
    padding: 0.4rem 1.25rem;
    border-radius: 9999px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.flyer-tab-btn:hover {
    background-color: #ffedd5;
}

.flyer-tab-btn.active {
    background-color: var(--orange);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.flyer-image-container {
    display: none;
}

.flyer-image-container.active {
    display: block;
}

.pdf-btn-wrapper {
    margin-top: 1.25rem;
}

.pdf-download-btn {
    display: inline-block;
    background-color: var(--orange);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.pdf-download-btn:hover {
    background-color: rgba(237, 109, 70, 0.85);
    transform: translateY(-2px);
}
/* ★★★ ここまで追加 ★★★ */

.map-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    .news-flyer img,
    .map-container {
        height: 400px;
    }
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* About Section */
.about-section {
    background-color: #FFF;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.concept-card {
    background-color: var(--bg-color);
    border-color: var(--yellow);
}

.concept-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .concept-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Staff Section */
.staff-section {
    background-color: var(--bg-color);
    padding: 4rem 1rem;
}

.staff-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.staff-card {
    background: #fff;
    border: 2px solid #e91e63;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.representative-card {
    flex: 1;
    min-width: 240px;
}

.staff-team-card {
    flex: 1.5;
    min-width: 300px;
}

.staff-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
}

.representative-card .staff-image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
}

.staff-team-card .staff-image {
    width: 90%;
    border-radius: 15px;
    object-fit: cover;
}

/* Activity Report Section */
.report-grid {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: 500px !important;
    margin: 0 auto !important;
}

.report-card {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
    width: 100% !important;
}

.report-card img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Contact Section (レイアウト・崩れ防止の調整済み) */
.contact-section {
    background-color: white;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-content {
    position: relative;
    background-color: var(--bg-color);
    border-radius: 1.5rem;
    padding: 2rem 1rem;
    max-width: 600px;
    width: 100%;
    border: 4px solid var(--yellow);
    margin-top: 1rem;
    box-sizing: border-box;
}
/* 768px以上の時だけ外側のオレンジ枠線を表示 */
@media (min-width: 768px) {
    .contact-content {
        padding: 3rem 2rem;
        border-width: 5px;
        border-radius: 2rem;
    }
.contact-content:before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 5px solid var(--orange);
    border-radius: 2.5rem;
    z-index: -1;
    }
}

.contact-content > p {
    text-align: center;
    line-height: 1.8;
    margin: 0 auto 1.5rem;
    word-break: break-word;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.form-link-btn {
    display: inline-block;
    white-space: nowrap;
    background-color: var(--orange);
    color: #ffffff !important;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: bold;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.form-link-btn:hover {
    background-color: rgba(237, 109, 70, 0.85);
    transform: translateY(-2px);
}

.contact-links {
    text-align: left;
}

.contact-person,
.contact-tel {
    margin: 0.25rem 0;
}

/* Donation Section */
.donation-section {
    background-color: var(--bg-color);
    padding: 4rem 1rem;
    text-align: center;
}

/* Button Common Styles */
.main-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--orange);
    color: white;
    font-size: 1.125rem;
    font-weight: bold;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s ease-in-out;
    text-decoration: none;
}

.main-button:hover {
    background-color: rgba(237, 109, 70, 0.8);
}

.button-container {
    text-align: center;
    margin-top: 2rem;
}

/* Footer Styles */
.main-footer {
    background-color: var(--green);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
}

.footer-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    position: relative;
}

.go-top-button {
    position: absolute;
    top: -3rem;
    right: 1rem;
    background-color: var(--orange);
    padding: 1rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease-in-out;
}

.go-top-button:hover {
    background-color: rgba(237, 109, 70, 0.8);
}

.go-top-button svg {
    height: 1.5rem;
    width: 1.5rem;
    color: white;
}

@media (min-width: 768px) {
    .go-top-button {
        right: 2rem;
    }
}
/* --- スマホ表示の横はみ出し・ズレ防止対策 --- */

/* 1. ページ全体が画面幅を超えて横スクロールしないように制限 */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 2. すべての要素が画面幅内に収まるように指定 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 3. 画像や要素が画面からはみ出るのを防ぐ */
img, iframe, container, section {
    max-width: 100% !important;
}

/* 4. ヘッダー（ロゴやナビゲーション）のレスポンシブ調整 */
header, nav {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* 5. スマホ（画面幅768px以下）での文字・ボタンの折り返し設定 */
@media (max-width: 768px) {
    /* ナビゲーションメニューの文字やロゴの重なりを解消 */
    header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    /* お問い合わせボタンなどの横幅調整 */
    .btn, a.btn, button {
        max-width: 100%;
        white-space: normal; /* ボタン内の文字を自動折り返し */
    }
}