/* ===== スクロール問題修正版 ===== */
/* 重要: htmlとbodyのスクロール設定を明示的に指定 */
html {
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    padding-top: 70px; /* ヘッダーの高さ分のパディング */
    margin: 0;
}

/* ===== 固定ヘッダーのスタイル ===== */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* ===== ロゴセクション ===== */
.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

/* ===== メニューセクション ===== */
.menu-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu li a:hover {
    background-color: #f5f5f5;
    color: #ff6b35;
}

.nav-menu li a.active {
    background-color: #ff6b35;
    color: white;
}

/* ===== CTAボタン ===== */
.cta-button .btn-contact {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.cta-button .btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* ===== モバイル用ハンバーガーメニュー ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ===== モバイルメニュー ===== */
.mobile-menu {
    display: none;
    background-color: white;
    border-top: 1px solid #eee;
    padding: 20px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu ul li {
    margin: 15px 0;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu ul li a.mobile-contact {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-align: center;
    border-radius: 25px;
    margin-top: 20px;
    border-bottom: none;
}

/* ===== メインコンテンツの調整 ===== */
.main-content {
    padding-top: 0; /* bodyで既にpadding-topを設定しているため */
    min-height: calc(100vh - 70px);
}

/* ===== レスポンシブ対応 ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .menu-section {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .logo {
        height: 35px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    body {
        padding-top: 60px;
    }
    
    .main-content {
        min-height: calc(100vh - 60px);
    }
    
    .mobile-menu {
        max-height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
    }
    
    .mobile-menu {
        padding: 15px;
    }
}

/* ===== スクロール時のアニメーション ===== */
.fixed-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* ===== アクセシビリティ対応 ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fixed-header,
    .nav-menu li a,
    .cta-button .btn-contact,
    .mobile-menu-toggle span {
        transition: none;
    }
}

/* ===== 既存スタイルとの競合を防ぐ ===== */
/* 既存のCSSでoverflow: hiddenが設定されている場合の上書き */
* {
    box-sizing: border-box;
}

/* 既存のheight: 100%設定を上書き */
html, body {
    height: auto !important;
    min-height: 100vh;
}

/* 既存のposition: relativeやabsoluteとの競合を防ぐ */
.fixed-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

