/* 基本設定 */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    margin: 0;
    background-color: #0c9;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-left {
    text-align: left;
}

/* ヘッダー */
header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
.logo-link {
    text-decoration: none;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    color: #333;
    font-weight: bold;
}

/* ヒーローセクション (トップページ) */
.hero {
    background-image: url('img/ec.png'); /* ここにメイン画像を配置 */
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 150px 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.hero-text h2 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero-text p {
    font-size: 20px;
}

/* 下層ページ タイトル */
.page-title {
    background-color: #f8f9fa;
    text-align: center;
    padding: 50px 20px;
    border-bottom: 1px solid #eee;
}
.page-title h2 {
    margin: 0 0 10px 0;
    font-size: 36px;
}
.page-title p {
    margin: 0;
    font-size: 16px;
    color: #666;
}


/* コンテンツセクション */
.content-section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 40px;
    text-align: center;
}

.section-title-left {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: left;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.bg-light {
    background-color: #f8f9fa;
}

/* サービス */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    text-align: left;
}

.service-item {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.service-item h4 {
    margin-top: 0;
}

/* 実績 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}
.work-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
}
.works-grid-large {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.work-item-large img {
    width: 100%;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}
.work-item-large p {
    font-size: 15px;
    text-align: left;
}


/* 会社概要テーブル */
.company-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.company-table th, .company-table td {
    border: 1px solid #ddd;
    padding: 15px;
    vertical-align: top;
}
.company-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 25%;
}
.business-content {
    line-height: 2.2;
}

/* ボタン */
.btn {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover {
    background: #0056b3;
    color: #fff;
    opacity: 1;
}


/* フッター */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 50px 20px;
}

footer p {
    margin: 10px 0;
    color: #ccc;
}
footer .btn {
    margin-top: 10px;
    margin-bottom: 30px;
}
.footer-company-name {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
    color: #fff;
}
.copyright {
    font-size: 14px;
    color: #aaa;
    margin-top: 30px;
}


/* =================================== */
/* レスポンシブ対応 (メディアクエリ)   */
/* =================================== */

/* 1. タブレット向け (900px以下) */
@media (max-width: 900px) {
    .works-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* 2. スマートフォン向け (600px以下) */
@media (max-width: 600px) {
    /* ヘッダー */
    header .container {
        flex-direction: column;
    }
    .logo {
        margin-bottom: 15px;
    }
    header nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    header nav ul li {
        margin: 10px 0;
    }

    /* ヒーロー */
    .hero {
        padding: 80px 20px;
    }
    .hero-text h2 {
        font-size: 32px;
    }
    .hero-text p {
        font-size: 16px;
    }

    /* セクション */
    .content-section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 26px;
    }

    /* グリッドレイアウト */
    .service-grid,
    .works-grid,
    .works-grid-large {
        grid-template-columns: 1fr; /* 1カラムにする */
    }
    
    /* 会社概要テーブル */
    .company-table th, .company-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .company-table th {
        border-bottom: none;
        text-align: center;
    }
    .company-table td {
        border-top: none;
        margin-bottom: 15px;
    }
}