/* 全体の基本設定 */
body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f1f0f0;
    color: #333;
}

/* ナビゲーション */
nav {
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #6b1717, #16213e);
    /* ヘッダーの背景色を青に */
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
}



/* ナビのリンク */
nav a {
    min-width: 0; /* 必ず入れる（flexbox内でのはみ出し防止） */
    color: white;
    margin: 0 0.1rem; /* ここを少し狭める */
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0; /* 幅を縮めすぎない */
    transition: border-bottom 0.3s;
}

/* ホバー時・アクティブ時のスタイル */
nav a:hover,
nav a.active {
    border-bottom: 2px solid #fff;
}

/* トップ画像セクション（ヒーロー） */
.main-visual {
    background: url('../images/topimage.jpg') no-repeat center/cover;
     height: 50vh; 
     min-height: 300px; 
     max-height: 300px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgb(252, 252, 252);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.main-visual p {
    opacity: 0; /* 初期状態では非表示 */
    /* 表示 */
    transition: opacity 2s;
}

/* 各セクションのスタイル */
section {
    padding: 3rem 1rem;
    max-width: 960px;
    margin: auto;
    background-color: #ffffff;
}

/* 偶数番目セクション背景色 */
section:nth-of-type(even) {
    background-color: #ffffff;
}

/* セクション見出し */
h2 {
    border-bottom: 2px solid #be2525;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: #ec1f1f;
}


/* カードデザイン */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

/* --- Responsive Image --- */
.responsive-image {
    max-width: 100%; /* Ensures the image never exceeds its container's width */
    height: auto; /* Maintains the image's aspect ratio */
    display: block; /* Removes extra space below the image */
    margin: 0 auto; /* Centers the image */
}

/* --- Responsive iframe (Map) --- */
.responsive-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (height / width = 9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    margin: 0 auto; /* Center the container */
    max-width: 100%; /* Ensures it doesn't exceed its parent's width */
}

.responsive-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Remove default iframe border */
}

/* スマホ対応 */
@media (max-width: 600px) {
    nav {
        display: flex;
        flex-direction: row; /* 横並び */
        justify-content: center; /* 横方向の中央寄せ */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 0.5rem;
        gap: 0.5rem;
        width: 100%;
    }

    nav a {
        flex: 0 0 auto;
        white-space: nowrap;
        margin: 0 0.1,rem;
    }
}
