:root {
    --main-color: #1a365d;
    --accent-color: #c53030;
    --bg-light: #f7fafc;
    --text-color: #2d3748;
    --hero-overlay-opacity: 0.6; 
}

/* ============================================================
   ■ 全体レイアウトと共通設定
   ============================================================ */
body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
    scroll-behavior: smooth;
    /* 固定ヘッダーの高さ分、上部に余白を作る（PC基準） */
    padding-top: 145px !important;
}

/* 👑固定ヘッダー：PCもスマホも、この外枠ごと最前面に完全固定 */
#header-placeholder {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100000 !important; /* ドロップダウンより必ず上 */
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5%;
    background: #fff;
}

.logo { margin-bottom: 15px; }
.logo a { text-decoration: none; display: block; }
.logo img { height: 70px; width: auto; display: block; }

nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--text-color); font-weight: bold; font-size: 0.95rem; transition: color 0.3s; }
nav a:hover { color: var(--accent-color); }

/* ヒーローエリア */
.hero {
    height: 60vh;
    background-image: linear-gradient(rgba(26, 54, 93, var(--hero-overlay-opacity)), rgba(26, 54, 93, var(--hero-overlay-opacity)));
    background-position: center; background-size: cover; background-repeat: no-repeat;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: #fff; text-align: center; padding: 0 5%; text-shadow: 0 2px 15px rgba(0,0,0,0.7);
    margin-top: 0 !important; /* bodyのpadding-topで調整するため0にリセット */
}
.hero h2 { font-size: 2.2rem; margin-bottom: 20px; line-height: 1.4; }

/* セクション共通 */
section { 
    padding: 140px 10% 80px 10%; 
}
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h3 { font-size: 2rem; color: var(--main-color); position: relative; display: inline-block; padding-bottom: 10px; }
.section-title h3::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: var(--accent-color); }

/* DX Slider Section */
.dx-slider-section { 
    padding: 80px 5% 120px 5%; 
    background-color: var(--bg-light); 
    position: relative; 
}

.slider-viewport { 
    max-width: 900px; 
    margin: 0 auto; 
    aspect-ratio: 16 / 9; 
    position: relative; 
    overflow: hidden; 
    border-radius: 12px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    background: #fff; 
}

.slider-track { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.slide { min-width: 100%; height: 100%; }
.slide a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.slide img { width: 100%; height: 100%; object-fit: contain; }

.slider-nav { position: absolute; top: 50%; width: 100%; display: flex; justify-content: space-between; transform: translateY(-50%); padding: 0 15px; box-sizing: border-box; pointer-events: none; }
.nav-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.8); border: none; cursor: pointer; pointer-events: auto; display: flex; align-items: center; justify-content: center; z-index: 20; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

/* News Section */
.news-list { max-width: 800px; margin: 0 auto; }
.news-item { display: flex; padding: 20px 0; border-bottom: 1px solid #eee; transition: background 0.3s; text-decoration: none; color: inherit; }
.news-item:hover { background-color: #f8f9fa; }
.news-date { width: 120px; font-weight: bold; color: #718096; }
.news-text { flex: 1; font-weight: 500; }
.news-arrow { color: var(--accent-color); margin-left: 10px; }

.btn-container { text-align: center; margin-top: 30px; }
.btn-more { display: inline-block; padding: 10px 30px; border: 2px solid var(--main-color); color: var(--main-color); text-decoration: none; font-weight: bold; border-radius: 5px; transition: 0.3s; }
.btn-more:hover { background: var(--main-color); color: #fff; }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--bg-light); padding: 30px; border-radius: 8px; transition: transform 0.3s; border-top: 5px solid var(--main-color); }
.service-card:hover { transform: translateY(-5px); }
.service-card i { font-size: 2rem; color: var(--accent-color); margin-bottom: 20px; }

footer { background: var(--main-color); color: #fff; text-align: center; padding: 40px 0; }

/* LINE問い合わせ共通パーツ */
.line-contact-banner {
    margin: 40px auto;
    padding: 30px;
    border: 1px solid #D4AF37;
    text-align: center;
    background-color: #f9f9f9;
    max-width: 800px;
}
.line-contact-banner h3 { margin-top: 0; color: #333; }
.line-contact-btn {
    display: inline-block;
    background-color: #000;
    color: #D4AF37;
    padding: 12px 40px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    font-family: 'Swiss 721', sans-serif;
    transition: 0.3s;
}
.line-contact-btn:hover { background-color: #D4AF37; color: #000; }


/* ============================================================
   ■ ロードマップ・ドロップダウンメニュー（完全修正版）
   ============================================================ */

.dots-container {
    position: static !important;
    transform: none !important;
    display: flex !important;          
    justify-content: center !important; 
    gap: 8px !important;
    margin: 35px auto 0 auto;          
}

.dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.3) !important;
    cursor: pointer;
    transition: 0.3s;
}
.dot.active {
    background: var(--main-color) !important;
    transform: scale(1.2) !important;
}

.dx-slider-dropdown {
    max-width: 900px;
    margin: 45px auto 0 auto;    
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;          
}

/* details と summary の挙動をスマホ・PC双方で完全維持 */
details.dx-bar-details {
    display: block !important;
}

summary.dx-bar-summary {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #fff !important;
    border: 2px solid var(--main-color) !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    color: var(--main-color) !important;
    list-style: none !important; 
    outline: none !important;
    transition: background 0.2s !important;
    font-size: 0.95rem !important;
}
summary.dx-bar-summary::-webkit-details-marker { display: none !important; }
summary.dx-bar-summary:hover { background-color: #f0f4f8 !important; }

.bar-arrow {
    font-size: 1rem;
    transition: transform 0.3s;
}
details.dx-bar-details[open] .bar-arrow {
    transform: rotate(180deg);
}
details.dx-bar-details[open] .dx-bar-summary {
    border-radius: 6px 6px 0 0 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

/* 👑展開するドロップダウンメニュー本体：固定ヘッダー（100000）の直下に潜り込ませる */
.dx-bar-scroll-menu {
    display: block !important;
    position: absolute !important;   
    top: 50px !important;            
    left: 15px !important;           
    right: 15px !important;
    max-height: 200px !important;    
    overflow-y: auto !important;     
    background: #fff !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 0 0 6px 6px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important; 
    text-align: left !important;
    z-index: 99999 !important; /* ヘッダーのすぐ後ろ、かつコンテンツより手前 */
}

.dx-bar-scroll-menu::-webkit-scrollbar { width: 6px; }
.dx-bar-scroll-menu::-webkit-scrollbar-track { background: #f1f1f1; }
.dx-bar-scroll-menu::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.dx-bar-scroll-menu::-webkit-scrollbar-thumb:hover { background: var(--main-color); }

/* 💡スマホでもタップ反応を100%通すためのリンク設定 */
.dx-bar-scroll-menu .dx-bar-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    border-bottom: 1px solid #edf2f7 !important;
    text-decoration: none !important;
    color: var(--text-color) !important;
    background: #fff !important;
    font-weight: 500 !important;
    transition: background 0.2s, color 0.2s !important;
    font-size: 0.95rem !important;
    position: relative !important;
    z-index: 100001 !important; /* タップ判定を最優先 */
    pointer-events: auto !important;
    cursor: pointer !important;
}
.dx-bar-scroll-menu .dx-bar-item:last-child { border-bottom: none !important; }
.dx-bar-scroll-menu .dx-bar-item:hover { background-color: var(--bg-light) !important; color: var(--accent-color) !important; }

.dx-b-ep { width: 70px; font-weight: bold; color: var(--main-color); font-size: 0.85rem; }
.dx-b-ttl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-bar-item i { color: #cbd5e0; font-size: 0.8rem; }
.dx-bar-item:hover i { color: var(--accent-color); }
.dx-bar-item.dx-b-gai .dx-b-ep { color: #2b6cb0; }

/* 💡第8話（執筆中・企画中含む）のクリックも殺さず通す設定 */
.dx-bar-item.dx-b-view { 
    background-color: #f7fafc !important; 
    color: var(--text-color) !important; 
    cursor: pointer !important; 
    pointer-events: auto !important; 
}


/* ============================================================
   ■ 📱スマホ専用のレスポンシブ調整（ブレイクポイント768px以下）
   ============================================================ */
@media (max-width: 768px) {
    body {
        /* スマホはナビが2行になって縦に伸びるため、余白を広げてコンテンツの被りを防止 */
        padding-top: 175px !important; 
    }
    
    #header-placeholder {
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
        z-index: 100000 !important;
    }

    header { 
        padding: 10px 5% !important; 
    }
    
    .logo {
        margin-bottom: 8px !important;
    }
    
    .logo img { 
        height: 50px !important; 
    }
    
    nav ul { 
        gap: 10px 15px !important; 
        flex-wrap: wrap !important; 
        justify-content: center !important; 
    }
    
    nav a { 
        font-size: 0.85rem !important; 
    }
    
    .hero h2 { 
        font-size: 1.5rem !important; 
    }
    
    .dot { 
        width: 6px !important; 
        height: 6px !important; 
    }
}

/* ページ内リンク用（アンカーで飛んだ時にヘッダーに隠れないようにする） */
section[id], 
.dx-slider-section {
    scroll-margin-top: 180px !important; 
}