/* ===== 基本設定 ===== */
:root {
    --primary-color: #e67e22;
    --secondary-color: #fff5e6;
    --accent-color: #f39c12;
    --text-color: #2d3436;
    --light-text: #666666;
    --border-color: #ffe0b2;
    --shadow-color: rgba(230, 126, 34, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

img {
    max-width: 100%;
}

/* ===== コンテナ ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ヘッダー（ヒーロー） ===== */
.header {
    position: relative;
    height: clamp(280px, 42vw, 460px);
    overflow: hidden;
    margin-bottom: 50px;
}

.header-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
}

.header-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 100%;
    padding: 20px;
    background: linear-gradient(rgba(230, 126, 34, 0.65), rgba(243, 156, 18, 0.65));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.04em;
}

.subtitle {
    font-size: clamp(1rem, 2.4vw, 1.3rem);
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

/* ===== セクション共通見出し ===== */
h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

/* ===== 主な取引先 ===== */
.clients {
    margin: 50px 0 60px;
}

.clients-box {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px 32px;
    background-color: #f6e8d0;
    border: 2px solid var(--text-color);
    border-radius: 28px;
    padding: 24px 44px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.clients-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    text-align: left;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

.clients-title::after {
    display: none;
}

.clients-divider {
    align-self: stretch;
    border-left: 3px dashed #4f9a3e;
    min-height: 70px;
    margin: 2px 6px;
}

.clients-logos {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px 24px;
    flex: 0 1 auto;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo--plain img {
    max-height: 54px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.client-logo--boxed {
    background-color: #fff;
    border-radius: 10px;
    padding: 14px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.client-logo--boxed img {
    max-height: 38px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.client-logo img:hover {
    transform: scale(1.04);
}

/* ===== 企業理念 ===== */
.company-philosophy {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 40px;
    background-color: var(--secondary-color);
    border-radius: 12px;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.philosophy-item {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.philosophy-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.philosophy-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.philosophy-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

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

/* ===== 事業内容と施設 ===== */
.business-and-facilities {
    margin-top: 60px;
    margin-bottom: 40px;
    background-color: var(--secondary-color);
    padding: 40px 0;
    border-radius: 12px;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.business-item {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.business-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

.business-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.business-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

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

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 0 20px;
}

.facility-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease;
}

.facility-item:hover {
    transform: translateY(-5px);
}

.facility-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.caption {
    padding: 15px;
    font-size: 0.95rem;
    color: var(--text-color);
    text-align: center;
    font-weight: 500;
}

/* ===== 会社概要テーブル ===== */
.company-overview {
    margin-top: 60px;
    margin-bottom: 40px;
}

.table-container {
    margin: 15px 0;
    box-shadow: 0 2px 4px var(--shadow-color);
    border-radius: 8px;
    overflow: hidden;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 0.95rem;
}

.info-table th,
.info-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table th {
    width: 25%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.info-table td strong {
    color: var(--accent-color);
    font-weight: 700;
}

/* ===== お問い合わせ ===== */
.contact {
    margin-top: 60px;
    padding: 50px 0 60px;
    background-color: var(--secondary-color);
}

.contact-lead {
    text-align: center;
    color: var(--light-text);
    margin: 0 auto 30px;
    font-size: 0.95rem;
}

.contact-form {
    max-width: 640px;
    margin: 0 auto;
    background-color: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.hidden-field {
    display: none;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-row .req {
    color: #e74c3c;
    font-weight: 700;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #fffdfa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15);
}

.form-row textarea {
    resize: vertical;
}

.form-actions {
    text-align: center;
    margin-top: 10px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px var(--shadow-color);
}

.submit-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(230, 126, 34, 0.25);
}

.form-success {
    max-width: 640px;
    margin: 0 auto 25px;
    padding: 18px 20px;
    background-color: #eafaf1;
    border: 1px solid #abebc6;
    color: #1e8449;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    line-height: 1.7;
}

/* ===== フッター ===== */
.footer {
    background-color: var(--text-color);
    color: #fff;
    padding: 40px 0 30px;
    text-align: center;
}

.footer-name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.footer-info p {
    font-size: 0.9rem;
    line-height: 1.9;
    opacity: 0.9;
}

.footer-copy {
    margin-top: 20px;
    font-size: 0.78rem;
    opacity: 0.6;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .header {
        margin-bottom: 35px;
    }

    .business-grid,
    .facilities-grid,
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .business-and-facilities {
        margin-top: 40px;
        padding: 30px 0;
    }

    .business-item,
    .philosophy-item {
        padding: 20px;
    }

    .business-item,
    .facility-item {
        max-width: 420px;
        margin: 0 auto;
    }

    .company-philosophy {
        padding: 30px 20px;
    }

    .clients-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 18px;
        gap: 16px;
        width: auto;
    }

    .clients-title {
        white-space: normal;
    }

    .clients-divider {
        align-self: center;
        border-left: none;
        border-top: 3px dashed #4f9a3e;
        min-height: 0;
        width: 70%;
        margin: 0 auto;
    }

    .clients-logos {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
    }

    .client-logo {
        flex: 0 1 auto;
        min-width: 0;
    }

    .client-logo--plain img {
        max-height: 32px;
    }

    .client-logo--boxed {
        padding: 7px 10px;
    }

    .client-logo--boxed img {
        max-height: 24px;
    }

    .contact-form {
        padding: 25px 20px;
    }

    .info-table th {
        white-space: normal;
        width: 32%;
    }

    .info-table th,
    .info-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* ===== 印刷対応 ===== */
@media print {
    .header {
        height: 200px;
    }

    .contact,
    .footer {
        display: none;
    }

    .business-item,
    .philosophy-item,
    .facility-item,
    .table-container {
        box-shadow: none;
        border: 1px solid var(--border-color);
        break-inside: avoid;
    }

    .business-and-facilities,
    .company-philosophy {
        background-color: transparent;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
