/* =================================
   經歷詳細頁面專用樣式
   ================================= */

/* =================================
   1. 基礎設置與重置樣式
   ================================= */

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* =================================
   2. 導航欄樣式
   ================================= */

header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 90%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    text-decoration: none;
    color: #005f73;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

nav a:hover {
    color: #00a896;
}

/* 語言切換按鈕樣式 */
#lang-toggle {
    background: none;
    border: 2px solid #005f73;
    color: #005f73;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
}

#lang-toggle:hover {
    background-color: #005f73;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 95, 115, 0.3);
}

/* =================================
   3. 主要內容區域
   ================================= */

main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

article {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

article h1 {
    font-size: 2.2rem;
    color: #005f73;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 3px solid #00a896;
    padding-bottom: 15px;
}

.meta {
    font-size: 1rem;
    color: #666;
    margin: 5px 0;
    font-style: italic;
}

section {
    margin-bottom: 40px;
}

section:last-child {
    margin-bottom: 0;
}

section h2 {
    font-size: 1.8rem;
    color: #007a6e;
    margin-top: 0;
    margin-bottom: 20px;
    border-left: 4px solid #00a896;
    padding-left: 15px;
}

section p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
}

section ul,
section ol {
    margin: 15px 0;
    padding-left: 25px;
}

section li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #555;
}

section li strong {
    color: #005f73;
}

/* =================================
   4. 圖片樣式
   ================================= */

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    object-fit: cover;
}

/* 實習照片網格 (用於 experience1) */
.internship-photos {
    display: flex;
    gap: 25px;
    margin: 25px 0;
    align-items: flex-start;
}

.photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.photo-item img {
    width: auto;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    object-fit: contain;
    max-width: 100%;
}

/* 中醫社照片網格 (用於 experience2) */
.club-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.poster-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poster-grid img,
.poster-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

/* 圖片說明文字樣式 */
.image-caption {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* =================================
   5. 血腥內容警告樣式
   ================================= */

.warning-section {
    margin: 30px 0 20px 0;
}

.warning-box {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.warning-box .warning-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.warning-box p {
    margin: 5px 0;
    color: #856404;
    font-weight: 500;
}

.censored-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.censored-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.censored-image {
    width: 100%;
    height: 100%;
    display: block;
    filter: blur(20px);
    transition: filter 0.3s ease;
    object-fit: contain;
}

.warning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.warning-text {
    text-align: center;
    color: #fff;
}

.warning-text .warning-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.warning-text p {
    margin: 5px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
}

/* 點擊後顯示圖片 */
.censored-image-container.revealed .censored-image {
    filter: blur(0);
}

.censored-image-container.revealed .warning-overlay {
    opacity: 0;
    pointer-events: none;
}

.censored-image-container:hover .warning-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

/* =================================
   6. PDF 嵌入樣式
   ================================= */

.pdf-container {
    width: 100%;
    margin: 25px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #f5f5f5;
}

.pdf-container iframe {
    width: 100%;
    height: 800px;
    border: none;
    display: block;
}

/* =================================
   7. 按鈕樣式
   ================================= */

.cta-button {
    display: inline-block;
    background-color: #005f73;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 10px;
}

.cta-button:hover {
    background-color: #00a896;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 95, 115, 0.3);
}

/* =================================
   8. 頁腳樣式
   ================================= */

footer {
    text-align: center;
    padding: 20px;
    color: #777;
    margin-top: 40px;
    position: relative;
}

.footer-crafting-table {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto 15px auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* =================================
   遊戲圖片樣式
   ================================= */

/* 隨機遊戲圖片 - Steve 位於右下角 */
.random-game-image {
    position: fixed;
    bottom: 0;
    right: 0;
    width: auto;
    height: 100px;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.random-game-image.show {
    opacity: 0.3;
}

/* 目標圖片 - 怪物位於左下角 */
.target-image {
    position: fixed;
    bottom: 0;
    left: 0;
    width: auto;
    height: 100px;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.target-image.show {
    opacity: 0.4;
}

/* Item 圖片 - 物品疊在 crafting table 上方 */
.item-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 50px;
    width: auto;
    opacity: 0;
    transition: opacity 0.5s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    z-index: 10;
}

.item-image.show {
    opacity: 1;
}

/* =================================
   9. 響應式設計 - 手機版
   ================================= */

@media (max-width: 850px) {
    .pdf-container iframe {
        height: 600px;
    }
    header {
        padding: 1rem 3%;
        width: 94%;
    }
    
    main {
        padding: 10px;
        margin: 10px auto;
    }
    
    article {
        padding: 20px;
    }
    
    article h1 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .meta {
        font-size: 0.9rem;
    }
    
    section h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    section {
        margin-bottom: 30px;
    }
    
    .image-grid,
    .club-photos {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .internship-photos {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .internship-photos .photo-item {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .internship-photos .photo-item img {
        width: auto;
        height: 300px;
        max-width: 100%;
    }
    
    .poster-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .censored-images {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .warning-text .warning-icon {
        font-size: 2rem;
    }
    
    .warning-text p {
        font-size: 1rem;
    }
    
    .image-caption {
        font-size: 0.85rem;
    }
    
    .random-game-image {
        height: 100px;
        bottom: 0;
        right: 0;
    }
    
    .target-image {
        height: 100px;
    }
    
    .item-image {
        height: 50px;
    }
}

/* =================================
   10. 響應式設計 - 平板版
   ================================= */

@media (min-width: 600px) and (max-width: 850px) {
    .pdf-container iframe {
        height: 700px;
    }
    
    .internship-photos {
        flex-direction: row;
    }
    
    .internship-photos .photo-item img {
        height: 350px;
    }
    
    .club-photos,
    .poster-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 851px) {
    .internship-photos {
        flex-direction: row;
    }
    
    .internship-photos .photo-item img {
        height: 400px;
    }
    
    .club-photos {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .poster-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
