/* 香港地區滑動器 WordPress 外掛樣式 */

.hk-area-slider-container {
    width: 100%;
    /*max-width: 900px;*/
    margin: 0 auto;
    /*background: rgba(255, 255, 255, 0.1);*/
    /*backdrop-filter: blur(10px);*/
    border-radius: 20px;
    /*padding: 30px;*/
    /*box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);*/
    position: relative;
    overflow: hidden;
}

.hk-area-slider-title {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* 篩選器樣式 */
.hk-filter-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.hk-filter-buttons {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95); /* 增加背景不透明度 */
    padding: 8px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 增強陰影 */
}

.hk-filter-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(51, 51, 51, 0.9); /* 增加文字對比度 */
    font-size: 1rem;
    font-weight: 600; /* 增加字體粗細 */
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hk-filter-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #333;
    transform: translateY(-2px);
}

.hk-filter-btn.active {
    background: #054391;
    color: white;
    box-shadow: 0 4px 15px rgba(5, 67, 145, 0.4);
    transform: translateY(-2px);
}

/* 新的獨立長型篩選按鈕樣式 */
.hk-filter-buttons-individual {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.hk-filter-btn-long {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 16px 32px;
    border: 2px solid #054391;
    border-radius: 15px;
    background: #054391;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    justify-content: center;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.hk-filter-btn-long:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-color: #043068;
    background: #043068;
    color: white;
}

.hk-filter-btn-long.active {
    background: #032548;
    color: white;
    border-color: #032548;
    box-shadow: 0 8px 35px rgba(5, 67, 145, 0.4);
    transform: translateY(-3px);
}

.hk-filter-btn-long .filter-text {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hk-filter-btn-long.active .filter-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hk-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    /*background: rgba(255, 255, 255, 0.1);*/
    padding: 20px;
    /*box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

.hk-slider-wrapper {
    overflow: hidden;
    border-radius: 10px;
}

.hk-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 0;
}

/* 無限循環支援 */
.hk-slider-track.no-transition {
    transition: none !important;
}



.hk-slider-item {
    min-width: calc((100vw - 40px) / 7); /* 固定寬度適用於大於1200px, */
    width: calc((100vw - 40px) / 7); /* 確保固定寬度大於1200px,*/
    height: 350px; /* 增加高度以容納更大的按鈕和上下交替排列 */
    position: relative;
    background-size: 700% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0; /* 防止項目縮小 */
}
/* Add media query <1200px and >=768px*/

@media (max-width: 1240px) and (min-width: 769px) {
    .hk-slider-item {
        min-width: calc((100vw - 40px) / 7); /* 調整寬度以適應不同螢幕尺寸 */
        width: calc((100vw - 40px) / 7);
    }
}
/* Add media query >=1240px */
@media (min-width: 1240px) {
    .hk-slider-item {
        min-width: calc(1240px / 7); /* 固定寬度適用於大於1200px, */
        width: calc(1240px / 7); /* 確保固定寬度大於1200px,*/
    }
}
/* Add media query <768px */
@media (max-width: 768px) {
    .hk-slider-item {
        min-width: calc((100vw - 80px) / 3); /* 調整寬度以適應不同螢幕尺寸 */
        width: calc((100vw - 80px) / 3);
    }
}

/* Add media query >=1240px */
@media (min-width: 1240px) {
    .hk-slider-item:nth-child(even) .hk-area-button {
        transform: translateY(20px)!important;
        font-size: 1.7rem!important;
    }
     .hk-slider-item:nth-child(odd) .hk-area-button {
        transform: translateY(-90px)!important;
        font-size: 1.7rem!important;
    }
}
/* Add media query between 1199 and 980px */
@media (min-width: 980px) and (max-width: 1199px) {
    .hk-slider-item:nth-child(even) .hk-area-button {
        transform: translateY(10px)!important;
        font-size: 1.4rem!important;

    }
     .hk-slider-item:nth-child(odd) .hk-area-button {
        transform: translateY(-80px)!important;
        font-size: 1.4rem!important;
    }
}
/* Add media query between 1199 and 980px */
@media (min-width: 800px) and (max-width: 979px) {
    .hk-slider-item:nth-child(even) .hk-area-button {
        transform: translateY(0px)!important;
        font-size: 1rem!important;
        line-height: 1.2rem!important;
    }
     .hk-slider-item:nth-child(odd) .hk-area-button {
        transform: translateY(-70px)!important;
        font-size: 1rem!important;
        line-height: 1.2rem!important;
    }
}
/* Add media query between 769 and 799px */
@media (min-width: 769px) and (max-width: 799px) {
    .hk-slider-item:nth-child(even) .hk-area-button {
        transform: translateY(-10px)!important;
        font-size: 0.7rem!important;
        line-height: 1.2rem!important;
    }
     .hk-slider-item:nth-child(odd) .hk-area-button {
        transform: translateY(-60px)!important;
        font-size: 0.7rem!important;
        line-height: 1.2rem!important;
    }
}


/*.hk-slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent; /* 移除灰色覆蓋層 */
    /*transition: background 0.3s ease;
    border-radius: 8px;
}*/

/*.hk-slider-item:hover::before {
    background: rgba(255, 255, 255, 0.1); /* 懸停時只添加輕微的白色覆蓋 */
/*}*/


.hk-area-button {
    position: relative;
    z-index: 2;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: #054391;
    border: none; /* 移除邊框 */
    color:var(--sf-primary-yellow, #FFA500);
    font-size: 1.7rem;
    line-height: 1.7rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /*box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4); /* 增大陰影配合大小 */
    padding: 8px; /* 增加內距 */
    /*text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* 添加文字陰影提高可讀性 */
    text-decoration: none; /* 移除連結下劃線 */
    font-family: ITCAvantGardeStd-Md, ITCAvantGardeStd-Demi, MyriadPro-Bold, "Noto Sans TC", "儷黑 Pro", "LiHei Pro", 微軟正黑體, "Microsoft JhengHei", 標楷體, DFKai-SB, sans-serif
}

.hk-area-button.lang-en {
    font-size: 1rem;
    line-height: 1rem;
}

/*.hk-area-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); /* 增大懸停時的陰影 */
    /*background: #043068;
    color: white; /* 確保連結文字顏色保持白色 */
    /*text-decoration: none; /* 確保懸停時也沒有下劃線 */
/*}*/

/* 梅花間竹排列 - hk-slider-item 背景處理 */
.hk-slider-item:nth-child(odd) {
    background-image: url('../images/button_background-02_new.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

}

.hk-slider-item:nth-child(even) {
    background-image: url('../images/button_background-01_new.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

}

/* 梅花間竹排列 - 奇數按鈕在上方，偶數按鈕在下方 */
.hk-slider-item:nth-child(odd) .hk-area-button {
    transform: translateY(-90px);
    margin-top: 55px;
    background: url('../images/button_bg.webp') ;
    background: -webkit-image-set(
        url('../images/button_bg.webp') 1x,
        url('../images/button_bg@2x.webp') 2x,
        url('../images/button_bg@3x.webp') 3x,
        url('../images/button_bg@4x.webp') 4x
    ) ;
    background: image-set(
        url('../images/button_bg.webp') 1x,
        url('../images/button_bg@2x.webp') 2x,
        url('../images/button_bg@3x.webp') 3x,
        url('../images/button_bg@4x.webp') 4x
    ) ;
    background-size: 90%;
    background-position: center;
    background-repeat: no-repeat;
    padding:30px;
}

.hk-slider-item:nth-child(even) .hk-area-button {
    transform: translateY(20px);
    margin-top: 80px;
    background: url('../images/button_bg.webp');
    background: -webkit-image-set(
        url('../images/button_bg.webp') 1x,
        url('../images/button_bg@2x.webp') 2x,
        url('../images/button_bg@3x.webp') 3x,
        url('../images/button_bg@4x.webp') 4x
    ) ;
    background: image-set(
        url('../images/button_bg.webp') 1x,
        url('../images/button_bg@2x.webp') 2x,
        url('../images/button_bg@3x.webp') 3x,
        url('../images/button_bg@4x.webp') 4x
    ) ;
    background-size: 90%;
    background-position: center;
    background-repeat: no-repeat;
     padding:35px;
}

/* 懸停時保持交替排列 */
/*.hk-slider-item:nth-child(odd) .hk-area-button:hover {
    transform: translateY(-20px) scale(1.1);
    background: url('../images/button_background-01.png') #043068;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}*/

/*.hk-slider-item:nth-child(even) .hk-area-button:hover {
    transform: translateY(20px) scale(1.1);
    background: url('../images/button_background-02.png') #043068;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}*/

/* 不同區域的背景圖片 - 可自定義 */
.hk-bg-hk-island {
    /* 選項1: 使用外部圖片 */
    /* background-image: url('path/to/your/hk-island-bg.jpg'); */
    
    /* 選項2: 使用自定義SVG圖案 */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 200"><rect fill="%2300bcd4" width="1400" height="200"/><path fill="%2300acc1" d="M0,120 Q350,80 700,120 T1400,120 L1400,200 L0,200 Z"/><circle fill="%2300acc1" cx="200" cy="70" r="25"/><circle fill="%2300acc1" cx="600" cy="90" r="30"/><circle fill="%2300acc1" cx="1000" cy="60" r="28"/><circle fill="%2300acc1" cx="1300" cy="85" r="22"/></svg>');
    
    /* 選項3: 使用純色漸變 */
    /* background: linear-gradient(135deg, #ff6b6b, #ff8e8e); */
}

.hk-bg-kowloon {
    /* 選項1: 使用外部圖片 */
    /* background-image: url('path/to/your/kowloon-bg.jpg'); */
    
    /* 選項2: 使用自定義SVG圖案 */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 200"><rect fill="%23673ab7" width="1400" height="200"/><polygon fill="%235e35b1" points="0,200 300,140 600,160 900,130 1200,150 1400,120 1400,200"/><rect fill="%235e35b1" x="150" y="40" width="80" height="100" rx="15"/><rect fill="%235e35b1" x="450" y="20" width="60" height="120" rx="12"/><rect fill="%235e35b1" x="750" y="50" width="70" height="90" rx="18"/><rect fill="%235e35b1" x="1050" y="30" width="90" height="110" rx="20"/></svg>');
    
    /* 選項3: 使用純色漸變 */
    /* background: linear-gradient(135deg, #4ecdc4, #45b7b8); */
}

.hk-bg-new-territories {
    /* 選項1: 使用外部圖片 */
    /* background-image: url('path/to/your/new-territories-bg.jpg'); */
    
    /* 選項2: 使用自定義SVG圖案 */
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1400 200"><rect fill="%23ff9800" width="1400" height="200"/><path fill="%23f57c00" d="M0,80 Q200,40 400,80 Q600,120 800,80 Q1000,40 1200,80 Q1300,100 1400,80 L1400,200 L0,200 Z"/><polygon fill="%23f57c00" points="200,30 250,80 200,130 150,80"/><polygon fill="%23f57c00" points="500,20 560,70 500,120 440,70"/><polygon fill="%23f57c00" points="800,40 850,90 800,140 750,90"/><polygon fill="%23f57c00" points="1100,25 1160,75 1100,125 1040,75"/></svg>');
    
    /* 選項3: 使用純色漸變 */
    /* background: linear-gradient(135deg, #a8e6cf, #88d8a3); */
}

.hk-slider-controls {
    position: relative;
    top: auto;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 10px 0;
    pointer-events: none;
}

.hk-slider-btn {
    pointer-events: all;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #FF0056;
    border: none;
    font-size: 2.5rem;
    font-weight: bolder;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hk-slider-btn:hover {
    background: #E6004D;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 0, 86, 0.4);
}

.hk-slider-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    transform: scale(1);
}

.hk-slider-btn:disabled:hover {
    background: #FF0056;
    transform: scale(1);
    box-shadow: none;
}

/* 動畫效果 */
@keyframes hk-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hk-slider-item {
        /*min-width: calc(100% / 3);
        /*width: calc(100% / 3); /* 覆蓋固定寬度 */
        min-width: 220px;
    }
    
    .hk-slider-item:nth-child(odd) {
        background-image: url('../images/button_background-02_new.png');
        background-size: 100%;
        background-position: center 0.5px;
        background-repeat: no-repeat;
    }
    .hk-slider-item:nth-child(odd) .hk-area-button {
        margin-top: 30px;
        background-size: 100%;
    }

    .hk-slider-item:nth-child(even) {
        background-image: url('../images/button_background-01_new.png');
        background-size: 100%;
        background-position: center 0.5px;
        background-repeat: no-repeat;
    }
    .hk-slider-item:nth-child(even) .hk-area-button {
        margin-top: 100px;
        background-size: 100%;
    }
    
    .hk-area-button {
        /*width: 175px;*/
        /*height: 175px;*/
        font-size: 1.1rem;
        padding: 6px;
        /*box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);*/
    }
    
    .hk-area-slider-title {
        font-size: 1.5rem;
    }
    
    .hk-filter-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .hk-filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .hk-area-slider-container {
        padding: 20px;
    }
    
    .hk-slider-controls {
        padding: 15px 10px 0;
        gap: 15px;
    }
    
    .hk-slider-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hk-slider-item {
        min-width: 150px;
        width: 150px; /* 覆蓋固定寬度 */
        height: 250px; /* 增加高度以容納更大按鈕的響應式上下交替排列 */
    }
    
    .hk-slider-item:nth-child(odd) {
        background-image: url('../images/button_background-02_new.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .hk-slider-item:nth-child(even) {
        background-image: url('../images/button_background-01_new.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .hk-area-button {
        width: 100px;
        height: 100px;
        font-size: 1rem;
        padding: 5px;
        /*box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);*/
    }
    
    /* 響應式梅花間竹排列 - 縮小移動距離 */
    .hk-slider-item:nth-child(odd) .hk-area-button {
        transform: translateY(-30px);
        margin-top: 20px;
        background: url('../images/button_bg.webp') #054391;
        background: -webkit-image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #054391;
        background: image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #054391;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .hk-slider-item:nth-child(even) .hk-area-button {
        transform: translateY(15px);
        margin-top: 50px;
        background: url('../images/button_bg.webp') #054391;
        background: -webkit-image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #054391;
        background: image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #054391;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    /*.hk-slider-item:nth-child(odd) .hk-area-button:hover {
        transform: translateY(-10px) scale(1.1);
        background: url('../images/button_bg.webp') #043068;
        background: -webkit-image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #043068;
        background: image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #043068;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }*/

    /*.hk-slider-item:nth-child(even) .hk-area-button:hover {
        transform: translateY(10px) scale(1.1);
        background: url('../images/button_bg.webp') #043068;
        background: -webkit-image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #043068;
        background: image-set(
            url('../images/button_bg.webp') 1x,
            url('../images/button_bg@2x.webp') 2x,
            url('../images/button_bg@3x.webp') 3x,
            url('../images/button_bg@4x.webp') 4x
        ) #043068;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }*/
    
    .hk-filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .hk-filter-btn-long {
        padding: 12px 24px;
        min-width: 120px;
        font-size: 0.9rem;
        gap: 0;
    }
    
    .hk-filter-buttons-individual {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }
    
    .hk-slider-controls {
        padding: 10px 10px 0;
        gap: 12px;
    }
    
    .hk-slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .hk-area-slider-title {
        font-size: 1.2rem;
    }
}

/* 主題變化 */
.hk-area-slider-container.theme-dark {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.hk-area-slider-container.theme-dark::before {
    background: #2c3e50;
}

.hk-area-slider-container.theme-dark .hk-area-slider-title {
    color: white;
}

.hk-area-slider-container.theme-minimal {
    background: white;
    /*box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);*/
}

.hk-area-slider-container.theme-minimal::before {
    display: none;
}

/* ==========================================================================
   Custom Theme Integration Overrides
   ========================================================================== */

/* Z-index positioning for theme compatibility */
#hk-area-slider-691fe838ef5da,
[id^="hk-area-slider-"] {
    position: relative;
    z-index: 101;
}

/* Filter button theme color overrides */
.hk-filter-btn-long,
.hk-filter-btn-long:hover {
    transform: unset;
    box-shadow: unset;
    transition: unset;
    border-radius: 80px;
    border-color: #054391;
    background: #054391;
}

.hk-filter-btn-long.active {
    background: #FF0056;
    color: white;
    border-color: #FF0056;
    transform: unset;
    box-shadow: unset;
    transition: unset;
}

/* Language-specific text sizing */
.hk-area-button.lang-en {
    font-size: 1rem;
    line-height: 1rem;
}

/* ==========================================================================
   Mobile Responsive Overrides (480px and below)
   ========================================================================== */
@media screen and (max-width: 480px) {
    .hk-filter-buttons-individual {
        display: flex;
        gap: 15px;
        margin-bottom: 30px;
        justify-content: center;
        flex-wrap: wrap;
        flex-direction: unset;
    }
    
    .hk-filter-btn-long {
        padding: 12px 24px;
        min-width: 100px;
        font-size: 0.9rem;
        gap: 0;
        display: block;
    }
    
    .hk-slider-item {
        min-width: 150px;
        width: 150px;
        height: 250px !important;
    }
    
    .hk-slider-container {
        padding: 20px 20px 0 20px !important;
    }
    
    .hk-slider-btn {
        width: 60px;
        height: 60px;
        font-size: 4rem;
        line-height: 3.1rem;
        align-items: unset;
    }
    
    .hk-area-button {
        width: 150px;
        height: 150px;
        font-size: 1rem;
        padding: 0;
        box-shadow: unset;
    }
    
    .hk-slider-track {
        height: 280px !important;
    }
    
    /* Staggered positioning for mobile */
    .hk-slider-item:nth-child(odd) .hk-area-button {
        transform: translateY(-57px);
        margin: 0;
    }
    
    .hk-slider-item:nth-child(even) .hk-area-button {
        transform: translateY(53px);
        margin: 0;
    }
}