/* 基本設定 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

.section-padding {
    padding: 60px 0;
}

/* ヘッダー */
header {
    background: #333;
    color: #fff;
    padding-top: 20px;
    min-height: 70px;
    border-bottom: #77aaff 3px solid;
}

header h1 {
    float: left;
    margin: 0;
    padding: 0;
}

header nav {
    float: right;
    margin-top: 10px;
}

header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header li {
    display: inline;
    padding: 0 15px;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header a:hover {
    color: #77aaff;
    font-weight: bold;
}

/* ヒーローセクション */
#hero {
    min-height: 400px;
    background: #50b3a2 url('https://via.placeholder.com/1500x400/50b3a2/ffffff?text=Your+Business+Image') no-repeat center center/cover; /* 背景画像を設定 */
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#hero h2 {
    font-size: 3em;
    margin-bottom: 10px;
}

#hero p {
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto;
}

/* 各セクション */
section {
    background: #fff;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

section h2 {
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #77aaff;
}

/* 事業内容のグリッド表示 */
.service-grid {
    display: grid; /* グリッドレイアウトを有効にする */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* レスポンシブなカラム設定 */
    gap: 30px; /* アイテム間の隙間 */
    margin-top: 40px;
}

.service-item {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.service-item h4 {
    color: #555;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.service-item p {
    font-size: 0.95em;
    color: #666;
    min-height: 80px; /* 説明文の高さが揃うように調整（任意） */
}

.service-image {
    max-width: 100%; /* 親要素の幅に合わせて画像を縮小 */
    height: auto; /* アスペクト比を維持 */
    display: block; /* 余分なスペースをなくす */
    margin: 20px auto 0; /* 中央寄せと上部の余白 */
    border-radius: 5px; /* 角を少し丸める */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* レスポンシブ対応の調整 (既存の @media (max-width: 768px) に追加または修正) */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr; /* 1列表示にする */
    }
}

/* フォーム */
#contactForm .form-group {
    margin-bottom: 20px;
}

#contactForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm textarea {
    width: calc(100% - 22px); /* paddingとborderを考慮 */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box; /* paddingとborderをwidthに含める */
}

#contactForm textarea {
    resize: vertical; /* 縦方向のみリサイズ可能に */
}

#contactForm button[type="submit"] {
    display: block;
    width: 100%;
    padding: 10px;
    background: #77aaff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#contactForm button[type="submit"]:hover {
    background: #5588cc;
}

/* フッター */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

footer p {
    margin: 0;
}

/* レスポンシブ対応 (簡易版) */
@media (max-width: 768px) {
    header h1,
    header nav {
        float: none;
        text-align: center;
    }

    header nav ul li {
        display: block;
        margin-bottom: 10px;
    }

    .container {
        width: 90%;
    }

    #hero h2 {
        font-size: 2em;
    }
}