html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    background-color: #f9f9f9;
}

/* ヘッダー */
header h1 {
    font-size: 1.4rem;
    margin: 0;
}

/* インスタモーダル */
.cursor-pointer {
    cursor: pointer;
}

.modal-body img {
    width: 200px;
}

.modal-body a {
    margin-top: 10px;
}

/* フッターを画面最下部に固定（常に下に表示） */
body {
    display: flex;
    flex-direction: column;
    font-family: "Noto Sans JP", sans-serif;
    background: #fffdf9;
    color: #334;
    line-height: 1.8;
    overflow-x: hidden;
}

main {
    flex: 1;
}

.catch {
    width: 100%;
    background-image: url('https://childhanaoka.main.jp/child/images/eyeCatch.png');
    background-size: cover;
    background-position: center;
    height: 500px;
}

/* メインビジュアル用の背景設定 */
.hero {
    background: url('https://via.placeholder.com/1600x500') no-repeat center center;
    background-size: cover;
    height: 400px;
}

/* ナビゲーションのカスタムカラー */
.nav-link {
    color: #333;
}

.nav-link:hover {
    color: #007bff;
}

/* カードのテキスト整列 */
.card-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-card {
    transition: background-color 0.3s, transform 0.2s;
    font-size: 1rem;
    font-weight: 500;
}

.info-card:hover {
    background-color: #f0f8ff;
    transform: translateY(-2px);
    cursor: pointer;
}

/* フッター共通スタイル */
footer {
    font-size: 0.9rem;
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
}

.tab-content {
    background-color: #f8fdfd;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 1rem;
}

.timeline {
    border-left: 3px solid #f88;
    padding-left: 1rem;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #f88;
}

.timeline-event {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: #f88;
    border-radius: 50%;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4b8;
    margin-top: 2rem;
}

h2 {
    font-size: 2.1rem;
    font-weight: 700;
    text-align: center;
    margin-top: 2rem;
    color: #5a7;
}

h2 small {
    display: block;
    font-size: 0.9rem;
    color: #bbb;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin-inline: auto;
    padding: 20px;
}

.card {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card__img img {
    width: 100%;
    height: auto;
    display: block;
}

.card__body {
    padding: 15px;
}

.card__title {
    font-size: 18px;
    font-weight: bold;
}

.card__text {
    line-height: 1.6;
    margin-top: 10px;
    font-size: 14px;
    color: #444;
}

/* レスポンシブ対応 */
@media screen and (max-width: 992px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .cards {
        grid-template-columns: repeat(1, 1fr);
    }
}

.our-message {
    padding: 40px 20px;
    background-color: #f9f9f9;
}

.message-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.message-image {
    flex: 1 1 400px;
    min-width: 280px;
}

.message-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
}

.message-text {
    flex: 1 1 400px;
    min-width: 280px;
}

.message-text p {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.underline {
    display: inline-block;
    font-weight: 500;
    color: #fefefe;
    background: linear-gradient(transparent 40%, #7bead6 60%);
}

/* スマホ・タブレットで縦並びに切り替え */
@media screen and (max-width: 768px) {
    .message-container {
        flex-direction: column;
        text-align: center;
    }

    .message-text h2 {
        font-size: 24px;
    }

    .message-text p {
        font-size: 15px;
    }

    .navbar-toggler {
        display: block;
    }

    .pc-nav {
        display: none;
    }

    .catch {
        width: 100%;
        height: 300px;
        /* スマホ時の高さを調整 */
        background-size: cover;
        /* スマホではカバーに */
    }

    .message-image {
        flex: 1 1 0px !important;
        min-width: 280px;
    }


    .nav-tabs .nav-link {
        font-size: 12px;
        /* ボタンの文字サイズを縮小 */
        padding: 5px 10px;
        /* 内側の余白を縮小 */
    }
}

@media screen and (max-width: 477px) {
    .catch {
        width: 100%;
        height: 250px;
        /* スマホ時の高さを調整 */
        background-size: cover;
        /* スマホではカバーに */
    }
}

/* スマホ・タブレットで縦並びに切り替え */
.loop-wrapper {
    position: relative;
    overflow: hidden;
}

.loop-container {
    overflow-x: scroll;
    scroll-behavior: auto;
    white-space: nowrap;
}

.loop-track {
    display: flex;
    gap: 20px;
}

.loop-track img {
    flex: 0 0 auto;
    width: 280px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.loop-track img:hover {
    transform: scale(1.08);
    filter: brightness(0.9);
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    z-index: 2;
    cursor: pointer;
    border-radius: 6px;
}

.scroll-btn.left {
    left: 10px;
}

.scroll-btn.right {
    right: 10px;
}

@media screen and (max-width: 576px) {
    .loop-track img {
        width: 70vw;
        height: 160px;
    }
}

.loop-container {
    overflow-x: scroll;
    overflow-y: hidden;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE & Edge */
}

.loop-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.loop-wrapper {
    overflow: hidden;
}

/* ハンバーガー3本線 */
.hamburger {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.4s;
}

/* アニメーション: バツ印変形 */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6.4px, -7px);
}

/* モバイルメニュー 非表示状態 */
.mobile-nav {
    max-height: 0;
    overflow: hidden;
    background-color: #f8f9fa;
    transition: max-height 0.4s ease;
}

/* 表示時（JavaScriptで追加） */
.mobile-nav.active {
    max-height: 300px;
}

/* スマホ時にインスタアイコンがボタンの隣にくるようにしたい場合はflex構成変更 */
@media screen and (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        row-gap: 10px;
    }
}