:root {
    --gmp-warm: #FAF9F6;
    --gmp-slate: #64748B;
}

/* Hero */
.work-hero {
    padding: 170px 0 70px;
    background:
        radial-gradient(circle at 82% 15%, rgba(0, 125, 65, 0.08) 0%, transparent 42%),
        radial-gradient(circle at 8% 85%, rgba(0, 255, 133, 0.06) 0%, transparent 32%),
        var(--gmp-warm);
}

.work-hero h1 {
    font-size: clamp(2.3rem, 4.5vw, 3.4rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--gmp-dark-deep);
}

.text-gradient {
    background: linear-gradient(135deg, var(--gmp-primary) 0%, #00B35C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form card */
.form-shell {
    margin-top: -40px;
    position: relative;
    z-index: 5;
}

.form-card {
    background: #fff;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.07);
    padding: 46px 48px;
}

.form-section + .form-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #EEF2F6;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.section-head .num {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: rgba(0, 125, 65, 0.1);
    color: var(--gmp-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.section-head h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    color: var(--gmp-dark-deep);
}

.form-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 8px;
}

.req::after {
    content: ' *';
    color: var(--gmp-secondary);
    font-weight: 800;
}

.form-control, .form-select {
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.92rem;
    color: var(--gmp-dark-deep);
    background-color: #fff;
    transition: all 0.25s ease;
}

.form-control::placeholder { color: #94A3B8; }

.form-control:focus, .form-select:focus {
    border-color: var(--gmp-primary);
    box-shadow: 0 0 0 4px rgba(0, 125, 65, 0.1);
    outline: none;
}

/* 必填未填 / 格式錯誤：顯示紅色（使用者互動或送出後才判定，避免一載入就整片紅） */
.form-control:user-invalid,
.form-select:user-invalid {
    border-color: var(--gmp-secondary, #C1272D);
}

.form-control:user-invalid:focus,
.form-select:user-invalid:focus {
    border-color: var(--gmp-secondary, #C1272D);
    box-shadow: 0 0 0 4px rgba(193, 39, 45, 0.12);
}

.form-check-input:user-invalid {
    border-color: var(--gmp-secondary, #C1272D);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.12);
}

/* 相容不支援 :user-invalid 的舊瀏覽器：聚焦到未填必填欄時，焦點光暈用紅色而非綠色 */
.form-control:required:invalid:focus,
.form-select:required:invalid:focus {
    border-color: var(--gmp-secondary, #C1272D);
    box-shadow: 0 0 0 4px rgba(193, 39, 45, 0.12);
}

/* 選項卡群組（專案類型 / 功能需求）未選時的紅色提示 */
.opt-hint {
    display: none;
    margin: 10px 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gmp-secondary, #C1272D);
}

.opt-grid.is-invalid + .opt-hint {
    display: block;
}

.form-select:user-invalid + .opt-hint {
    display: block;
}

.opt-grid.is-invalid .opt-card {
    border-color: var(--gmp-secondary, #C1272D);
}

/* Selectable chip cards (radio / checkbox) */
.opt-grid {
    display: grid;
    gap: 12px;
}

.opt-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.opt-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 767px) {
    .opt-grid.cols-3, .opt-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.opt-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 15px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 0.9rem;
    color: #334155;
    background: #fff;
}

.opt-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.opt-card .ico {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: #F1F5F9;
    color: var(--gmp-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.opt-card .opt-price {
    margin-left: auto;
    padding-left: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gmp-slate);
    white-space: nowrap;
}

.opt-card:has(input:checked) .opt-price {
    color: var(--gmp-primary);
}

.opt-card:hover {
    border-color: rgba(0, 125, 65, 0.45);
}

.opt-card:has(input:checked) {
    border-color: var(--gmp-primary);
    background: rgba(0, 125, 65, 0.05);
    box-shadow: 0 6px 16px rgba(0, 125, 65, 0.1);
}

.opt-card:has(input:checked) .ico {
    background: var(--gmp-primary);
    color: #fff;
}

.opt-card .check {
    margin-left: auto;
    color: var(--gmp-primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.opt-card:has(input:checked) .check { opacity: 1; }

.btn-submit {
    background: var(--gmp-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 15px 35px rgba(0, 125, 65, 0.3);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-submit::after {
    content: "\f1d8"; /* fa-paper-plane */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 10px;
}

.btn-submit:hover {
    background: #009D51;
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 125, 65, 0.4);
    color: #fff;
}

.success-box {
    background: rgba(0, 125, 65, 0.06);
    border: 1.5px solid rgba(0, 125, 65, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

/* 服務方案 */
.web-requirement-page .web-plan-section {
    background:
        radial-gradient(circle at 88% 8%, rgba(0, 125, 65, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 6% 92%, rgba(27, 127, 200, 0.06) 0%, transparent 40%),
        var(--gmp-warm);
}

.web-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.web-plan-card {
    --plan-accent: var(--gmp-primary);
    --plan-accent-soft: rgba(0, 125, 65, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 32px 26px 30px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.web-plan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--plan-accent);
}

.web-plan-card:hover {
    transform: translateY(-6px);
    border-color: var(--plan-accent);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.1);
}

.web-plan-card--green  { --plan-accent: #21A24A; --plan-accent-soft: rgba(33, 162, 74, 0.08); }
.web-plan-card--teal   { --plan-accent: #12A0A8; --plan-accent-soft: rgba(18, 160, 168, 0.08); }
.web-plan-card--blue   { --plan-accent: #1B7FC8; --plan-accent-soft: rgba(27, 127, 200, 0.08); }
.web-plan-card--indigo { --plan-accent: #5560C2; --plan-accent-soft: rgba(85, 96, 194, 0.08); }

.web-plan-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.web-plan-card__no {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    color: var(--plan-accent);
}

.web-plan-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--plan-accent);
    color: #fff;
    font-size: 1.2rem;
}

.web-plan-card h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--plan-accent);
}

.web-plan-card__price {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin: 0 0 14px;
    color: var(--gmp-dark-deep);
}

.web-plan-card__price .cur {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.web-plan-card__price .num {
    font-family: 'Outfit', sans-serif;
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
}

.web-plan-card__price .unit {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gmp-slate);
}

.web-plan-card__labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.web-plan-card__badge {
    padding: 6px 14px;
    border-radius: 50px;
    background: var(--plan-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.web-plan-card__tag {
    padding: 5px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    color: var(--gmp-slate);
    font-size: 0.75rem;
    font-weight: 700;
}

.web-plan-feature {
    margin: 0 0 18px;
    padding: 18px 0 0;
    border-top: 1px solid #EEF2F6;
    list-style: none;
}

.web-plan-feature li {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.web-plan-feature li:last-child {
    margin-bottom: 0;
}

.web-plan-feature li i {
    flex: 0 0 20px;
    margin-top: 3px;
    color: var(--plan-accent);
    font-size: 0.95rem;
    text-align: center;
}

.web-plan-feature li strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--gmp-dark-deep);
}

.web-plan-feature li span {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--gmp-slate);
}

.web-plan-card__target {
    margin-top: auto;
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--plan-accent-soft);
}

.web-plan-card__target i {
    flex: 0 0 20px;
    margin-top: 3px;
    color: var(--plan-accent);
    text-align: center;
}

.web-plan-card__target strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gmp-dark-deep);
}

.web-plan-card__target span {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--gmp-slate);
}

.web-plan-card__slogan {
    margin: 18px 0 20px;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.6;
    text-align: center;
    color: var(--plan-accent);
}

.web-plan-card__cta {
    padding: 12px 20px;
    border-radius: 50px;
    background: var(--plan-accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.web-plan-card__cta:hover {
    color: #fff;
    filter: brightness(0.92);
    transform: translateY(-2px);
}

.web-plan-note {
    margin: 2.5rem auto 0;
    max-width: 760px;
    font-size: 0.88rem;
    line-height: 1.7;
    text-align: center;
    color: var(--gmp-slate);
}

@media (max-width: 1199.98px) {
    .web-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .web-plan-grid {
        grid-template-columns: 1fr;
    }
}
