/* ===========================
   Blog.html 專屬樣式
   =========================== */

/* 背景顏色 */
body {
    background-color: #FAFAFA;
}

/*  Serif 字體 */
.font-serif {
    font-family: 'Playfair Display', serif, 'Noto Sans TC';
}

/* Parallax 背景 */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Text Reveal 動畫 */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transform: translateY(100%);
    opacity: 0;
    animation: revealText 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes revealText {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Magazine Grid Card Hover */
.mag-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mag-card:hover .mag-img {
    transform: scale(1.1);
}

.mag-img {
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.mag-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Header Scroll Effect 客製化 */
#main-header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: rgba(255, 255, 255, 0.98);
}

#main-header.scrolled .logo-area {
    max-height: 0px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    margin-bottom: 0;
    visibility: hidden;
}

#main-header.scrolled nav {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    margin-top: 0 !important;
    border-top: none !important;
}

.logo-area {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-out, padding 0.4s ease;
    max-height: 120px;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu 客製化 */
#mobile-menu {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 60;
    transition: opacity 0.3s;
    display: none;
}

#mobile-menu:not(.hidden) {
    display: block;
}

#mobile-menu-panel.open {
    transform: translateX(0);
}