/* ============================================================
   Wanyu 物種展示系統 — wsd-style.css
   網站背景色 #d1e4dd
   地理標題  #a8c8c2 + 左粗線 #3a8fa0
   展開底色  #e6f3f5 + 邊框 #68b7c2
   子分類    白底 + 淡藍綠邊框
   物種卡片  白底 + 淡陰影
   ============================================================ */

.wsd-wrap { margin: 0 0 2em; }

/* ================================================================
   地理分組 — 標題列
   ================================================================ */
.wsd-geo-group { margin-bottom: 10px; }

.wsd-geo-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    background: #a8c8c2;
    border: none;
    border-left: 5px solid #3a8fa0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 700;
    color: #1a3038;
    text-align: left;
    transition: background 0.2s;
    box-sizing: border-box;
}

.wsd-geo-toggle:hover {
    background: #98bab4;
}

.wsd-geo-toggle.is-open {
    background: #98bab4;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* 展開底色 */
.wsd-geo-content {
    border: 1.5px solid #68b7c2;
    border-top: none;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    padding: 14px;
    background: #e6f3f5;
    box-sizing: border-box;
}

/* 內層島嶼（其他島嶼內的小島） */
.wsd-geo-group--inner { margin: 0 0 8px; }

.wsd-geo-group--inner .wsd-geo-toggle {
    padding: 10px 16px;
    font-size: 0.96em;
    background: #b8d4d0;
    border-left: 4px solid #3a8fa0;
    border-radius: 6px;
    color: #1a3038;
}

.wsd-geo-group--inner .wsd-geo-toggle:hover { background: #a8c8c2; }

.wsd-geo-group--inner .wsd-geo-toggle.is-open {
    background: #a8c8c2;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.wsd-geo-group--inner .wsd-geo-content {
    border-color: #68b7c2;
    border-radius: 0 0 6px 6px;
    padding: 12px;
    background: #eef8fa;
}

.wsd-toggle-arrow {
    font-size: 0.85em;
    flex-shrink: 0;
    color: #3a8fa0;
}

/* ================================================================
   類群標題（總覽頁用）
   ================================================================ */
.wsd-cat-section { margin-bottom: 20px; }

.wsd-cat-title {
    font-size: 0.92em;
    font-weight: 700;
    color: #1a3038;
    border-left: 4px solid #68b7c2;
    padding: 2px 0 2px 10px;
    margin: 0 0 12px;
}

/* ================================================================
   子分類折疊 — 白底 + 淡藍綠邊框
   ================================================================ */
.wsd-subcat-group { margin-bottom: 8px; }

.wsd-subcat-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: #ffffff;
    border: 1.5px solid #a8d8de;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.97em;
    font-weight: 600;
    color: #28303D;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.wsd-subcat-toggle:hover {
    background: #e6f3f5;
    border-color: #68b7c2;
}

.wsd-subcat-toggle.is-open {
    background: #e6f3f5;
    border-color: #68b7c2;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.wsd-subcat-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.wsd-subcat-name { flex: 1; }

.wsd-subcat-count {
    font-size: 0.84em;
    color: #68b7c2;
    font-weight: 400;
}

.wsd-subcat-content {
    border: 1.5px solid #a8d8de;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 12px;
    background: #f8fdfe;
}

/* ================================================================
   物種卡片 — 白底 + 淡陰影
   ================================================================ */
.wsd-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 4px 0;
}

.wsd-card {
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(40,48,61,0.10);
    transition: box-shadow 0.2s, transform 0.2s;
}

.wsd-card:hover {
    box-shadow: 0 4px 12px rgba(40,48,61,0.16);
    transform: translateY(-2px);
}

.wsd-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wsd-card__img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #e6f3f5;
}

.wsd-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wsd-card:hover .wsd-card__img img { transform: scale(1.04); }

.wsd-card__img--no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #90cdd5;
    font-size: 0.8em;
}

.wsd-card__title {
    padding: 7px 9px;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.3;
    color: #28303D;
}

/* ================================================================
   響應式
   ================================================================ */
@media (max-width: 1024px) {
    .wsd-cards { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
    .wsd-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .wsd-geo-toggle { font-size: 0.95em; padding: 12px 14px; }
    .wsd-subcat-thumb { width: 48px; height: 34px; }
    .wsd-card__title { font-size: 0.8em; padding: 5px 7px; }
}

@media (max-width: 400px) {
    .wsd-cards { grid-template-columns: repeat(2, 1fr); }
}
