/* style.css（ver.05） */

/* 基本設定 */
body {
    margin: 0;
    font-family: "Noto Sans JP", sans-serif;
    color: #333;
    background: #fafafa;
}

/* ナビゲーション */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffffcc;
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: space-between;
    padding: 10px 40px;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
}

.logo-block {
    display: flex;
    flex-direction: column;
}

.company-info-small {
    font-size: 0.75rem;
    margin-top: 4px;
    line-height: 1.2;
}

.navbar ul {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    padding-right: 40px;
}

.navbar a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

/* スライダー */
.slider {
    margin-top: 120px;
    position: relative;
    height: 75vh;
    min-height: 480px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

/* スライダーテキスト */
.slider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    text-shadow: 0 0 10px rgba(0,0,0,0.6);
    z-index: 20;
    background: rgba(0, 0, 0, 0.45);
    padding: 24px 48px;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,0.6);
}

.slider-text h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.slider-text p {
    font-size: 1.2rem;
}

/* ドットナビ */
.dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
}

.dot {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.6;
}

.dot.active {
    opacity: 1;
    background: #4B78A0;
}

/* セクション共通 */
.section {
    padding: 80px 40px;
    text-align: center;
    scroll-margin-top: 130px;
}

.section.dark {
    background: #f0f0f0;
}

/* カード */
.cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    width: 300px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform .3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* 新着情報 */
.news-list {
    width: 90%;
    max-width: 900px;
    margin: auto;
    text-align: left;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #ccc;
}

.news-date {
    width: 120px;
    font-weight: bold;
}

.news-cat {
    width: 100px;
    color: #4B78A0;
}

.news-title {
    flex: 1;
}

/* 実績・社会貢献テーブル */
.table-wrapper {
    overflow-x: auto;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.works-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.works-table td:nth-child(3) {
    text-align: left;
}

.works-table th:nth-child(1) {
    width: 25%;
}

.works-table td:nth-child(1) {
    width: 25%;
    text-align: left;
}

.works-table th:nth-child(2),
.works-table td:nth-child(2) {
    width: 15%;
}

.works-table th:nth-child(3),
.works-table td:nth-child(3) {
    width: 60%;
}
.works-table th {
    background: #4B78A0;
    color: #fff;
}

/* 高さを少し縮める */
.compact-table th,
.compact-table td {
    padding: 10px 12px;
}

/* 実績紹介・社会貢献テーブルに罫線を追加 */
.works-table th,
.works-table td {
    border: 1px solid #ccc;
}

/* 代表者挨拶 */
.greeting {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: 900px;
    margin: 40px auto;
    text-align: left;
}

.greeting-photo {
    width: 300px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.greeting-text {
    flex: 1;
}

/* 会社概要テーブル */
.company-table {
    max-width: 900px;
    margin: 20px auto 40px;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.company-table th,
.company-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.company-table th {
    width: 140px;
    background: #f5f5f5;
    font-weight: 600;
}

/* 沿革 */
.history {
    max-width: 900px;
    margin: 30px auto;
    text-align: left;
}

.history-item {
    display: flex;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #ccc;
}

.history-year {
    width: 140px;
    font-weight: bold;
}

.history-text {
    flex: 1;
}

/* 技術者一覧 */
.engineer-grid {
    max-width: 900px;
    margin: 30px auto;
    display: flex;
    gap: 40px;
    justify-content: center;
    text-align: left;
}

.engineer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.engineer-grid li {
    margin-bottom: 8px;
}

.engineer-grid.four-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    justify-items: center;
}

/* 業務概要：横長カード */
.business-list {
    max-width: 900px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.business-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 10px;
    text-align: left;
}

.business-card img {
    width: 250px;
    height: auto;     /* ← 高さを自動にする */
    object-fit: cover;
    border-radius: 8px;
}

.business-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 実績・社会貢献：写真＋文章 */
.info-block {
    max-width: 900px;
    margin: 40px auto 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    text-align: left;
}

.info-block img {
    width: 260px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
}

.info-block p {
    flex: 1;
    line-height: 1.8;
}

/* 採用情報メッセージ */
.recruit-message {
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* お問い合わせ：マップ */
.map-row {
    width: 100%;
    margin: 20px 0 0;
    display: flex;
    gap: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.map-item {
    flex: 1;
    text-align: left;
}

.map-item h3 {
    margin-bottom: 8px;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: #4B78A0;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* フッター */
footer {
    text-align: center;
    padding: 20px;
    background: #4B78A0;
    color: #fff;
}

/* スクロールアニメーション */
.fadein {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fadein.show {
    opacity: 1;
    transform: translateY(0);
}

/* スマホ対応 */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        padding: 10px 20px;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
        padding-right: 0;
        align-items: flex-start;
    }

    .slider {
        height: 50vh;
        min-height: 300px;
    }

    .card {
        width: 90%;
    }

    .news-item {
        flex-direction: column;
        gap: 4px;
    }

    .greeting {
        flex-direction: column;
        text-align: left;
    }

    .greeting-photo {
        width: 70%;
        max-width: 260px;
    }

    .history-item {
        flex-direction: column;
    }

    .engineer-grid.four-columns {
        grid-template-columns: 1fr;
    }

    .business-card {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }

    .business-card img {
        width: 100%;
        height: auto;
    }

    .info-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-block img {
        width: 100%;
        height: auto;
    }

    .map-row {
        flex-direction: column;
    }
}

/* フォントサイズと文字色を数値指定 */
h1 {
    font-size: 10px;      /* トップ文字 */
    color: #FFFFFF;       /* 白色 */
}

h2 {
    font-size: 36px;      /* 見出し大 */
    color: #555555;      /* 薄いグレー色 */
}

h3 {
    font-size: 24px;      /* 見出し中 */
    color: #4B78A0;       /* ブルー色 */
}

h4 {
    font-size: 20px;
    color: #555555;
}

h6 {
    font-size: 16px;
    color: #777777;
}

/*業務実績：写真ギャラリー（4枚横並び） */
.works-gallery {
    width: 75%;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.works-gallery img {
    width: 100%;
    max-width: 300px;      /* 4枚並べるための最大幅 */
    border-radius: 10px;   /* 角丸 */
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/*社会貢献：写真ギャラリー（4枚横並び） */
.social-gallery {
    width: 75%;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-gallery img {
    width: 100%;
    max-width: 300px;      /* 4枚並べるための最大幅 */
    border-radius: 10px;   /* 角丸 */
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
