/* ===== Reset & Base ===== */

.hojokin-wrap {
    max-width: 980px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.7 !important;
    color: #333;
}

.hojokin-wrap img {
    max-width: 100%;
    height: auto;
}

.hojokin-wrap a {
    color: #1a5ca3;
    text-decoration: none;
}

.hojokin-wrap a:hover {
    text-decoration: underline;
}

/* ===== Section 1: 制度概要 ===== */
.section-overview {
    background: #f5f5f5;
    border: 2px solid #3a4a8a;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}

.section-title-main {
    background: linear-gradient(135deg, #2c3e7a, #3a5ba8);
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    padding: 18px 20px;
    letter-spacing: 0.05em;
}

.overview-inner {
    padding: 25px 30px;
    background: #fff;
    border: 1px solid #ccc;
    margin: 15px;
    border-radius: 4px;
}

.section-label {
    font-size: 17px !important;
    font-weight: bold !important;
    color: #333;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    padding-left: 4px;
    border-left: 4px solid #3a4a8a;
    padding-left: 10px;
}

.section-label:first-child {
    margin-top: 0;
}

.source-label {
    text-align: right;
    font-size: .86em;
    color: #888;
    margin-bottom: 10px;
}

.purpose-text {
    font-size: 14px;
    line-height: 1.8 !important;
    margin-bottom: 5px;
}

/* ===== 申請フロー ===== */
.flow-container {
    margin: 15px 0;
    position: relative;
}

.flow-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.flow-label-sme {
    background: #4a7fcb;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 5px 14px;
    border-radius: 4px;
    display: inline-block;
}

.flow-label-vendor {
    background: #e8a030;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 5px 14px;
    border-radius: 4px;
    display: inline-block;
}

.flow-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}

.flow-step {
    flex: 1;
    text-align: center;
    padding: 12px 6px;
    font-size: .86em;
    font-weight: bold;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4 !important;
}

.flow-step-sme {
    background: #d6e4f5;
    border: 2px solid #4a7fcb;
    border-radius: 8px;
    color: #2c4a7a;
}

.flow-step-vendor {
    background: #fdf0d5;
    border: 2px solid #e8a030;
    border-radius: 8px;
    color: #7a5c20;
}

.flow-step-shared {
    background: #e8e0f0;
    border: 2px solid #7a5aaa;
    border-radius: 8px;
    color: #4a3070;
}

.flow-step-gov {
    background: #fce4e4;
    border: 2px solid #d45050;
    border-radius: 8px;
    color: #8a2020;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #888;
    padding: 0 2px;
    flex-shrink: 0;
    width: 20px;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin: 10px 0;
}

.flow-row {
    display: flex;
    gap: 3px;
    margin-bottom: 4px;
    align-items: stretch;
}

.flow-row .flow-step {
    margin-right: 0;
}

.flow-row .flow-arrow {
    flex: 0 0 18px;
}

/* 上下段フロー */
.flow-dual {
    position: relative;
    margin: 15px 0;
}

.flow-dual-top,
.flow-dual-bottom {
    display: flex;
    align-items: stretch;
    gap: 3px;
}

.flow-dual-top {
    margin-bottom: 4px;
}

.flow-note {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    line-height: 1.5 !important;
}

/* ===== 補助率テーブル ===== */
.subsidy-table-wrap {
    margin: 15px 0;
    overflow-x: auto;
}

.subsidy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.subsidy-table th,
.subsidy-table td {
    border: 1px solid #999;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
}

.subsidy-table thead th {
    background: #3a4a8a;
    color: #fff;
    font-weight: bold;
}

.subsidy-table tbody td {
    background: #fff;
}

.subsidy-rate {
    font-size: 32px;
    font-weight: bold;
    color: #c03030;
    line-height: 1.2 !important;
}

.subsidy-rate-sub {
    font-size: 18px;
    font-weight: bold;
    color: #c03030;
}

.table-note {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 4px;
}

/* ===== 採択概要 ===== */
.adoption-section {
    margin: 20px 0;
    padding: 20px;
    background: #f0f4f8;
    border-radius: 6px;
}

.adoption-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.adoption-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.adoption-charts {
    flex: 0 0 340px;
}

.chart-group {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.chart-item {
    text-align: center;
}

.chart-item h4 {
    font-size: 13px;
    margin-bottom: 8px;
    color: #555;
}

/* Pie chart with CSS */
.pie-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.pie-construction {
    background: conic-gradient(#2e7d32 0deg 136.8deg,
        #f9a825 136.8deg 223.56deg,
        #1565c0 223.56deg 310deg,
        #e0e0e0 310deg 360deg);
}

.pie-equipment {
    background: conic-gradient(#1565c0 0deg 311.76deg,
        #e0e0e0 311.76deg 360deg);
}

.pie-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.3 !important;
}

.pie-center .big-num {
    font-size: 22px;
    color: #333;
}

.chart-legend {
    font-size: 11px;
    color: #555;
    margin-top: 6px;
    text-align: center;
}

.adoption-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.7 !important;
}

.adoption-text h4 {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e7a;
    margin-bottom: 8px;
    border-bottom: 2px solid #2c3e7a;
    padding-bottom: 4px;
}

/* ===== S7 Vision 採択事例 ===== */
.case-study {
    background: #fff;
    border: 2px solid #3a4a8a;
    border-radius: 6px;
    padding: 20px 25px;
    margin: 25px 0 30px;
}

.case-study-title {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #2c3e7a;
    margin-bottom: 15px !important;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c3e7a;
}

.case-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.case-info {
    flex: 0 0 280px;
    font-size: 13px;
    line-height: 1.8 !important;
}

.case-info dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.case-info dt {
    flex: 0 0 85px;
    font-weight: bold;
    color: #555;
}

.case-info dd {
    flex: 1 0 calc(100% - 85px);
    margin-bottom: 6px;
    margin-left: 0;
}

.case-timeline {
    flex: 1;
}

.timeline-steps {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
}

.timeline-step {
    text-align: center;
    margin: 5px 0;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    min-width: 80px;
    line-height: 1.4 !important;
    min-height: 60px;
}

.timeline-step br {
    display: none;
}

.timeline-step-blue {
    background: #d6e4f5;
    border: 2px solid #4a7fcb;
    color: #2c4a7a;
}

.timeline-step-green {
    background: #d5f0d5;
    border: 2px solid #4aa04a;
    color: #2a6a2a;
}

.timeline-step-red {
    background: #fce4e4;
    border: 2px solid #d45050;
    color: #8a2020;
}

.timeline-step-gold {
    background: linear-gradient(135deg, #f5d020, #f5ab20);
    border: 2px solid #d4a017;
    color: #fff;
    font-size: 14px;
}

.timeline-arrow {
    font-size: 20px;
    color: #888;
    flex-shrink: 0;
    padding: 0 4px;
}

.timeline-date {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-weight: normal;
}

.case-amount {
    display: inline-block;
    background: #c03030;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 4px;
    margin-top: 25px;
}

.case-note {
    font-size: .86em;
    color: #7b7b7b;
    margin: 11px 0 0 0 !important;
    line-height: 1.8 !important;
}

/* ===== Section 2: 製品カタログ ===== */
.section-catalog {
    background: transparent;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
    padding-bottom: 25px;
}

.catalog-header {
    background: url('https://www.tp-kantou.co.jp/wp-content/themes/template/images/hojokin/haikei.png') no-repeat center center;
    background-size: cover;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    text-shadow: 1px 1px 2px #000;
}

.catalog-header h2 {
    font-size: 32px;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    color: #fff;
    font-weight: 800;
}

.catalog-header p {
    font-size: 20px;
    font-weight: bold;
    color: #ffe066;
    font-style: italic;
}

.catalog-badge {
    position: absolute;
    top: 12px;
    left: 15px;
    background: #c03030;
    color: #fff;
    font-size: .86em;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 20px;
    line-height: 1.3 !important;
}

.catalog-badge span {
    display: block;
    font-size: 18px;
}

/* カテゴリー背景色 */
.bg-ts {
    background-color: #115fa9 !important;
}

.bg-gnss {
    background-color: #217b3a !important;
}

.bg-scanner {
    background-color: #8f63a7 !important;
}

/* 製品タイトル色 */
.color-ts {
    color: #115fa9 !important;
    border-bottom-color: #115fa9 !important;
}

.color-gnss {
    color: #217b3a !important;
    border-bottom-color: #217b3a !important;
}

.color-scanner {
    color: #8f63a7 !important;
    border-bottom-color: #8f63a7 !important;
}

/* --- カテゴリ共通 --- */
.catalog-category {
    margin: 25px 25px 0;
}

.category-title {
    background: #2c3e7a;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 25px !important;
    letter-spacing: 0.05em;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

.product-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 15px 15px;
    text-align: center;
    position: relative;
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: -10px;
    left: -6px;
    background: #e8a030;
    color: #fff;
    font-size: .86em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1.3 !important;
}
.product-badge.s7-badge {
    top:-15px !important;
    padding: 5px 8px !important;
}

.product-name {
    font-size: 17px;
    font-weight: bold;
    color: #2c3e7a;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e0e0e0;
}

.product-image {
    width: 100%;
    height: 120px;
    margin: 0 auto 10px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: .86em;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-desc {
    font-size: .86em;
    line-height: 1.6 !important;
    color: #555;
    text-align: left;
}

.product-specs {
    font-size: .86em;
    color: #777;
    text-align: left;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    line-height: 1.5 !important;
}

/* --- IMUとは --- */
.imu-box {
    background: #fff;
    border: 2px solid #e8a030;
    border-radius: 6px;
    padding: 15px;
}

.imu-box h4 {
    font-size: 15px;
    font-weight: bold;
    color: #e8a030;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #e8a030;
}

.imu-box p {
    font-size: .86em;
    line-height: 1.7;
    color: #555;
}

/* ===== フッター連絡先 ===== */
.contact-footer {
    background: #2c3e50;
    color: #fff;
    padding: 20px 25px;
    border-radius: 0 0 6px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-links {
    font-size: 13px;
    line-height: 2 !important;
}

.contact-links a {
    color: #8cc4ff;
    display: block;
}

.contact-links a:hover {
    color: #fff;
}

.contact-company {
    text-align: right;
    font-size: 13px;
    line-height: 1.8 !important;
}

.contact-company .company-name {
    font-size: 16px;
    font-weight: bold;
    color: #ffe066;
}

.trimble-badge {
    display: inline-block;
    background: #fff;
    color: #2c3e50;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 5px;
    font-weight: bold;
}

/* ===== 2カラムレイアウト（TS用） ===== */
.product-grid-ts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    align-items: stretch;
    margin-bottom: 0px;
}

.s7-card-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    text-align: left;
}

.s7-image-box {
    flex: 0 0 auto;
}

.s7-text-box {
    flex: 1;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .hojokin-wrap {
    font-size: 14px;
    }

    .section-title-main {
    font-size: 20px;
    padding: 14px 15px;
    }

    .overview-inner {
    padding: 15px;
    margin: 10px;
    }

    .adoption-content {
    flex-direction: column;
    }

    .adoption-charts {
    flex: auto;
    }

    .case-content {
    flex-direction: column;
    }

    .case-info {
    flex: auto;
    }

    .catalog-category {
    margin: 25px 0px 0;
    }
    .product-grid {
    grid-template-columns: 1fr 1fr;
    }

    .product-grid-2 {
    grid-template-columns: 1fr;
    }

    .product-grid-ts {
    grid-template-columns: 1fr;
    }

    .product-badge {
    left: -1px;
    }
    .product-badge.s7-badge {
    left: -2px;
    }

    .s7-card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    }

    .contact-footer {
    flex-direction: column;
    text-align: center;
    }

    .contact-company {
    text-align: center;
    }

    .flow-row {
    flex-wrap: wrap;
    }

    .timeline-steps {
    flex-wrap: wrap;
    justify-content: center;
    }

    .timeline-step br {
    display: inline;
    }

    .chart-group {
    flex-direction: column;
    align-items: center;
    }

    .catalog-header h2 {
    font-size: 20px;
    }

    .catalog-header p {
    font-size: 16px;
    }
}

@media (max-width: 480px) {
    .section-title-main {
    font-size: 17px;
    }

    .catalog-header h2 {
    font-size: 17px;
    }

    .product-card {
    padding: 20px;
    }
}