/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    color: #2c3e50;
}

main section {
    margin-bottom: 2rem;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    color: #34495e;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    background: #ecf0f1;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
}

.button:hover {
    background-color: #2980b9;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eaeaea;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Dealer List Styles */
.dealer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.dealer-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: calc(50% - 1rem);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.dealer-image-container {
    width: 100%;
    aspect-ratio: 120 / 45;
    background-color: #f0f0f0;
}

.dealer-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像をトリミングしてコンテナにフィットさせる */
}

.dealer-info {
    padding: 1rem;
    text-align: left;
}

.dealer-info h3 {
    margin: 0; /* Reset margin for flex alignment */
    font-size: 1.2rem;
}

.dealer-name-header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* アバターと名前部分が折り返さないように */
    margin-bottom: 0.5rem;
}

.dealer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%; /* 円形にする */
    border: 2px solid #eee;
    margin-right: 12px;
    object-fit: cover; /* アバター画像をトリミング */
    flex-shrink: 0; /* アバターが縮まないように */
}

.dealer-name-tags {
    display: flex;
    flex-direction: column;
}

.dealer-info h3 {
    margin: 0; /* Reset margin for flex alignment */
    font-size: 1.2rem;
}

.dealer-tags {
    margin-left: 0.5em;
}

.dealer-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2em 0.6em;
    margin-left: 0.4em;
    margin-top: 0.2em;
    background-color: #eee;
    color: #555;
    border-radius: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.dealer-links a {
    display: inline-flex; /* Use flexbox for alignment */
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    text-decoration: none;
    background-color: transparent; /* Remove background */
    padding: 0; /* Remove padding */
}

.dealer-links img {
    height: 30px; /* Set a fixed height for icons */
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}

.dealer-links a:hover img {
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .dealer-card {
        width: 100%;
    }
}
