@import url('/css/google-fonts.css');

body {
    font-family: 'Noto Sans TC', sans-serif;
    color: #333;
}

/* 自訂顏色 */
.text-theme-gold { color: #C59D5F; }
.bg-theme-gold { background-color: #C59D5F; }
.border-theme-gold { border-color: #C59D5F; }
.text-theme-dark { color: #2C2C2C; }
.bg-theme-light { background-color: #F8F8F8; }
.bg-theme-dark-footer { background-color: #F2F0EB; }
.bg-theme-bottom { background-color: #c07a31; }

/* 輪播點樣式 */
.dot {
    height: 4px;
    width: 32px;
    margin: 0 4px;
    background-color: #d1d5db;
    display: inline-block;
    transition: background-color 0.3s ease;
    cursor: pointer;
}
.dot.active {
    background-color: #C59D5F;
}

/* 隱藏預設捲軸 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.svg-border-draw {
    fill: none;
    stroke: #c07a31; 
    stroke-width: 8px; 
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.6s ease-in-out;
}
.group:hover .svg-border-draw {
    stroke-dashoffset: 0;
}
/* 產品輪播過渡效果 */
.slide-item {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.clip-slant {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
@media (min-width: 768px) {
    .clip-slant {
        clip-path: polygon(0 0, 100% 0, 55% 100%, 0 100%);
    }
}

/* --- 菱形網格容器設定 --- */
.talent-wall-container {
    width: 100%;
    height: 20%;
    top: 10%;
    transform: rotate(45deg);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    grid-auto-rows: 55px;
    background-color: transparent; 
    position: absolute;
    gap: 0px;
}

/* 右邊牆 (原本的位置) */
#talent-wall-container-right {
    left: 75%;
    opacity:80%;
}

/* 左邊牆 (新增的位置) */
#talent-wall-container-left {
    right: 30%;
    top:-40%; 
    z-index:10;
}

@media (min-width: 640px) {
    .talent-wall-container {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        grid-auto-rows: 75px;
    }

    #talent-wall-container-right {
        left: 105%;
    }

}

@media (min-width: 1024px) {
    .talent-wall-container {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        grid-auto-rows: 90px;
    }

    #talent-wall-container-right {
        left: 95%;
    }
}

@media (min-width: 1400px) {
    #talent-wall-container-right {
        left: 80%;
        opacity:100%;
    }
}

/* 空白格子 (用於構成不規則形狀的透明邊緣) */
.mosaic-cell-empty {
    width: 100%;
    height: 100%;
    background-color: transparent;
}

/* 實際作用的馬賽克格子 */
.mosaic-cell {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #ffbf6c;
    transition: background-color 0.8s ease-in-out;
    border-radius: 2px; /* 柔化邊緣 */
    overflow: hidden;
}

/* Phase 1: 變成指定顏色 */
.mosaic-cell.color-active {
    background-color: rgba(255, 216, 177, var(--cell-opacity, 1));
}

/* Phase 2: 圖片層 (反向旋轉並放大填滿) */
.mosaic-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    transform: rotate(-45deg) scale(1.45);
}

.mosaic-cell.img-active .mosaic-img {
    opacity: var(--img-opacity, 1);
}

/* Phase 3: 每格獨立的 Overlay 層 (文字出現時變暗) */
.cell-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 172, 90, 0.5);
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 10;
}

.mosaic-cell.overlay-active .cell-overlay {
    opacity: 1;
}

/* 中間的文字覆蓋層 */
#talent-text-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 20;
    padding: 1rem;
}

.talent-text-line {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    text-shadow: 0px 4px 30px rgba(73, 36, 0, 0.8);
    text-align: center;
}

.talent-text-line.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- 手機版關於我們文字輪播 --- */
@media (max-width: 1023px) {
    .mobile-text-fade-1 {
        animation: textCrossfade1 8s infinite;
    }
    .mobile-text-fade-2 {
        animation: textCrossfade2 8s infinite;
    }
}

@keyframes textCrossfade1 {
    0%, 45% { opacity: 1; visibility: visible; }
    50%, 95% { opacity: 0; visibility: hidden; }
    100% { opacity: 1; visibility: visible; }
}

@keyframes textCrossfade2 {
    0%, 45% { opacity: 0; visibility: hidden; }
    50%, 95% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}
