/*
Theme Name: 見時標本製作所
Theme URI: https://seeingtime.myhobbies.tw/
Author: 小龜 & 你
Description: 最終完全體版本 5.6：修正圖片變形、完整連結樣式、側邊欄固定佈局、極致 RWD 相容。全站字體全面黑體化。
Version: 5.6
*/

/* --- 1. 全域重設 --- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #fcfcfc;
    /* 💡 這裡已全面修改為中英文頂級黑體字型集 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "Apple LiGothic Medium", "Microsoft JhengHei", sans-serif;
    overflow-x: hidden;
    color: #333;
}

.site-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* 確保 WordPress 核心容器不限寬 */
#page, #content, #primary, main, .site-main, 
.specimen-archive-container, 
.specimen-single-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* --- 2. 左側垂直固定導覽列 (15%) --- */
.header-container {
    width: 15%;
    min-width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #fff;
    border-right: 1px solid #eee;
    padding: 60px 35px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    box-sizing: border-box;
}

.site-branding {
    margin-bottom: 45px;
    width: 60px;
    margin-top: 20px;
}
.site-branding h1 { margin: 0; font-size: 1.6rem; line-height: 1.2; letter-spacing: 1px; }
.site-branding a { text-decoration: none; color: #000; transition: 0.3s; }
.site-branding a:hover { opacity: 0.7; }

.main-navigation ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.main-navigation li { margin-bottom: 25px; }
.main-navigation a { 
    text-decoration: none; 
    color: #444; 
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s ease;
}
.main-navigation a:hover { color: #8d745a; padding-left: 8px; }

/* 側邊欄頁尾：固定於左側最下方 */
.side-footer { 
    margin-top: auto; 
    font-size: 11px; 
    color: #bbb; 
    line-height: 1.8; 
    letter-spacing: 0.5px;
}

/* --- 3. 右側主內容區域 (85%) --- */
.site-content {
    flex: 1;
    margin-left: 15%; 
    width: 85%;
    min-height: 100vh;
    padding: 30px 50px 50px 50px !important;
    box-sizing: border-box;
    display: block !important;
}

/* --- 4. 首頁與存檔頁瀑布流 --- */
.specimen-grid {
    width: 100% !important;
    display: block !important;
    clear: both;
}

.specimen-card {
    width: 20% !important; /* 電腦版五欄 */
    padding: 12px;
    box-sizing: border-box;
    float: left;
}

.specimen-card a {
    display: block;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none !important;
}

.specimen-card:hover a { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); }

.card-image { width: 100%; background: #f9f9f9; overflow: hidden; display: block; }
.card-image img { width: 100%; height: 100%; display: block; object-fit: cover; }

.card-info { padding: 20px 10px; text-align: center; background: #fff; }
.card-info h3 { font-size: 14px; color: #333; font-weight: 500; margin: 0; letter-spacing: 0.5px; }

/* --- 5. 作品詳情頁 (Single) --- */
.specimen-single-container {
    display: flex !important;
    width: 100% !important;
    gap: 50px;
    align-items: flex-start;
    box-sizing: border-box;
}

.specimen-main-content {
    flex: 0 0 38% !important; 
    max-width: 38% !important;
    width: 38% !important;
}

.specimen-sidebar {
    flex: 0 0 57% !important; 
    max-width: 57% !important;
    width: 57% !important;
    border-left: 1px solid #f0f0f0;
    padding-left: 45px;
    box-sizing: border-box;
}

/* 詳情頁麵包屑 */
.specimen-taxonomy-path { font-size: 0.9rem; color: #8d745a; margin-bottom: 25px; line-height: 1.6; }
.specimen-taxonomy-path a { text-decoration: none; color: #666; transition: 0.3s; }
.specimen-taxonomy-path a:hover { color: #8d745a; text-decoration: underline; }
.specimen-taxonomy-path .sep { margin: 0 8px; color: #ddd; }

/* 修正單張圖片變形的核心樣式 */
.specimen-visual-primary { width: 100%; margin-bottom: 30px; }
.specimen-visual-primary img { 
    width: 100% !important; 
    height: auto !important; /* 關鍵：禁止拉伸 */
    display: block; 
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); 
}

/* 詳情頁標題與 Meta */
.specimen-details h1 { font-size: 2rem; color: #222; margin-bottom: 25px; font-weight: 600; }
.specimen-meta-info { background: #fafafa; padding: 25px; border: 1px solid #eee; border-radius: 15px; margin-bottom: 35px; }
.meta-list { list-style: none; padding: 0; margin: 0; }
.meta-list li { margin-bottom: 15px; font-size: 1rem; color: #444; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.meta-list li:last-child { border-bottom: none; }
.scientific-name { color: #888; font-style: italic; }

/* 詳情頁下方相關作品網格 */
.specimen-sidebar h3 { font-size: 1.2rem; margin-bottom: 25px; color: #333; letter-spacing: 1px; }
.related-masonry-grid { width: 100% !important; clear: both; }
.related-masonry-item { width: 33.33% !important; padding: 8px; float: left; box-sizing: border-box; }
.related-masonry-item a { text-decoration: none; color: inherit; display: block; }
.related-img-box { border-radius: 12px; overflow: hidden; background: #f0f0f0; transition: 0.4s; }
.related-masonry-item:hover .related-img-box { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.related-info h4 { font-size: 12px; margin-top: 12px; text-align: center; color: #666; font-weight: 500; transition: 0.3s; }
.related-masonry-item:hover h4 { color: #8d745a; }

/* --- 6. 響應式 RWD 最終方案 --- */

@media (max-width: 1400px) { .specimen-card { width: 25% !important; } }

@media (max-width: 1200px) {
    .header-container { width: 200px; padding: 40px 25px; }
    .site-content { margin-left: 200px; width: calc(100% - 200px); padding: 30px !important; }
    .specimen-card { width: 33.33% !important; }
}

@media (max-width: 1024px) {
    .specimen-single-container { flex-direction: column !important; }
    .specimen-main-content, .specimen-sidebar {
        flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important;
        border-left: none !important; padding-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .site-wrapper { display: block; }
    .header-container { 
        width: 100%; height: auto; position: relative; 
        padding: 0px 20px; border-right: none; border-bottom: 1px solid #eee;
        flex-direction: row; justify-content: space-between; align-items: center;
    }
    .site-branding { margin-bottom: 0; width: auto; }
    .site-branding h1 { font-size: 1.2rem; }
    .main-navigation ul { flex-direction: row; gap: 15px;margin-bottom: 20px; justify-content: center;}
    .main-navigation li { margin-bottom: 0; }
    .main-navigation a { font-size: 1.1rem; }
    .side-footer { display: none; }
    

    .site-content { margin-left: 0 !important; width: 100% !important; padding: 20px !important; }
    
    .specimen-card { width: 50% !important; padding: 8px; }
    .related-masonry-item { width: 50% !important; }
}

@media (max-width: 480px) {
    .header-container {  }
}

/* --- 7. 特殊組件 --- */
.specimen-description p {
    font-size: 15px; line-height: 1.7rem; color: #444; letter-spacing: 1.2px;
    background-image: linear-gradient(#fcfcfc 1.65rem, #f0f0f0 1.65rem);
    background-size: 100% 1.7rem; background-attachment: local;
    margin-bottom: 1.7rem;
}

/* Swiper 導航按鈕樣式 */
.swiper-button-next, .swiper-button-prev { color: #000 !important; --swiper-navigation-size: 20px; font-weight: bold; }
.swiper-pagination-bullet-active { background: #000 !important; }

/* 通用頁尾 */
footer.site-footer {
    margin-left: 15%; padding: 40px; text-align: center; font-size: 11px; color: #bbb;
    border-top: 1px solid #f5f5f5; background: #fff;
}
@media (max-width: 768px) { footer.site-footer { margin-left: 0; } }

/* ==========================================================================
   手機板專用 LOGO 樣式設定
   ========================================================================== */

/* 預設隱藏（桌機板、寬螢幕不顯示） */
.mobile-logo-container {
    display: none;
}

/* 針對行動裝置 */
@media screen and (max-width: 768px) {
    .mobile-logo-container {
        display: block;          /* 在手機板顯示 */
        text-align: center;      /* 讓 LOGO 居中對齊 */
        padding: 20px 0px 30px 0px;         /* 設定上下間距 */
        border-bottom: 0px solid #eee; 
        background-color: #fff;  
    }

    .mobile-site-logo {
        max-width: 70%;        /* 控制 LOGO 在手機螢幕上的最大寬度 */
        height: auto;            /* 保持圖片比例不變形 */
        display: inline-block;
        vertical-align: middle;
    }
}
.line-button {
    max-width: 300px;
    background: #06c755;
    color: #fff;
    border-radius: 20px;
    height: 30px;
    font-size: 15px;
    text-align: center;
    padding: 5px;
margin: 0 auto;
    margin-bottom: 20px;
}
.line-button a {
    color: #fff;
    text-decoration: auto;
}