/* ============================================
   輪播圖片樣式
   ============================================ */

.acoustics-carousel {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 比例 */
    background: #000;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
    z-index: 2;
}

.carousel-prev,
.carousel-next {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 32px;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.carousel-dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ============================================
   水下聲學區塊 - 響應式設計
   Desktop (>1400px) | Tablet (576-1399px) | Mobile (<575px)
   ============================================ */

.underwater-acoustics {
    width: 100%;
    padding: 40px 20px;
    background-color: #0B1B2A;
}

.acoustics-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* 分類標題 */
.acoustics-category-title {
    text-align: center;
    margin-bottom: 40px;
}

.acoustics-category-title h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

/* ============================================
   DESKTOP (>1400px) - 方向控制
   ============================================ */

.acoustics-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* direction="left" - 圖片左、標題中、內容右 */
.acoustics-container.direction-left {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: 
        "left center right";
}

.acoustics-container.direction-left .acoustics-left {
    grid-area: left;
}

.acoustics-container.direction-left .acoustics-center {
    grid-area: center;
}

.acoustics-container.direction-left .acoustics-right {
    grid-area: right;
}

/* direction="right" - 內容左、標題中、圖片右 */
.acoustics-container.direction-right {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: 
        "right center left";
}

.acoustics-container.direction-right .acoustics-left {
    grid-area: left;
}

.acoustics-container.direction-right .acoustics-center {
    grid-area: center;
}

.acoustics-container.direction-right .acoustics-right {
    grid-area: right;
}

/* 左欄 - 特色圖片 */
.acoustics-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.acoustics-featured-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

/* 中欄 - Desktop 版本(垂直列表) */
.acoustics-center {
    display: flex;
    flex-direction: column;
}

.acoustics-titles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;

}

.acoustics-title-item {
    padding: 16px 20px;
    border-radius: 70%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.acoustics-title-item h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff !important;
}

.acoustics-title-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.acoustics-title-item.active {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* 右欄 - 內容 */
.acoustics-right {
    display: flex;
    align-items: flex-start;
}

.acoustics-content {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    max-height: 500px;
    overflow-y: auto;
}

.acoustics-content p {
    margin: 0 0 16px 0;
}

.acoustics-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

/* ============================================
   隱藏/顯示 (預設)
   ============================================ */

.desktop-view {
    display: block;
}

.tablet-view,
.mobile-view {
    display: none;
}

/* ============================================
   TABLET (576px - 1399px)
   ============================================ */

@media (max-width: 1399px) {
    .acoustics-container {
        grid-template-columns: 1fr;
        grid-template-areas: auto;
        gap: 30px;
    }

    .acoustics-container.direction-left,
    .acoustics-container.direction-right {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "center"
            "left"
            "right";
    }

    .acoustics-left {
        order: 2;
        /* 平板尺寸：左欄置中對齊，最大寬度 500px */
        justify-content: center;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

    .acoustics-center {
        order: 1;
    }

    .acoustics-right {
        order: 3;
        /* 平板尺寸：右欄置中對齊 */
        justify-content: center;
        margin: 0 auto;
        width: 100%;
        max-width: 500px;
    }

    .desktop-view {
        display: none;
    }

    .tablet-view {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }

    /* Tablet Tab 樣式 */
    .acoustics-tab-item {
        flex: 1;
        min-width: 120px;
        padding: 12px 16px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: white;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .acoustics-tab-item:hover {
    }

    .acoustics-tab-item.active {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 70%;
        box-shadow: 0 0 15px rgba(230, 0, 43, 0.3);
    }

    .acoustics-featured-image {
        max-width: 100%;
        max-height: 400px;
    }

    .acoustics-carousel {
        max-width: 100%;
    }

    .acoustics-content {
        max-height: 400px;
    }
}

/* ============================================
   MOBILE (<575px)
   ============================================ */

@media (max-width: 575px) {
    .acoustics-wrapper {
        padding: 0;
    }

    .acoustics-category-title {
        margin-bottom: 20px;
    }

    .acoustics-category-title h2 {
        font-size: 24px;
        padding: 0 20px;
    }

    .acoustics-container {
        grid-template-columns: 1fr;
        grid-template-areas: auto;
        gap: 20px;
        padding: 0 20px;
    }

    .acoustics-container.direction-left,
    .acoustics-container.direction-right {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "center"
            "left"
            "right";
    }

    .desktop-view {
        display: none;
    }

    .tablet-view {
        display: none;
    }

    .mobile-view {
        display: block;
    }

    /* Mobile Select 樣式 */
    .acoustics-select-wrapper {
        margin-bottom: 16px;
    }

    .acoustics-select {
        width: 100%;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        color: white;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .acoustics-select:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .acoustics-select:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.2);
        border-color: #E6002B;
        box-shadow: 0 0 10px rgba(230, 0, 43, 0.3);
    }

    .acoustics-select option {
        background: #0B1B2A;
        color: white;
    }

    .acoustics-featured-image {
        max-width: 100%;
        max-height: 300px;
    }

    .acoustics-carousel {
        max-width: 100%;
    }

    .acoustics-content {
    }

    .acoustics-right {
        margin-top: 20px;
    }
}

/* ============================================
   滾動條樣式
   ============================================ */

.acoustics-content::-webkit-scrollbar {
    width: 6px;
}

.acoustics-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.acoustics-content::-webkit-scrollbar-thumb {
    background: rgba(230, 0, 43, 0.5);
    border-radius: 10px;
}

.acoustics-content::-webkit-scrollbar-thumb:hover {
    background: rgba(230, 0, 43, 0.7);
}