﻿
/* JYB 首頁專用樣式 */

.home-page {
    overflow: hidden;
}

/* Hero 主視覺 */

.home-hero {
    position: relative;
    height: min(760px, 78vh);
    min-height: 520px;
    background-color: #dce5e1;
    background-image: linear-gradient(90deg, rgba(18, 36, 30, .42), rgba(18, 36, 30, 0) 75%), url('../Images/home-hero.jpg');
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
}

.home-hero-content {
    position: relative;
    width: min(92%, 1200px);
    margin: 0 auto;
    color: #fff;
}

.home-hero-eyebrow {
    margin: 0 0 22px;
    font-size: 13px;
    letter-spacing: 5px;
    font-weight: 400;
}

.home-hero-title {
    margin: 0;
    font-size: clamp(34px, 3.5vw, 54px);
    line-height: 1.5;
    letter-spacing: 6px;
    font-weight: 400;
}

.home-hero-description {
    margin: 26px 0 0;
    font-size: 15px;
    line-height: 2.2;
    letter-spacing: 2px;
}

.home-hero-line {
    display: block;
    width: 56px;
    height: 1px;
    margin-top: 38px;
    background: rgba(255, 255, 255, .85);
}

@media (max-width: 700px) {
    .home-hero {
        height: 70vh;
        min-height: 480px;
        background-position: center;
    }

    .home-hero-eyebrow {
        font-size: 11px;
        letter-spacing: 3px;
    }

    .home-hero-title {
        font-size: 34px;
        letter-spacing: 3px;
    }

    .home-hero-description {
        font-size: 13px;
        letter-spacing: 1px;
    }
}

.home-hero-slides {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

    .home-hero-slide.is-active {
        opacity: 1;
        visibility: visible;
    }

    .home-hero-slide img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

.home-hero-slides::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18, 36, 30, .42), rgba(18, 36, 30, 0) 75%);
    pointer-events: none;
}


/* Hero 輪播控制介面 */

.home-hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 35px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.home-hero-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    background: rgba(20, 35, 30, .15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background .3s ease, border-color .3s ease;
}

    .home-hero-arrow:hover {
        background: rgba(20, 35, 30, .5);
        border-color: #fff;
    }

.home-hero-indicators {
    display: flex;
    align-items: center;
    gap: 9px;
}

.home-hero-indicator {
    width: 30px;
    height: 3px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    transition: background .3s ease;
}

    .home-hero-indicator.is-active {
        background: #fff;
    }

@media (max-width: 700px) {
    .home-hero-controls {
        bottom: 22px;
        gap: 14px;
    }

    .home-hero-arrow {
        width: 36px;
        height: 36px;
    }

    .home-hero-indicator {
        width: 22px;
    }
}


/* 首頁 About Section */

.home-about {
    padding: 120px 0;
    background: #f7f8f5;
}

.home-about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.home-section-eyebrow {
    margin: 0 0 24px;
    color: #87918b;
    font-size: 13px;
    letter-spacing: 4px;
}

.home-about-title {
    margin: 0;
    color: #303633;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 4px;
}

.home-section-line {
    display: block;
    width: 52px;
    height: 1px;
    margin: 32px 0;
    background: #9ba9a0;
}

.home-about-description {
    margin: 0 0 20px;
    color: #6d7770;
    font-size: 15px;
    line-height: 2.2;
    letter-spacing: 1px;
}

.home-about-link {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid #8a9a90;
    color: #35483e;
    font-size: 14px;
    letter-spacing: 2px;
    text-decoration: none;
    transition: gap .3s ease;
}

    .home-about-link:hover {
        gap: 34px;
    }

.home-about-image {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #e5eae5;
}

    .home-about-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

@media (max-width: 900px) {
    .home-about {
        padding: 80px 0;
    }

    .home-about-inner {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .home-about-image {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 700px) {
    .home-about {
        padding: 65px 0;
    }

    .home-about-title {
        font-size: 30px;
        letter-spacing: 2px;
    }

    .home-about-description {
        font-size: 14px;
    }
}


/* 首頁 Services Section */

.home-services {
    padding: 120px 0;
    background: #fff;
}

.home-services-heading {
    margin-bottom: 55px;
    text-align: center;
}

.home-services-title {
    margin: 0;
    color: #303633;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 400;
    letter-spacing: 5px;
}

.home-services-intro {
    margin: 20px 0 0;
    color: #7b827d;
    font-size: 15px;
    line-height: 2;
    letter-spacing: 1px;
}

.home-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.home-service-card {
    min-width: 0;
    background: #fff;
}

.home-service-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e7ebe7;
}

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

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

.home-service-content {
    padding: 25px 5px 10px;
}

.home-service-number {
    color: #a4aea6;
    font-size: 12px;
    letter-spacing: 2px;
}

.home-service-content h3 {
    margin: 12px 0 15px;
    color: #303633;
    font-size: 23px;
    font-weight: 400;
    letter-spacing: 2px;
}

.home-service-content p {
    margin: 0;
    min-height: 90px;
    color: #7b827d;
    font-size: 14px;
    line-height: 2;
}

.home-service-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-bottom: 7px;
    border-bottom: 1px solid #aab5ac;
    color: #35483e;
    font-size: 13px;
    letter-spacing: 1px;
    text-decoration: none;
    transition: gap .3s ease;
}

    .home-service-link:hover {
        gap: 24px;
    }

.home-services-more {
    margin-top: 55px;
    text-align: center;
}

    .home-services-more a {
        display: inline-flex;
        align-items: center;
        gap: 25px;
        padding: 14px 35px;
        border: 1px solid #c8d0ca;
        color: #35483e;
        font-size: 14px;
        letter-spacing: 2px;
        text-decoration: none;
        transition: background .3s ease;
    }

        .home-services-more a:hover {
            background: #f5f7f4;
        }

@media (max-width: 900px) {
    .home-services {
        padding: 80px 0;
    }

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

@media (max-width: 700px) {
    .home-services {
        padding: 65px 0;
    }

    .home-services-heading {
        margin-bottom: 35px;
    }

    .home-services-title {
        font-size: 30px;
    }

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

    .home-services-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .home-service-content p {
        min-height: 0;
    }

    .home-services-more {
        margin-top: 40px;
    }
}


/* Step 14-C-4B：首頁服務項目文字網格 */

.home-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #d9e0da;
    border-top: 1px solid #d9e0da;
    border-bottom: 1px solid #d9e0da;
}

.home-service-tile {
    position: relative;
    display: block;
    min-height: 220px;
    padding: 35px 32px 50px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: background .3s ease;
}

    .home-service-tile:hover {
        background: #f5f8f5;
    }

.home-service-tile-title {
    margin: 0 0 22px;
    color: #303d35;
    font-size: 23px;
    font-weight: 500;
    letter-spacing: 2px;
    line-height: 1.5;
}

.home-service-tile-description p {
    margin: 0 0 6px;
    color: #77827a;
    font-size: 15px;
    line-height: 1.8;
    letter-spacing: 1px;
}

.home-service-tile-arrow {
    position: absolute;
    right: 30px;
    bottom: 25px;
    color: #8b9b8e;
    font-size: 22px;
    transition: transform .3s ease;
}

.home-service-tile:hover .home-service-tile-arrow {
    transform: translate(4px, -4px);
}

.home-service-tile:focus-visible {
    outline: 2px solid #587765;
    outline-offset: -3px;
}

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

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

    .home-service-tile {
        min-height: 160px;
        padding: 28px 25px 45px;
    }

    .home-service-tile-title {
        font-size: 21px;
    }
}


/* Step 14-C-4B-1：Services 版面優化 */

.home-services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    background: #fff;
    border: 0;
}

.home-service-tile {
    min-height: 175px;
    padding: 26px 25px 38px;
    background: #fff;
    box-sizing: border-box;
    border: 1px solid #e6ebe6;
    border-radius: 12px;
    overflow: hidden;
}

.home-service-tile-title {
    margin: 0 0 17px;
    color: #34443a;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 1.5px;
}

.home-service-tile-description p {
    margin: 0 0 3px;
    color: #7b857e;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: .5px;
}

.home-service-tile-arrow {
    right: 22px;
    bottom: 17px;
    font-size: 19px;
}

/* 平板：每列兩個 */
@media (max-width: 900px) {
    .home-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 手機：每列一個 */
@media (max-width: 700px) {
    .home-services-grid {
        grid-template-columns: 1fr;
    }

    .home-service-tile {
        min-height: 135px;
        padding: 24px 22px 38px;
        border-right: 0;
    }

    .home-service-tile-title {
        font-size: 19px;
        margin-bottom: 12px;
    }
}

/* ========================================
   首頁－卓越實績
   ======================================== */

.home-projects {
    padding: 85px 0 95px;
    background: #f7f9f7;
}

.home-projects-heading {
    margin-bottom: 36px;
    text-align: center;
}

.home-projects-title {
    margin: 12px 0 18px;
    font-size: 36px;
    font-weight: 700;
    color: #263a32;
}

.home-projects-intro {
    margin: 0;
    font-size: 16px;
    line-height: 1.9;
    color: #68776f;
}

.home-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.home-project-card {
    position: relative;
    display: block;
    height: 320px;
    overflow: hidden;
    border-radius: 12px;
    background: #dfe6e0;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(25, 45, 34, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .home-project-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(25, 45, 34, 0.15);
    }

.home-project-card-image {
    position: absolute;
    inset: 0;
}

    .home-project-card-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.home-project-card:hover .home-project-card-image img {
    transform: scale(1.06);
}

.home-project-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.04) 15%, rgba(0, 0, 0, 0.20) 45%, rgba(0, 0, 0, 0.76) 100% );
    pointer-events: none;
}

.home-project-card-content {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px;
    color: #fff;
}

.home-project-card-title {
    margin: 0 0 10px;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}

.home-project-card-subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.home-project-card-arrow {
    position: absolute;
    right: 25px;
    bottom: 27px;
    font-size: 25px;
    color: #fff;
}

.home-projects-more {
    margin-top: 35px;
    text-align: center;
}

    .home-projects-more a {
        display: inline-block;
        padding: 12px 26px;
        border: 1px solid #bdc9c0;
        border-radius: 6px;
        color: #354b3d;
        text-decoration: none;
        transition: background 0.25s ease, color 0.25s ease;
    }

        .home-projects-more a:hover {
            background: #354b3d;
            color: #fff;
        }

/* 平板 */
@media (max-width: 900px) {
    .home-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 手機 */
@media (max-width: 600px) {
    .home-projects {
        padding: 60px 0 70px;
    }

    .home-projects-title {
        font-size: 28px;
    }

    .home-projects-grid {
        grid-template-columns: 1fr;
    }

    .home-project-card {
        height: 280px;
    }

    .home-project-card-content {
        padding: 22px;
    }

    .home-project-card-title {
        font-size: 22px;
    }
}

/* ========================================
   首頁－最新消息
   ======================================== */

.home-news {
    padding: 85px 0 100px;
    background: #ffffff;
}

.home-news-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.home-news-title {
    margin: 12px 0 0;
    font-size: 36px;
    font-weight: 700;
    color: #263a32;
}

.home-news-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #354b3d;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s ease;
}

    .home-news-more:hover {
        color: #8a9e89;
    }

.home-news-list {
    border-top: 1px solid #dce4de;
}

.home-news-item {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 84px;
    padding: 20px 12px;
    border-bottom: 1px solid #dce4de;
    text-decoration: none;
    transition: background 0.25s ease;
}

    .home-news-item:hover {
        background: #f7f9f7;
    }

.home-news-date {
    flex: 0 0 115px;
    color: #7a8980;
    font-size: 14px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.home-news-subject {
    flex: 1;
    min-width: 0;
    color: #34453a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.7;
    transition: color 0.25s ease;
}

.home-news-item:hover .home-news-subject {
    color: #58765e;
}

.home-news-arrow {
    flex: 0 0 auto;
    color: #8b9b90;
    font-size: 20px;
    transition: transform 0.25s ease;
}

.home-news-item:hover .home-news-arrow {
    transform: translateX(5px);
}

/* 平板 */
@media (max-width: 900px) {
    .home-news {
        padding: 70px 0 80px;
    }
}

/* 手機 */
@media (max-width: 600px) {
    .home-news {
        padding: 60px 0 70px;
    }

    .home-news-title {
        font-size: 28px;
    }

    .home-news-heading {
        margin-bottom: 24px;
    }

    .home-news-item {
        gap: 8px;
        flex-wrap: wrap;
        min-height: 0;
        padding: 18px 8px;
    }

    .home-news-date {
        flex: 0 0 100%;
        font-size: 13px;
    }

    .home-news-subject {
        font-size: 15px;
    }

    .home-news-arrow {
        font-size: 18px;
    }
}




/* Step 15-C-1：首頁 Hero 平板／手機視覺調整（不影響桌面版） */
@media (min-width: 701px) and (max-width: 1024px) {
    .home-hero {
        height: min(680px, 72svh);
        min-height: 480px;
    }

    .home-hero-title {
        font-size: clamp(32px, 4.2vw, 46px);
        letter-spacing: 3px;
    }

    .home-hero-description {
        font-size: 14px;
        line-height: 2;
    }
}

@media (max-width: 700px) {
    .home-hero {
        height: 72svh;
        min-height: 500px;
        max-height: 760px;
        align-items: flex-end;
    }

    /* 讓手機上的輪播照片保留較多垂直構圖，避免與標語互相干擾 */
    .home-hero-slide img {
        object-position: center center;
    }

    .home-hero-slides::after {
        background: linear-gradient(to bottom,
            rgba(18, 36, 30, .10) 0%,
            rgba(18, 36, 30, .18) 30%,
            rgba(18, 36, 30, .70) 100%);
    }

    .home-hero-content {
        z-index: 2;
        padding-bottom: 112px;
    }

    .home-hero-eyebrow {
        margin-bottom: 14px;
        font-size: 10px;
        letter-spacing: 2px;
        overflow-wrap: anywhere;
    }

    .home-hero-title {
        font-size: clamp(25px, 6.6vw, 34px);
        line-height: 1.55;
        letter-spacing: 1px;
    }

    .home-hero-description {
        margin-top: 18px;
        font-size: 13px;
        line-height: 1.9;
        letter-spacing: 0;
    }

    .home-hero-line {
        margin-top: 20px;
    }

    .home-hero-controls {
        bottom: 26px;
        gap: 12px;
    }

    .home-hero-arrow {
        width: 42px;
        height: 42px;
    }

    .home-hero-indicator {
        width: 26px;
        height: 4px;
    }
}

@media (max-width: 360px) {
    .home-hero-content {
        padding-bottom: 105px;
    }

    .home-hero-title {
        font-size: 24px;
    }

    .home-hero-description {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-slide {
        transition: none;
    }
}

/* Step 15-C-1B：讓 picture 與原本 img 一樣填滿輪播區域 */
.home-hero-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}


/* Step 15-C-2：首頁「關於我們」響應式優化
   僅調整 900px 以下；桌面版維持原設計。 */
@media (min-width: 701px) and (max-width: 900px) {
    .home-about {
        padding: 76px 0 82px;
    }

    .home-about-inner {
        gap: 38px;
    }

    .home-about-content {
        min-width: 0;
    }

    .home-about-title {
        font-size: clamp(30px, 4vw, 38px);
        line-height: 1.55;
        overflow-wrap: break-word;
    }

    .home-about-description {
        font-size: 15px;
        line-height: 2;
        overflow-wrap: break-word;
    }

    .home-about-image {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 700px) {
    .home-about {
        padding: 58px 0 64px;
    }

    .home-about-inner {
        gap: 32px;
    }

    .home-about-content {
        min-width: 0;
    }

    .home-about .home-section-eyebrow {
        margin-bottom: 14px;
        font-size: 11px;
        letter-spacing: 3px;
    }

    .home-about-title {
        font-size: clamp(25px, 6.5vw, 30px);
        line-height: 1.6;
        letter-spacing: 1.5px;
        overflow-wrap: break-word;
    }

    .home-about .home-section-line {
        margin: 22px 0;
    }

    .home-about-description {
        margin-bottom: 14px;
        font-size: 15px;
        line-height: 2;
        letter-spacing: .3px;
        overflow-wrap: break-word;
    }

    .home-about-link {
        margin-top: 14px;
        min-height: 44px;
        align-items: center;
        gap: 18px;
        font-size: 14px;
    }

    .home-about-image {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 700px) and (orientation: landscape) and (max-height: 500px) {
    .home-about {
        padding: 44px 0 48px;
    }

    .home-about-inner {
        gap: 26px;
    }

    .home-about-image {
        aspect-ratio: 16 / 9;
    }
}


/* Step 15-C-3：首頁「專業服務」響應式優化
   只調整 Services 區塊，保留桌面版原有配置。 */
@media (min-width: 701px) and (max-width: 900px) {
    .home-services {
        padding: 72px 0 78px;
    }

    .home-services-heading {
        margin-bottom: 36px;
    }

    .home-services-grid {
        gap: 16px;
    }

    .home-service-tile {
        min-height: 155px;
        padding: 24px 23px 42px;
    }

    .home-service-tile-title {
        font-size: 23px;
    }
}

@media (max-width: 700px) {
    .home-services {
        padding: 48px 0 54px;
    }

    .home-services-heading {
        margin-bottom: 26px;
    }

    .home-services .home-section-eyebrow {
        margin-bottom: 10px;
        font-size: 11px;
        letter-spacing: 3px;
    }

    .home-services-title {
        font-size: 27px;
        letter-spacing: 3px;
        line-height: 1.45;
    }

    .home-services-intro {
        margin-top: 12px;
        font-size: 14px;
        line-height: 1.85;
        letter-spacing: .3px;
    }

    .home-services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-service-tile {
        min-width: 0;
        min-height: 0;
        padding: 19px 48px 22px 19px;
        border: 1px solid #e6ebe6;
        border-radius: 10px;
    }

    .home-service-tile-title {
        margin-bottom: 9px;
        font-size: 20px;
        line-height: 1.45;
        letter-spacing: 1px;
        overflow-wrap: anywhere;
    }

    .home-service-tile-description p {
        font-size: 14px;
        line-height: 1.7;
        letter-spacing: .2px;
        overflow-wrap: anywhere;
    }

    .home-service-tile-arrow {
        right: 17px;
        bottom: 15px;
        font-size: 19px;
    }

    .home-services-more {
        margin-top: 28px;
    }

    .home-services-more a {
        min-height: 44px;
        padding: 10px 26px;
    }
}

/* 手機橫向：兩欄並排，減少捲動距離。 */
@media (max-width: 700px) and (orientation: landscape) {
    .home-services {
        padding: 36px 0 42px;
    }

    .home-services-heading {
        margin-bottom: 22px;
    }

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

    .home-service-tile {
        padding: 17px 36px 20px 17px;
    }

    .home-service-tile-title {
        font-size: 18px;
    }
}


/* Step 15-C-3B：手機橫向（含 iPhone 16 Pro Max）標題區緊湊化。
   以短視窗高度辨識手機橫向，避免影響一般平板及桌面版。 */
@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
    .home-services {
        padding-top: 30px;
        padding-bottom: 42px;
    }

    .home-services-heading {
        margin-bottom: 22px;
    }

    .home-services .home-section-eyebrow {
        margin-bottom: 8px;
        font-size: 11px;
        letter-spacing: 3px;
    }

    .home-services-title {
        font-size: 27px;
        line-height: 1.4;
        letter-spacing: 3px;
    }

    .home-services-intro {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.7;
        letter-spacing: .3px;
    }

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


/* Step 15-C-4：首頁「卓越實績」響應式優化；僅作用於 .home-projects */
/* 平板直向及中等寬度視窗 */
@media (min-width: 701px) and (max-width: 900px) and (min-height: 501px) {
    .home-projects { padding: 68px 0 76px; }
    .home-projects-heading { margin-bottom: 28px; }
    .home-projects .home-section-eyebrow { margin-bottom: 12px; }
    .home-projects-title { margin: 8px 0 12px; font-size: 31px; }
    .home-project-card { height: 290px; }
    .home-project-card-content { padding: 24px 48px 24px 24px; }
    .home-project-card-title { font-size: 23px; }
}

/* 手機直向：縮小留白，實績卡片採單欄 */
@media (max-width: 700px) and (orientation: portrait) {
    .home-projects { padding: 42px 0 52px; }
    .home-projects-heading { margin-bottom: 22px; }
    .home-projects .home-section-eyebrow { margin-bottom: 8px; font-size: 11px; letter-spacing: 3px; }
    .home-projects-title { margin: 6px 0 10px; font-size: 27px; line-height: 1.4; }
    .home-projects-intro { font-size: 14px; line-height: 1.7; }
    .home-projects-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .home-project-card { height: clamp(230px, 66vw, 300px); }
    .home-project-card-content { padding: 18px 52px 20px 20px; }
    .home-project-card-title { margin-bottom: 6px; font-size: 21px; }
    .home-project-card-subtitle { font-size: 13px; line-height: 1.6; }
    .home-project-card-arrow { right: 18px; bottom: 18px; }
    .home-projects-more { margin-top: 24px; }
}

/* 手機橫向：包含較寬的 iPhone，並以高度限制避免影響一般平板 */
@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
    .home-projects { padding: 28px 0 42px; }
    .home-projects-heading { margin-bottom: 18px; }
    .home-projects .home-section-eyebrow { margin-bottom: 7px; font-size: 11px; letter-spacing: 3px; }
    .home-projects-title { margin: 5px 0 8px; font-size: 27px; line-height: 1.35; }
    .home-projects-intro { font-size: 14px; line-height: 1.6; }
    .home-projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .home-project-card { height: 204px; }
    .home-project-card-content { padding: 18px 45px 18px 18px; }
    .home-project-card-title { margin-bottom: 6px; font-size: 20px; }
    .home-project-card-subtitle { font-size: 13px; line-height: 1.55; }
    .home-project-card-arrow { right: 16px; bottom: 16px; }
    .home-projects-more { margin-top: 22px; }
}


/* Step 15-C-4A：卓越實績標題區比照 AboutUs.aspx 的緊湊間距。
   僅調整標題區，保留 Step 15-C-4 已完成的卡片響應式設定。 */
@media (max-width: 1024px) {
    .home-projects { padding-top: 24px; }
    .home-projects-heading { margin-bottom: 26px; }
    .home-projects .home-section-eyebrow { margin-bottom: 8px; }
    .home-projects-title { margin-top: 0; margin-bottom: 8px; font-size: 29px; line-height: 1.35; }
    .home-projects-intro { line-height: 1.65; }
}

@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
    .home-projects { padding-top: 14px; }
    .home-projects-heading { margin-bottom: 16px; }
    .home-projects .home-section-eyebrow { margin-bottom: 4px; }
    .home-projects-title { margin-top: 0; margin-bottom: 4px; font-size: 26px; }
}

/* Step 15-C-4D: background images do not display a broken-image icon when missing. */
.home-project-card-image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}
.home-project-card:hover .home-project-card-image {
    transform: scale(1.06);
}


/* Step 15-C-5：首頁「最新消息」響應式優化（僅作用於 .home-news） */
/* iPad 與手機：標題區比照 AboutUs.aspx 的緊湊間距 */
@media (max-width: 1024px) {
    .home-news { padding-top: 24px; padding-bottom: 56px; }
    .home-news-heading { margin-bottom: 26px; align-items: flex-end; }
    .home-news .home-section-eyebrow { margin-bottom: 8px; }
    .home-news-title { margin-top: 0; font-size: 29px; line-height: 1.35; }
    .home-news-item { gap: 20px; padding: 18px 8px; min-height: 72px; }
}

/* 手機直向：日期在上，標題在下；箭頭保持在右側 */
@media (max-width: 700px) and (orientation: portrait) {
    .home-news { padding-bottom: 44px; }
    .home-news-heading { gap: 12px; margin-bottom: 22px; }
    .home-news .home-section-eyebrow { font-size: 11px; letter-spacing: 3px; }
    .home-news-more { font-size: 13px; }
    .home-news-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 5px;
        padding: 15px 4px;
        min-height: 0;
    }
    .home-news-date { grid-column: 1; grid-row: 1; font-size: 13px; }
    .home-news-subject { grid-column: 1; grid-row: 2; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
    .home-news-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 18px; }
}

/* 手機橫向：沿用已驗收的短視窗條件，保持日期／標題同列 */
@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
    .home-news { padding-top: 14px; padding-bottom: 36px; }
    .home-news-heading { margin-bottom: 16px; }
    .home-news .home-section-eyebrow { margin-bottom: 4px; font-size: 11px; letter-spacing: 3px; }
    .home-news-title { margin-top: 0; font-size: 26px; }
    .home-news-item { display: flex; flex-wrap: nowrap; gap: 16px; min-height: 0; padding: 13px 8px; }
    .home-news-date { flex: 0 0 100px; font-size: 13px; }
    .home-news-subject { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
    .home-news-arrow { flex: 0 0 auto; font-size: 18px; }
}
