@charset "UTF-8";

/* =========================================
   1. 変数・基本設定
   ========================================= */
:root {
    --main-color: #F0932B;      /* オレンジ（元気・親しみ） */
    --accent-color: #FFBE76;    /* パステルオレンジ（明るさ） */
    --light-accent: #FFEAA7;    /* クリームイエロー（柔らかさ） */
    --text-color: #4a4a4a;      /* 濃いグレー（少し柔らかめ） */
    --text-light: #888888;      /* 薄いグレー */
    --bg-color: #ffffff;        /* 背景白 */
    --bg-gray: #FFFDF7;         /* 温かみのあるオフホワイト */
    --font-serif: "Noto Serif JP", serif; /* 見出し用明朝体 */
    --font-sans: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif; /* 本文用ゴシック */
}

/* Hide hamburger by default (Desktop/Tablet Landscape) */
.hamburger-btn {
    display: none;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-size: 105%; /* Overall text size increase */
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    line-height: 2.2; 
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;

}

/* --- Strength Section (Card Layout) --- */
.strength-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.strength-item {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    height: 100%;
}

.strength-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--main-color);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 10px;
}

.strength-item h3 {
    font-size: 1.4rem;
    color: var(--main-color);
    font-family: var(--font-serif);
    margin-bottom: 20px;
}

.strength-item p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.4s;
}

.strength-link {
    display: block;
    height: 100%;
}

/* --- Strength Details (Zigzag Layout) --- */
.strength-detail-section {
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.strength-detail-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
    padding-top: 40px; /* スクロール位置用 */
}

.strength-detail-row.reverse {
    flex-direction: row-reverse;
}

.strength-detail-img {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* 少し浮き上がらせる */
}

.strength-detail-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.strength-detail-img:hover img {
    transform: scale(1.02); /* 軽いホバーエフェクト */
}

.strength-detail-text {
    flex: 1;
}

.detail-number {
    display: inline-block;
    color: var(--main-color);
    font-size: 3.5rem;
    font-family: var(--font-serif);
    font-weight: bold;
    line-height: 1;
    margin-bottom: 15px;
    opacity: 0.15;
}

.strength-detail-text h3 {
    font-size: 1.6rem;
    color: var(--main-color);
    font-family: var(--font-serif);
    margin-bottom: 20px;
    line-height: 1.4;
}

.strength-detail-text p {
    color: var(--text-color);
    line-height: 2;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .strength-detail-row,
    .strength-detail-row.reverse {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 60px;
    }
    
    .detail-number {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .strength-detail-text h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* =========================================
   2. ヘッダー
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.4s ease, padding 0.4s ease;
    color: #fff; /* 初期状態は白文字（背景画像の上） */
}

/* スクロール時 & 下層ページ用（JSでクラス付与想定） */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    color: var(--text-color); /* 黒文字に変更 */
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    position: relative;
    z-index: 1010;
}

.logo img {
    height: 40px;
    transition: filter 0.4s, opacity 0.4s ease;
}

.logo-white {
    display: block;
}

.logo-black {
    display: none;
}

header.scrolled .logo-white {
    display: none;
}

header.scrolled .logo-black {
    display: block;
}

nav ul {
    display: flex;
    align-items: center; /* 垂直方向を揃える */
    list-style: none;
    gap: 40px; /* 間隔を少し広めに */
    margin: 0;
    padding: 0;
}

nav a {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    position: relative; /* アニメーションの基準点 */
    display: inline-block;
    padding-bottom: 5px;
    text-decoration: none;
    z-index: 1010;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* 線の太さ */
    background-color: var(--main-color); /* 文字色と同じ色にする */
    transform: scaleX(0); /* 最初は幅0 */
    transform-origin: bottom center; /* 右側を基準に縮む設定 */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* 動きの緩急 */
}

nav a:hover::after {
    transform: scaleX(0.5); /* ホバー時は幅100% */
    transform-origin: bottom center; /* 左側を基準に伸びる設定 */
}

/* --- お問合せボタン（ヘッダー用） --- */
nav a.btn-contact {
    background-color:var(--main-color);
    color: #fff;
    padding: 3px 20px;
    border-radius: 7px; /* 角の丸い四角 */
    box-shadow: 0 4px 7cap rgba(240, 147, 43, 0.4);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    z-index: 1020; /* ボタンは最前面に */
}

/* お問合せボタンには通常リンクの下線アニメーションを適用しない */
nav a.btn-contact::after {
    display: none;
}

/* ホバー時の視覚効果 */
nav a.btn-contact:hover {
    background-color: var(--accent-color);
    box-shadow: 0 6px 10px rgba(240, 147, 43, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

/* スクロール時のカラー考慮（白背景時の調整） */
header.scrolled nav a.btn-contact {
    color: #fff;
}

/* =========================================
   ドロップダウンナビゲーション
   ========================================= */

/* ドロップダウンを持つ親liの設定 */
nav ul > li.has-dropdown {
    /* 2段表示にするため relative を解除 */
    position: static;
}

/* ドロップダウン矢印インジケーター */
nav ul > li.has-dropdown > a::before {
    content: '▾';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-60%);
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

nav ul > li.has-dropdown:hover > a::before {
    transform: translateY(-60%) rotate(180deg);
}

/* ドロップダウンメニュー本体 */
.dropdown-menu {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    gap: 40px !important;
    position: absolute;
    top: 100%; /* ヘッダーの直下 */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    list-style: none;
    margin: 0;

    /* 非表示状態 */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 990; /* メインヘッダー項目より低く設定 */
}

/* (全幅化に伴い三角形は削除) */
.dropdown-menu::before {
    display: none;
}

/* ホバー外れ防止用の透明エリア（さらに広めに設定） */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
}

/* ホバーで表示 */
nav ul > li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ドロップダウン内リンクのスタイル */
.dropdown-menu li {
    width: auto;
}

.dropdown-menu li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* 矢印（＞）の追加 */
.dropdown-menu li a::before {
    content: '›';
    margin-right: 8px;
    font-weight: bold;
    color: var(--main-color);
    transition: transform 0.3s ease;
    display: inline-block;
}

.dropdown-menu li a:hover {
    color: var(--main-color);
    background-color: rgba(240, 147, 43, 0.05);
}

.dropdown-menu li a:hover::before {
    transform: translateX(4px);
}

/* --- ヘッダーがスクロールされていない状態（背景が透明な時）のドロップダウン配色 --- */
header:not(.scrolled) .dropdown-menu {
    background: transparent !important;
    box-shadow: none !important;
    border-top: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

header:not(.scrolled) .dropdown-menu li a {
    color: #fff !important;
}

header:not(.scrolled) .dropdown-menu li a:hover {
    color: var(--main-color) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 区切り線（スクロール時のみ薄く表示） */
header.scrolled .dropdown-menu li + li {
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- 未スクロール時のヘッダーのうち「ドロップダウン項目」をホバーした際の挙動（全ページ共通） --- */
header:not(.scrolled):has(li.has-dropdown:hover) {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}

header:not(.scrolled):has(li.has-dropdown:hover) .logo-white { display: none !important; }
header:not(.scrolled):has(li.has-dropdown:hover) .logo-black { display: block !important; }
header:not(.scrolled):has(li.has-dropdown:hover) nav a { color: var(--text-color) !important; }
header:not(.scrolled):has(li.has-dropdown:hover) .hamburger-btn .bar { background-color: var(--text-color) !important; }

/* 対象項目ホバー時は2段目メニューも白背景（ボカシあり）に戻して視認性を確保 */
header:not(.scrolled):has(li.has-dropdown:hover) .dropdown-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}

header:not(.scrolled):has(li.has-dropdown:hover) .dropdown-menu li a {
    color: var(--text-color) !important;
}

/* --- メインビジュアル（全画面・縦書き） --- */
.hero {
    position: sticky; /* スクロール時に固定 */
    top: 0;
    z-index: 1; /* Was -1, moved to 1 so children like scrolldown show up on top */
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* 中央寄せに戻す */
    padding: 0; /* 余白をリセット */
    overflow: hidden;
}

/* ★追加：背景レイヤーがテキストの上に乗らないようにする */
.hero > *:not(.hero-bg) {
    position: relative;
    z-index: 10;
}

/* --- 背景画像の共通設定 --- */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 1; /* 初期状態はすべて「表示」 */
}

/* --- 各画像の読み込み --- */
/* ※ファイル名やパスはご自身のものに合わせてください */
.bg4 { background-image: url('../image/hero.webp'); }
.bg3 { background-image: url('../image/hero3.webp'); }
.bg2 { background-image: url('../image/hero2.webp'); }
.bg1 { background-image: url('../image/miage(chikayama).webp'); }

/* --- フェードアウト用のアニメーション --- */
@keyframes fadeOutSlide {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* --- 1.5秒ごとに切り替えるタイマー設定 ---
*/
.bg1 {
    animation: fadeOutSlide 2.0s ease 2.0s forwards;
}

.bg2 {
    animation: fadeOutSlide 2.0s ease 5.0s forwards;
}

.bg3 {
    animation: fadeOutSlide 2.0s ease 9.0s forwards;
}

/* --- スクロールインジケーター --- */
.scrolldown {
    position: absolute;
    bottom: -70px;
    left: 0%;
    transform: translateX(-50%);
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.scrolldown span {
    position: absolute;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-family: var(--font-sans);
}

.scrolldown::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 0;
    background: #fff;
    animation: sdb-anim 2s infinite;
}

@keyframes sdb-anim {
    0% {
        top: 0;
        height: 0;
        opacity: 0;
    }
    20% {
        top: 0;
        height: 25px;
        opacity: 1;
    }
    80% {
        top: 25px;
        height: 25px;
        opacity: 1;
    }
    100% {
        top: 50px;
        height: 0;
        opacity: 0;
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 画像を少し暗く */
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    writing-mode: vertical-rl; /* 縦書き */
    text-orientation: upright;
    letter-spacing: 0.3em;
}

.vertical-text {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 500;
    margin: 70px 0px 0px 0px;
    line-height: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-sub {
    font-family: var(--font-sans);
    font-size: 1rem;
    margin: 70px 0px 0px 0px; 
    opacity: 0.9;
    border-right: 1px solid rgba(255,255,255,0.7);
    padding-right: 20px;
}

/* --- セクション共通 --- */
section {
    padding: 60px 20px; /* 100px -> 60px */
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #e5e5e5;
}

section:first-of-type {
    border-top: none;
}

h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 50px; /* 60px -> 50px */
    text-align: left;
    font-weight: normal;
    letter-spacing: 0.1em;
}

/* --- 下層ページ（About, Work, Company） --- */

.serif-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--main-color);
}
/* --- 経営理念セクション (Frosted Glass Style) --- */
.mission-section {
    position: relative;
    width: 100%;
    min-height: 100vh; /* より縦長に */
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 120px 20px;
    margin: 0 auto;
    max-width: none; /* 全幅表示 */
    border-top: none;
    overflow: hidden;
}

.mission-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3); /* 少しだけ濃度を上げる */
    backdrop-filter: blur(25px); /* ぼかしを強く */
    -webkit-backdrop-filter: blur(25px);
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
    will-change: transform, backdrop-filter;
    z-index: 1;
}

.mission-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.mission-sub-title {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: var(--main-color);
    margin-bottom: 20px;
    font-weight: bold;
}

.mission-title {
    color: #fff !important;
    font-size: 2.4rem !important;
    line-height: 1.5 !important;
    margin-bottom: 40px !important;
    text-align: left !important;
}

.mission-content p {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 20px;
    opacity: 0.9;
}

.mission-action {
    margin-top: 50px;
}

/* モバイル対応 */

@media (max-width: 768px) {
    .mission-section {
        min-height: auto;
        padding: 80px 20px;
        background-attachment: scroll; 
    }
    
    .mission-container {
        flex-direction: column;
    }

    .mission-title {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
    }

    .mission-content {
        padding-left: 0 !important;
        padding-top: 10px !important;
    }
    
    .mission-content p {
        font-size: 1rem;
        line-height: 1.8;
    }
}

/* --- 線画ボタン --- */
.btn-line {
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
    padding: 12px 40px;
    border: 1px solid var(--text-color);
    color:#1F2937;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.btn-line::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: var(--main-color);
    transition: 0.4s;
    z-index: -1;
}

.btn-line:hover {
    color: #fff;
    border-color: var(--main-color);
}

.btn-line:hover::before {
    width: 100%;
}

/* --- 診断CTAボタン --- */
.btn-diagnosis:hover {
    background-color: #ea6c00 !important;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.55) !important;
}

/* --- ニュースエリア --- */
#news {
    padding-top: 40px;
    padding-bottom: 100px;
}

#news .news-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 50px;
    text-align: left;
}

.section-sub {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--main-color);
    letter-spacing: 0.3em;
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

.news-list {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.news-item {
    display: flex;
    align-items: center;
    padding: 30px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.news-item:hover {
    background-color: rgba(0, 0, 0, 0.015);
    padding-left: 25px;
}

.news-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--main-color);
    transition: width 0.4s ease;
}

.news-item:hover::after {
    width: 100%;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 260px;
    flex-shrink: 0;
}

.news-meta time {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-light);
    letter-spacing: 0.05em;
    font-weight: 500;
}

.news-tag {
    background-color: rgba(240, 147, 43, 0.08);
    color: var(--main-color);
    font-size: 0.75rem;
    padding: 3px 14px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 1px solid rgba(240, 147, 43, 0.2);
}

.news-title {
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--main-color);
}

.news-arrow {
    margin-left: 20px;
    color: var(--main-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
}

.news-item:hover .news-arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 10px;
    }
    
    .news-meta {
        width: 100%;
        margin-bottom: 12px;
        gap: 15px;
    }
    
    .news-title {
        white-space: normal;
        line-height: 1.6;
        font-size: 1rem;
    }
    
    .news-arrow {
        display: none;
    }
}

/* --- 事業紹介エリア --- */
#service {
    position: relative;
    z-index: 0;
    background-color: #f7f7f7; /* 薄いグレー */
    max-width: 100%; /* 横幅いっぱいにするため100%に上書き */
    padding: 80px 40px;
    margin: 0;
}

#service::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--main-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -2;
}

#service:has(.text-right .btn-line:hover)::after {
    transform: scaleX(1);
}

#service .section-title {
    transition: color 0.5s ease;
}

#service:has(.text-right .btn-line:hover) .section-title {
    color: #fff;
}

#service .service-inner {
    max-width: 1200px;
    margin: 0 auto;
}

#service::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; /* ロゴの大きさ（画面幅の60%程度） */
    height: 100%;
    background-image: url('../image/ロゴ（コンセプトなし）.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.05; /* うっすら背景に見える透明度 */
    z-index: -1;
    pointer-events: none; /* クリック等の邪魔にならないように */
}

/* --- 事業紹介：4つ横並びカード --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

.service-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* カード画像エリア */
.service-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* 比率を大きく（縦長に）設定 */
    background: linear-gradient(135deg, var(--main-color), #e8a04a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像をいっぱいに表示 */
    transition: transform 0.4s ease;
}

.service-card:hover .service-card-img img {
    transform: scale(1.1);
}

/* 番号バッジ */
.service-number {
    position: absolute;
    bottom: -25px; /* 左下へ */
    left: 16px;
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 700;
    color: rgba(229, 132, 14, 0.78);/* 少し見やすく透過度を調整 */   
    line-height: 1;
    z-index: 3;
}

/* カードテキストエリア */
.service-card-body {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 14px 28px 25px;
}

.service-card-body h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 12px;
}

.service-card-body h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--main-color);
    border-radius: 2px;
}

.service-card-body p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.9;
}

/* --- ページフッター --- */
.text-right  {
    text-align: right;
}

/* =========================================
   4. 下層ページ（About, Work, Company）
   ========================================= */

/* --- ページヘッダー（控えめな高さ） --- */
.page-hero {
    height: 35vh;
    min-height: 250px;
    background-color: var(--text-color);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply; /* 画像を暗く馴染ませる */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
    text-align: left;
    margin-bottom: 60px;
    padding-left: 40px;
}

.page-hero h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    letter-spacing: 0.1em;
    margin: 0;
}

.page-hero p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
    letter-spacing: 0.05em;
}

/* --- 下層ページの画像サイズ調整（重要） --- */
/* コンテンツ内のメイン画像：中央寄せ・幅制限 */
.featured-img,
.content-block img {
    display: block;
    max-width: 1000px;     /* 横幅制限 */
    width: 100%;
    height: auto;
    max-height: 450px;    /* 高さ制限 */
    object-fit: cover;
    margin: 0 auto 40px;  /* 中央寄せ & 下余白 */
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* テキストも中央寄せで見やすく */
.content-block.center-text {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

/* --- 代表挨拶（Greeting） --- */
.greeting-layout {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 左カラム：写真＋名前 */
.greeting-left {
    flex: 0 0 370px;
    width: 370px;
}

.greeting-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.10);
    background: var(--bg-gray);
    margin-bottom: 18px;
}

.greeting-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.greeting-img:hover img {
    transform: scale(1.03);
}

.greeting-identity {
    text-align: left;
    padding-left: 4px;
}

.greeting-role {
    font-size: 0.78rem;
    color: var(--main-color);
    letter-spacing: 0.18em;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.greeting-name {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--text-color);
    margin: 0 0 4px;
    letter-spacing: 0.08em;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.greeting-name-en {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: normal;
    letter-spacing: 0.14em;
}

.greeting-sub {
    font-size: 0.8rem;
    color: var(--text-light);
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* 右カラム：メッセージのみ */
.greeting-text {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 100%;
}

.greeting-body {
    font-family: var(--font-serif);
    font-size: 1.08rem;
    line-height: 2.5;
    color: #3a3428;
    letter-spacing: 0.08em;
    text-align: justify;
    border-left: 3px solid var(--main-color);
    padding-left: 28px;
}

/* --- 強み詳細内のエキスパートチーム表示 --- */
.member-intro-box {
    margin-top: -50px;
    margin-left: -110px;
    padding: 30px 20px;
    background-color: #fff9f0; /* 薄いオレンジ */
    border-radius: 16px;
    border: 1px solid #ffe8cc;
    width: 125%;
}

/* アコーディオンのボタンスタイル */
.accordion-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--main-color);
    padding: 10px 0;
}

.accordion-toggle .toggle-text {
    flex-grow: 1;
    text-align: center;
    padding-left: 24px;
}

/* ＋アイコン */
.accordion-toggle .toggle-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.accordion-toggle .toggle-icon::before,
.accordion-toggle .toggle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: var(--main-color);
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.accordion-toggle .toggle-icon::before {
    width: 16px;
    height: 2px;
}

.accordion-toggle .toggle-icon::after {
    width: 2px;
    height: 16px;
}

/* 開いたときのアイコン（－に変化） */
.accordion-container.is-open .accordion-toggle .toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

/* アコーディオンの中身（初期は非表示） */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, margin-top 0.4s ease-out;
}

/* 開いたときの中身の上の余白 */
.accordion-container.is-open .accordion-content {
    margin-top: 40px;
}

@media (max-width: 768px) {
    .member-intro-box {
        margin-top: 40px;
        margin-left: 0;
        width: 100%;
        padding: 40px 20px;
    }
    .accordion-toggle {
        font-size: 1.2rem;
    }
}

/* --- メンバー紹介（About - Grid Design） --- */
#member {
    padding-bottom: 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

/* 4カラムグリッド */
.member-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px;
    max-width: 1200px;
    margin: 0 auto;
}
/* 4カラムグリッド */
.member-grid4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px;
    max-width: 1500px;
    margin: 0 auto;
}

.member-tile {
    overflow: visible;
    margin-bottom: 15px;
    border-radius: 12px;
    transition: transform 0.35s ease;
}

.member-tile-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.member-tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

/* Hover effects */
.member-tile:hover .member-tile-img {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.11);
}

.member-tile:hover .member-tile-img img {
    transform: scale(1.05);
}

.member-tile-info {
    padding: 16px 0 0;
    text-align: center;
}

.tile-position {
    font-size: 0.78rem;
    color: var(--main-color);
    letter-spacing: 0.15em;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.tile-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 0 0 4px;
    letter-spacing: 0.05em;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tile-name-en {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: normal;
    letter-spacing: 0.12em;
}

/* Scroll Animation Classes (Ensure these are active) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 業務フロー（Work） --- */
/* --- Timeline Flow (Renovation) --- */
.timeline-container {
    position: relative;
    max-width: 1350px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Phase Section Styles */
.phase-section {
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

/* Background Support */
.phase-section.has-bg {
    border: none;
}

.phase-section.has-bg .phase-header {
    position: relative;
    overflow: hidden;
    background: #111;
    border: none;
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.phase-section.has-bg .phase-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--phase-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.35; /* さらに暗くして文字の視認性を高める */
    z-index: -1;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.phase-section.has-bg .phase-header:hover::before {
    transform: scale(1.05);
}

.phase-section.has-bg .phase-header > * {
    position: relative;
    z-index: 1;
}

.phase-section.has-bg .phase-title h3 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.phase-section.has-bg .phase-title p {
    color: rgba(255,255,255,0.8);
}

.phase-section.has-bg .toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.phase-section.has-bg.active .toggle-btn {
    background: var(--main-color);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.phase-header:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: var(--main-color);
}

.phase-title h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 4px;
}

.phase-title p {
    font-size: 0.85rem;
    color: var(--text-light);
    letter-spacing: 0.15em;
    font-weight: 600;
}

.toggle-btn {
    background: var(--bg-gray);
    border: none;
    color: var(--main-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon {
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1;
}

/* Phase Details (Accordion) */
.phase-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease;
    padding: 0 40px; 
    position: relative; 
}

.phase-section.active .phase-details {
    max-height: 5000px; /* Increased to prevent cut-off on mobile */
    padding: 40px;
    transition: max-height 0.5s ease-in;
}

/* Update Toggle Button State */
.phase-section.active .toggle-btn {
    background: var(--main-color);
    color: #fff;
    transform: rotate(45deg);
}

.phase-section.active .phase-header {
    border-color: var(--main-color);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Timeline Line (Inside Phase) */
.timeline-line {
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, #eee, var(--main-color), #eee);
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.6;
}

.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 100px;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.phase-details .timeline-item:hover {
    transform: translateY(-5px);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* 偶数番目は左右反転（画像左、テキスト右） */
.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 46%;
    padding: 35px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.timeline-content h4 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    color: var(--main-color);
    font-family: var(--font-serif);
    font-weight: 700;
}

.timeline-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-light);
}

.timeline-image {
    width: 44%;
    height: 280px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-image::before {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 900;
    color: rgba(0,0,0,0.03);
    letter-spacing: 0.1em;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.timeline-item:hover .timeline-image img {
    transform: scale(1.05);
}

/* 中央のマーカー */
.timeline-marker {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
    background-color: #fff;
    color: var(--main-color);
    border: 3px solid var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    background-color: var(--main-color);
    color: #fff;
    transform: scale(1.1);
}

/* --- 会社概要（Company） --- */
.price-container {
    max-width: 1400px;
    margin: 0 auto;
}
.table-container {
    max-width: 800px;
    margin: 0 auto;
}
.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th, .company-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.company-table th {
    width: 30%;
    color: var(--main-color);
    font-weight: normal;
    font-family: var(--font-serif);
}

/* =========================================
   5. フォーム・フッター・その他
   ========================================= */

/* お問い合わせ：左右レイアウト */
.contact-container {
    display: flex;
    align-items: stretch;
    gap: 60px;
    margin-top: 60px;
}

.contact-form-wrapper {
    flex: 1;
    min-width: 300px;
}

.contact-image {
    flex: 1;
    height: 700px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-form {
    background: transparent; /* 背景色をなくす */
    padding: 0;              /* パディングもなくす */
    max-width: 100%;         /* 幅を100%に */
    margin: 0;
}

/* 入力項目のグループ */
.form-group {
    margin-bottom: 40px; /* 余白を広めにとる */
    position: relative;
}

/* ラベルのデザイン変更 */
label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-color);
    letter-spacing: 0.1em;
    font-weight: normal; /* 太字にしない */
    font-family: var(--font-sans);
}

/* 必須マークのスタイル */
label span {
    color: var(--main-color);
    font-size: 0.7rem;
    margin-left: 5px;
    vertical-align: middle;
}

/* 入力欄のデザイン（下線のみ） */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 10px 0; /* 横のパディングを0に */
    border: none;
    border-bottom: 1px solid #ccc; /* 下線のみ */
    background: transparent;
    border-radius: 0;
    font-family: var(--font-serif); /* 入力文字を明朝体にするとより雰囲気がでます */
    font-size: 1rem;
    transition: border-color 0.3s;
    outline: none;
}

/* フォーカス時に下線の色を変える */
input:focus,
textarea:focus {
    border-bottom: 1px solid var(--main-color);
}

/* 送信ボタン（シンプル化） */
button[type="submit"] {
    display: block;
    width: 400px;      /* 幅を指定 */
    margin: 60px auto 0; /* 中央寄せ */
    padding: 15px 0;
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    font-family: var(--font-sans); /* btn-line has this explicitly */
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    background: var(--main-color);
    transition: 0.4s;
    z-index: -1;
}

button[type="submit"]:hover {
    color: #fff;
    border-color: var(--main-color);
}

button[type="submit"]:hover::before {
    width: 100%;
}

/* --- フッター（New Design） --- */
footer {
    font-family: var(--font-sans);
    color: #fff;
    margin-top: 0;
}

/* 1. Upper Section (Links) */
.footer-upper {
    background-color: #f9f9f9; 
    padding: 60px 0;
}

.footer-upper-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand {
    flex: 0 0 auto;
}

.footer-logo-img {
    height: 45px;
    width: auto;
}

.footer-links-container {
    flex: 1;
    z-index: 120px;
    display: flex;
    justify-content: center;
    gap: 80px; /* カラム間の余白 */
    flex-wrap: wrap; 
}

.footer-link-col {
    min-width: 180px;
}

.col-header {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 25px;
    letter-spacing: 0.1em;
    padding-left: 15px;
    border-left: 4px solid var(--main-color);
    line-height: 1.2;
    color: var(--text-color);
}

.footer-link-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link-col li {
    margin-bottom: 12px;
}

.footer-link-col a {
    color: var(--text-color); /* 黒/グレー系に変更 */
    font-size: 0.9rem;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s, color 0.3s;
    display: inline-block;
}

.footer-link-col a:hover {
    opacity: 1;
    color: var(--main-color);
    text-decoration: underline;
}

/* SNS Icons (Right) */
.footer-sns {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.sns-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color 0.3s, transform 0.3s;
}

.sns-icon:hover {
    color: var(--main-color);
    transform: translateY(-3px);
}

/* 著作権バー */
.footer-bottom {
    background-color: var(--main-color);
    color: #fff;
    text-align: center;
    padding: 18px 40px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-upper-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 50px;
    }

    .footer-links-container {
        justify-content: center;
        gap: 40px;
    }

    .footer-link-col {
        min-width: 100%;
    }

    .col-header {
        border-left: none;
        border-bottom: 2px solid var(--main-color);
        padding-left: 0;
        padding-bottom: 10px;
        display: inline-block;
    }
}
/* --- アニメーション --- */

/* =========================================
   6. レスポンシブ対応（スマホ・タブレット）
   ========================================= */
@media (max-width: 1024px) {
    /* ヘッダー */
    .header-inner {
        padding: 0 20px;
    }

    /* ハンバーガーボタン */
    .hamburger-btn {
        display: block;
        position: relative;
        z-index: 1001; /* navより手前に配置 */
        width: 30px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .bar {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--text-color); /* Default to dark */
        transition: all 0.4s;
    }
    
    header:not(.scrolled) .bar {
        background-color: #fff;
    }
    header.scrolled .bar {
        background-color: var(--text-color);
    }

    body.nav-open .bar {
        background-color: var(--text-color);
    }

    .bar1 { top: 0; }
    .bar2 { top: 50%; transform: translateY(-50%); }
    .bar3 { bottom: 0; }

    body.nav-open .bar1 {
        transform: translateY(11px) rotate(45deg);
    }
    body.nav-open .bar2 {
        opacity: 0;
    }
    body.nav-open .bar3 {
        transform: translateY(-11px) rotate(-45deg);
    }

    /* モバイルナビゲーション (オーバーレイ) */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        display: flex !important;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    body.nav-open nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    nav ul {
        display: flex; /* Restore flex */
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    nav a {
        font-size: 1.2rem;
        color: var(--text-color) !important; /* Always dark on mobile menu */
    }
    nav a:hover {
        color: var(--text-color) !important; /* No inversion on hover */
        background: none !important; /* Remove background on hover */
    }
    nav a.btn-contact,
    nav a.btn-diagnosis-header {
        color: #fff !important; /* Keep white text for buttons with dark backgrounds */
    }

    /* Disable scroll when menu open */
    body.nav-open {
        overflow: hidden;
    }

    /* Force header to scrolled style when menu is open */
    body.nav-open header {
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 1px 10px rgba(0,0,0,0.05) !important;
        padding: 15px 0 !important;
    }
    body.nav-open .logo-white { display: none !important; }
    body.nav-open .logo-black { display: none !important; }
    
    /* Home メインビジュアル */
    .hero h1.vertical-text {
        writing-mode: horizontal-tb;
        font-size: 2rem;
        margin: 0 0 20px 0;
        text-align: left;
    }
    .hero-sub {
        writing-mode: horizontal-tb;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.7);
        padding-bottom: 10px;
        margin: 0 0 10px 0;
    }
    .hero-content {
        display: flex;
        flex-direction: row;
        align-items: left;
        left:10px;
    }

    /* Home ジグザグレイアウト解除 */

    /* 事業紹介：1カラムに */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card-img {
        height: 180px;
    }

    /* 下層ページ */
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    /* 代表挨拶：スマホ縦積み */
    .greeting-layout {
        flex-direction: column;
        gap: 30px;
    }

    .greeting-left {
        width: 100%;
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .greeting-img {
        width: 75%;
        aspect-ratio: 3 / 4;
        flex: none;
        margin-bottom: 3px;
    }

    .greeting-identity {
        text-align: center; /* Center name and role */
    }

    .greeting-text {
        width: 100%;
        align-items: flex-start;
    }

    .greeting-body {
        padding-left: 16px;
        font-size: 0.95rem;
        line-height: 1.9;
    }

    /* メンバーグリッド：スマホは2列 */
    .member-grid,
    .member-grid4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 会社概要テーブル */
    .company-table th, .company-table td {
        display: block;
        width: 100%;
    }
    .company-table th {
        background: var(--bg-gray);
        font-weight: bold;
    }

    /* お問い合わせ：スマホ対応 */
    .contact-container {
        flex-direction: column;
        gap: 40px;
    }

    .contact-image {
        height: 300px;
    }

    /* ニュース：スマホ対応 */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px 0;
    }
    
    .news-meta {
        width: 100%;
        gap: 12px;
    }
    
    .news-title {
        white-space: normal;
        line-height: 1.6;
    }

    /* その他 */
    section {
        padding: 60px 20px;
    }

    /* 業務フロー（Timeline）スマホ対応 */
    .phase-header {
        padding: 24px 20px;
    }

    .phase-title h3 {
        font-size: 1.35rem;
    }

    .timeline-line {
        left: 20px; /* 左側に線を移動 */
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 45px; /* 左側のスペースを調整 */
        margin-bottom: 40px;
        width: auto;
    }
    
    .timeline-item:nth-child(even) {
        flex-direction: column;
    }

    .timeline-marker {
        position: absolute;
        left: -40px;
        top: 0;
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-width: 2px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .timeline-content,
    .timeline-image {
        width: 100%;
    }
    
    .timeline-content {
        padding: 24px;
        margin-bottom: 16px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
    
    .timeline-image {
        height: 180px;
        border-radius: 12px;
    }
}

/* 超小型スマートフォン */
@media (max-width: 480px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   モバイルのドロップダウン対応
   ========================================= */
@media (max-width: 1024px) {
    /* ドロップダウン矢印を非表示 */
    nav ul > li.has-dropdown > a::before {
        display: none;
    }

    /* ドロップダウンをフルwidthで常時展開 */
    header .dropdown-menu,
    header:not(.scrolled).dropdown-menu {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background: transparent !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 8px 0 0 0 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    /* 吹き出し三角非表示 */
    .dropdown-menu::before {
        display: none;
    }

    /* サブメニューのリンクスタイル */
    header .dropdown-menu li a,
    header:not(.scrolled) .dropdown-menu li a {
        font-size: 0.9rem !important;
        color: var(--text-color) !important;
        padding: 4px 0 !important;
        padding-left: 0 !important;
    }

    header .dropdown-menu li a:hover,
    header:not(.scrolled) .dropdown-menu li a:hover {
        color: var(--text-color) !important; /* No inversion on hover */
        background: none !important;
    }

    /* 区切り線を非表示 */
    .dropdown-menu li + li {
        border-top: none;
    }
}

/* ============================================================
   助成金一覧テーブル（23区）
   ============================================================ */
#subsidy {
    padding: 40px 20px;
}

.subsidy-note {
    background: #fdf2e9;
    border-left: 4px solid var(--main-color);
    padding: 16px 20px;
    border-radius: 6px;
    margin: 24px 0 32px;
    font-size: 0.88rem;
    line-height: 1.9;
    color: #444;
}
.subsidy-note span {
    color: var(--main-color);
    margin-right: 6px;
}

.subsidy-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    margin-top: 8px;
}

.subsidy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 1100px;
    background: #fff;
}

.subsidy-table thead tr {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: #fff;
}

.subsidy-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.4;
    border: 1px solid rgba(255,255,255,0.15);
    white-space: nowrap;
}

.subsidy-table td {
    padding: 9px 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
    color: #374151;
    vertical-align: middle;
    line-height: 1.4;
}

.subsidy-table .district-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1F2937;
    background: #f3f4f6;
    white-space: nowrap;
}

.subsidy-table .total {
    font-weight: 700;
    color: var(--main-color);
    background: #fff7f0;
    font-size: 0.9rem;
}

/* 区ごとに区切り線を強調 */
.subsidy-table tr.district-row > td {
    border-top: 2px solid #d1d5db;
}

/* 偶数行の背景 */
.subsidy-table tbody tr:nth-child(even):not(.district-row) td:not(.district-name) {
    background: #fafafa;
}

/* ホバー */
.subsidy-table tbody tr:hover td {
    background: #fdf2e9;
    transition: background 0.15s ease;
}

.subsidy-footer-note {
    margin-top: 20px;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.8;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .subsidy-table th,
    .subsidy-table td {
        font-size: 0.72rem;
        padding: 7px 5px;
    }
    .subsidy-table .district-name {
        font-size: 0.78rem;
    }
    .subsidy-table .total {
        font-size: 0.78rem;
    }
}
/* =========================================
   技術連携セクション：画像スライダー
   ========================================= */
.evoltz-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    overflow: hidden;
    padding: 20px 0 60px;
}

.evoltz-slider {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evoltz-slide {
    position: absolute;
    width: 60%;
    max-width: 800px;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transform: scale(0.7) translateX(0);
}

.evoltz-slide img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* 中央（アクティブ） */
.evoltz-slide.active {
    opacity: 1;
    z-index: 10;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}

/* 左右の画像（薄く、少し小さく） */
.evoltz-slide.prev {
    opacity: 0.3;
    z-index: 5;
    transform: scale(0.85) translateX(-50%);
    filter: blur(1px) grayscale(50%);
}

.evoltz-slide.next {
    opacity: 0.3;
    z-index: 5;
    transform: scale(0.85) translateX(50%);
    filter: blur(1px) grayscale(50%);
}

/* スマホ対応 */
@media (max-width: 768px) {
    .evoltz-slider {
        height: 250px;
    }
    .evoltz-slide {
        width: 85%;
    }
    .evoltz-slide.prev {
        transform: scale(0.8) translateX(-30%);
    }
    .evoltz-slide.next {
        transform: scale(0.8) translateX(30%);
    }
}

/* スライダーの矢印 */
.slider-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
    pointer-events: none; /* 下の画像をクリックできるように */
}

.slider-arrow {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    pointer-events: auto; /* ボタン自体はクリック可能に */
}

.slider-arrow:hover {
    background-color: var(--main-color);
    color: #fff;
    transform: scale(1.1);
}

.slider-arrow::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    display: block;
}

.prev-btn::before {
    transform: rotate(-135deg);
    margin-left: 5px;
}

.next-btn::before {
    transform: rotate(45deg);
    margin-right: 5px;
}

/* スマホ対応の矢印 */
@media (max-width: 768px) {
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    .slider-arrows {
        padding: 0 10px;
    }
}

/* =========================================
   7. ストーリーセクション（リデザイン）
   ========================================= */
#story {
    padding: 60px 0px;
    background-color: var(--bg-gray);
    overflow: hidden;
    position: relative;
    z-index: 0;
    max-width: 100%;
    margin: 0;
}

.story-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 80px;
}

.story-header h2 {
    font-size: 3rem;
    margin-bottom: 24px;
    text-align: center;
}

.story-header p {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-color);
}

/* 比較グリッド（2カラム：Before/After, 業界動向など） */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin: 80px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 比較カード共通スタイル */
.comparison-card {
    background: #fff;
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.comparison-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.comparison-card h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--main-color);
    margin-bottom: 24px;
    line-height: 1.4;
    position: relative;
    padding-bottom: 16px;
}

.comparison-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--main-color);
    opacity: 0.3;
}

.comparison-card-img {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 15px;
}

.comparison-card-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.comparison-card:hover .comparison-card-img img {
    transform: scale(1.02);
}

.comparison-card p {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-color);
}

/* 3カラム比較（新築 vs 既築 vs カナメイシ） */
.comparison-3way {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 80px 0;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

/* カナメイシのカードを強調 */
.comparison-card.featured {
    background-color: #fff9f0;
    border: 2px solid var(--main-color);
    position: relative;
}

.comparison-card.featured::before {
    content: 'OUR ROLE';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--main-color);
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* ジグザグセクションの微調整 */
.strength-detail-text p {
    font-size: 1.1rem;
    line-height: 2.1;
}

.detail-number {
    opacity: 0.2;
    font-size: 4rem;
}

/* レスポンシブ調整 */
@media (max-width: 1024px) {
    .comparison-grid,
    .comparison-3way {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .comparison-card {
        padding: 40px 30px;
    }
    
    .story-header h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    #story {
        padding: 80px 20px;
    }
    
    .story-header h2 {
        font-size: 1.8rem;
    }
    
    .comparison-card h3 {
        font-size: 1.4rem;
    }
}

/* --- Risk Comparison Layout (Side-by-Side) --- */
.risk-comparison-layout {
    display: flex;
    align-items: stretch;
    gap: 60px;
    margin: 80px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.risk-graph-area {
    flex: 1;
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.risk-graph-area img {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 12px;
}

.risk-graph-area img.graph-enlarged {
    transform: scale(1.3)translateY(-10%);
    transform-origin: center top;
    margin-bottom:10%;
}

.risk-graph-area .note-box {
    margin-top: auto !important; 
}


.risk-standards-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.risk-standard-item {
    background: #fff;
    padding: 24px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-left: 6px solid #ddd;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.risk-standard-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.risk-standard-item h4 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin: 0;
    min-width: 120px;
}

.risk-standard-item img {
    width: 100px;
    height: auto;
    border-radius: 8px;
}

.risk-standard-item p {
    margin: 0;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Color Coding */
.risk-standard-item.risk-high {
    border-left-color: #ef4444; /* Red */
}
.risk-standard-item.risk-high p {
    color: #ef4444;
}

.risk-standard-item.risk-mid {
    border-left-color: #f59e0b; /* Orange/Yellow */
}
.risk-standard-item.risk-mid p {
    color: #f59e0b;
}

.risk-standard-item.risk-low {
    border-left-color: #10b981; /* Green */
}
.risk-standard-item.risk-low p {
    color: #10b981;
}

/* Sequential Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.5s; }

@media (max-width: 1024px) {
    .risk-comparison-layout {
        flex-direction: column;
        gap: 40px;
    }
    
    .risk-graph-area, .risk-standards-area {
        width: 100%;
    }
}

/* --- Stress Flow Layout (HTML Markup Replacement) --- */
.stress-flow-container {
    max-width: 95%;
    margin: 80px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 20px;
}

.stress-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    overflow: hidden;
    max-width: 100%;
}

.stress-card.problem {
    border-top: 6px solid var(--text-light); 
}

.stress-card.solution {
    border-top: 6px solid var(--main-color); 
}

.stress-card-content {
    padding: 40px;
    text-align: center;
}

.stress-card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

.stress-card.problem .stress-card-title {
    color: var(--text-color);
}

.stress-card.solution .stress-card-title {
    color: var(--main-color);
}

.stress-card-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.stress-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px 20px 20px;
}

.stress-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fdfdfd;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid #eee;
}

.stress-grid-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stress-grid-img-wrapper img {
    max-width: 180%;
    max-height: 200%;
    object-fit: contain;
}

.stress-grid-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stress-card.problem .stress-grid-title {
    color: var(--text-light);
}

.stress-card.solution .stress-grid-title {
    color: var(--main-color);
}

.stress-grid-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    text-align: left;
}

.flow-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: var(--main-color);
}

@media (max-width: 1024px) {
    .stress-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stress-card-content {
        padding: 30px 20px;
    }
    .stress-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px 30px 20px;
    }
}

/* --- evoltz Collaboration Section --- */
.evoltz-section {
    max-width: 100%;
    margin: 100px auto;
    padding: 0 40px;
}

.evoltz-intro-text {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
}

.evoltz-intro-text h3 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--main-color);
    font-family: var(--font-serif);
    line-height: 1.4;
}

.evoltz-hero-image-wrapper {
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.evoltz-hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.evoltz-intro-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-color);
    text-align: left;
    margin-top: 30px;
}

.evoltz-card-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Specific Badge and Typography for Partner Cards */
.risk-standard-item h5 {
    font-size: 0.8rem;
    color: var(--main-color);
    background: rgba(249, 115, 22, 0.08);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.risk-standard-item h4 {
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.risk-standard-item .evoltz-desc, 
.risk-standard-item a { /* Supporting both for flexibility */
    display: block;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: normal;
    text-decoration: none;
    pointer-events: none; /* If using <a> just for text */
}

@media (max-width: 768px) {
    .evoltz-section {
        padding: 0 20px;
        margin: 60px auto;
    }

    .evoltz-intro-text h3 {
        font-size: 1.6rem;
    }

    .evoltz-intro-text p {
        font-size: 0.95rem;
    }

    .risk-standard-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 24px;
    }

    .risk-standard-item img {
        width: 80px;
        margin-bottom: 20px;
    }
}

/* --- Background Image Integration for Cards --- */
.risk-standard-item.bg-fade-item {
    position: relative;
    overflow: hidden;
    padding: 45px 60px 45px 300px; /* Signficant left padding to clear the image */
    min-height: 180px;
    align-items: flex-start;
    border-left-width: 8px;
    background: #fdfdfd;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.risk-standard-item.bg-fade-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.risk-standard-item.bg-fade-item .bg-integrated {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 45%; /* Slightly narrower image area */
    object-fit: cover;
    z-index: 0;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.risk-standard-item.bg-fade-item:hover .bg-integrated {
    opacity: 0.55;
}

.risk-standard-item.bg-fade-item > div {
    position: relative;
    z-index: 2;
    width: 100%;
    text-shadow: 0 0 10px rgba(255,255,255,0.8); /* Subtle white glow to pop text */
}

/* Ensure text is dark and clear */
.risk-standard-item.bg-fade-item h4 {
    color: #1a1a1a;
    font-weight: 700;
}

.risk-standard-item.bg-fade-item p {
    color: #333;
    line-height: 1.8;
}


@media (max-width: 768px) {
    .risk-standard-item.bg-fade-item {
        padding: 30px 24px;
        min-height: auto;
    }
    .risk-standard-item.bg-fade-item .bg-integrated {
        width: 100%;
        opacity: 0.15;
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    }
}

/* --- plus-merits Accordion --- */
.plus-merits {
    margin-top: 80px;
    margin-bottom: 60px;
}

.merits-accordion-trigger {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #f8fafc; /* Very light slate */
    border: none;
    border-left: 8px solid var(--main-color);
    padding: 30px 45px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    text-align: left;
}

.merits-accordion-trigger:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.merits-accordion-trigger h3 {
    margin: 0;
    font-size: 1.6rem;
    font-family: var(--font-serif);
    color: var(--text-color);
    line-height: 1.4;
    flex: 1;
}

.merits-accordion-trigger .toggle-icon {
    font-size: 2.2rem;
    color: var(--main-color);
    transition: transform 0.4s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 20px;
}

.merits-accordion-trigger.is-active .toggle-icon {
    transform: rotate(45deg);
}


.merits-accordion-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.06);
    max-width: 1200px;
    margin: 0 auto;
}

.merits-accordion-content.is-open {
    max-height: 2000px; /* Large enough */
    opacity: 1;
    margin-top: 40px;
    margin-bottom: 80px;
}

.merits-content-inner {
    padding: 80px;
}

.merits-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.merits-img-wrapper {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    aspect-ratio: 16 / 9;
}

.merits-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.merits-img-wrapper:hover img {
    transform: scale(1.08);
}

.merits-description-text {
    font-size: 1.15rem;
    line-height: 2.1;
    color: var(--text-color);
    text-align: left; /* Left align for longer professional text */
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .merits-images-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .merits-content-inner {
        padding: 40px 24px;
    }
    .merits-toggle-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
