/* ===========================
   墓じまいの流れ - 完全版CSS
   既存のCSSを上書きして正しく表示
   =========================== */

/* フローセクション全体 */
#nagare {
    position: relative;
}

/* フローラッパー */
.flow-wrapper {
    position: relative;
    padding: 40px 0;
}

/* 既存の::beforeを無効化 */
.flow-item::before {
    display: none !important;
}

/* 各フローアイテム */
.flow-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 80px;
    position: relative;
}

/* 左配置 */
.flow-item.left {
    flex-direction: row;
}

/* 右配置 */
.flow-item.right {
    flex-direction: row-reverse;
}

/* ステップ番号 */
.step-number {
    position: relative;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b8c5b3 0%, #a0b09a 100%);
    color: #ffffff;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(184, 197, 179, 0.3);
	background:#206db4;
}

.step-number span {
    position: relative;
}

/* 既存の::afterを無効化してから新しく定義 */
.step-number::after {
    display: none !important;
}

/* 点線を.flow-wrapperの背景として配置 */
.flow-wrapper::before {
    content: '';
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: calc(100% - 140px);
    background-image: linear-gradient(to bottom, #b8c5b3 50%, transparent 50%);
    background-size: 3px 12px;
    background-repeat: repeat-y;
    z-index: 0;
    pointer-events: none;
}

/* ステップコンテンツ */
.step-content {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ステップヘッダー */
.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* ステップタイトル */
.step-title {
	font-family: 'Noto Serif JP', serif;
	font-size: 1.8em;
	font-weight: 600;
	color: #206db4;
	letter-spacing: 0.05em;
}

/* ステップアイコン */
.step-icon {
    flex-shrink: 0 !important;
    color: #206db4 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.step-icon svg {
    width: 40px !important;
    height: 40px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ステップ説明 */
.step-description {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #5a5a5a;
}

/* ステップ写真 */
.step-photo {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.step-photo img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

/* ===========================
   レスポンシブデザイン
   =========================== */

/* タブレット */
@media (max-width: 768px) {
    .flow-wrapper {
        padding: 30px 0;
    }
    
    /* 中央の線の位置を調整 */
    .flow-wrapper::before {
        top: 60px;
        height: calc(100% - 120px);
    }

    .flow-item {
        gap: 20px;
        margin-bottom: 60px;
    }

    /* 左右の配置を統一（縦並び） */
    .flow-item.left,
    .flow-item.right {
        flex-direction: column;
        align-items: center;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .step-content {
        width: 100%;
        padding: 25px;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .step-icon {
        align-self: flex-end;
    }
}

/* スマートフォン */
@media (max-width: 480px) {
    .flow-wrapper {
        padding: 20px 0;
    }
    
    /* 中央の線の位置を調整 */
    .flow-wrapper::before {
        top: 50px;
        height: calc(100% - 100px);
    }

    .flow-item {
        gap: 15px;
        margin-bottom: 50px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .step-content {
        padding: 20px;
    }

    .step-title {
        font-size: 2.5rem;
		font-weight:bold;
    }

    .step-description {
        font-size: 1.5rem;
    }
	



    .step-icon svg {
        width: 30px;
        height: 30px;
    }

    .step-photo img {
        max-height: 300px;
    }
}

/* 非常に小さい画面 */
@media (max-width: 360px) {
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .step-content {
        padding: 15px;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-description {
        font-size: 0.85rem;
    }

    .step-photo img {
        max-height: 250px;
    }
}

/* PC表示での点線位置調整 */
@media (min-width: 769px) {
    /* 左配置の場合 */
    .flow-item.left .step-number {
        order: -1;
    }
    
    /* 右配置の場合 */
    .flow-item.right .step-number {
	order: 1;
	background-color: #206db4;
    }
}
