/* ==========================================================================
   設計模式內容頁共用樣式 (design-retirement / design-accessible /
   design-smarthome / design-green)
   ========================================================================== */

/* ---------- 全幅 Hero ---------- */
.dp-hero {
    position: relative;
    /* .main padding 30 + .main-cont margin 30 + 20 = 80 = header 高度,讓 hero 緊貼 header 下緣 */
    margin: 20px -30px 0;
    height: 62vh;
    min-height: 460px;
    background-size: cover;
    background-position: center center;
    overflow: hidden;
}

.dp-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, .35) 100%);
}

.dp-hero-ghost {
    position: absolute;
    right: -10px;
    bottom: -25px;
    font-size: 150px;
    line-height: 1;
    font-weight: bold;
    letter-spacing: 5px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .22);
    white-space: nowrap;
    pointer-events: none;
}

.dp-hero-inner {
    position: absolute;
    left: 8%;
    bottom: 70px;
    color: #fff;
}

.dp-hero-crumb {
    font-size: 12px;
    letter-spacing: 2px;
    opacity: .85;
    margin-bottom: 18px;
}

.dp-hero-crumb a { color: #fff; }
.dp-hero-crumb a:hover { color: #e61e19; }
.dp-hero-crumb i { margin: 0 8px; font-size: 10px; opacity: .6; }

.dp-hero-title {
    font-size: 44px;
    font-weight: normal;
    letter-spacing: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
}

.dp-hero-title::after {
    content: "";
    display: block;
    width: 70px;
    height: 3px;
    background: #e61e19;
    margin: 22px 0;
}

.dp-hero-sub {
    font-size: 15px;
    letter-spacing: 4px;
    opacity: .9;
}

/* hero 底部錨點導覽列 */
.dp-hero-nav {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, .15);
    text-align: center;
    z-index: 2;
}

.dp-hero-nav a {
    display: inline-block;
    color: #fff;
    font-size: 13px;
    letter-spacing: 3px;
    padding: 14px 26px;
    position: relative;
    transition: color .3s;
}

.dp-hero-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #e61e19;
    transform: translateX(-50%);
    transition: width .3s;
}

.dp-hero-nav a:hover { color: #e61e19; }
.dp-hero-nav a:hover::after { width: 60%; }

/* ---------- 內文容器 ---------- */
.dp-wrap {
    max-width: 1100px;
    margin: 0 auto;
    line-height: 2;
    font-size: 15px;
    color: #555;
}

.dp-wrap p { margin-bottom: 22px; text-align: justify; }

/* ---------- 序言 + 數據卡 ---------- */
.dp-intro {
    display: flex;
    gap: 50px;
    align-items: center;
    padding: 80px 0 40px;
}

.dp-intro-text { flex: 1.4; position: relative; padding-left: 28px; }

.dp-intro-text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: linear-gradient(#e61e19, rgba(230, 30, 25, .15));
}

.dp-intro-text .dp-lead {
    font-size: 17px;
    color: #333;
    letter-spacing: 1px;
}

.dp-stats { flex: 1; display: flex; flex-direction: column; gap: 18px; }

.dp-stat {
    background: #fff;
    border: 1px solid #eee;
    border-left: 4px solid #e61e19;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    padding: 18px 26px;
    transition: transform .35s, box-shadow .35s;
}

.dp-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .1);
}

.dp-stat-num {
    font-size: 34px;
    color: #e61e19;
    font-weight: bold;
    line-height: 1.2;
}

.dp-stat-num span { font-size: 16px; color: #999; font-weight: normal; margin-left: 4px; }

.dp-stat-label { font-size: 13px; color: #666; letter-spacing: 1px; }

/* ---------- 章節標題 (幽靈數字) ---------- */
.dp-sec {
    position: relative;
    margin: 90px 0 40px;
    padding-top: 30px;
}

.dp-sec-num {
    position: absolute;
    top: -10px;
    left: -8px;
    font-size: 110px;
    line-height: 1;
    font-weight: bold;
    color: transparent;
    -webkit-text-stroke: 1px rgba(230, 30, 25, .25);
    pointer-events: none;
}

.dp-sec-en {
    font-size: 12px;
    letter-spacing: 4px;
    color: #e61e19;
    text-transform: uppercase;
    margin-bottom: 6px;
    position: relative;
}

.dp-sec-title {
    position: relative;
    font-size: 28px;
    color: #222;
    font-weight: normal;
    letter-spacing: 4px;
}

.dp-sec-title::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    background: #e61e19;
    margin-top: 16px;
}

/* ---------- 交錯圖文 ---------- */
.dp-feature {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 50px 0 70px;
}

.dp-feature-img {
    flex: 1.15;
    position: relative;
}

.dp-feature-img::before {
    content: "";
    position: absolute;
    top: -16px;
    left: -16px;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(230, 30, 25, .35);
    z-index: 0;
    transition: top .4s, left .4s;
}

.dp-feature.dp-reverse .dp-feature-img::before { left: auto; right: -16px; }

.dp-feature-img:hover::before { top: -8px; left: -8px; }
.dp-feature.dp-reverse .dp-feature-img:hover::before { right: -8px; }

.dp-feature-img .dp-imgbox {
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
}

.dp-feature-img img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform .8s ease;
}

.dp-feature-img:hover img { transform: scale(1.06); }

.dp-imgcap {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    font-size: 11px;
    color: rgba(255, 255, 255, .85);
    background: rgba(0, 0, 0, .35);
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 1px;
}

.dp-feature-text {
    flex: 1;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .1);
    padding: 45px 40px;
    margin-left: -60px;
    position: relative;
    z-index: 2;
}

.dp-feature.dp-reverse { flex-direction: row-reverse; }
.dp-feature.dp-reverse .dp-feature-text { margin-left: 0; margin-right: -60px; }

.dp-feature-text h4 {
    font-size: 19px;
    color: #222;
    letter-spacing: 2px;
    margin-bottom: 6px;
    font-weight: bold;
}

.dp-feature-text .dp-feature-en {
    font-size: 11px;
    letter-spacing: 3px;
    color: #e61e19;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.dp-feature-text p { font-size: 14px; margin-bottom: 14px; }

/* ---------- 勾選清單卡片化 ---------- */
.dp-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 10px 0 20px;
    padding: 0;
    list-style: none;
}

.dp-checks li {
    flex: 0 0 calc(50% - 8px);
    box-sizing: border-box;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    padding: 16px 18px 16px 52px;
    position: relative;
    font-size: 14px;
    line-height: 1.75;
    transition: background .3s, border-color .3s, transform .3s;
}

.dp-checks li:hover {
    background: #fff;
    border-color: rgba(230, 30, 25, .35);
    transform: translateY(-3px);
}

.dp-checks li::before {
    content: "\f00c";
    font-family: FontAwesome;
    position: absolute;
    left: 16px;
    top: 18px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    background: #e61e19;
    color: #fff;
    font-size: 12px;
}

.dp-checks li strong { color: #222; }

/* 窄版單欄清單 (圖文卡內使用) */
.dp-feature-text .dp-checks li { flex: 0 0 100%; }

/* ---------- 標章 / 徽章卡片 ---------- */
.dp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 35px 0;
}

.dp-badge {
    flex: 1 1 calc(25% - 15px);
    min-width: 200px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #eee;
    border-top: 3px solid #e61e19;
    text-align: center;
    padding: 35px 22px 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
    transition: transform .35s, box-shadow .35s;
    position: relative;
    overflow: hidden;
}

.dp-badge::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .55), transparent);
    transition: left .7s;
}

.dp-badge:hover { transform: translateY(-8px); box-shadow: 0 20px 45px rgba(0, 0, 0, .12); }
.dp-badge:hover::after { left: 130%; }

.dp-badge-icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(230, 30, 25, .08);
    color: #e61e19;
    font-size: 26px;
    transition: background .35s, color .35s, transform .35s;
}

.dp-badge:hover .dp-badge-icon {
    background: #e61e19;
    color: #fff;
    transform: rotateY(180deg);
}

.dp-badge h5 {
    font-size: 16px;
    color: #222;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: bold;
}

.dp-badge p { font-size: 13px; color: #777; line-height: 1.8; margin: 0; text-align: center; }

/* ---------- 表格 ---------- */
.dp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .08);
    background: #fff;
}

.dp-table th {
    background: #1d1d1d;
    color: #fff;
    padding: 16px 14px;
    text-align: left;
    font-weight: normal;
    font-size: 15px;
    letter-spacing: 2px;
    border-bottom: 3px solid #e61e19;
}

.dp-table td {
    border-bottom: 1px solid #f0f0f0;
    padding: 18px 14px;
    vertical-align: top;
    font-size: 14px;
}

.dp-table tr:hover td { background: #fcf9f9; }

.dp-table .dp-td-strong { color: #222; font-weight: bold; letter-spacing: 1px; }

/* ---------- 全幅引言帶 ---------- */
.dp-quote {
    position: relative;
    margin: 90px -30px;
    padding: 110px 30px;
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
}

.dp-quote::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(20, 18, 18, .62);
}

.dp-quote-inner { position: relative; max-width: 760px; margin: 0 auto; }

.dp-quote-inner i {
    font-size: 30px;
    color: #e61e19;
    margin-bottom: 22px;
    display: inline-block;
}

.dp-quote-text {
    font-size: 24px;
    letter-spacing: 4px;
    line-height: 1.9;
    font-weight: 300;
}

.dp-quote-sub {
    margin-top: 20px;
    font-size: 13px;
    letter-spacing: 3px;
    opacity: .75;
}

/* ---------- 圖庫帶 ---------- */
.dp-gallery {
    display: flex;
    gap: 18px;
    margin: 40px 0 20px;
}

.dp-gallery-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 300px;
}

.dp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s;
}

.dp-gallery-item:hover img { transform: scale(1.1); }

.dp-gallery-cap {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 30px 18px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
    color: #fff;
    font-size: 13px;
    letter-spacing: 2px;
    transform: translateY(8px);
    opacity: 0;
    transition: transform .45s, opacity .45s;
}

.dp-gallery-item:hover .dp-gallery-cap { transform: translateY(0); opacity: 1; }

/* ---------- 設計師建議卡 ---------- */
.dp-tip {
    position: relative;
    background: linear-gradient(135deg, #fdf7f7, #fff);
    border: 1px solid rgba(230, 30, 25, .18);
    padding: 40px 40px 30px 96px;
    margin: 50px 0;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .07);
}

.dp-tip::before {
    content: "\f10d";
    font-family: FontAwesome;
    position: absolute;
    left: 34px;
    top: 38px;
    font-size: 30px;
    color: rgba(230, 30, 25, .8);
}

.dp-tip-title {
    font-size: 17px;
    color: #222;
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 16px;
}

.dp-tip ul { list-style: none; margin: 0; padding: 0; }

.dp-tip li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 14px;
}

.dp-tip li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    background: #e61e19;
    transform: rotate(45deg);
}

/* ---------- CTA ---------- */
.dp-cta {
    position: relative;
    margin: 90px -30px -30px;
    padding: 120px 30px;
    background-size: cover;
    background-position: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.dp-cta::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(rgba(15, 14, 14, .68), rgba(15, 14, 14, .68));
}

.dp-cta-inner { position: relative; }

.dp-cta-title {
    font-size: 30px;
    letter-spacing: 6px;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 14px;
}

.dp-cta-sub {
    font-size: 14px;
    letter-spacing: 3px;
    opacity: .85;
    margin-bottom: 38px;
}

.dp-cta-btn {
    display: inline-block;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .8);
    padding: 14px 56px;
    letter-spacing: 4px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    transition: color .4s, border-color .4s;
    z-index: 1;
}

.dp-cta-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #e61e19;
    transition: left .4s;
    z-index: -1;
}

.dp-cta-btn:hover { border-color: #e61e19; color: #fff; }
.dp-cta-btn:hover::before { left: 0; }

/* ---------- 相關頁面連結卡 ---------- */
.dp-related {
    display: flex;
    gap: 18px;
    margin: 60px 0 30px;
}

.dp-related-item {
    flex: 1;
    position: relative;
    height: 150px;
    overflow: hidden;
    display: block;
}

.dp-related-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s;
    display: block;
}

.dp-related-item::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, .45);
    transition: background .4s;
}

.dp-related-item:hover::after { background: rgba(230, 30, 25, .55); }
.dp-related-item:hover img { transform: scale(1.08); }

.dp-related-label {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    text-align: center;
    color: #fff;
    letter-spacing: 4px;
    font-size: 16px;
    z-index: 2;
}

.dp-related-label .en {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    opacity: .8;
    margin-top: 6px;
}

/* ---------- 進場動畫 (搭配 main.js 的 show-item / show-now) ---------- */
.dp-rise { transform: translateY(40px); }
.dp-rise.show-now { transform: translateY(0); }

/* ==========================================================================
   響應式
   ========================================================================== */
@media screen and (max-width: 1100px) {
    .dp-hero { background-attachment: scroll; height: 50vh; min-height: 380px; }
    .dp-quote, .dp-cta { background-attachment: scroll; }
    .dp-hero-title { font-size: 32px; letter-spacing: 8px; }
    .dp-hero-ghost { font-size: 90px; }
    .dp-hero-nav a { padding: 12px 14px; font-size: 12px; letter-spacing: 2px; }

    .dp-intro { flex-direction: column; gap: 30px; padding-top: 50px; }
    .dp-stats { width: 100%; flex-direction: row; }
    .dp-stat { flex: 1; padding: 14px 16px; }
    .dp-stat-num { font-size: 26px; }

    .dp-feature { flex-direction: column; margin: 40px 0 60px; }
    .dp-feature.dp-reverse { flex-direction: column; }
    .dp-feature-img { width: 100%; }
    .dp-feature-img img { height: 320px; }
    .dp-feature-text,
    .dp-feature.dp-reverse .dp-feature-text {
        margin: -50px 20px 0;
        padding: 32px 26px;
    }

    .dp-badge { flex: 1 1 calc(50% - 10px); }
    .dp-gallery { flex-wrap: wrap; }
    .dp-gallery-item { flex: 1 1 calc(50% - 9px); height: 240px; }
    .dp-gallery-cap { transform: translateY(0); opacity: 1; }
    .dp-related { flex-wrap: wrap; }
    .dp-related-item { flex: 1 1 calc(50% - 9px); }
    .dp-sec-num { font-size: 80px; }
    .dp-sec-title { font-size: 23px; }
}

@media screen and (max-width: 640px) {
    /* .main padding 10 + .main-cont margin 10 + 40 = 60 = 手機版 header 高度 */
    .dp-hero { margin: 40px -10px 0; min-height: 320px; }
    .dp-quote { margin: 60px -10px; padding: 70px 20px; }
    .dp-cta { margin: 60px -10px -10px; padding: 80px 20px; }
    .dp-hero-inner { left: 20px; right: 20px; bottom: 60px; }
    .dp-hero-title { font-size: 26px; letter-spacing: 5px; }
    .dp-hero-sub { font-size: 12px; letter-spacing: 2px; }
    .dp-hero-nav { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .dp-hero-nav a { padding: 11px 12px; font-size: 11px; }

    .dp-stats { flex-direction: column; }
    .dp-checks li { flex: 0 0 100%; }
    .dp-badge { flex: 1 1 100%; }
    .dp-gallery-item { flex: 1 1 100%; height: 220px; }
    .dp-feature-text, .dp-feature.dp-reverse .dp-feature-text { margin: -40px 10px 0; }
    .dp-feature-img img { height: 240px; }
    .dp-quote-text { font-size: 18px; letter-spacing: 2px; }
    .dp-cta-title { font-size: 22px; letter-spacing: 3px; }
    .dp-tip { padding: 70px 24px 24px; }
    .dp-tip::before { left: 24px; top: 24px; }
    .dp-sec { margin: 60px 0 30px; }

    /* 表格直欄化 */
    .dp-table, .dp-table tbody, .dp-table tr, .dp-table td { display: block; }
    .dp-table thead { display: none; }
    .dp-table tr { margin-bottom: 16px; border: 1px solid #eee; }
    .dp-table td { padding: 12px 14px; }
    .dp-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        color: #e61e19;
        font-size: 12px;
        letter-spacing: 2px;
        margin-bottom: 6px;
    }
}
