:root {
    --font-base: 'Noto Sans JP', sans-serif;
    --font-english: 'Roboto', sans-serif;
    --color-text: #333;
    /* Assuming a default text color if not defined elsewhere */
}

/* ========================================
   基本設定
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* スキップリンク（アクセシビリティ） */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #f07800;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 700;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #1e293b;
    outline-offset: 2px;
}

/* フォーカスインジケーターの強化 */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #f07800;
    outline-offset: 2px;
}

/* マウスユーザー用：フォーカスアウトラインを非表示 */
*:focus:not(:focus-visible) {
    outline: none;
}

/* キーボードユーザー用：フォーカスアウトラインを表示 */
*:focus-visible {
    outline: 2px solid #f07800;
    outline-offset: 2px;
}

/* サイドバー（カラフルライン） */
.side-bar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 12px;
    z-index: 9999;
    display: none;
    /* デフォルト非表示（スマホ） */
}

.side-bar.left {
    left: 0;
}

.side-bar.right {
    right: 0;
}

/* ========================================
   ナビゲーション
   ======================================== */
.navigation {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #f1f5f9;
}

/* ロゴ行 */
.logo-row {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #f1f5f9;
    padding: 0.75rem 1rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.logo-row.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.logo-row-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-image {
    height: 28px;
    width: auto;
    display: block;
}

/* メニュー行 */
.navigation-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navigation-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #1e293b;
}

.logo-accent {
    color: #f07800;
}

.navigation-menu {
    display: none;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.navigation-link {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navigation-link:hover {
    color: #f07800;
}

.text-link-orange {
    color: #f07800;
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.3s;
}

.text-link-orange:hover {
    opacity: 0.7;
}

.sp-br {
    display: block;
}

.marker-target {
    background: linear-gradient(transparent 60%, #ffff00 60%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 1.5s ease;
    padding-bottom: 2px;
}

.text-marker {
    background: linear-gradient(transparent 60%, #ffff00 60%);
    font-weight: 700;
}

.marker-target.active {
    background-size: 100% 100%;
}

.button-primary {
    background-color: #f07800;
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.button-primary:hover {
    background-color: #d96d00;
    transform: scale(1.05);
}

.button-primary:focus {
    outline: 3px solid #1e293b;
    outline-offset: 3px;
}

.mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    /* Removed height: 100% to allow flex parent (navigation-content) to center it vertically */
}

.mobile-menu {
    display: none;
    background-color: white;
    border-top: 1px solid #f1f5f9;
    padding: 0.5rem 1rem 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.mobile-menu-link {
    display: block;
    padding: 0.75rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background-color 0.3s;
}

.mobile-menu-link:hover {
    background-color: #f8fafc;
}

.mobile-menu-link.highlight {
    color: #f07800;
    font-weight: 700;
}

.mobile-menu-link:focus {
    outline: none;
}

/* デスクトップメニュー表示 */
@media (min-width: 768px) {
    .logo-image {
        height: 35px;
    }

    .navigation-content {
        justify-content: center;
        height: 5rem;
    }

    .navigation-menu {
        display: flex;
    }

    .mobile-menu-button {
        display: none;
    }
}

/* ========================================
   ヒーローセクション
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, #fffaf0 0%, #fff7ed 100%);
    padding: 8rem 1rem 0;
    position: relative;
    overflow: hidden;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#ffd9b3 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid #ffe5cc;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    color: #f07800;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.text-gradient {
    background: linear-gradient(90deg, #f07800, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.125rem;
    color: #475569;
    margin-bottom: 2.5rem;
    line-height: 1.75;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.button-cta {
    background-color: #f07800;
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    box-shadow: 0 20px 25px -5px rgba(6, 182, 212, 0.3);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button-cta:hover {
    background-color: #ff9933;
    transform: translateY(-4px);
}

.button-cta:focus {
    outline: 3px solid #1e293b;
    outline-offset: 3px;
}

.button-secondary {
    background-color: white;
    color: #334155;
    border: 2px solid #e2e8f0;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button-secondary:hover {
    background-color: #f8fafc;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-visual-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
}

.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.hero-main-image:hover {
    transform: scale(1.05);
}

/* アニメーション最適化 */
.hero-main-image,
.photo-image,
.overview-image {
    will-change: transform;
}

.hero-main-image:not(:hover),
.photo-image:not(:hover),
.overview-image:not(:hover) {
    will-change: auto;
}

.hero-visual-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, #f472b6, #fbbf24, #f07800);
    border-radius: 9999px;
    filter: blur(60px);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-visual-card {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(3deg);
    transition: transform 0.5s;
    border: 1px solid #f1f5f9;
}

.hero-visual-card:hover {
    transform: rotate(0deg);
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    height: 100%;
}

.visual-item {
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-item-1 {
    background-color: #f1f5f9;
}

.visual-item-2 {
    background-color: #1e293b;
    color: white;
    padding: 1rem;
}

.visual-item-3 {
    background-color: #f07800;
    color: white;
}

.visual-item-4 {
    background-color: #f472b6;
    color: white;
}

/* タブレット・デスクトップ対応 */
@media (min-width: 1024px) {
    .hero-section {
        padding: 12rem 1rem 8rem;
    }

    .hero-visual-container {
        max-width: 1000px;
    }
}

/* ========================================
   Aboutセクション
   ======================================== */
.about-section {
    padding: 60px 1rem;
    background-color: white;
}

.about-container {
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: clamp(1.25rem, 5vw, 1.875rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-title-icon {
    width: 3.9rem;
    height: auto;
    object-fit: contain;
}

.thin-bracket {
    font-weight: 400;
}

.section-divider {
    width: 5rem;
    height: 0.375rem;
    background: linear-gradient(to right, #ff9933, #3b82f6);
    margin: 0 auto 2.5rem;
    border-radius: 9999px;
}

.section-description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 3rem;
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 2.25rem;
    }
}

/* ========================================
   ポイントセクション
   ======================================== */
.points-section {
    padding: 60px 1rem;
    background-color: #f8fafc;
}

.points-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    color: #f07800;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.points-grid {
    display: grid;
    gap: 2rem;
}

.point-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.point-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.point-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 6rem;
    height: 6rem;
    background-color: #f1f5f9;
    border-bottom-left-radius: 9999px;
    margin-right: -1rem;
    margin-top: -1rem;
    transition: background-color 0.3s;
}

.point-card:hover .point-corner {
    background-color: #ffe5cc;
}

.point-number {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 2.25rem;
    font-weight: 900;
    color: #cbd5e1;
    transition: color 0.3s;
}

.point-card:hover .point-number {
    color: #f07800;
}

.point-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-cyan {
    background-color: #ffe5cc;
    color: #f07800;
}

.icon-pink {
    background-color: #fce7f3;
    color: #db2777;
}

.icon-yellow {
    background-color: #fef3c7;
    color: #d97706;
}

.icon-green {
    background-color: #d1fae5;
    color: #059669;
}

.point-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

.point-description {
    color: #475569;
    line-height: 1.75;
}

.point-icon-image {
    width: 5.2rem;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    /* transition: filter 0.3s ease; */
}

/* .point-card:hover .point-icon-image {
    filter: grayscale(0%);
} */

@media (min-width: 768px) {
    .points-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .point-card {
        padding: 2.5rem;
    }
}

/* ========================================
   概要セクション
   ======================================== */
.overview-section {
    padding: 60px 1rem;
    background-color: white;
}

.overview-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.overview-images-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.overview-image-wrapper {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.overview-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
    /* 余白除去のため念のため */
}

.overview-image-wrapper:hover .overview-image {
    transform: scale(1.1);
}

.overview-container {
    max-width: 1152px;
    margin: 0 auto;
}

.overview-title {
    font-size: 1.875rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: #1e293b;
    text-align: left;
    padding-left: 1rem;
    border-left: 4px solid #f07800;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overview-table-wrapper {
    overflow-x: auto;
}

.overview-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.overview-table th,
.overview-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.overview-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    width: 40%;
    vertical-align: top;
}

.overview-table td {
    color: #475569;
    line-height: 1.75;
    width: 60%;
}

.overview-list {
    margin-top: 0.75rem;
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.overview-list li {
    margin-bottom: 0.5rem;
    color: #475569;
}

.overview-list li:last-child {
    margin-bottom: 0;
}

@media (min-width: 1024px) {
    .overview-title {
        font-size: 2.25rem;
    }

    .overview-table th {
        width: 250px;
    }

    .overview-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }

    .overview-images-container {
        flex: 1;
        max-width: 40%;
    }

    .overview-table-wrapper {
        flex: 1.5;
    }
}

/* ========================================
   フローセクション
   ======================================== */
.flow-section {
    padding: 60px 1rem;
    background-color: #f8fafc;
}

.flow-container {
    max-width: 1152px;
    margin: 0 auto;
}

.flow-chart-image-container {
    text-align: center;
    margin-bottom: 2rem;
    margin-left: -1rem;
    /* スマホで左右のパディングを相殺して画像を大きく表示 */
    margin-right: -1rem;
}

.flow-chart-image-container img {
    width: 100%;
    height: auto;
}

.about-section {
    padding: 60px 1rem;
    background-color: #ffffff;
}

.about-container {
    max-width: 1152px;
    margin: 0 auto;
}

/* 写真ギャラリー */
.photo-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-frame {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-frame:hover .photo-image {
    transform: scale(1.1);
}

.photo-frame:focus-within {
    outline: 2px solid #f07800;
    outline-offset: 2px;
}

.photo-caption {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    font-weight: 500;
}

@media (min-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .photo-frame {
        max-width: none;
    }
}

/* 詳細ステップ */
.flow-detailed-steps {
    margin-top: 3rem;
}

.detailed-step {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    scroll-margin-top: 150px;
}

.detailed-step-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* モバイルでは数字とタイトルを改行させない */
@media (max-width: 767px) {
    .detailed-step-header {
        flex-wrap: wrap;
    }

    .detailed-step-number {
        flex-shrink: 0;
    }

    .detailed-step-title {
        flex: 1;
        min-width: 0;
    }

    .detailed-step-deadline {
        width: 100%;
    }
}

/* デスクトップでは中央揃え */
@media (min-width: 768px) {
    .detailed-step-header {
        align-items: center;
        flex-wrap: nowrap;
    }
}

.detailed-step-deadline {
    background-color: #dcfce7;
    color: #16a34a;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
}

.detailed-step-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: #f07800;
}

.detailed-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    text-align: left;
}

.detailed-step-content {
    color: #475569;
    line-height: 1.75;
    text-align: left;
}

.detailed-step-content p {
    margin-bottom: 1rem;
}

.detailed-step-content p:last-child {
    margin-bottom: 0;
}

/* ヒアリング項目 */
.hearing-items {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.hearing-items h4 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.hearing-items ul {
    list-style: none;
    padding-left: 0;
}

.hearing-items li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.hearing-items li:before {
    content: "・";
    position: absolute;
    left: 0;
    color: #f07800;
    font-weight: 700;
}

/* 連絡先情報 */
.contact-info {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    border: 2px solid #f07800;
}

.contact-info h4 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item-main {
    text-align: center;
    margin-bottom: 0.5rem;
}

.contact-dept {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.contact-phone {
    font-size: clamp(1.5rem, 7vw, 2.25rem);
    font-weight: 900;
    color: #f07800;
    line-height: 1.2;
    letter-spacing: 0.05em;
    font-family: var(--font-english);
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.contact-phone:hover {
    opacity: 0.8;
}

.contact-item-sub {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    border-top: 1px dashed #cbd5e1;
    padding-top: 1rem;
}

/* 重要な注意事項 */
.important-note {
    margin-top: 0.5rem;
}

.important-note p {
    margin: 0;
    color: #dc2626;
    font-size: 0.75rem;
    line-height: 1.5;
}

.highlight-text {
    color: #dc2626;
    font-weight: 700;
}

/* フローチャートセクション */
.flow-chart-section {
    margin-top: 4rem;
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.flow-chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
}

.flow-chart {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.flow-chart-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    width: 100%;
}

.flow-chart-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
}

.flow-chart-link {
    text-decoration: none;
    display: block;
    flex-shrink: 0;
    width: 200px;
}

.flow-chart-box {
    background-color: #f07800;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    margin-bottom: 0;
    transition: all 0.3s;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 個別のフローカラー設定 */
.flow-chart-box.flow-color-1 {
    background-color: #d41156;
}

.flow-chart-link:hover .flow-chart-box.flow-color-1 {
    background-color: #b00e47;
}

.flow-chart-box.flow-color-2 {
    background-color: #e2750e;
}

.flow-chart-link:hover .flow-chart-box.flow-color-2 {
    background-color: #c4660c;
}

.flow-chart-box.flow-color-3 {
    background-color: #2f9f39;
}

.flow-chart-link:hover .flow-chart-box.flow-color-3 {
    background-color: #27852f;
}

.flow-chart-box.flow-color-4 {
    background-color: #e17f99;
}

.flow-chart-link:hover .flow-chart-box.flow-color-4 {
    background-color: #d65f7f;
}

.flow-chart-box.flow-color-5 {
    background-color: #f4e827;
    color: #1e293b;
}

.flow-chart-link:hover .flow-chart-box.flow-color-5 {
    background-color: #dccf0f;
}

.flow-chart-box.flow-color-6 {
    background-color: #0768ab;
}

.flow-chart-link:hover .flow-chart-box.flow-color-6 {
    background-color: #06548a;
}

.flow-chart-box.flow-color-7 {
    background-color: #a33b88;
}

.flow-chart-link:hover .flow-chart-box.flow-color-7 {
    background-color: #85306f;
}

/* 共通ホバーエフェクト */
.flow-chart-link:hover .flow-chart-box {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.flow-chart-notes-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.flow-chart-note {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0;
    text-align: left;
    flex: 1;
}

.flow-chart-warning {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0;
    text-align: left;
}

.flow-chart-arrow {
    color: #f07800;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    margin-left: 0;
}

/* 矢印のみの行の場合、上下の余白を調整 */
.flow-chart-row:has(.flow-chart-arrow:only-child) {
    margin-top: -1rem;
    margin-bottom: -1rem;
}

/* モバイルでは下向き矢印 */
.flow-chart-arrow::before {
    content: "↓";
}

/* ========================================
   CSS Flow Chart (New)
   ======================================== */
.css-flow-chart {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2rem;
}

.css-flow-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.css-flow-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: white;
    min-height: 120px;
    margin-bottom: -20px;
    z-index: 1;
    /* Mobile: Down Arrow Shape */
    clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 20px), 50% 100%, 0% calc(100% - 20px));
    /* First item flat top */
}

/* Specific item colors - Orange Gradient */
.item-01 {
    background-color: #ffe0b2;
    color: #1e293b;
    z-index: 7;
}

.item-02 {
    background-color: #ffcc80;
    color: #1e293b;
    z-index: 6;
}

.item-03 {
    background-color: #ffb74d;
    color: #1e293b;
    z-index: 5;
}

.item-04 {
    background-color: #ffa726;
    color: #1e293b;
    z-index: 4;
}

.item-05 {
    background-color: #fb8c00;
    color: white;
    z-index: 3;
}

.item-06 {
    background-color: #f57c00;
    color: white;
    z-index: 2;
}

.item-07 {
    background-color: #ef6c00;
    color: white;
    z-index: 1;
}

.item-01 .step-note,
.item-02 .step-note,
.item-03 .step-note,
.item-04 .step-note {
    color: #1e293b;
}

/* Text Styles */
.step-num {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    font-family: var(--font-english);
}

.step-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-note {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .css-flow-chart {
        gap: 2rem;
    }

    .css-flow-row {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }

    .css-flow-item {
        flex: 1;
        margin-bottom: 0;
        margin-left: -20px;
        min-height: 140px;
        /* Desktop: Right Arrow Shape */
        /* Default inner item: Indent left, Point right */
        clip-path: polygon(0% 0%, calc(100% - 20px) 0%, 100% 50%, calc(100% - 20px) 100%, 0% 100%, 20px 50%);
    }

    .css-flow-item.item-01 {
        margin-left: 0;
        clip-path: polygon(0% 0%, calc(100% - 20px) 0%, 100% 50%, calc(100% - 20px) 100%, 0% 100%);
    }

    /* Row 2 items start flat or indented? Image shows indented start for 05 too if aligned with 01? 
       Actually user image shows Row 2 starts flush left but indented shape? 
       Let's look at image again. 
       Row 1: 01 Flat Left. 
       Row 2: 05 Flat Left visually? Or indented? 
       The image shows 05 aligned with 01. 01 is flat. 
       Let's make 05 Flat Left as well for cleaner alignment. 
    */
    .css-flow-item.item-05 {
        margin-left: 0;
        clip-path: polygon(0% 0%, calc(100% - 20px) 0%, 100% 50%, calc(100% - 20px) 100%, 0% 100%);
        z-index: 7;
    }

    /* Last items in row (04, 07) usually flat right? 
       Image shows 04 pointing. 07 pointing. 
       So stick to pointing right. 
    */
}

/* Previous Desktop Media Query */
@media (min-width: 768px) {
    .flow-chart-image-container {
        margin-left: 0;
        margin-right: 0;
    }

    .sp-br {
        display: none;
    }

    .detailed-step {
        padding: 2.5rem;
    }

    /* デスクトップでサイドバーを表示 */
    .side-bar {
        display: block;
    }

    .side-bar.left {
        background: linear-gradient(165deg,
                #d41156 0%, #d41156 14.28%,
                #e2750e 14.28%, #e2750e 28.57%,
                #2f9f39 28.57%, #2f9f39 42.85%,
                #e17f99 42.85%, #e17f99 57.14%,
                #f4e827 57.14%, #f4e827 71.42%,
                #0768ab 71.42%, #0768ab 85.71%,
                #a33b88 85.71%, #a33b88 100%);
    }

    .side-bar.right {
        background: linear-gradient(-165deg,
                #d41156 0%, #d41156 14.28%,
                #e2750e 14.28%, #e2750e 28.57%,
                #2f9f39 28.57%, #2f9f39 42.85%,
                #e17f99 42.85%, #e17f99 57.14%,
                #f4e827 57.14%, #f4e827 71.42%,
                #0768ab 71.42%, #0768ab 85.71%,
                #a33b88 85.71%, #a33b88 100%);
    }

    .flow-chart-row {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    /* 矢印のみの行はデスクトップで非表示 */
    .flow-chart-row:has(.flow-chart-arrow:only-child) {
        display: none;
    }

    .flow-chart-item {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        width: auto;
    }

    .flow-chart-link {
        width: 100%;
    }

    .flow-chart-box {
        margin-bottom: 0.5rem;
    }

    .flow-chart-note {
        text-align: center;
        margin-bottom: 0.25rem;
    }

    .flow-chart-warning {
        text-align: center;
    }

    .flow-chart-arrow {
        padding: 0 1rem;
        align-items: center;
        margin-top: 0;
        height: 60px;
        display: flex;
        align-items: center;
        width: auto;
    }

    /* デスクトップでは横向き矢印 */
    .flow-chart-arrow::before {
        content: "→";
    }


}

/* ========================================
   CTAセクション
   ======================================== */
.cta-section {
    padding: 6rem 1rem 0;
    background-color: #0f172a;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
}

.cta-container {
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.cta-title {
    font-size: 1.875rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.cta-description {
    color: #cbd5e1;
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

.cta-box {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 32rem;
    margin: 0 auto;
}

.cta-box-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.cta-contact-info {
    margin-bottom: 1.5rem;
}

.cta-contact-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: white;
}

.cta-contact-info .cta-phone {
    font-size: 2rem !important;
    font-weight: 900 !important;
    color: #f07800 !important;
    letter-spacing: 0.05em;
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    .cta-contact-info .cta-phone {
        font-size: 2.5rem !important;
    }
}

.cta-note {
    font-size: 0.875rem;
    color: #94a3b8;
}

@media (min-width: 1024px) {
    .cta-title {
        font-size: 3rem;
    }
}

/* ========================================
   フッター
   ======================================== */
.footer-top-image {
    text-align: center;
    line-height: 0;
    margin-bottom: 0;
    margin-top: 3rem;
}

.footer-top-image img {
    max-width: 39%;
    height: auto;
}

.footer {
    background-color: white;
    color: #475569;
    padding: 3rem 1rem;
    border-top: 1px solid #e2e8f0;
}

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

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 900;
    color: #cbd5e1;
}

.footer-logo-accent {
    color: #f07800;
}

.footer-copyright {
    font-size: 11px;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
    }
}

/* ========================================
   ユーティリティ
   ======================================== */
.hidden {
    display: none;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-large {
    font-size: 2.5rem;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
}

.icon-yellow {
    color: #eab308;
}

/* ========================================
   固定お問い合わせボタン（スマホのみ）
   ======================================== */
.fixed-contact-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background-color: #f07800;
    color: white;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(240, 120, 0, 0.4);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s;
    animation: pulse 2s infinite;
    gap: 8px;
}

.fixed-contact-button:hover {
    background-color: #d96b00;
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(240, 120, 0, 0.5);
}

.fixed-contact-button .material-icons {
    font-size: 24px;
    color: white;
}

.button-text {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    padding-top: 1px;
    /* 視覚調整 */
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 25px rgba(240, 120, 0, 0.4);
    }

    50% {
        box-shadow: 0 10px 35px rgba(240, 120, 0, 0.6);
    }
}

/* タブレット以上では非表示 */
@media (min-width: 768px) {
    .fixed-contact-button {
        display: none;
    }
}