/* FAQ 頁面專用樣式 */

/* ===== 整體容器樣式 ===== */
.faq-page {
    background: linear-gradient(135deg, #f5f9fc 0%, #e8f4f8 100%);
    min-height: 100vh;
    padding: 60px 0;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 頁面標題區域 ===== */
.faq-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.faq-title {
    font-size: 48px;
    font-weight: 700;
    color: #0095d7;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 149, 215, 0.1);
}

.faq-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0095d7, #43c2f5);
    border-radius: 2px;
}

.faq-description {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    max-width: 800px;
    margin: 30px auto 0;
}

/* ===== 搜尋框樣式 ===== */
.faq-search-wrapper {
    max-width: 600px;
    margin: 40px auto;
    position: relative;
}

.faq-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 149, 215, 0.15);
    transition: all 0.3s ease;
}

.faq-search-box:hover,
.faq-search-box:focus-within {
    box-shadow: 0 12px 30px rgba(0, 149, 215, 0.25);
    transform: translateY(-2px);
}

.faq-search-icon {
    position: absolute;
    left: 25px;
    width: 24px;
    height: 24px;
    color: #0095d7;
    z-index: 2;
}

.faq-search-input {
    width: 100%;
    padding: 18px 60px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.faq-search-input::placeholder {
    color: #999;
}

/* ===== 分類輪播區 ===== */
.faq-category-swiper {
    margin: 50px 0;
    padding: 20px 0;
    position: relative;
}

/* Swiper 容器設定 */
.laundryGuideSwiper {
    overflow: hidden;
    position: relative;
    padding: 20px 60px;
}

.laundryGuideSwiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

.laundryGuideSwiper .swiper-slide {
    width: auto !important;
    flex-shrink: 0;
}

/* Swiper 導航按鈕 */
.swiper-button-prev,
.swiper-button-next {
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 50%;
    box-shadow: none;
    transition: all 0.3s ease;
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}
.swiper-horizontal {
    .swiper-button-prev, .swiper-button-next, ~ .swiper-button-prev, ~ .swiper-button-next {
        top: var(--swiper-navigation-top-offset, 65%);
      
    }
}
.swiper-button-prev {
    left: 0;
}

.swiper-button-next {
    right: 0;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: transparent;
    box-shadow: none;
    transform: translateY(-50%) scale(1.15);
}

.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.swiper-button-prev img,
.swiper-button-next img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.swiper-button-prev:hover img,
.swiper-button-next:hover img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.swiper-button-prev img {
    transform: rotate(180deg);
}
.swiper-button-prev:after{
    content:'';
}
.swiper-button-next:after {
    content: '';
}
/* 分類卡片樣式 */
.faq-category-card {
    background: white;
    border-radius: 20px;
    padding: 25px 0px 0px 0px;

    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    margin: 0 10px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    position: relative;
}

.faq-category-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: #0095d7;
    box-shadow: 0 15px 35px rgba(0, 149, 215, 0.2);
    outline: none;
}

.faq-category-card:focus {
    outline: none;
}

.faq-category-card.active {
    background: linear-gradient(135deg, #0095d7 0%, #43c2f5 100%);
    border-color: #0095d7;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 149, 215, 0.3);
    outline: none;
}

.faq-category-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    object-fit: contain;
    max-width: 100px;
    max-height: 100px;
    display: block;
}

.faq-category-card:hover .faq-category-icon {
    transform: scale(1);
}

.faq-category-card.active .faq-category-icon {
    transform: scale(1);
    width: 100px;
    height: 100px;
    max-width: 100px;
    max-height: 100px;
}

.faq-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 0 5px;
    transition: color 0.3s ease;
    word-break: keep-all;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-height: 42px;
    width: 100%;
}

.faq-category-card.active .faq-category-title {
    color: white;
}

/* ===== 資訊卡片區 ===== */
.faq-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.faq-info-card {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.faq-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0095d7, #43c2f5);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.faq-info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 149, 215, 0.15);
}

.faq-info-card:hover::before {
    transform: scaleX(1);
}

.faq-info-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #0095d7;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}



.faq-info-card-text {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

/* ===== 區域標題樣式 ===== */
.faq-section-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 80px 0 40px;
    position: relative;
    padding-bottom: 20px;
}

.faq-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #0095d7, #43c2f5);
    border-radius: 2px;
}

/* ===== FAQ 問答列表樣式 ===== */
.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 149, 215, 0.15);
    transform: translateX(5px);
}

.faq-question {
    padding: 25px 30px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid transparent;
}

.faq-question:hover {
    background: linear-gradient(90deg, rgba(0, 149, 215, 0.05) 0%, transparent 100%);
    color: #0095d7;
}

.faq-question.collapsed {
    border-bottom-color: #f0f0f0;
}

.faq-question-text {
    flex: 1;
    padding-right: 20px;
    line-height: 1.6;
}

.faq-toggle-icons {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.fa-circle-plus,
.fa-circle-minus {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #0095d7;
    transition: all 0.3s ease;
}

.faq-question.collapsed .fa-circle-minus {
    opacity: 0;
    transform: translateY(-50%) rotate(180deg);
}

.faq-question:not(.collapsed) .fa-circle-plus {
    opacity: 0;
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.faq-answer.show {
    padding: 25px 30px 30px;
    max-height: 1000px;
}

.faq-answer-text {
    font-size: 16px;
    color: #666;
    line-height: 1.9;
}

.faq-answer-text br {
    display: block;
    margin: 8px 0;
    content: '';
}

/* ===== 聯絡資訊卡片 ===== */
.faq-contact-section {
    margin: 80px 0 60px;
    text-align: center;
}

.faq-contact-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.faq-contact-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.faq-contact-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.faq-contact-card {
    background: white;
    border-radius: 20px;
    padding: 35px 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 280px;
}

.faq-contact-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 149, 215, 0.2);
    background: linear-gradient(135deg, #0095d7 0%, #43c2f5 100%);
}

.faq-contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0095d7 0%, #43c2f5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.faq-contact-card:hover .faq-contact-icon {
    background: white;
}

.faq-contact-icon img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.faq-contact-card:hover .faq-contact-icon img {
    filter: none;
}

.faq-contact-info {
    text-align: left;
}

.faq-contact-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.faq-contact-card:hover .faq-contact-label {
    color: rgba(255, 255, 255, 0.9);
}

.faq-contact-value {
    font-size: 20px;
    font-weight: 700;
    color: #0095d7;
    transition: color 0.3s ease;
}

.faq-contact-card:hover .faq-contact-value {
    color: white;
}

/* ===== 響應式設計 ===== */
@media (max-width: 992px) {
    .faq-title {
        font-size: 36px;
    }
    
    .faq-description {
        font-size: 16px;
    }
    
    .faq-section-title {
        font-size: 28px;
    }
    
    .faq-info-cards {
        grid-template-columns: 1fr;
    }
    
    .faq-category-card {
        width: 140px;
        height: 140px;
        padding: 18px 15px;
    }

    .faq-category-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 10px;
        max-width: 90px;
        max-height: 90px;
    }

    .faq-category-card:hover .faq-category-icon,
    .faq-category-card.active .faq-category-icon {
        width: 90px;
        height: 90px;
        max-width: 90px;
        max-height: 90px;
    }
    
    .faq-category-title {
        font-size: 15px;
        min-height: 40px;
    }
}

@media (max-width: 768px) {
    .faq-page {
        padding: 40px 0;
    }
    
    .faq-title {
        font-size: 32px;
    }
    
    .faq-search-input {
        padding: 15px 50px;
        font-size: 14px;
    }
    
    .laundryGuideSwiper {
        padding: 10px 50px;
    }
    
    .faq-category-card {
        width: 150px;
        height: 150px;
        padding: 15px 10px;
    }

    .faq-category-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 8px;
        max-width: 90px;
        max-height: 90px;
    }

    .faq-category-card:hover .faq-category-icon,
    .faq-category-card.active .faq-category-icon {
        width: 90px;
        height: 90px;
        max-width: 90px;
        max-height: 90px;
    }
    
    .faq-category-title {
        font-size: 14px;
        min-height: 36px;
        line-height: 1.3;
    }
    
    .faq-question {
        padding: 20px;
        font-size: 16px;
    }
    
    .faq-answer.show {
        padding: 20px;
    }
    
    .faq-answer-text {
        font-size: 14px;
    }
    
    .faq-contact-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .faq-contact-card {
        width: 100%;
        max-width: 350px;
    }
}

@media (max-width: 576px) {
    .faq-container {
        padding: 0 15px;
    }
    
    .faq-title {
        font-size: 28px;
    }
    
    .faq-section-title {
        font-size: 24px;
        margin: 50px 0 30px;
    }
    
    .faq-info-card {
        padding: 25px 20px;
    }
    
    .faq-info-card-title {
        font-size: 18px;
    }
    
    .faq-info-card-text {
        font-size: 14px;
    }
    
    .laundryGuideSwiper {
        padding: 10px 45px;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        width: 40px;
        height: 40px;
    }
    
    .swiper-button-prev img,
    .swiper-button-next img {
        width: 40px;
        height: 40px;
    }
    
    .faq-category-card {
        width: 150px;
        height: 150px;
        padding: 12px 8px;
        margin: 0 8px;
    }

    .faq-category-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 6px;
        max-width: 90px;
        max-height: 90px;
    }

    .faq-category-card:hover .faq-category-icon,
    .faq-category-card.active .faq-category-icon {
        width: 90px;
        height: 90px;
        max-width: 90px;
        max-height: 90px;
    }
    
    .faq-category-title {
        font-size: 15px;
        min-height: 32px;
        line-height: 1.3;
        -webkit-line-clamp: 3;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 15px;
    }
    
    .fa-circle-plus,
    .fa-circle-minus {
        font-size: 24px;
    }
    
    .faq-toggle-icons {
        width: 30px;
        height: 30px;
    }
}

/* ===== 動畫效果 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInUp 0.6s ease forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

/* ===== 滾動條美化 ===== */
.faq-page ::-webkit-scrollbar {
    width: 8px;
}

.faq-page ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.faq-page ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0095d7, #43c2f5);
    border-radius: 10px;
}

.faq-page ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0081c5, #3eb2f0);
}
