/* カスタムスタイルの定義 */
body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: #0a0a0a;
    /* 深いブラック */
    color: #e5e5e5;
    /* 明るいグレー */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* カスタムフォントの定義 */
@font-face {
    font-family: 'MTB_Logo';
    src: url('../src/MTB-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.logo-custom {
    font-family: 'MTB_Logo', sans-serif;
    letter-spacing: 0.05em;
    /* 文字間隔を広げる */
}


/* 見出し用のフォント */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* アクセントカラー */
.accent-blue {
    color: #3b82f6;
}

.border-accent-blue {
    border-color: #3b82f6;
}

.container {
    width: 100%;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

header {
    background-color: #0a0a0a;
    height: 64px;
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* レスポンシブ対応 - コンテナ */
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* ヒーローセクションの背景動画 */
.hero-video-container {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -2;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 1) 10%, rgba(10, 10, 10, 0.6) 50%, rgba(10, 10, 10, 1) 95%);
    z-index: -1;
}

/* ガラス風のカードスタイル */

.glass-card {
    padding: 2rem;
    background: rgba(23, 23, 23, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;

}




/*イベント告知エリア*/
.event_info {
    text-align: center;

}

.event_info .glass-card {
    position: relative;
    width: 90%;
    margin: 0px 5%;
    padding-top: calc(2rem + 30px);
}

.event_info .tracking-wider {
    position: absolute;
    top: 10px;
    left: 10px;

}

/* レスポンシブ対応 - イベント告知 */
@media (max-width: 768px) {
    .event_info .glass-card {
        width: 95%;
        margin: 0px 2.5%;
    }
}

/* お知らせエリア */
.notice-card {
    width: 90%;
    margin: 0 5% 1.5rem 5%;
}

@media (max-width: 768px) {
    .notice-card {
        width: 95%;
        margin: 0 2.5% 1.5rem 2.5%;
    }
}

/* ヒーローセクション */
.hero-section {
    position: sticky;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 1rem;
}

.hero-title {
    position: relative;
    font-size: 3.5rem;
    line-height: 1;
}


.hero-subtitle {
    margin-top: 1rem;
    font-size: 1.5rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    color: #d1d5db;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* レスポンシブ対応 - ヒーローセクション */
@media (min-width: 768px) {
    .hero-title {
        font-size: 5rem;
    }

}


main {
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem;
    position: relative;
    z-index: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #0a0a0a;
    /* 深いブラック */
    color: #e5e5e5;
    /* 明るいグレー */
    max-width: none;
    width: 100%;
}

/* レスポンシブ対応 - メインコンテンツ */
@media (min-width: 640px) {
    main {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    main {
        padding: 3rem;
    }
}

@media (min-width: 1024px) {
    main {
        padding: 4rem;
    }
}

/* モード切り替え用の基本スタイル */
body {
    transition: background-color 2s ease, color 2s ease;
}

header {
    transition: background-color 2s ease, color 2s ease;
}

main {
    transition: background-color 2s ease, color 2s ease;
}

main .white-mode-only {
    opacity: 0;
    transition: opacity 1.2s 0.6s;
}

body.white-mode .white-mode-only {
    opacity: 1;
    transition: opacity 1.2s 0.6s;
}

footer {
    transition: background-color 2s ease, color 2s ease, border-color 2s ease;
}

/* Blackモード（デフォルト） */
.black-mode {
    background-color: #0a0a0a;
    color: #e5e5e5;
}

.black-mode header {
    background-color: #0a0a0a;
}

.black-mode header h1 {
    color: white;
}

.black-mode header nav a {
    color: #d1d5db;
}

.black-mode header nav a:hover {
    color: white;
}

.black-mode main {
    background-color: #0a0a0a;
    color: #e5e5e5;
    height: 100vh;
}

.black-mode footer {
    background-color: transparent;
    border-top: 1px solid #374151;
    color: #6b7280;
}

.black-mode footer h1 {
    color: #e5e7eb;
}

/* Whiteモード */
.white-mode {
    background-color: #F5EFE6;
    color: #4A4A4A;
}

.white-mode header {
    background-color: rgba(245, 239, 230, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #D1C5B4;
}

.white-mode header h1 {
    color: #4A4A4A;
}

.white-mode header nav a {
    color: #4A4A4A;
}

.white-mode header nav a:hover {
    color: #E60012;
}

.white-mode main {
    background-color: #F5EFE6;
    color: #4A4A4A;
}

.white-mode footer {
    background-color: #EAE1D2;
    border-top: none;
    color: #4A4A4A;
}

main .black-mode-only {
    opacity: 1;
    transition: opacity 1.0s 0.6s;
}

body.white-mode .black-mode-only {
    opacity: 0;
    transition: opacity 1.0s 0.6s;

}

.white-mode footer h1 {
    color: #4A4A4A;
}

/* アクセントカラーの切り替え */
.black-mode .accent-blue {
    color: #3b82f6;
}

.white-mode .accent-blue {
    color: #E60012;
}

/* ガラスカードの切り替え */
.black-mode .glass-card {
    background: rgba(23, 23, 23, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.white-mode .glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/*年表セッション*/

.history-section {
    position: relative;
    width: 100%;
    padding: 0rem 0%;
}

/* 中央の横線 */
.timeline-horizontal-line {
    position: absolute;
    top: calc(2rem + 140px);
    left: 2rem;
    right: 2rem;
    height: 5px;
    background: #4A4A4A;
    transform: translateY(-50%);
    z-index: 1;
    min-width: calc(100% - 4rem);
}

/* 年表セクション専用スタイル */
.timeline-container {
    position: relative;
    width: 100%;
    padding: 0rem 2rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f5efe6;
}

/* スクロールバーのスタイル（Webkit系ブラウザ用） */
.timeline-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #f5efe6;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}


.timeline-item {
    position: relative;
    flex-shrink: 0;
    min-width: 280px;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

/* マーカー（円形） */
.timeline-marker {
    position: absolute;
    top: calc(2rem + 25px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 3;
    background-color: #4A4A4A;
}


/* 縦の点線 */
.timeline-vertical-line {
    position: absolute;
    top: calc(2rem + 25px);
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background-image: repeating-linear-gradient(to bottom,
            transparent,
            transparent 4px,
            currentColor 4px,
            currentColor 8px);
    z-index: 2;
    color: #4A4A4A;
}

/* コンテンツラッパー */
.timeline-content-wrapper {
    margin-top: 10px;
    width: 100%;
    text-align: left;
}

.timeline-year {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #1f2937;
}


.timeline-description {
    list-style: none;
    padding: 0;
    margin: calc(60px + 10px) 0 5px 0;
    height: 30px;
    color: #4a4a4a;
    line-height: 1.0;
}

.timeline-description li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.timeline-description li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #6b7280;
}

.timeline-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ対応 - 年表 */
@media (max-width: 768px) {

    /*
    .timeline-container {
        
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 3rem;
    }
    
    .timeline-horizontal-line {
        display: none;
    }
    */
    .timeline-item {
        width: 70%;
        margin-bottom: 50px;
    }

    .timeline-marker {
        top: calc(2rem + 35px);
    }

    /*
    .timeline-vertical-line {
        top: 20px;
        height: 40px;
    }
    
    .timeline-content-wrapper {
        margin-top: 60px;
    }
        */
}

/* アニメーション効果 */
.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ホバー効果 */
.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.timeline-image:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* About Usセクション */
.about-image-wrapper {
    position: relative;
    perspective: 1000px;
    padding: 20px;
}

.about-image-frame {
    position: relative;
    padding: 25px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 0 0 8px white,
        inset 0 0 0 12px #d1d5db;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.about-image-wrapper:hover .about-image-frame {
    transform: rotate(-1deg) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.25),
        inset 0 0 0 8px white,
        inset 0 0 0 12px #d1d5db;
}

.about-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    filter: sepia(10%) contrast(1.05) brightness(0.98);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

/* レスポンシブ対応 - About Us */
@media (max-width: 768px) {
    .about-image-frame {
        transform: rotate(0deg);
        padding: 15px;
    }

    .about-image-wrapper:hover .about-image-frame {
        transform: rotate(0deg) scale(1.02);
    }
}



/*//////////////////////////eventページ//////////////////////*/
.event_main_img {
    height: 100%;
    max-height: 500px;
}

.event_main_img img {
    height: 100%;
}



/* About Us background image */
.about-content-right {
    position: relative;
}

.about-content-right::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../src/mtbwebrogo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center right;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.about-content-right>* {
    position: relative;
    z-index: 1;
}

/* Mobile Menu Fixes */
#mobile-menu-overlay .drawer {
    background-color: #171717;
    /* Default to solid dark background to match default theme */
    color: #e5e5e5;
}

#mobile-menu-overlay .backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    /* Fallback for transparency */
}

/* Removed z-index overrides to fix visual issues where overlay covers logo/header bar */

/* Mobile Menu - White Mode Fix */
body.white-mode #mobile-menu-overlay .drawer {
    background-color: #F5EFE6 !important;
    color: #4A4A4A !important;
}

/* Mobile Menu Link Backgrounds - Glassmorphism Style */
.mobile-link {
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.mobile-link:hover {

    transform: translateX(5px);
}

/* White Mode Override */
body.white-mode .mobile-link {
    color: #4A4A4A;
    /* Ensure contrast */
}


/* Base Layout (No Dark Mode) Override */
body.base-layout {
    background-color: #F5EFE6;
    color: #4A4A4A;
    transition: none;
    /* Disable transition for immediate load */
}

body.base-layout header {
    background-color: rgba(245, 239, 230, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #D1C5B4;
    transition: none;
}

body.base-layout header h1,
body.base-layout header nav a {
    color: #4A4A4A;
}

body.base-layout header nav a:hover {
    color: #E60012;
}

body.base-layout main {
    background-color: #F5EFE6;
    color: #4A4A4A;
    transition: none;
    min-height: calc(100vh - 64px);
    /* Ensure full height minus header */
}

body.base-layout footer {
    background-color: #EAE1D2;
    border-top: none;
    color: #4A4A4A;
    transition: none;
}

body.base-layout footer h1 {
    color: #4A4A4A;
}

body.base-layout .accent-blue {
    color: #E60012;
}

/* Glass Card adaption for base layout */
body.base-layout .glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Base Layout Mobile Menu */
body.base-layout #mobile-menu-overlay .drawer {
    background-color: #F5EFE6 !important;
    color: #4A4A4A !important;
}

body.base-layout .mobile-link {
    color: #4A4A4A !important;
}