/* portfolio.css - 作品集頁面樣式 */

/* 全局容器樣式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 作品集頁面頭部橫幅 */


/* 作品分類導航 */
.portfolio-nav {
    padding: 2rem 0;
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    top: 0;
    z-index: 100;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.filter-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* 作品集主體區域 */
.portfolio-showcase {
    padding: 5rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e6f7ff 100%);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* 作品項目樣式 */
.portfolio-item {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    max-width: 100%; /* 確保不超出容器寬度 */
}

.portfolio-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

/* 桌面端覆蓋層 */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    box-sizing: border-box; /* 確保內邊距不會增加寬度 */
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transform: translateY(-20px);
    transition: transform 0.4s ease 0.1s;
    width: 100%; /* 確保寬度不會超出父容器 */
    overflow-wrap: break-word; /* 允許長文字換行 */
}

.portfolio-overlay p {
    margin-bottom: 1.5rem;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
    width: 100%; /* 確保寬度不會超出父容器 */
    overflow-wrap: break-word; /* 允許長文字換行 */
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
}

/* 新增: 點擊查看提示徽章 */
.portfolio-item:hover {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-info {
    padding: 1.5rem;
    text-align: center; /* 確保文字置中 */
}

.portfolio-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
    overflow-wrap: break-word; /* 允許長文字換行 */
}

.portfolio-category {
    font-size: 0.9rem;
    color: #666;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #f0f9ff;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

/* 新增: 資訊區按鈕容器 */
.info-action {
    margin-top: 0.5rem;
    display: none; /* 預設隱藏，在移動設備上顯示 */
}

/* 資訊區按鈕樣式 */
.btn-info {
    padding: 0.6rem 2rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.btn-info:hover,
.btn-info:active {
    background: #1e40af;
}

/* 懸停按鈕樣式 */
.btn-small {
    padding: 0.6rem 1.2rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transform: translateY(20px);
    transition: all 0.4s ease 0.3s;
    border: 2px solid transparent;
    display: inline-block;
    white-space: nowrap; /* 防止按鈕文字換行 */
}

.portfolio-item:hover .btn-small {
    transform: translateY(0);
}

.btn-small:hover {
    background: transparent;
    border-color: white;
}

/* 響應式設計 */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* 移動端特定樣式 */
    .portfolio-overlay {
        display: none; /* 在移動端隱藏懸停覆蓋 */
    }
    
    .info-action {
        display: block; /* 在移動端顯示按鈕 */
    }
    
    .portfolio-item {
        transform: none !important; /* 取消上移懸停效果 */
    }
    
    .portfolio-item:hover .portfolio-image {
        transform: none; /* 取消放大懸停效果 */
    }
    
    /* 移動端點擊效果 */
    .portfolio-item:active {
        opacity: 0.9;
        transition: opacity 0.2s;
    }
}

/* 觸控設備適配 - 不依賴媒體查詢寬度 */
@media (hover: none) {
    .portfolio-overlay {
        display: none;
    }
    
    .info-action {
        display: block;
    }
    
    .portfolio-item:hover {
        transform: none;
    }
    
    .portfolio-item:hover .portfolio-image {
        transform: none;
    }
}
/* 客戶見證區域 */
.testimonials {
    padding: 6rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a1a1a;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #2563eb;
    margin: 1rem auto 0;
    border-radius: 2px;
}

.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-item {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.testimonial-item:hover {
    transform: translateY(-8px);
}

.testimonial-content {
    position: relative;
}

.testimonial-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: 1.8rem;
    color: #2563eb;
    font-weight: bold;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.author-info span {
    font-size: 0.9rem;
    color: #666;
}

/* CTA 區域 */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn.primary {
    background: white;
    color: #3b82f6;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn.primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 響應式設計 */

@media (max-width: 768px) {

    .testimonial-slider {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .portfolio-nav {
        padding: 1.5rem 0;
    }


    
    .section-title {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}