/* ========================================================
   CSS Variables & Base Reset
======================================================== */
:root {
    /* Color Palette */
    --color-primary: #0F172A;
    /* ダークネイビー (信頼・誠実) */
    --color-accent: #2563EB;
    /* ブルー (注目・誠実) */
    --color-accent-light: #EFF6FF;
    /* ブルー背景用 */
    --color-bg-main: #FFFFFF;
    /* クリーンな白 */
    --color-bg-alt: #F8FAFC;
    /* 淡いグレー */
    --color-text-main: #334155;
    /* テキストメイン */
    --color-text-muted: #64748B;
    /* サブテキスト */
    --color-border: #E2E8F0;

    /* Typography */
    --font-main: 'Noto Sans JP', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: var(--color-bg-main);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================================
   Utilities & Common
======================================================== */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--color-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.accent-color {
    color: var(--color-accent);
}

section {
    padding: var(--spacing-xl) 0;
}

/* ========================================================
   Buttons
======================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background-color: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

.btn-secondary {
    background-color: #06C755;
    /* LINE Green */
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(6, 199, 85, 0.39);
}

.btn-secondary:hover {
    background-color: #05A044;
    transform: translateY(-2px);
}

/* ========================================================
   Placeholders
======================================================== */
.placeholder {
    background-color: var(--color-bg-alt);
    border: 2px dashed var(--color-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    width: 100%;
    height: 100%;
    min-height: 250px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.placeholder:hover {
    background-color: #F1F5F9;
    border-color: #CBD5E1;
}

.placeholder-text {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

/* ========================================================
   1. Header
======================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.5rem var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header-logo h1 {
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
}

.header-logo p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.header-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-area {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.header-tel {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.header-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 4px;
}

body {
    padding-top: 80px;
    /* Header height */
}

/* ========================================================
   2. Hero Section
======================================================== */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-accent-light) 0%, #FFFFFF 100%);
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-lg);
}

/* --- Image Comparison Slider --- */
.hero-image-container {
    position: relative;
    z-index: 5;
}

.image-comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 300px;
    /* 画像がない場合でも高さを確保 */
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    background-color: #e2e8f0;
    /* グレーの背景色 */
    cursor: ew-resize;
    user-select: none;
}

.image-comparison-slider .image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-comparison-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-comparison-slider .after {
    width: 50%;
    /* Initial state */
    z-index: 2;
    border-right: 4px solid #fff;
}

.image-label {
    position: absolute;
    bottom: 20px;
    padding: 6px 16px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.label-before {
    right: 20px;
}

.label-after {
    left: 20px;
}

/* Handle */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #fff;
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
}

.slider-handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.5);
    border: 4px solid #fff;
}

/* Price Bubble */
.price-bubble {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: #fff;
    padding: 1.2rem 1.8rem;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    z-index: 20;
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

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

.bubble-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.bubble-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.bubble-value small {
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 2px;
}

.bubble-arrow {
    font-size: 1.4rem;
    color: var(--color-accent);
    font-weight: bold;
}

/* --- Responsive Adjustments --- */
@media screen and (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }
}

@media screen and (max-width: 480px) {
    .price-bubble {
        padding: 0.8rem 1rem;
        gap: 0.6rem;
        right: 10px;
        bottom: -15px;
    }

    .bubble-value {
        font-size: 1.1rem;
    }

    .bubble-label {
        font-size: 0.65rem;
    }

    .bubble-arrow {
        font-size: 1.1rem;
    }
}

/* ========================================================
   3. Problems (共感セクション)
======================================================== */
.problems {
    background-color: var(--color-bg-alt);
}

.problems .container {
    max-width: 1100px;
}

.problems-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.problems-grid {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--spacing-sm);
    order: 1;
    /* PC: 左側にテキスト */
}

.problems-image {
    order: 2;
    /* PC: 右側に画像 */
    display: flex;
    align-items: center;
}

.problem-owner-img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.problem-card {
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    flex: 1;
}

.problem-card::before {
    content: '✔';
    color: #EF4444;
    font-weight: bold;
    font-size: 1.5rem;
}

/* ========================================================
   4. Our Strengths (選ばれる理由)
======================================================== */
.strengths {
    background-color: var(--color-bg-main);
}

.strengths-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.strengths-grid {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--spacing-md);
    order: 1; /* PC: 左側にテキスト */
}

.strength-card {
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    flex: 1;
}

.strength-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-top: 2px;
}

.strength-text h3 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.strength-text p {
    color: var(--color-text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

.strengths-image-placeholder {
    order: 2; /* PC: 右側に画像 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-team {
    width: 100%;
    min-height: 400px;
    background-color: #fff;
    border-radius: 16px;
}

/* ========================================================
   5. Portfolio (施工事例)
======================================================== */
.portfolio {
    background-color: var(--color-bg-alt);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-md);
}

.portfolio-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
}

.portfolio-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
}

.portfolio-info {
    padding: 2rem;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* ========================================================
   6. Subsidy Support (補助金活用)
======================================================== */
.subsidy {
    background-color: var(--color-bg-main);
}

.subsidy-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem;
    background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(253, 216, 53, 0.2);
}

.subsidy-content p.subsidy-lead {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.subsidy-image {
    max-width: 600px;
    margin: 2rem auto 3rem;
    display: flex;
    justify-content: center;
}

.subsidy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.subsidy-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(217, 119, 6, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.subsidy-city {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
}

.subsidy-target {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

.subsidy-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.subsidy-amount .price-num {
    font-size: 2.2rem;
    color: #D97706; /* Accent orange */
    line-height: 1;
}

.subsidy-condition {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.subsidy-img,
.kitchen-img,
.portrait-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.subsidy-image {
    display: flex;
    justify-content: center;
}

.price-tag {
    font-size: 1.4rem;
    font-weight: 800;
    color: #D97706;
}

.subsidy-note {
    font-size: 0.85rem;
    color: #92400E;
    opacity: 0.8;
    line-height: 1.5;
    text-align: left;
}

.subsidy-content .section-title {
    text-align: left;
    margin-bottom: var(--spacing-md);
    color: #b45309;
    /* Warm dark orange */
}

.subsidy-content .section-title::after {
    margin: 1rem 0 0;
    background-color: #f59e0b;
}

.image-subsidy {
    min-height: 250px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* ========================================================
   7. Service & Price (サービス・料金ガイド)
======================================================== */
.price {
    background-color: var(--color-bg-alt);
}

.price-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.price-text p {
    font-size: 1.2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-left: 6px solid var(--color-accent);
}

.image-kitchen {
    min-height: 350px;
}

.price-image {
    display: flex;
    justify-content: center;
    background-color: var(--color-bg-main);
    border-radius: 16px;
    min-height: 200px;
    /* 画像がない場合のプレースホルダー的役割 */
    overflow: hidden;
}

.kitchen-img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    display: block;
}

/* ========================================================
   8. About Us (代表紹介)
======================================================== */
.about .about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.image-portrait {
    min-height: 400px;
    border-radius: 20px;
}

.about-text p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.about-text p:first-child {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
    padding-left: 1rem;
}

/* ========================================================
   9. FAQ (よくある質問)
======================================================== */
.faq {
    background-color: var(--color-bg-alt);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.faq-item summary {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
    cursor: pointer;
    position: relative;
    list-style: none;
    /* Hide default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--color-text-main);
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
    padding-top: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================
   10. CTA (コンバージョンエリア)
======================================================== */
.cta {
    background: var(--color-primary);
    color: #fff;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: #fff;
}

.cta>p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    color: #CBD5E1;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.cta-buttons .btn {
    min-width: 280px;
    font-size: 1.2rem;
    padding: 1.2rem 2rem;
}

/* ========================================================
   Footer
======================================================== */
.footer {
    background: #0F172A;
    color: #64748B;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #334155;
}

/* ========================================================
   Animations (JS用)
======================================================== */
.fade-in {
    opacity: 1;
    /* 最初から見えるように変更 */
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ========================================================
   Responsive Design
======================================================== */
@media screen and (max-width: 768px) {
    :root {
        --spacing-xl: 4rem;
        --spacing-md: 1.5rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .header-info {
        display: none;
        /* スマホではヘッダー情報を隠し、ハンバーガーやCTAのみにする等 */
    }

    .header-container {
        justify-content: center;
        text-align: center;
    }

    .header-logo h1 {
        font-size: 1.4rem;
    }

    .header-logo p {
        font-size: 0.7rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .price-bubble {
        right: 10px;    /* 画面右端から少し余裕を持たせる */
        left: auto;
        margin: 0;
        bottom: -15px;  /* はみ出しすぎない程度に下げる */
        width: auto;
        padding: 0.8rem 1rem;
        gap: 0.5rem;
        transform: scale(0.95);
        transform-origin: bottom right;
    }

    .bubble-value {
        font-size: 1.1rem;
    }

    .bubble-arrow {
        font-size: 1rem;
    }

    .problems-content,
    .strengths-content,
    .subsidy-container,
    .subsidy-grid,
    .price-content,
    .about .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .problems-image,
    .strengths-image-placeholder {
        order: 1;
        /* Mobile: 画像を上部に配置 */
        margin-bottom: var(--spacing-md);
    }

    .problems-grid,
    .strengths-grid {
        order: 2;
        /* Mobile: テキストを下部に配置 */
    }

    .subsidy-content .section-title {
        text-align: center;
    }

    .subsidy-content .section-title::after {
        margin: 1rem auto;
    }

    .strength-num {
        top: -20px;
        font-size: 3rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}