/* =========================================
   鎖住背景防止滾動
========================================= */
body.menu-open {
    overflow: hidden;
}

/* =========================================
   導航列 (Primary Navigation)
========================================= */
.primary-nav {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    background-color: transparent;
    transition: background-color var(--duration-normal) var(--ease-brand), 
                box-shadow var(--duration-normal) var(--ease-brand);
}

.primary-nav.scrolled {
    background: var(--color-dark-teal);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 3vw, 1rem) 1.25rem;
}

.logo img {
    height: clamp(2rem, 5vw, 2.75rem);
}

/* 防止視窗縮放時觸發過場動畫閃爍 */
body.resize-animation-stopper .nav-links,
body.resize-animation-stopper .icon-bar {
    transition: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
	text-shadow:
        -1px -1px 0 var(--color-dark-teal);
         1px -1px 0 var(--color-dark-teal);
        -1px  1px 0 var(--color-dark-teal);
         1px  1px 0 var(--color-dark-teal);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.primary-nav.scrolled .nav-links a {
    color: var(--color-white);
}

.primary-nav.scrolled .nav-links a:hover {
    color: var(--color-gold);
}

/* =========================================
   漢堡按鈕與全螢幕選單
========================================= */
.menu-toggle {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002; 
    margin-right: 0.5rem; 
}

.icon-bar {
    display: block;
    width: 1.5rem;
    height: 3px;
    margin: 5px 0;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform var(--duration-fast) ease-in-out, opacity var(--duration-fast) ease-in-out;
}

.menu-toggle.active .icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .icon-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 48rem) {
    .menu-toggle { display: block; }
    .logo { position: absolute; left: 50%; transform: translateX(-50%); }
    
    .nav-links {
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background-color: var(--color-dark-teal);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1001; 
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease, visibility 0.5s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        font-size: clamp(1.5rem, 5vw, 2rem); 
        padding: 0.75rem 0;
    }
}

/* =========================================
   Hero Section
========================================= */
.hero-section {
    position: relative;
    width: 100%;
    background-color: var(--color-cream);
}

.hero-img {
    width: 100%;
	height: auto;
    aspect-ratio: 1920 / 700;
    object-fit: cover;
}

/* Index.html notice bar */
.notice-bar {
    width: 100%;
    background-color: #33622C; 
    color: var(--color-white);
    padding: 1rem 0;
}

.notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem;
}

.notice-tag {
    background-color: var(--color-gold);
    color: var(--color-dark-teal);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    
    /* 防止在手機版被擠壓與換行 */
    flex-shrink: 0;      
    white-space: nowrap; 
}

/* 針對公告文字的細節設定 */
.notice-text {
    line-height: 1.5;
    text-align: left;
}

/* 手機版RWD */
@media (max-width: 48rem) {
    .hero-section { 
        padding-top: 4rem; 
        background-color: var(--color-dark-teal); 
        
        /* 確保內部元素在手機版乖乖由上往下排好，絕不重疊 */
        display: flex;
        flex-direction: column;
    }
    
    .hero-img { 
        min-height: auto;
    }

    /* 手機版多行公告時，讓黃色標籤對齊第一行文字的頂部會更好看 */
    .notice-content {
        align-items: flex-start;
    }
    .notice-tag {
        margin-top: 3px;
    }
}

/* =========================================
   Health column 分頁欄式消息區 (讓 div 變成可點擊跳轉)
========================================= */
.card-link {
    position: absolute;
    inset: 0; /* 等同於 top: 0; right: 0; bottom: 0; left: 0; */
    z-index: 1; /* 蓋在最上面 */
    text-indent: -9999px; /* 把文字隱藏掉 */
}
