/* design-enhancements.css - 設計多樣性增強 */

/* ===== 最新消息區塊 - Timeline 時間軸風格 ===== */

.news-card {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid var(--brand-primary);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.news-card::before {
    content: '';
    position: absolute;
    left: -0.65rem;
    top: 2rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--brand-primary);
    border: 3px solid var(--bg-alt);
    box-shadow: 0 0 0 3px var(--brand-primary-light);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateX(0.5rem);
    border-left-color: var(--brand-primary-dark);
}

.news-card:hover::before {
    background: var(--brand-primary-dark);
    box-shadow: 0 0 0 5px var(--brand-primary-light), 0 0 20px var(--brand-primary);
}

.news-img {
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.news-card:hover .news-img {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== 服務項目 - 卡片陰影與層次 ===== */

.service-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--brand-primary-light);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-img {
    transition: transform 0.5s ease;
    filter: brightness(0.95);
}

.service-card:hover .service-img {
    transform: scale(1.05);
    filter: brightness(1);
}

/* 服務項目按鈕特殊樣式 */
.service-card .toggle-button {
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.3s ease;
}

.service-card .toggle-button::before {
    content: '▼';
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.service-card .toggle-button:hover {
    padding-left: 2rem;
}

/* ===== 產品展示 - 簡潔無邊框設計 ===== */

.recommended-product-card {
    /* 移除所有陰影和邊框效果,與背景融合 */
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    width: 100%;
    max-width: 350px;
    height: 350px;
}

.recommended-product-card:hover .description-layer {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.recommended-product-card img {
    transition: none !important;
}

.recommended-product-card:hover img {
    transform: none !important;
    filter: none !important;
}

.recommended-product-card .info-layer {
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4), transparent);
    backdrop-filter: blur(2px);
}

/* ===== 美麗見證 - 引用樣式 ===== */

.testimonial-card {
    position: relative;
    padding: 0 !important; /* 移除 padding,讓內容直接從頂部開始 */
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-main) 100%);
    border: 1px solid var(--border-color);
    height: 480px !important; /* 高度加倍 */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: 1rem;
    font-size: 6rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: var(--brand-primary-light);
    opacity: 0.2;
    z-index: 0;
}

.testimonial-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important; /* 強制靠上 */
    align-items: flex-start !important; /* 水平靠左 */
    text-align: left !important; /* 文字左對齊 */
    height: 100%;
    padding: 2rem 1.75rem !important; /* 上下 2rem, 左右 1.75rem */
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem; /* 增加與作者資訊的間距 */
    text-align: left !important; /* 強制左對齊 */
}

.testimonial-author {
    text-align: left !important; /* 作者資訊也左對齊 */
    width: 100%;
}

.testimonial-author .author-name {
    position: relative;
    display: inline-block;
}

.testimonial-author .author-desc {
    margin-left: 0.3rem;
}

.testimonial-author .author-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: width 0.3s ease;
}

.testimonial-card:hover .testimonial-author .author-name::after {
    width: 100%;
}

/* ===== 品牌區塊 - 簡潔無效果設計 ===== */

.brand-block {
    position: relative;
    padding: 2rem;
    border-radius: 1rem;
    background: transparent;
    box-shadow: none !important;
}

.brand-block::before {
    display: none;
}

.brand-block:hover {
    box-shadow: none !important;
    transform: none !important;
}

.brand-block:hover::before {
    opacity: 0;
}

.brand-block img {
    border-radius: 0.75rem;
    box-shadow: none !important;
}

.brand-block:hover img {
    transform: none !important;
    box-shadow: none !important;
}

.product-brand {
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.product-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
}

/* ===== 蛻變展示輪播 - 增強控制按鈕 ===== */

#beforeafter-carousel button {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

#beforeafter-carousel button:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary-light);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(107, 122, 143, 0.4);
}

#beforeafter-carousel button:active {
    transform: scale(0.95);
}

/* ===== 按鈕樣式增強 ===== */

.btn-text {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-text::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--brand-primary-light);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn-text:hover::before {
    transform: scaleX(1);
}

.btn-text:hover {
    color: white;
}

/* ===== 響應式微調 ===== */

@media (max-width: 768px) {
    .news-card {
        padding-left: 1.5rem;
    }
    
    .news-card::before {
        left: -0.5rem;
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .brand-block {
        padding: 1.5rem;
    }
    
    .testimonial-card::before {
        font-size: 4rem;
        top: -0.5rem;
    }
}

/* ===== 滾動進場動畫 ===== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 初始隱藏待動畫的元素 */
[data-animate] {
    opacity: 0;
}

[data-animate].animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="slideInUp"].animated {
    animation-name: slideInUp;
}

[data-animate="slideInLeft"].animated {
    animation-name: slideInLeft;
}

[data-animate="slideInRight"].animated {
    animation-name: slideInRight;
}
