/* css/style.css */

/* 全体のスタイル */
body {
    font-family: 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Meiryo, メイリオ, Osaka, 'MS PGothic', arial, helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    /* 修正点: 固定幅(width)を最大幅(max-width)に変更 */
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    /* 修正点: paddingが幅に影響しないようにbox-sizingを追加 */
    box-sizing: border-box;
}

/* ヘッダー */
header {
    padding: 20px;
}

.header-top {
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* 修正点: スマホでの折り返しに対応 */
    flex-wrap: wrap;
}

.header-main .logo img {
    max-width: 500px;
    height: auto;
    /* 修正点: ロゴがはみ出ないようにする */
    max-width: 100%;
}

.header-main .contact {
    text-align: right;
    font-size: 14px;
}

.contact .tel-label {
    font-weight: bold;
}

.contact .tel-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.contact .address {
    margin-top: 5px;
    line-height: 1.6;
}

/* ナビゲーションメニュー */
nav {
    background-color: #8DC255;
    padding: 10px 0;
    text-align: center;
}

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

nav li {
    display: inline-block;
    margin: 5px 15px;
}

nav a {
    display: block;
    padding: 10px 18px;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    text-align: center;
    transition: opacity 0.3s, background-color 0.3s;
    font-weight: bold;
}

nav a:hover {
    opacity: 0.8;
}

/* メインコンテンツ */
main {
    padding: 30px 20px;
    line-height: 1.8;
}

/* ページのメインタイトル共通スタイル */
main h1 {
    text-align: center;
    margin: 0 auto 40px auto;
    padding: 30px 20px;
    background-color: #f2fded;
    border-top: 3px solid #8DC255;
    border-bottom: 3px solid #8DC255;
}

main h1 .page-title-sub,
main h1 .page-title-main {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}

main h1 .page-title-main {
    display: block;
    font-size: 2.1em;
    color: #418859;
    font-weight: bold;
    letter-spacing: 0.15em;
}

/* index.html専用スタイル */
.top-message {
    text-align: center;
    font-size: 16px;
    margin-bottom: 30px;
    background-color: #f2fded;
    padding: 20px;
    border-radius: 5px;
}

.main-visual {
    text-align: center;
}

.main-visual img {
    max-width: 100%;
    height: auto;
}

/* フッター */
footer {
    background-color: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 1px solid #e9ecef;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ===== お知らせページ ナビゲーション ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.menu-item {
    display: block;
    padding: 25px 15px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: #418859;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* =================================
  各ページのコンテンツセクション共通スタイル
==================================== */
.content-section{
    margin-bottom: 30px;
}

.section-title{
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    background-color: #f7f7f7;
    padding: 10px 15px;
    margin: 40px 0 20px 0;
    border-left: 8px solid #81ce4d;
}
.content-section:first-of-type .section-title {
    margin-top: 0;
}

.description{
    padding: 0 1em;
    margin-bottom: 1.5em;
}
.description strong {
    display: block;
    margin-bottom: 0.2em;
}


.activity-table{
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d1d1d2;
    margin: 20px 0;
}
.activity-table td{
    border: 1px solid #d1d1d2;
    padding: 15px 10px;
    text-align: center;
    vertical-align: middle;
}

/* =================================
  PDFリンクボタンのスタイル
==================================== */
.pdf-link-container {
    text-align: center;
    margin: 0 auto 40px auto;
}

.pdf-link-button {
    display: inline-block;
    background-color: #418859;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1.1em;
}

.pdf-link-button:hover {
    background-color: #fff;
    color: #418859;
    border-color: #418859;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* =================================
  レスポンシブ対応 (ここから追加・修正)
==================================== */
@media (max-width: 768px) {
    /* --- 全体の余白調整 --- */
    .container {
      /* スマホ表示では左右に余白を持たせる */
      padding-left: 15px;
      padding-right: 15px;
    }

    /* --- ヘッダーの調整 --- */
    .header-main {
      /* ロゴと連絡先を縦積みに */
      flex-direction: column;
      align-items: center; /* 中央揃えに */
      gap: 15px;
    }
    .header-main .contact {
      text-align: center; /* 連絡先も中央揃えに */
    }

    /* --- ナビゲーションの調整 --- */
    nav ul {
      /* メニューを縦積みに */
      flex-direction: column;
      gap: 5px;
    }
    nav li {
      margin: 0;
      width: 100%;
    }

    /* --- タイトル文字サイズの調整 --- */
    main h1 .page-title-main {
        font-size: 1.6em;
        letter-spacing: normal;
    }

    /* --- お知らせページのナビゲーション --- */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    /* --- お知らせページのナビゲーション --- */
    .menu-grid {
        grid-template-columns: 1fr; /* 1列に */
    }
    .menu-item {
        padding: 20px 15px;
    }
}

@media screen and (max-width: 768px) {

    /* 全体のレイアウト調整 */
    #container, #header, #contents, #footer {
        width: 100%;
        padding: 10px;
        box-sizing: border-box; /* paddingを含めて幅を100%にする */
    }

    /* ヘッダー内の要素を縦並びに */
    #header h1, #header ul {
        float: none;
        text-align: center;
        width: 100%;
    }

    #header ul li {
        display: inline-block;
        margin: 5px;
    }

    /* メインコンテンツとサイドバーを縦並びに */
    #main, #sub {
        float: none;
        width: 100%;
    }

    /* 画像が画面幅を超えないようにする */
    img {
        max-width: 100%;
        height: auto;
    }

    /* 文字サイズの調整 */
    body {
        font-size: 16px;
    }

    h2, h3 {
        font-size: 18px;
    }
}