/* ==========================================================================
   1. デザインの基本設定 & 共通設定
   ========================================================================== */
:root {
    --main-green: #2d5a27;
    --soft-green: #e9f0e8;
    --text-dark: #333333;
    --white: #ffffff;
    --bg-light: #fbfcfb;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: "Hiragino Mincho ProN", serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--bg-light);
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden; /* 横スクロールのブレを防止 */
}

p {
    font-size: 18px; /* 全てのpタグ文字の大きさ */
    margin-bottom: 20px; /* 段落ごとの間隔 */
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* 共通セクション */
section { 
    padding: 80px 0; 
    border-bottom: 1px solid #f0f0f0; 
}

.section-title {
    text-align: center; 
    font-size: 2.2rem; 
    color: var(--main-green);
    margin-bottom: 50px; 
    letter-spacing: 0.2em;
}

.bg-soft { 
    background-color: var(--soft-green); 
}

/* ==========================================================================
   2. ヘッダー（パソコン・スマホ共通）
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    position: sticky; 
    top: 0; 
    z-index: 1000;
    border-bottom: 1px solid var(--soft-green);
}

.header-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

header h1 { 
    display: flex; 
    align-items: center; 
    margin: 0; 
}

header h1 img {
    height: 80px; 
    width: auto;
    display: block;
    transition: 0.3s;
}

nav ul { 
    list-style: none; 
    display: flex; 
    gap: 20px; 
    margin: 0; 
    padding: 0; 
}

nav a { 
    text-decoration: none; 
    color: var(--text-dark); 
    font-size: 1.2rem; 
    font-weight: bold; 
    transition: 0.3s; 
}

nav a:hover { 
    color: var(--main-green); 
}

/* ==========================================================================
   3. メインビジュアル（スライドショー）
   ========================================================================== */
.slider-section {
    position: relative; 
    height: 60vh; 
    overflow: hidden;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.slider { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    z-index: -1; 
}

.slide {
    position: absolute; 
    width: 100%; 
    height: 100%;
    background-size: cover; 
    background-position: center;
    opacity: 0; 
    animation: sliderAnime 15s infinite;
}

.slide1 { background-image: url('images/sato-ueki-main-visual.png'); animation-delay: 0s; }
.slide2 { background-image: url('images/sato-ueki-main-visual2.png'); animation-delay: 5s; }
.slide3 { background-image: url('images/sato-ueki-main-visual3.png'); animation-delay: 10s; }

@keyframes sliderAnime {
    0% { opacity: 0; transform: scale(1.0); }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; }
}

.hero-content { 
    text-align: center; 
    color: white; 
    text-shadow: 0 0 15px rgba(0,0,0,0.5); 
    z-index: 1; 
    padding: 0 20px; 
}

.hero-content h2 { 
    font-size: clamp(2.0rem, 5vw, 3.0rem); 
    margin-bottom: 15px; 
}

.btn { 
    display: inline-block; 
    background: var(--main-green); 
    color: white; 
    padding: 12px 35px; 
    text-decoration: none; 
    border-radius: 2px; 
    transition: 0.3s; 
}

.btn:hover { 
    opacity: 0.9; 
    transform: translateY(-2px); 
}

/* ==========================================================================
   4. ご挨拶・お悩みセクション
   ========================================================================== */
.message-box {
    background: #fff; 
    padding: 50px 40px; 
    border: 1px solid var(--soft-green); 
    border-radius: 8px;
    max-width: 850px; 
    margin: 0 auto; 
    line-height: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
}

.message-lead {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--main-green);
    text-align: center;
    margin-bottom: 35px;
    letter-spacing: 0.05em;
}

.message-text p {
    margin-bottom: 30px; /* 間隔 */
    text-align: justify; /* 両端揃えで整列 */
}

.highlight-text {
    text-align: center !important; 
    font-size: 1.4rem;              
    font-weight: bold;              
    color: var(--main-green);       
    margin: 35px 0 !important;      
    letter-spacing: 0.05em;
    display: block;                 
}

.trouble-box {
    background-color: var(--soft-green); 
    padding: 30px; 
    margin: 40px 0; 
    border-radius: 5px; 
    border-left: 5px solid var(--main-green);
}

.trouble-box h4 { 
    color: var(--main-green); 
    margin-bottom: 20px; 
    text-align: center; 
    font-size: 1.6rem;
    letter-spacing: 0.05em;
}

.trouble-box ul { list-style: none; }
.trouble-box li { position: relative; padding-left: 25px; margin-bottom: 12px; font-size: 1.0rem; }
.trouble-box li:last-child { margin-bottom: 0; }
.trouble-box li::before { content: "✓"; position: absolute; left: 0; color: var(--main-green); font-weight: bold; }

.message-strong {
    text-align: center; 
    font-size: 1.8rem; 
    font-weight: bold; 
    color: var(--main-green);
    margin: 40px auto 25px; 
    border-bottom: 2px solid var(--soft-green); 
    display: table;
    padding-bottom: 10px;
    line-height: 1.6;
}

.signature { 
    text-align: right; 
    margin-top: 20px; 
    font-size: 1.2rem; 
    font-weight: bold;
    color: var(--text-dark);
    line-height: 1.5;
}

.sp-only { display: none; }

/* ==========================================================================
   5. 事業内容セクション
   ========================================================================== */
.grid-6 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
}

.service-card { 
    background: white; 
    padding: 30px; 
    text-align: center; 
    border: 1px solid #eee; 
    border-radius: 8px; 
}

.service-link {
    text-decoration: none;
    color: inherit;
    display: block; 
}

.service-link:hover .service-card {
    transform: translateY(-3px);
    border-color: var(--main-green);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.service-card .icon { 
    font-size: 3rem; 
    display: block; 
    margin-bottom: 15px; 
}

.service-card h3 { 
    font-size: 1.6rem; /* 見出しの文字を大きく設定 */
    margin-bottom: 15px; 
}

.service-card p { 
    font-size: 1.2rem; /* 説明文の文字を大きく設定 */
    line-height: 1.6;
}

/* ==========================================================================
   6. 施工事例
   ========================================================================== */
.comparison-grid {
    display: flex;
    flex-direction: column;
    gap: 60px; /* 事例ごとの間隔を広く */
    margin-top: 40px;
}

.comparison-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px; 
    max-width: 900px; 
    margin: 0 auto;  
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.work-info { 
    text-align: center; 
    margin-bottom: 25px; 
}

.work-info h3 { 
    font-size: 24px; /* パソコンで大きく見せる */
    color: var(--main-green); 
    margin-bottom: 15px; 
    font-weight: bold;
}

.work-desc {
    font-size: 18px; /* 文字を大きく */
    line-height: 1.6;
    color: #111111; /* より濃くハッキリ */
}

.photo-box { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
}

.photo-container { 
    position: relative; 
    flex: 1; 
}

.work-photo { 
    width: 100%; 
    height: auto; /* 高さを固定せず、写真本来の比率で大きく見せる */
    object-fit: cover; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.label-tag { 
    position: absolute; 
    bottom: 10px; 
    left: 10px;
    background: rgba(0,0,0,0.8); /* より濃くして文字を読みやすく */
    color: #fff; 
    padding: 6px 15px; 
    font-size: 16px; /* 文字を大きく */
    font-weight: bold;
    border-radius: 4px; 
    z-index: 5; 
}

/* ==========================================================================
   7. 料金表・高さガイド（PC表示ベース）
   ========================================================================== */
.height-guide {
    text-align: center; 
    margin-bottom: 40px; 
    background: #ffffff;
    padding: 30px 15px; 
    border: 1px solid #eee; 
    border-radius: 12px;
}

.guide-tag {
    display: inline-block; 
    background: var(--main-green); 
    color: #fff;
    padding: 6px 20px; 
    font-size: 1.2rem; /* 文字拡大 */
    font-weight: bold; 
    border-radius: 50px; 
    margin-bottom: 25px;
}

/* 高さ視覚シミュレータ */
.hp-height-guide {
    margin: 30px auto 50px auto;
    max-width: 1000px;
    width: 100%;
}

.hp-height-visual-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 450px; 
    background: linear-gradient(to bottom, #ffffff 0%, #e9f0e8 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    padding: 0 20px 45px 90px; 
    overflow: hidden;
}

.hp-house-graphic {
    width: 260px;
    height: 380px;
    background: white;
    border: 3px solid #475569;
    position: relative;
    z-index: 1;
    margin-bottom: 20px; 
}

.hp-house-roof {
    position: absolute;
    top: -80px; 
    left: -20px; 
    width: 294px; 
    height: 120px; 
    background: #334155;
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
}

.hp-house-window {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #e2e8f0;
    border: 2px solid #475569;
}

.hp-window-1 { top: 60px; left: 102px; }
.hp-window-2 { top: 220px; left: 40px; }
.hp-window-3 { top: 220px; right: 40px; }

.hp-height-marker {
    position: absolute;
    left: 0;
    width: 100%;
    border-top: 2px dashed #b4c6b2;
    z-index: 0;
}

.hp-marker-label {
    position: absolute;
    left: 10px;
    background: #2d5a27;
    color: white;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    transform: translateY(-50%);
    white-space: nowrap;
}

.hp-tree-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-bottom: 20px; 
}

.hp-tree-shape {
    border-radius: 50% 50% 15% 15%;
    margin-bottom: -5px;
}

.hp-tree-trunk {
    background-color: #78350f;
    width: 10px;
}

.hp-tree-info {
    text-align: center;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    font-weight: bold;
    font-size: 1.2rem; /* 文字拡大 */
    color: #2d5a27;
    line-height: 1.3;
    white-space: nowrap;
}

.hp-tree-info small {
    font-size: 1.0rem; /* 文字拡大 */
    color: #475569;
    font-weight: normal;
    display: block;
}

.hp-tree-info p,
.hp-tree-info span {
    font-size: 1.2rem !important;
}

.hp-guide-note {
    text-align: center;
    margin-top: 25px;
    font-weight: bold;
    color: #2d5a27;
    font-size: 1.2rem; /* 文字拡大 */
}

/* パソコン用：標準テーブルデザイン */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    background: white; 
    min-width: 500px; 
    font-size: 1.2rem; /* 本文と文字の大きさ統一 */
}

.table-container table {
    table-layout: fixed;
}

th, td { 
    border: 1px solid #eee; 
    padding: 20px; 
    text-align: left; 
}

th { 
    background: var(--soft-green); 
    color: var(--main-green); 
}

.table-sub-title {
    font-size: 1.8rem;/* 他の見出しと統一 */
    color: var(--main-green);
    margin: 40px 0 15px 0;
    border-bottom: 2px solid var(--main-green);
    padding-bottom: 8px;
    display: inline-block;
}

.work-name {
    font-size: 1.3rem; /* 項目名を強調 */
    font-weight: bold;
    background-color: var(--bg-light); 
    color: var(--text-dark);
}

.work-name small {
    font-size: 1.0rem;/* 文字拡大 */
    color: #666;
    font-weight: normal;
    display: block;
    margin-top: 4px;
}

/* ==========================================================================
   8. 依頼の流れ & フッター（PC・スマホ画面100%固定化修正）
   ========================================================================== */
.flow-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 15px; 
}

.flow-step { 
    background: var(--soft-green); 
    padding: 30px; 
    text-align: center; 
    border-radius: 5px; 
    font-size: 1.2rem; /* 文字拡大 */
}

.step-num { 
    font-weight: bold; 
    color: var(--main-green); 
    font-size: 1.0rem; 
    display: block; 
    margin-bottom: 8px; 
}

/* 🌟フッター背景を画面いっぱい（100%幅）に広げるための修正 */
footer { 
    background: #222222; 
    color: #999999; 
    text-align: center; 
    padding: 50px 20px 110px 20px; /* 左右にパディングを追加 */
    margin-top: 80px; 
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.mobile-tel-bar {
    display: none;
}


/* ==========================================================================
   9. スマホ・タブレット用 レスポンシブ調整（一括集約）
   ========================================================================== */
@media (max-width: 768px) {
    /* 共通タグ */
    p {
        font-size: 16px; /* スマホでは少し小さくして画面内に収まりやすくする */
    }

    /* ヘッダー */
    header .header-flex {
        flex-direction: column; 
        gap: 10px;
    }
    header h1 img {
        height: 60px; 
    }
    nav ul {
        flex-wrap: wrap;       
        justify-content: center;
        gap: 10px 15px;        
    }
    nav a {
        font-size: 0.75rem;    
    }

    /* ご挨拶・メッセージ */
    .message-box {
        padding: 30px 20px; 
    }
    .message-lead {
        font-size: 1.15rem;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    .highlight-text {
        font-size: 1.2rem;         
        margin: 25px 0 !important;
        line-height: 1.6;          
    }
    .trouble-box {
        padding: 20px 15px;
        margin: 30px 0;
    }
    .trouble-box h4 {
        font-size: 1.05rem;
    }
    .message-strong {
        font-size: 1.05rem;
    }
    .sp-only {
        display: inline; 
    }

    /* 施工事例（スマホでは縦に並べて写真を大きく保つ） */
    .photo-box { 
        flex-direction: column; 
        gap: 15px;
    }
    .comparison-item {
        padding: 15px;
    }
    .work-info h3 {
        font-size: 20px;
    }
    .work-desc {
        font-size: 16px;
    }

    /* 実績・料金ガイド */
    .hp-height-visual-container {
        height: 410px; 
        padding: 0 10px 45px 75px;
        position: relative;
    }
    .hp-house-graphic {
        display: none;
    }
    
    .hp-height-marker {
        width: 100% !important;
        position: absolute;
        left: 0;
        z-index: 10;
    }
    .hp-marker-label {
        font-size: 11px;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        padding: 2px 6px;
        border-radius: 3px;
        border: 1px solid #ccc;
        position: absolute;
        left: 15px;
    }
    .hp-tree-column {
        position: relative;
        z-index: 1;
    }
    
    .hp-tree-info {
        font-size: 12px;
    }
    .hp-tree-info small {
        font-size: 10px;
    }

    /* メッセージ強調設定 */
    .message-strong {
        font-size: 0.9rem !important;
        line-height: 1.6;
        white-space: nowrap;
    }
    .message-strong br {
        display: block;
    }

    /* スマホ固定電話ボタン */
    .mobile-tel-bar {
        display: flex;
        position: fixed;
        bottom: 15px;      
        left: 5%;
        width: 90%;        
        height: 55px;
        background-color: var(--main-green); 
        color: #fff;
        text-decoration: none;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        font-weight: bold;
        border-radius: 50px; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
        border: 2px solid #fff; 
    }
    .tel-icon {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    .tel-text {
        font-size: 1rem;
        letter-spacing: 0.1em;
    }

    /* ==========================================================================
       スマホ用：テーブル横スクロール＆幅の個別最適化（完全独立・上書き完全ブロック版）
       ========================================================================== */
    
    /* 1. すべてのテーブル共通：横スクロールの基盤設定 */
    .table-container,
    .license-container,
    .about-container,
    .waste-container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 30px;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    .table-container table,
    .license-container table,
    .about-container table,
    .waste-container table {
        width: 100% !important;
        table-layout: auto !important;
        margin-top: 0 !important;
    }
    
    /* PC用の大きな文字サイズ（1.2rem等）を完全に上書きし、全ての表の文字を均一にします */
    .table-container th, .table-container td,
    .license-container th, .license-container td,
    .about-container th, .about-container td,
    .waste-container th, .waste-container td,
    .waste-container table tr td, .waste-container table tr th,
    .waste-container table p {
        padding: 12px 10px !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    /* ------------------------------------------
       2. 料金表 専用（3列）の幅調整
       ------------------------------------------ */
    .table-container table {
        min-width: 550px !important;
    }

    /* ------------------------------------------
       3. 保有資格 専用（3列）の幅調整
       ------------------------------------------ */
    .license-container table {
        min-width: 500px !important;
    }
    /* 1列目（左）：40% */
    .license-container table tr td:nth-child(1) {
        width: 40% !important;
        font-weight: bold;
        background-color: var(--soft-green);
        color: var(--main-green);
    }
    /* 2列目（中）：30% */
    .license-container table tr td:nth-child(2) {
        width: 30% !important;
        background-color: #ffffff;
    }
    /* 3列目（右）：30% */
    .license-container table tr td:nth-child(3) {
        width: 30% !important;
        background-color: #ffffff;
    }

    /* ------------------------------------------
       4. 会社案内 専用（2列）の幅調整
       ------------------------------------------ */
    .about-container table {
        min-width: 500px !important;
    }
    /* 1列目（左の見出し）：28% に固定 */
    .about-container table tr th {
        width: 28% !important;
        font-weight: bold;
        background-color: var(--soft-green);
        color: var(--main-green);
    }
    /* 2列目（右の内容）：72% の広々スペース */
    .about-container table tr td {
        width: 72% !important;
        background-color: #ffffff;
    }

    /* ------------------------------------------
       5. ゴミ処分費用 専用（2列）の幅調整
       ------------------------------------------ */
    .waste-container table {
        min-width: 500px !important;
    }
    /* 1列目（左）：会社案内と完璧に揃えて 50% に */
    .waste-container table tr td:nth-child(1),
    .waste-container table tr th:nth-child(1) {
        width: 50% !important;
        font-weight: bold;
        background-color: var(--soft-green);
        color: var(--main-green);
    }
    /* 2列目（右）：残りの 50% に */
    .waste-container table tr td:nth-child(2) {
        width: 50% !important;
        background-color: #ffffff;
    }
}