/* ==========================================
   首頁專用樣式 (Index Page Styles)
   ========================================== */

/* Vue v-cloak 隱藏未編譯模板 */
[v-cloak] { display: none; }

/* Hero Section Animation */
.hero-carousel {
    animation: fadeIn 0.8s ease-out;
    transition: background-image 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Banner Carousel ========== */

/* Vue transition: fade banner content */
.banner-fade-enter-active,
.banner-fade-leave-active {
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.banner-fade-enter-from {
    opacity: 0;
    transform: translateY(12px);
}
.banner-fade-leave-to {
    opacity: 0;
    transform: translateY(-12px);
}

/* 左右箭頭 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.08);
}
.carousel-arrow-left {
    left: 16px;
}
.carousel-arrow-right {
    right: 16px;
}

/* 指示點 */
.carousel-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}
.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.15);
}
.carousel-dot.active {
    background: #fff;
    border-color: #fff;
}

/* 手機版箭頭縮小 */
@media (max-width: 640px) {
    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .carousel-arrow-left { left: 8px; }
    .carousel-arrow-right { right: 8px; }
    .carousel-dots { bottom: 12px; gap: 8px; }
    .carousel-dot { width: 10px; height: 10px; }
}

/* Search Box Hover Effect */
.search-box:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Quick Link Icon Animation */
.quick-link-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.quick-link-icon:hover {
    transform: scale(1.1);
}

/* News Item Hover */
.news-item {
    transition: background-color 0.2s ease;
}

.news-item:hover {
    background-color: #f9fafb;
}

/* ========== Domain Carousel ========== */

.domain-carousel-wrapper {
    position: relative;
    overflow: visible;
}

.domain-carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 8px 4px 16px;
}

.domain-carousel-track::-webkit-scrollbar {
    display: none;
}

.domain-card-link {
    flex: 0 0 calc(25% - 18px);
    min-width: 240px;
    text-decoration: none;
    color: inherit;
}

.domain-card {
    background: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    border-top: 4px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease;
    height: 100%;
}

.domain-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border-top-color: #0089A7;
}

.domain-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    transition: transform 0.3s ease;
}

.domain-card:hover .domain-card-icon {
    transform: scale(1.05);
}

.domain-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1f2937;
}

.domain-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.domain-card-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.domain-bullet {
    width: 6px;
    height: 6px;
    background: #F2A900;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Navigation Arrows */
.domain-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #0089A7;
    background: #fff;
    color: #0089A7;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.domain-nav-btn:hover {
    background: #0089A7;
    color: #fff;
}

.domain-nav-btn:focus-visible {
    outline: 3px solid #F2A900;
    outline-offset: 2px;
}

.domain-nav-left {
    left: -22px;
}

.domain-nav-right {
    right: -22px;
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
    .domain-card-link {
        flex: 0 0 calc(50% - 12px);
        min-width: 220px;
    }
    .domain-nav-left { left: -16px; }
    .domain-nav-right { right: -16px; }
}

/* Responsive: Mobile */
@media (max-width: 640px) {
    .domain-card-link {
        flex: 0 0 calc(100% - 8px);
        min-width: 0;
    }
    .domain-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    .domain-nav-left { left: -10px; }
    .domain-nav-right { right: -10px; }
}
