/* 【自訂字體載入】 */
@font-face {
    font-family: 'Poppins-Bold';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Avenir Light';
    src: url('../fonts/Avenir Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Weber Hand ITC Std';
    src: url('../fonts/Weber Hand ITC Std Regular.otf') format('opentype');
}

/* 【全局設定】 */
@view-transition {
    navigation: auto;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 【頂部導覽列】 */
.logo {
    justify-self: start;
    font-weight: bold;
    font-family: 'Weber Hand ITC Std', sans-serif;
    font-size: 24px;
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 50px;
    background-color: #7AD5F7;
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
}

.nav-links {
    justify-self: center;
}

.nav-links a {
    margin: 0 15px;
    font-size: 14px;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: #4681B4;
}

.social-icons {
    justify-self: end;
}

.social-icons a {
    display: inline-block;
    overflow: hidden;
    vertical-align: middle;
}

.social-icons a img {
    width: 50px;
    margin-left: 1px;
    vertical-align: middle;
    /* 不使用動畫 */
    transform: translateX(0);
    filter: drop-shadow(-100px 0 0 #4681B4);
}

/* Header 社群圖示 Hover 效果 (使用 CSS 濾鏡，取代雙圖片切換) */
.social-icons a:hover img {
    transform: translateX(100px);
}

/* 【頁尾】 */
footer {
    background-color: #7AD5F7;
    color: #7A706D;
    padding: 20px 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* 【漢堡選單圖示】 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    position: absolute;
    right: 25px;
    top: 20px;
    z-index: 1001;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 【響應式設定：導覽列】 */
@media (max-width: 768px) {
    header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 15px;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links,
    .social-icons {
        display: none;
        width: 100%;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        margin-top: 15px;
    }

    .nav-links.active a {
        margin: 10px 0;
        font-size: 16px;
    }

    .social-icons.active {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
    }
}

/* 【部落格文章共用排版模組 (post.html)】 */
.post-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 25px;
}

.post-header {
    text-align: left;
    margin-bottom: 50px;
}

.post-title {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 2.4rem;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 20px;
    text-align: left;
}

.post-meta {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    align-items: center;
}

.post-meta a {
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.post-meta a:hover {
    color: #7AD5F7;
}

.post-cover-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-content {
    font-family: 'Avenir Light', Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #444;
    letter-spacing: 0.3px;
}

.post-content p {
    margin-bottom: 10px;
}

.post-content-quote {
    font-style: italic;
}

.post-divider {
    border: 0;
    height: 1px;
    background-color: #999;
    margin: 40px 0;
}

.post-subtitle {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 1.75rem;
    color: #2c3e50;
    margin: 60px 0 25px;
    border-left: 5px solid #7AD5F7;
    padding-left: 15px;
}

.post-subtitle-h2 {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 60px 0 20px;
}

.post-subtitle-h3 {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 20px 0 10px;
}

.post-subtitle-h3 a {
    text-decoration: underline;
}

.post-image {
    width: 100%;
    margin: 40px 0 15px;
}

.post-image-row {
    display: flex;
    gap: 5px;
    margin: 20px 0;
}

.post-image-row img {
    width: 50%;
    height: 250px;
    object-fit: cover;
}

/* 三張或多張照片的網格排版 */
.post-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 5px;
    margin: 20px 0;
}

.post-image-grid img {
    width: 100%;
    height: 200px;
    /* 固定高度讓排版更整齊，可依需求調整 */
    object-fit: cover;
}

.post-image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-top: -10px;
    margin-bottom: 40px;
}

.post-quote {
    background: #f4fcff;
    border-left: 5px solid #7AD5F7;
    padding: 25px 30px;
    margin: 40px 0;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }

    .post-subtitle {
        font-size: 1.5rem;
    }

    .post-content {
        font-size: 1.05rem;
    }
}

/* 【文章互動與分享區 (post.html)】 */
.post-interaction-area {
    margin-top: 50px;
    padding-top: 20px;
}

.share-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: right;
}

.share-icons a img {
    height: 50px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

/* 文章底部社群分享圖示 Hover 變換與浮動動畫 */
.share-icons a:hover img {
    transform: translateY(-5px);
    /* 透過濾鏡將黑色圖示轉為接近 #7AD5F7 的天藍色 */
    filter: invert(75%) sepia(51%) saturate(594%) hue-rotate(179deg) brightness(104%) contrast(96%);
}

/* 複製連結的 Toast 提示 */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    z-index: 9999;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-toast.show {
    opacity: 1;
}

.divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 25px 0;
}


/* 【文章底部作者區】 */
.post-author-section {
    display: flex;
    align-items: center;
    position: relative;
    padding: 30px 0 50px;
}

.nav-prev,
.nav-next {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: #333;
    max-width: 35%;
    transition: color 0.3s ease;
}

.nav-prev {
    left: 0;
}

.nav-next {
    right: 0;
}

.nav-title {
    font-size: 0.95rem;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.nav-prev:hover .nav-title {
    color: #7AD5F7;
    transform: translateX(-5px);
}

.nav-next:hover .nav-title {
    color: #7AD5F7;
    transform: translateX(5px);
}

.nav-prev img,
.nav-next img {
    height: 80px;
    flex-shrink: 0;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.nav-prev:hover img {
    transform: translateX(-5px);
    filter: invert(75%) sepia(51%) saturate(594%) hue-rotate(179deg) brightness(104%) contrast(96%);
}

.nav-next:hover img {
    transform: translateX(5px);
    filter: invert(75%) sepia(51%) saturate(594%) hue-rotate(179deg) brightness(104%) contrast(96%);
}

.author-details {
    margin: 0 auto;
    text-align: center;
}

.author-details p {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #000;
}

.author-details img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-details a:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 【相關文章區 (You might also like)】 */
.related-posts-section {
    background-color: #f8f9fa;
    padding: 60px 0;
    width: 100%;
}

.related-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 25px;
}

.related-container h2 {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 30px;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.related-posts-list li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #f9f9f9;
    border-radius: 12px;
    border-bottom: none;
    transition: transform 0.3s ease;
}

.related-posts-list li:hover {
    transform: translateY(-5px);
}

.related-posts-list li:last-child {
    border-bottom: none;
}

.related-date {
    font-family: 'Poppins-Bold', Arial, sans-serif;
    font-size: 0.85rem;
    color: #7AD5F7;
    margin-bottom: 12px;
}

.related-title {
    font-size: 1.1rem;
    color: #444;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: bold;
}

.related-title:hover {
    color: #7AD5F7;
}

.post-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content li::marker {
    color: #7AD5F7;
}

.post-content a {
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: #7AD5F7;
}