/* Home — Services showcase (Version 2) */

.home-services-v2 {
    --hsv2-brand: #0071d2;
    --hsv2-brand-dark: #004070;
    --hsv2-heading: #001d4a;
    --hsv2-body: #333333;
    --hsv2-muted: #5a6270;
    --hsv2-surface: #ffffff;
    --hsv2-panel: #f4f8fc;
    --hsv2-border: #e2eaf3;
    --hsv2-icon-bg: #f0f7ff;
    --hsv2-gap: clamp(20px, 2.5vw, 28px);
    position: relative;
    isolation: isolate;
    overflow-x: clip;
}

.home-services-v2:not([style*="background-image"]) {
    background-color: var(--hsv2-panel);
    background-image:
        radial-gradient(circle at 88% 12%, rgba(0, 113, 210, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 12% 88%, rgba(0, 113, 210, 0.04) 0%, transparent 40%);
}

/* —— Header — สอดคล้อง home-about-v2__industries-head —— */
.home-services-v2 .sec-title.home-services-v2__head {
    margin-bottom: 0;
    text-align: center;
}

.home-services-v2 .sec-title .sub-text.home-services-v2__kicker {
    display: block;
    margin-bottom: 14px;
    padding-bottom: 0;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hsv2-brand);
}

.home-services-v2 .sec-title .sub-text.home-services-v2__kicker::after {
    display: none;
}

.home-services-v2 .sec-title .title.title2.home-services-v2__title {
    position: relative;
    margin: 0 auto;
    padding: 0 0 14px;
    max-width: none;
    font-size: clamp(26px, 2.8vw, 36px);
    line-height: 1.3;
    font-weight: 700;
    color: var(--hsv2-heading);
    text-align: center;
}

.home-services-v2 .sec-title .title.title2.home-services-v2__title .home-services-v2__title-line {
    display: inline;
    font-style: normal;
    color: var(--hsv2-heading);
}

.home-services-v2 .sec-title .title.title2.home-services-v2__title .home-services-v2__title-line--accent {
    color: var(--hsv2-brand);
}

.home-services-v2 .sec-title .title.title2.home-services-v2__title span {
    font-style: normal;
}

.home-services-v2 .sec-title .title.title2.home-services-v2__title::after {
    display: block;
    content: "";
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 48px;
    height: 3px;
    margin: 0 auto;
    border: 0;
    border-radius: 999px;
    background-color: var(--hsv2-brand);
    z-index: 1;
}

.home-services-v2 .desc.home-services-v2__lead {
    margin: clamp(12px, 1.5vw, 16px) auto clamp(28px, 3.5vw, 36px);
    padding: 0;
    max-width: 52rem;
    font-size: 15px;
    line-height: 1.65;
    color: var(--hsv2-muted);
    text-align: center;
}

.home-services-v2__head:not(:has(.home-services-v2__lead)) {
    margin-bottom: clamp(28px, 3.5vw, 36px);
}

/* Featured 01 */
.home-services-v2__featured {
    margin-bottom: var(--hsv2-gap);
}

.home-services-v2__featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
    gap: 0;
    background: var(--hsv2-surface);
    border: 1px solid var(--hsv2-border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 29, 74, 0.08);
    overflow: hidden;
}

.home-services-v2__featured-media {
    min-height: 220px;
    background: var(--hsv2-panel);
}

.home-services-v2__featured-img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.home-services-v2__featured-body {
    padding: clamp(24px, 3vw, 36px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-services-v2__featured-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.home-services-v2__icon-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--hsv2-icon-bg);
    color: var(--hsv2-brand);
    font-size: 22px;
}

.home-services-v2__order-num,
.home-services-v2__card-num,
.home-services-v2__support-num {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 500;
    line-height: 1;
    color: var(--hsv2-brand);
    opacity: 0.35;
}

.home-services-v2__featured-top .home-services-v2__order-num {
    opacity: 1;
    font-weight: 600;
    color: var(--hsv2-brand);
}

.home-services-v2 .title.title3.home-services-v2__featured-title {
    margin: 0;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    color: var(--hsv2-heading);
}

.home-services-v2 .desc.home-services-v2__featured-desc {
    margin: 0;
    color: var(--hsv2-muted);
    line-height: 1.6;
}

.home-services-v2__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.home-services-v2__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hsv2-icon-bg);
    color: var(--hsv2-brand);
    font-size: 12px;
    font-weight: 600;
}

.home-services-v2__tag i {
    font-size: 14px;
}

/* Grid 02–05 */
.home-services-v2__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hsv2-gap);
    margin-bottom: var(--hsv2-gap);
}

.home-services-v2__card {
    min-width: 0;
}

.home-services-v2__card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 200px;
    padding: 22px 20px 48px;
    background: var(--hsv2-surface);
    border: 1px solid var(--hsv2-border);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 29, 74, 0.06);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-services-v2__card-inner:hover,
.home-services-v2__card-inner:focus-visible {
    border-color: rgba(0, 113, 210, 0.35);
    box-shadow: 0 12px 32px rgba(0, 113, 210, 0.12);
}

.home-services-v2__card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--hsv2-icon-bg);
    color: var(--hsv2-brand);
    font-size: 20px;
}

.home-services-v2__card-num {
    position: absolute;
    top: 18px;
    right: 16px;
    opacity: 0.28;
}

.home-services-v2 .title.title3.home-services-v2__card-title {
    margin: 4px 0 0;
    padding-right: 2.5rem;
    font-size: 16px;
    font-weight: 700;
    color: var(--hsv2-heading);
    line-height: 1.35;
}

.home-services-v2 .desc.home-services-v2__card-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--hsv2-muted);
}

.home-services-v2__card-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    color: var(--hsv2-brand);
    font-size: 18px;
}

/* Support 06 */
.home-services-v2__support-wrap {
    margin-bottom: 0;
}

.home-services-v2__support {
    display: grid;
    grid-template-columns: auto 1px minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
    padding: clamp(24px, 3vw, 36px);
    background: var(--hsv2-surface);
    border: 1px solid var(--hsv2-border);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 29, 74, 0.06);
}

.home-services-v2__support-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.home-services-v2__support-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--hsv2-brand);
    color: #fff;
    font-size: 24px;
    flex-shrink: 0;
}

.home-services-v2__support-num {
    opacity: 1;
    font-weight: 600;
    color: var(--hsv2-brand);
}

.home-services-v2 .title.title3.home-services-v2__support-title {
    margin: 0;
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 700;
    color: var(--hsv2-heading);
}

.home-services-v2__support-vrule {
    width: 1px;
    align-self: stretch;
    min-height: 48px;
    background: var(--hsv2-border);
}

.home-services-v2 .desc.home-services-v2__support-desc {
    margin: 0;
    color: var(--hsv2-muted);
    line-height: 1.55;
}

.home-services-v2__support-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 8px;
    background: var(--hsv2-brand);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.home-services-v2__support-btn:hover,
.home-services-v2__support-btn:focus-visible {
    background: var(--hsv2-brand-dark);
    color: #fff;
}

/* Trust bar — พื้นหลังน้ำเงินเข้ม (โทนเดียวกับ #0071d2) */
.home-services-v2__trust {
    --hsv2-trust-brand: #0071d2;
    --hsv2-trust-deep: #004a8c;
    --hsv2-trust-max: min(1520px, calc(100vw - clamp(24px, 4vw, 48px)));
    background: linear-gradient(
        90deg,
        var(--hsv2-trust-deep) 0%,
        #005a9e 50%,
        #0062b0 100%
    );
    padding: clamp(16px, 2vw, 22px) 0;
}

.home-services-v2__trust > .container.custom {
    max-width: var(--hsv2-trust-max);
    width: 100%;
}

@media only screen and (min-width: 1300px) {
    .home-services-v2__trust > .container.custom {
        max-width: min(1560px, calc(100vw - 32px));
    }
}

.home-services-v2__trust-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-services-v2__trust-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(12px, 1.5vw, 18px);
    min-width: 0;
    padding: clamp(6px, 0.9vw, 10px) clamp(24px, 3vw, 40px);
    text-align: left;
}

/* เส้นคั่นระหว่างคอลัมน์ (ไม่เต็มความสูง) */
.home-services-v2__trust-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18%;
    right: 0;
    bottom: 18%;
    width: 1px;
    background: rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.home-services-v2__trust-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 4.2vw, 48px);
    height: clamp(40px, 4.2vw, 48px);
    color: #fff;
}

/* ไอคอนทึบสีขาว — ไม่ใช้ outline (กันเส้นซ้อนหลายชั้น) */
.home-services-v2__trust-icon i {
    display: block;
    font-size: clamp(38px, 4vw, 46px);
    line-height: 1;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.home-services-v2__trust-icon i::before {
    color: #fff;
    -webkit-text-stroke: 0;
    text-stroke: 0;
}

.home-services-v2__trust-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.home-services-v2__trust-title {
    display: block;
    font-size: clamp(14px, 1.35vw, 16px);
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
}

.home-services-v2__trust-desc {
    display: block;
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 400;
    line-height: 1.45;
    color: #cbd5e1;
}

@media (max-width: 1199px) {
    .home-services-v2__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .home-services-v2__featured-card {
        grid-template-columns: 1fr;
    }

    .home-services-v2__support {
        grid-template-columns: 1fr;
        gap: clamp(14px, 2vw, 20px);
        padding: clamp(24px, 3vw, 36px);
    }

    .home-services-v2__support-vrule {
        display: none;
    }

    .home-services-v2__support-btn {
        justify-self: start;
    }
}

@media (max-width: 767px) {
    .home-services-v2__grid {
        grid-template-columns: 1fr;
    }

    .home-services-v2__trust-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-services-v2__trust-item:not(:last-child)::after {
        display: none;
    }

    .home-services-v2__trust-item:nth-child(odd):not(:nth-last-child(-n+1))::after {
        display: block;
    }

    .home-services-v2__trust-item {
        padding: 8px 14px;
    }
}

@media (max-width: 479px) {
    .home-services-v2__trust-list {
        grid-template-columns: 1fr;
    }

    .home-services-v2__trust-item::after {
        display: none !important;
    }

    .home-services-v2__trust-item:not(:last-child) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    }
}
