/* 基本設定 */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fdfdfd;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ヘッダー */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: fixed;
    width: 100%; /* 幅を100%に */
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box; /* パディングを幅に含める */
}

header h1 {
    margin: 0;
}

header h1 img {
    height: 40px; /* ロゴの高さを指定 */
    width: auto;
    vertical-align: middle;
}

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

header nav li {
    margin-left: 30px;
}

header nav a:hover {
    color: #007bff;
}

/* メインコンテンツ */
main {
    padding-top: 85px; /* ヘッダーの高さ分 */
}

/* ヒーローセクション */
.hero {
    height: 60vh;
    background-image: url('Gemini_Generated_Image_yadr32yadr32yadr.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-text {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 30px 50px;
    border-radius: 10px;
    max-width: 90%; /* スマホでの見切れ防止 */
    box-sizing: border-box;
}

.hero-text h2 {
    font-size: 42px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-text p {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* セクション共通 */
main section {
    padding: 80px 40px;
    text-align: center;
    box-sizing: border-box; /* パディングを幅に含める */
}

main section:nth-of-type(even) {
    background-color: #f9f9f9;
}

main section h2 {
    font-size: 32px;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

main section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #007bff;
    margin: 8px auto 0;
}

/* 事務所概要 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-content dl {
    display: flex;
    flex-wrap: wrap;
}

.about-content dt {
    width: 25%;
    font-weight: bold;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.about-content dd {
    width: 75%;
    margin: 0;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

/* 事業内容 */
.service-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    width: calc(33% - 20px); /* 3列表示でギャップを考慮 */
    max-width: 350px;
    min-width: 280px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 角丸を画像に適用するため */
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* 内容が少なくても高さを揃える */
}

.card-content h3 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.card-content p {
    font-size: 15px;
    line-height: 1.8;
    text-align: left;
    flex-grow: 1; /* 説明文の長さに応じて高さを調整 */
}

.btn, .btn-disabled {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.btn {
    background-color: #007bff;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.coming-soon {
    opacity: 0.7;
}

/* 代表者メッセージ */
.message-container {
    display: flex; /* 画像と右側コンテンツを横並び */
    align-items: flex-start; /* 上揃え */
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    gap: 50px; /* 画像とテキストの間のスペース */
}

.profile-image-area {
    flex-shrink: 0;
}

.profile-pic {
    width: 250px; /* 画像の幅を調整 */
    height: 350px; /* 画像の高さを調整 */
    border-radius: 0; /* 角丸をなくす */
    object-fit: cover;
}

.message-content-area {
    flex-grow: 1; /* 残りのスペースを埋める */
    display: flex;
    flex-direction: column; /* 経歴と本文を縦に並べる */
}

.message-content-area h3 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 15px;
}

.profile-career-list {
    list-style: none; /* デフォルトのリストスタイルを削除 */
    padding: 0;
    margin: 0 0 30px 0; /* 下に余白を追加 */
}

.profile-career-list li {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.5;
}

.message-body-paragraph { /* 新しく追加 */
    line-height: 1.8;
    margin-bottom: 1em;
}

/* お問い合わせ */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box; /* パディングを幅に含める */
}

.contact-form .btn {
    background-color: #28a745;
    width: 100%;
    padding: 15px;
    font-size: 18px;
}
.contact-form .btn:hover {
    background-color: #218838;
}

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
        width: 100%; /* 幅を100%に */
    }

    header h1 {
        margin-bottom: 10px;
    }
    
    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    header nav li {
        margin: 5px 10px;
    }

    main {
        padding-top: 140px; /* ヘッダーの高さ調整 */
    }
    
    main section {
        padding: 60px 20px; /* 左右のパディングを調整 */
    }

    .hero {
        height: 50vh; /* スマートフォンでの高さを調整 */
    }

    .hero-text h2 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 18px;
    }
    
    .about-content dt,
    .about-content dd {
        width: 100%;
        border-bottom: none;
        padding: 5px 0;
    }
    .about-content dt {
        border-bottom: 1px dotted #ccc;
        padding-top: 15px;
    }

    .card {
        width: 90%; /* スマホでは幅を広げる */
        max-width: none; /* 最大幅を解除 */
    }

    .message-container {
        flex-direction: column; /* スマホでは縦並び */
        gap: 30px;
    }

    .profile-image-area {
        width: 100%; /* スマホでは幅いっぱいに */
        text-align: center; /* 画像を中央寄せ */
    }

    .profile-pic {
        width: 80%; /* スマホでの画像の幅を調整 */
        height: auto;
        max-width: 300px; /* 画像の最大幅を設定 */
    }
}

@media (max-width: 480px) { /* さらに小さい画面向け */
    header {
        padding: 10px;
    }

    header h1 img {
        height: 30px;
    }

    header nav li {
        margin: 3px 8px;
        font-size: 14px;
    }

    main section {
        padding: 40px 15px;
    }

    .hero-text h2 {
        font-size: 28px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .card {
        width: 95%;
    }
}

