/* ============================================================
   TOPページ サービス一覧（写真カード型）
   markup: /template/top-service-photo.php

   デザイン切替:
   index.php の $top_service_design を 'renewal' に戻すと現行アイコン版、
   'legacy' にすると旧デザインへ戻せます。
   ============================================================ */

.top-service-photo {
    --tsp-brand: #0876bb;
    --tsp-brand-dark: #07548a;
    --tsp-navy: #18324a;
    --tsp-text: #1c2b38;
    --tsp-muted: #667786;
    --tsp-line: #dce7ef;
    --tsp-sky: #f2f8fc;
    --tsp-white: #fff;
    width: min(92%, 1240px);
    margin: 0 auto;
    padding-bottom: 56px;
    color: var(--tsp-text);
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic Pro", "Yu Gothic", sans-serif;
}

.top-service-photo *,
.top-service-photo *::before,
.top-service-photo *::after {
    box-sizing: border-box;
}

.top-service-photo__header {
    max-width: 780px;
    margin: 0 auto 48px;
    text-align: center;
}

.top-service-photo__eyebrow,
.top-service-photo__section-kicker {
    margin: 0;
    color: var(--tsp-brand);
    font-family: Manjari, sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
}

.top-service-photo__eyebrow::after {
    display: block;
    width: 72px;
    height: 2px;
    margin: 10px auto 14px;
    background: var(--tsp-brand);
    content: "";
}

.top-service-photo__title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.35;
}

.top-service-photo__lead {
    margin: 18px 0 0;
    color: var(--tsp-muted);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.9;
}

.top-service-photo__section + .top-service-photo__section {
    margin-top: 64px;
}

.top-service-photo__section-heading {
    margin-bottom: 24px;
    text-align: left;
}

.top-service-photo__section-heading h3 {
    margin: 8px 0 6px;
    color: var(--tsp-navy);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.4;
}

.top-service-photo__section-heading > p:last-child {
    margin: 0;
    color: var(--tsp-muted);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
}

.top-service-photo__featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.top-service-photo__featured-card,
.top-service-photo__card {
    overflow: hidden;
    color: inherit;
    background: var(--tsp-white);
    border: 1px solid var(--tsp-line);
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.top-service-photo__featured-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 22px;
}

.top-service-photo__featured-card:hover,
.top-service-photo__card:hover {
    transform: translateY(-5px);
    border-color: rgba(8, 118, 187, .55);
    box-shadow: 0 18px 38px rgba(24, 50, 74, .14);
}

.top-service-photo__featured-media,
.top-service-photo__card-media {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: var(--tsp-sky);
}

.top-service-photo__featured-media {
    aspect-ratio: 2 / 1;
}

.top-service-photo__featured-media::after {
    position: absolute;
    inset: auto 0 0;
    height: 35%;
    background: linear-gradient(to top, rgba(12, 36, 55, .2), transparent);
    content: "";
    pointer-events: none;
}

.top-service-photo__featured-media > img:not(.top-service-photo__card-logo),
.top-service-photo__card-media > img:not(.top-service-photo__card-logo) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.top-service-photo__card-logo {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: min(78%, 280px);
    height: auto;
    margin: 0;
    object-fit: contain;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: drop-shadow(0 2px 10px rgba(12, 36, 55, .28));
}

.top-service-photo__featured-card:hover .top-service-photo__featured-media > img:not(.top-service-photo__card-logo),
.top-service-photo__card:hover .top-service-photo__card-media > img:not(.top-service-photo__card-logo) {
    transform: scale(1.035);
}

.top-service-photo__badge {
    position: absolute;
    z-index: 1;
    top: 18px;
    left: 18px;
    padding: 7px 12px;
    color: var(--tsp-white);
    background: rgba(7, 84, 138, .92);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1;
}

.top-service-photo__featured-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 28px 28px;
}

.top-service-photo__label {
    margin: 0 0 9px;
    color: var(--tsp-brand);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
}

.top-service-photo__featured-name,
.top-service-photo__card-name {
    margin: 0;
    color: var(--tsp-navy);
    font-weight: 600;
}

.top-service-photo__featured-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 12px;
    font-size: clamp(24px, 2.5vw, 32px);
    line-height: 1.35;
}

.top-service-photo__featured-name span,
.top-service-photo__card-name span {
    color: var(--tsp-brand);
    font-family: Manjari, sans-serif;
    font-weight: 400;
    letter-spacing: .04em;
}

.top-service-photo__featured-name span {
    font-size: 14px;
}

.top-service-photo__desc {
    margin: 14px 0 16px;
    color: var(--tsp-text);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.75;
}

.top-service-photo__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-service-photo__chips li {
    padding: 7px 11px;
    color: var(--tsp-brand-dark);
    background: var(--tsp-sky);
    border: 1px solid #cfe2ef;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.top-service-photo__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--tsp-brand);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.top-service-photo__arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s ease;
}

.top-service-photo__featured-card:hover .top-service-photo__arrow,
.top-service-photo__card:hover .top-service-photo__arrow,
.top-service-photo__guide:hover .top-service-photo__arrow {
    transform: rotate(45deg) translate(3px, -3px);
}

.top-service-photo__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.top-service-photo__card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-radius: 18px;
}

.top-service-photo__card-media {
    aspect-ratio: 4 / 3;
}

.top-service-photo__card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px 20px;
}

.top-service-photo__card-name {
    display: grid;
    gap: 3px;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.45;
}

.top-service-photo__card-name span {
    font-size: 10px;
}

.top-service-photo__card-desc {
    margin: 10px 0 13px;
    color: var(--tsp-muted);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.7;
}

.top-service-photo__chips--small {
    margin-top: auto;
}

.top-service-photo__chips--small li {
    padding: 6px 8px;
    font-size: 10px;
}

.top-service-photo__cta--small {
    margin-top: 17px;
    font-size: 12px;
}

.top-service-photo__guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 52px;
    padding: 28px 34px;
    color: var(--tsp-white);
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, .14), transparent 30%),
        linear-gradient(120deg, var(--tsp-brand) 0%, var(--tsp-brand-dark) 100%);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(7, 84, 138, .2);
    text-decoration: none;
}

.top-service-photo__guide-copy {
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.7;
}

.top-service-photo__guide-copy > span {
    display: block;
    margin-bottom: 3px;
    color: var(--tsp-white);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
}

.top-service-photo__guide-cta {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    color: var(--tsp-brand-dark);
    background: var(--tsp-white);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.top-service-photo__featured-card:focus-visible,
.top-service-photo__card:focus-visible,
.top-service-photo__guide:focus-visible {
    outline: 3px solid var(--tsp-brand);
    outline-offset: 4px;
}

@media screen and (max-width: 1024px) {
    .top-service-photo__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .top-service-photo__card-name {
        min-height: 0;
    }
}

@media screen and (max-width: 768px) {
    .top-service-photo {
        width: 90%;
        padding-bottom: 16px;
    }

    .top-service-photo__header {
        margin-bottom: 34px;
    }

    .top-service-photo__eyebrow {
        font-size: 14px;
    }

    .top-service-photo__title {
        font-size: 25px;
    }

    .top-service-photo__lead {
        margin-top: 14px;
        font-size: 13px;
        line-height: 1.8;
        text-align: left;
    }

    .top-service-photo__section + .top-service-photo__section {
        margin-top: 46px;
    }

    .top-service-photo__section-heading {
        margin-bottom: 18px;
    }

    .top-service-photo__section-heading h3 {
        margin-top: 6px;
        font-size: 20px;
    }

    .top-service-photo__section-heading > p:last-child {
        font-size: 12px;
    }

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

    .top-service-photo__featured-card {
        border-radius: 16px;
    }

    .top-service-photo__featured-media {
        aspect-ratio: 16 / 8.5;
    }

    .top-service-photo__badge {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .top-service-photo__featured-content {
        padding: 20px 18px 22px;
    }

    .top-service-photo__featured-name {
        font-size: 24px;
    }

    .top-service-photo__desc {
        margin: 11px 0 13px;
        font-size: 12px;
    }

    .top-service-photo__cta {
        margin-top: 18px;
    }

    .top-service-photo__guide {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        margin-top: 36px;
        padding: 24px 20px;
    }

    .top-service-photo__guide-copy > span {
        font-size: 17px;
    }
}

@media screen and (max-width: 560px) {
    .top-service-photo__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .top-service-photo__card {
        display: grid;
        grid-template-columns: 40% 60%;
        border-radius: 14px;
    }

    .top-service-photo__card-media {
        aspect-ratio: auto;
        min-height: 220px;
    }

    .top-service-photo__card-content {
        min-width: 0;
        padding: 16px 14px;
    }

    .top-service-photo__card-name {
        font-size: 14px;
    }

    .top-service-photo__card-desc {
        margin: 8px 0 10px;
        font-size: 10px;
        line-height: 1.6;
    }

    .top-service-photo__chips {
        gap: 5px;
    }

    .top-service-photo__chips li {
        padding: 5px 7px;
        font-size: 9px;
        white-space: normal;
    }

    .top-service-photo__cta--small {
        margin-top: 13px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .top-service-photo__featured-card,
    .top-service-photo__card,
    .top-service-photo__featured-media > img:not(.top-service-photo__card-logo),
    .top-service-photo__card-media > img:not(.top-service-photo__card-logo),
    .top-service-photo__arrow {
        transition: none;
    }
}
