/* Service Section - Google-inspired */
.service {
    padding: 64px 0;
    background: #fff !important;
}

/* 3サービス想定。4つ以上に増えても折り返して破綻しないようにしている */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.service-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2), 0 8px 20px rgba(60, 64, 67, 0.14);
    transform: translateY(-2px);
}

/* カード全体をリンクにしつつ、内容を縦に積んで高さを揃える */
.service-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.service-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.04);
}

/*
 * OGP画像が取得できなかった場合のフォールバック。
 * 頭文字をブランドカラーの面に置いて、画像ありのカードと
 * 並んでも見劣りしないようにする。
 */
.service-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0A5D54 0%, #127C71 55%, #1A9E90 100%);
    position: relative;
    overflow: hidden;
}

/* 単色だと平坦なので、うっすら円を重ねて奥行きを出す */
.service-placeholder::after {
    content: '';
    position: absolute;
    width: 150%;
    aspect-ratio: 1;
    top: -75%;
    right: -55%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.service-initial {
    position: relative;
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.service-content {
    padding: 20px 20px 52px;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.service-card:hover .service-name {
    color: #127C71;
}

.service-description {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.7;
    margin-bottom: 0;
}

.service-arrow {
    position: absolute;
    bottom: 18px;
    right: 20px;
    width: 22px;
    height: 22px;
    color: #5f6368;
    transition: color 0.2s ease, transform 0.2s ease;
}

.service-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

.service-card:hover .service-arrow {
    color: #127C71;
    transform: translateX(3px);
}

.service-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #5f6368;
    padding: 48px 24px;
    font-size: 14px;
}

/* キーボード操作でもホバーと同じ見た目になるようにする */
.service-link:focus-visible {
    outline: 2px solid #127C71;
    outline-offset: 3px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .service {
        padding: 40px 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-content {
        padding: 16px 16px 48px;
    }
}

/* 動きを減らす設定の環境では拡大・移動を無効にする */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card:hover,
    .service-image img,
    .service-card:hover .service-image img,
    .service-arrow {
        transition: none;
        transform: none;
    }
}
