/* 頂部免費服務介紹區域 - 左圖右文佈局 */
.free-service-hero {
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: #fff;
    box-shadow: 0 10px 40px rgba(104, 58, 183, 0.15);
    position: relative;
}

/* 从大卡片中下连接到免费服务列表的线 */
.free-service-hero::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4.5rem;
    transform: translateX(-50%);
    width: 2px;
    height: 4.5rem;
    background: linear-gradient(to bottom, hsl(263, 70%, 48%), rgba(104, 58, 183, 0.3));
    z-index: 1;
}

/* 左側圖片區域 */
.hero-image-container {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 15px;
    /* 建議圖片尺寸：500x400px 或 600x480px (5:4 比例) */
}

/* 右側內容區域 */
.hero-content {
    padding-left: 2rem;
}

.free-service-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: hsl(263, 70%, 48%);
    margin-bottom: 1rem;
}

.free-service-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
    max-width: none;
}

/* 功能項目 - 橫向排列 */
.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    min-height: 60px; /* 確保所有項目有相同的最小高度 */
}

.feature-icon-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, hsl(263, 70%, 48%), hsl(263, 60%, 55%));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.feature-text h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.feature-text p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.4;
}

/* 服務列表小標題 */
.section-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    position: relative;
}

/* 免费服务列表标题的连接点 */
#services-list .section-subtitle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -1.5rem;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: hsl(263, 70%, 48%);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(104, 58, 183, 0.3);
}

/* 只針對免費服務頁面的特殊樣式 */
.services .btn--base {
    background: hsl(263, 70%, 48%);
    border-color: hsl(263, 70%, 48%);
}

.services .btn--base:hover {
    background: white;
    color: hsl(263, 70%, 48%);
    border-color: hsl(263, 70%, 48%);
    transform: translateY(-2px);
}

.services .form--control:focus {
    border-color: hsl(263, 70%, 48%);
    box-shadow: 0 0 0 0.25rem rgba(104, 58, 183, 0.1);
}

/* 修復免費服務表格對齊問題 - 設置固定列寬 */
.services .custom-table {
    table-layout: fixed;
    width: 100%;
}

.services .custom-table th:nth-child(1),
.services .custom-table td:nth-child(1) {
    width: 8%;
    text-align: center;
}

.services .custom-table th:nth-child(2),
.services .custom-table td:nth-child(2) {
    width: 28%;
    text-align: left;
}

.services .custom-table th:nth-child(3),
.services .custom-table td:nth-child(3) {
    width: 26%;
    text-align: center;
}

.services .custom-table th:nth-child(4),
.services .custom-table td:nth-child(4) {
    width: 18%;
    text-align: center;
}

.services .custom-table th:nth-child(5),
.services .custom-table td:nth-child(5) {
    width: 20%;
    text-align: center;
}

/* 確保所有表格單元格垂直居中 */
.services .custom-table tbody tr td {
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 優化服務名稱列的顯示 */
.services .custom-table td:nth-child(2) {
    line-height: 1.4;
    padding: 12px 8px;
}

/* 優化價格列的顯示 */
.services .custom-table td:nth-child(3) {
    line-height: 1.3;
    padding: 12px 8px;
}

/* 優化Action列的顯示 */
.services .custom-table td:nth-child(5) {
    padding: 12px 8px;
}

.services .custom-table td:nth-child(5) a {
    font-size: 0.9em;
    white-space: nowrap;
}

/* 響應式設計 */
@media (max-width: 991px) {
    /* 解除固定列寬與固定布局，防止擠壓 */
    .services .custom-table { table-layout: auto; }
    .services .custom-table th,
    .services .custom-table td { width: auto !important; }
    .services .custom-table td a { white-space: normal; }

    .hero-content { padding-left: 0; margin-top: 2rem; }
    .hero-image-container { margin-bottom: 0; }
}

@media (max-width: 768px) {
    .free-service-hero { padding: 2rem 1rem; }
    .free-service-title { font-size: 2rem; text-align: center; }
    .free-service-subtitle { font-size: 1.1rem; text-align: center; }
    .hero-content { text-align: center; }
    .feature-item { justify-content: flex-start; text-align: left; margin-bottom: 1.2rem; min-height: 55px; }
    .feature-icon-small { margin-right: 0.8rem; }
    .hero-image { max-width: 400px; }
    .promo-badge { left: 10px; right: auto; top: 10px; }
}

@media (max-width: 576px) {
    .free-service-title { font-size: 1.8rem; }
    .feature-item { min-height: 50px; margin-bottom: 1rem; }
    .feature-icon-small { width: 40px; height: 40px; font-size: 1rem; margin-right: 0.7rem; }
    .feature-text h6 { font-size: 1rem; margin-bottom: 0.3rem; }
    .feature-text p { font-size: 0.85rem; line-height: 1.3; }
    .section-subtitle { font-size: 1.5rem; }
}

/* 右上角「現時活動 先到先得！」徽章 */
.promo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(104, 58, 183, 0.08);
    color: #198754; /* green text */
    border: 1px solid rgba(104, 58, 183, 0.25);
    border-radius: 999px;
    padding: 10px 20px; /* reduce ~1/3 */
    font-weight: 700;
    font-size: 1.3rem; /* reduce ~1/3 */
    backdrop-filter: blur(2px);
    transform: rotate(-10deg);
    transform-origin: right top;
}

.promo-badge__dot {
    width: 11px; /* reduce ~1/3 */
    height: 11px;
    background: hsl(3, 100%, 62%);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 92, 87, 0.7);
    animation: pulseDot 1.8s ease-out infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(255, 92, 87, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(255, 92, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 92, 87, 0); }
}

.promo-badge__text {
    letter-spacing: 0.2px;
}

/* 小螢幕上略為縮小避免遮擋 */
@media (max-width: 576px) {
    .promo-badge { font-size: 1.4rem; padding: 10px 18px; left: 8px; right: auto; top: 8px; transform: rotate(-12deg); transform-origin: left top; }
    .promo-badge__dot { width: 14px; height: 14px; }
}
