/* カラー定義 */
:root {
    --color-primary: #333;
    --color-accent: #6EAF2F;
    --color-accent-text: #ffffff;
    --color-border: #ddd;
    --color-table-header: #f5f5f5;
}

/* 共通スタイル */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

body {
    font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--color-primary);
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

header {
    display: flex;
    align-items: center;
}

footer {
    margin-top: 80px;
    padding: 20px;
    background: var(--color-accent);
    color: var(--color-accent-text);
    text-align: center;
    font-size: 0.875rem;
}

main {
    padding-bottom: 80px;
}

.container {
    width: min(1100px, 90%);
    margin: 0 auto;
}

section {
    padding: 20px 0;
}

h1,
h2 {
    margin-bottom: 15px;
}

.page-title {
    padding: 60px 0 20px;
    text-align: center;
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--color-accent);
    color: var(--color-accent-text);
    text-decoration: none;
    border-radius: 4px;
}

.btn:hover {
    opacity: 0.8;
}

/* ナビゲーションメニュー */
#nav-toggle {
    visibility: hidden;
    width: 0;
    height: 0;
}

#nav-toggle-label {
    visibility: hidden;
    position: fixed;
    top: 6px;
    right: 6px;
    width: 36px;
    height: 36px;
    z-index: 30;
    cursor: pointer;
}

#nav-toggle-label span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: gray;
    border-radius: 6px;
    transition: all 0.8s;
}

#nav-toggle-label span:nth-of-type(1) {
    top: 6px;
}

#nav-toggle-label span:nth-of-type(2) {
    top: 16px;
}

#nav-toggle-label span:nth-of-type(3) {
    bottom: 6px;
}

#nav-toggle:checked~#nav-toggle-label span:nth-of-type(1) {
    transform: translateY(10px) rotate(-45deg);
}

#nav-toggle:checked~#nav-toggle-label span:nth-of-type(2) {
    opacity: 0;
}

#nav-toggle:checked~#nav-toggle-label span:nth-of-type(3) {
    transform: translateY(-10px) rotate(45deg);
}

#nav-toggle:checked~#nav-menu {
    visibility: visible;
}

#nav-menu {
    display: flex;
    align-items: center;
    font-size: 1rem;
}

#nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav-menu li {
    display: inline-block;
    margin: 10px 15px;
    text-align: center;
}

#nav-menu a {
    display: block;
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    transition: font-weight .3s ease;
    padding: 6px 10px;
}

#nav-menu a.current {
    font-weight: bold;
}

#nav-menu a:hover {
    font-weight: bold;
}

/* トップページ */
.mv {
    position: relative;
}

.mv img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.mv-text {
    position: absolute;
    top: 20%;
    left: 5%;
    transform: translateY(-20%);
    color: #fff;
}

.mv-text h1 {
    font-size: 3rem;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    display: flex;
    gap: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.company-layout,
.about-layout {
    display: flex;
    gap: 50px;
    align-items: center;
}

.company-image,
.about-image {
    flex: 2;
}

.company-text,
.about-text {
    flex: 3;
}

.company-image img,
.about-image img {
    width: 100%;
    display: block;
}

.button-area {
    margin-top: 30px;
}

/* 会社概要・会社沿革 */
.company-profile,
.history {
    padding: 20px 0 40px;
}

.company-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th,
.company-table td,
.history-table th,
.history-table td {
    border: 1px solid var(--color-border);
    padding: 15px;
    vertical-align: top;
}

.company-table th,
.history-table th {
    width: 220px;
    background: var(--color-table-header);
    text-align: left;
}

.era-date {
    display: inline-flex;
}

.era-date__jp {
    width: 5em;
}

.era-date__ad {
    font-weight: normal;
}

/* 事業内容 */
.business-item {
    margin-bottom: 5rem;
}

.business-item p {
    max-width: 900px;
    margin: 0 1rem 1rem;
    line-height: 1.8;
}

.business-item img {
    display: block;
    max-width: 900px;
    margin: 0 1rem 1rem;
}

/* 安全への取り組み */
.safe-lead {
    padding: 0 0 60px;
}

.safe-lead p {
    line-height: 1.9;
}

.safe-item {
    padding: 20px 0;
}

.safe-layout {
    display: flex;
    gap: 50px;
    align-items: center;
}

.safe-layout.reverse {
    flex-direction: row-reverse;
}

.safe-image,
.safe-content {
    flex: 1;
}

.safe-image img {
    max-width: 300px;
    display: block;
    border-radius: 10px;
}

.safe-content h3 {
    margin-bottom: 20px;
    color: #005bac;
    font-size: 1.5rem;
}

.safe-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 採用情報 */
.recruit {
    padding-bottom: 80px;
}

.recruit-lead {
    margin-bottom: 3rem;
    line-height: 1.8;
}

.recruit-card {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
        "recruit-position recruit-workplace recruit-job"
        "recruit-time recruit-time recruit-time";

    margin-bottom: 2rem;

    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;

    background: #fff;
}

.recruit-position {
    grid-area: recruit-position;
}

.recruit-workplace {
    grid-area: recruit-workplace;
}

.recruit-job {
    grid-area: recruit-job;
}

.recruit-time {
    grid-area: recruit-time;
}

.recruit-position,
.recruit-workplace,
.recruit-job {
    border-right: 1px solid var(--color-border);
}

.recruit-job {
    border-right: none;
}

.recruit-time {
    border-top: 1px solid var(--color-border);
}

.recruit-position h3 {
    margin: 0;
    padding: 1rem;

    background: var(--color-accent);
    color: var(--color-accent-text);
}

.salary {
    margin: 0;
    padding: 1rem;

    font-weight: bold;
    font-size: 1.1rem;
    color: var(--color-accent);
}

.recruit-card h4 {
    margin: 0;
    padding: .75rem 1rem;

    background: var(--color-table-header);
    border-bottom: 1px solid var(--color-border);
}

.recruit-card p {
    line-height: 1.8;
}

.recruit-workplace p,
.recruit-job p,
.recruit-time p {
    margin: 0;
    padding: 1rem;
}

.recruit-benefit {
    margin-top: 4rem;
}

.benefit-list {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.benefit-list dt {
    padding: 1rem;
    background: var(--color-table-header);
    border-top: 1px solid var(--color-border);
    font-weight: bold;
}

.benefit-list dt:first-child {
    border-top: none;
}

.benefit-list dd {
    margin: 0;
    padding: 1rem;
    background: #fff;
}

.benefit-list dd ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.benefit-list dd li {
    margin-bottom: .25rem;
}

.access {
    margin-top: 4rem;
}

.access-item {
    margin-bottom: 3rem;
}

.access-item h3 {
    margin-bottom: 1rem;
}

.access-map iframe {
    width: 100%;
    max-width: 800px;
    height: 400px;
    border: 0;
}

.button-area {
    margin-top: 3rem;
    text-align: center;
}

/* お問合せ */
.contact-section {
    padding: 20px 0 40px;
}

.contact-lead {
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: center;
}

.contact-table {
    width: 100%;
    border-collapse: collapse;
}

.contact-table th,
.contact-table td {
    border: 1px solid var(--color-border);
    padding: 16px;
    vertical-align: top;
}

.contact-table th {
    width: 220px;
    background: var(--color-table-header);
    text-align: left;
}

.contact-table input,
.contact-table select,
.contact-table textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.contact-table textarea {
    resize: vertical;
}

.contact-submit {
    margin-top: 40px;
    text-align: center;
}

.contact-submit button {
    cursor: pointer;
    border: none;
}

@media screen and (max-width:767px) {

    /* 共通スタイル */
    section {
        padding: 50px 0;
    }

    /* ナビゲーションメニュー */
    #nav-toggle-label {
        visibility: visible;
    }

    #nav-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        padding-top: 1.5rem;
        width: 100%;
        visibility: hidden;
        z-index: 29;
        background: rgba(255, 255, 255, .95);
        height: 100vh;
    }

    #nav-menu li {
        width: 100%;
        border-bottom: 1px solid lightgray;
        margin: 10px 0;
    }

    /* トップページ */
    .mv img {
        height: 300px;
    }

    .mv-text h1 {
        font-size: 2rem;
    }

    .company-layout,
    .about-layout {
        flex-direction: column;
    }

    .news-list li {
        flex-direction: column;
        gap: 5px;
    }

    /* 会社概要・会社沿革 */
    .company-table,
    .company-table tbody,
    .company-table tr,
    .company-table th,
    .company-table td,
    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table th,
    .history-table td {
        display: block;
        width: 100%;
    }

    .company-table th,
    .history-table th {
        border-bottom: none;
    }

    /* 事業内容 */
    .business-route-content {
        flex-direction: column;
    }

    /* 安全への取り組み */
    .safe-layout,
    .safe-layout.reverse {
        flex-direction: column;
        gap: 25px;
    }

    .safe-content h3 {
        font-size: 1.25rem;
    }

    /* お問合せ */
    .contact-table,
    .contact-table tbody,
    .contact-table tr,
    .contact-table th,
    .contact-table td {
        display: block;
        width: 100%;
    }

    .contact-table th {
        border-bottom: none;
    }

    /* 採用情報 */
    .recruit-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "recruit-position"
            "recruit-workplace"
            "recruit-job"
            "recruit-time";
    }

    .recruit-position,
    .recruit-workplace,
    .recruit-job {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
}