md-tabs:not(:defined) {
    visibility: hidden;
}

/* 全ての要素にbox-sizing: border-box;を適用 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ▼▼▼ 変更ここから：ナビゲーションの高さに合わせて調整 ▼▼▼ */
html {
    scroll-padding-top: 90px;
}

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.8;
    color: #4A4A4A;
}

/* ▲▲▲ 変更ここまで ▲▲▲ */


/* KeiFontの読み込み */
@font-face {
    font-family: 'KeiFont';
    src: url('./font/keifont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 見出し類にKeiFontを適用し、色も変更 */
h1,
h2,
h3,
.activity-card h3,
.vision-item h3,
#info .info-item-sub h3,
.content-section h2 span {
    font-family: 'KeiFont', 'Noto Sans JP', sans-serif;
    color: #FF6F00;
}

.content-section h2 {
    color: #FF6F00;
}

.content-section h3 {
    color: #FF6F00;
}

.activity-card h3 {
    color: #FF6F00;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- MWCコンponentの基本カラー設定 --- */
:root {
    --md-sys-color-primary: #FF6F00;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-secondary: #00BCD4;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-tertiary: #FBC02D;
    --md-sys-color-on-tertiary: #4A4A4A;
    --md-sys-color-background: #fffcf5;
    --md-sys-color-on-background: #4A4A4A;
    --md-sys-color-surface: #FFFFFF;
    --md-sys-color-on-surface: #4A4A4A;
    --md-sys-color-outline: #ddd;
}

/* ボタンのホバーやアクティブ時の調整 */
md-filled-button,
md-filled-tonal-button {
    --md-filled-button-container-color: var(--md-sys-color-primary);
    --md-filled-button-label-text-color: var(--md-sys-color-on-primary);
    --md-filled-button-hover-container-color: #d1702c;
    --md-filled-button-focus-container-color: #d1702c;
    --md-filled-button-pressed-container-color: #c06525;
    --md-filled-button-label-text-font: 'Noto Sans JP', sans-serif;
}

md-outlined-button {
    --md-outlined-button-container-color: transparent;
    --md-outlined-button-outline-color: var(--md-sys-color-primary);
    --md-outlined-button-label-text-color: var(--md-sys-color-primary);
    --md-outlined-button-label-text-font: 'Noto Sans JP', sans-serif;
    --md-outlined-button-hover-label-text-color: var(--md-sys-color-on-primary);
    --md-outlined-button-hover-outline-color: var(--md-sys-color-primary);
    --md-outlined-button-hover-state-layer-color: var(--md-sys-color-primary);
}

md-card {
    --md-card-container-color: var(--md-sys-color-surface);
    --md-card-label-text-font: 'Noto Sans JP', sans-serif;
}

/* --- ヒーローセクション (ファーストビュー) --- */
.hero-section {
    height: calc(100vh - 85px);
    /* 新しいナビゲーションの高さ分を調整 */
    background-image: url('./img/mv-back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    display: block;
}

/* メインビジュアルのh1見出しのスタイルとアニメーション */
.hero-welcome-text {
    font-family: 'KeiFont', 'Noto Sans JP', sans-serif;
    font-size: 5.5em;
    color: #FF6F00;
    position: absolute;
    top: 15%;
    left: 10%;
    z-index: 2;
    padding: 10px 20px;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    animation: textFadeIn 0.5s ease-out 1.2s forwards;
    opacity: 0;
    background-color: transparent;
    position: relative;
}

.hero-welcome-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: -1;
    animation: wipeRight 1s ease-out 0.5s forwards;
}

@keyframes textFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes wipeRight {
    to {
        width: 100%;
    }
}

.characters {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.characters img {
    position: absolute;
    height: auto;
    z-index: 1;
    opacity: 0;
    transform: scale(0.2) translateY(50px);
    bottom: 10%;
}

.characters .seiron-char {
    max-width: 600px;
    bottom: 0;
    left: 10%;
    animation: popOutCenter 1s ease-out 0.4s forwards;
}

.characters .aoi-char {
    max-width: 600px;
    bottom: 0;
    right: 10%;
    animation: popOutCenter 1s ease-out 0.5s forwards;
}

@keyframes popOutCenter {
    0% {
        opacity: 0;
        transform: scale(0.2) translateY(50px);
    }

    70% {
        opacity: 1;
        transform: scale(1.1) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ▼▼▼ 変更ここから：グローバルナビゲーションのスタイル ▼▼▼ */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

md-tabs {
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

md-primary-tab {
    --md-primary-tab-label-text-color: #5f6368;
    --md-primary-tab-icon-color: #5f6368;
    --md-primary-tab-active-label-text-color: #333;
    --md-primary-tab-active-icon-color: #333;
    --md-primary-tab-active-focus-label-text-color: #333;
    --md-primary-tab-active-focus-icon-color: #333;
    --md-primary-tab-active-hover-label-text-color: #333;
    --md-primary-tab-active-hover-icon-color: #333;
    --md-primary-tab-active-state-layer-color: #e0ddef;
    --md-primary-tab-active-hover-state-layer-color: #e0ddef;
    --md-primary-tab-active-focus-state-layer-color: #e0ddef;
    --md-primary-tab-active-pressed-state-layer-color: #e0ddef;
    min-width: 130px;
}

/* ▲▲▲ 変更ここまで ▲▲▲ */

/* --- コンテンツセクション共通スタイル --- */
.content-section {
    padding: 60px 0;
}

.content-section:nth-child(odd) {
    background-color: white;
}

.content-section:nth-child(even) {
    background-color: #fff9e6;
}

.content-section h2 {
    font-size: 46px;
    color: #FF6F00;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 100;
}

.content-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #FBC02D;
}

.content-section h3 {
    font-size: 28px;
    color: #FF6F00;
    margin-top: 20px;
    margin-bottom: 15px;
    font-weight: 100;
}

.content-section p {
    margin-bottom: 20px;
    font-size: 1em;
}

/* --- 「あつまラボってどんなところ？」セクションの2カラムレイアウト --- */
.introduction-flex-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.introduction-image-column {
    flex: 1;
    min-width: 50%;
}

.introduction-image-column img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.introduction-text-column {
    flex: 1.5;
}

/* --- 「あつまラボでできること」(Activities) セクション --- */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.activity-card {
    padding: 0;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
}

.activity-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 8px 8px 0 0;
}

.activity-card h3 {
    font-size: 1.4em;
    color: #FF6F00;
    margin-bottom: 10px;
    margin-top: 0;
    padding: 0 16px;
}

.activity-card p {
    padding: 0 16px 16px;
    text-align: left;
}

/* --- 「あつまラボの目指す未来」(Vision) セクション --- */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.vision-item {
    padding: 0;
    text-align: center;
}

md-card.vision-card {
    --md-card-container-color: #fff0f5;
    --md-card-label-text-font: 'Noto Sans JP', sans-serif;
}

.vision-item img {
    max-width: 300px;
    margin-bottom: 15px;
    padding-top: 20px;
}

.vision-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    margin-top: 0;
    padding: 0 16px;
}

.vision-item p {
    padding: 0 16px 20px;
    text-align: left;
}

/* --- 「運営について/お問い合わせ」(Info) セクション --- */
#info .info-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

#info .info-item-main {
    flex: 2;
    min-width: 300px;
}

#info .info-item-sub {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    width: 100%;
}

#info .info-item-sub h3 {
    margin-top: 0;
}

/* --- フッター --- */
.site-footer {
    background-color: #795548;
    color: #fffcf5;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
}

.site-footer p {
    margin-bottom: 5px;
}

.site-footer a {
    color: #FBC02D;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.pc {
    display: block;
}

.sp {
    display: none;
}
/* --- お問い合わせボタンの個別スタイル --- */
#contact-button {
    /* 背景色をアクセントカラーのシアンに変更 */
    --md-filled-button-container-color: #00BCD4;
    /* ボタンの上の文字色を白に */
    --md-filled-button-label-text-color: #FFFFFF;

    /* ホバー時の色も調整 */
    --md-filled-button-hover-container-color: #00acc1;
    padding: 12px 24px;
}
/* --- ノートPC・タブレット対応 --- */
@media (max-width: 1367px) {
    .characters {
        height: 80%;
    }

    .characters .seiron-char,
    .characters .aoi-char {
        max-width: 50%;
        width: 500px;
    }
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 0;
    }

    body {
        padding-top: 0;
        padding-bottom: 70px;
    }

    .container {
        width: 100%;
    }

    .hero-section {
        height: 38vh;
        min-height: 375px;
    }

    .hero-welcome-text {
        font-size: 2em;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
        top: 10%;
        left: 5%;
        padding: 5px 10px;
    }

    .characters {
        height: 85%;
    }

    .characters .seiron-char {
        max-width: 40%;
        left: 5%;
        bottom: 5%;
    }

    .characters .aoi-char {
        max-width: 50%;
        right: 5%;
        bottom: 5%;
    }

    .content-section {
        padding: 0;
    }

    .content-section h2 {
        font-size: 34px;
    }

    .content-section h3 {
        font-size: 24px;
    }

    .introduction-flex-container {
        flex-direction: column;
    }

    .introduction-text-column h2 {
        margin-top: 20px;
    }

    .global-nav {
        top: auto;
        bottom: 0;
        padding: 5px 0;
        border-bottom: none;
        /* 上書き */
        text-align: center;
        /* 上書き */
        height: auto;
        /* 上書き */
    }

    md-tabs {
        width: 100%;
    }

    md-primary-tab {
        flex: 1;
        min-width: auto;
    }

    .vision-item img {
        max-width: 150px;
    }

    #info .info-columns {
        flex-direction: column;
    }

    .pc {
        display: none;
    }

    .sp {
        display: block;
    }
        /* ▼▼▼ 変更（追加）ここから：スマホでの「できること」セクションのレイアウト ▼▼▼ */
    #activities .container {
        padding: 20px; /* 内側の余白を調整 */
    }
    .activities-grid {
        grid-template-columns: 1fr; /* 1カラムリストに */
        gap: 16px; /* カード間の隙間を狭くする */
    }
    .activity-card {
        display: flex; /* Flexboxレイアウトに変更 */
        align-items: center; /* アイテムを垂直方向に中央揃え */
        text-align: left; /* テキストを左揃えに */
        padding: 16px; /* カード内の余白 */
    }
    .activity-card img {
        flex: 0 0 80px; /* 画像の幅を固定（80px） */
        width: 80px;
        height: 80px;
        margin-right: 16px; /* 画像とテキストの間の余白 */
        margin-bottom: 0; /* 下の余白をリセット */
        border-radius: 8px; /* 角を丸める */
        object-fit: cover; /* 画像の比率を保ったままトリミング */
    }
    .activity-card-text h3 {
        margin: 0;
        margin-bottom: 8px;
        padding: 0;
    }
    .activity-card-text p {
        margin: 0;
        padding: 0;
        font-size: 0.9em; /* 少し文字を小さく */
        line-height: 1.6; /* 行間を調整 */
    }
    /* ▲▲▲ 変更（追加）ここまで ▲▲▲ */
}
/* --- 運営について（場所・地図）セクションのスタイル --- */
.location-section {
    margin-top: 40px; /* 上のコンテンツとの余白 */
}

.location-container {
    display: flex;
    align-items: center;
    gap: 30px; /* 地図と住所の間の余白 */
    margin-top: 20px;
}

.map-column {
    flex: 1.5; /* 地図側の幅を少し広めに */
}

.map-column iframe {
    border-radius: 8px; /* 地図の角を丸くする */
}

.address-column {
    flex: 1;
}

/* --- レスポンシブ対応の中に追加 --- */
@media (max-width: 768px) {
    /* (既存のレスポンシブスタイル...) */

    /* ▼▼▼ この部分を追加 ▼▼▼ */
    .location-container {
        flex-direction: column; /* スマホでは縦並びに変更 */
    }

    .address-column {
        text-align: center; /* スマホでは住所を中央揃えに */
    }
}