/* === 靜思精舍自力耕生園區展覽館 === */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2E6B5E;
    --color-primary-dark: #1E4D43;
    --color-primary-light: #4A9485;
    --color-secondary: #C9A96E;
    --color-secondary-light: #E0CFA6;
    --color-accent: #D4837D;
    --color-bg: #FFF8F0;
    --color-bg-card: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #E8E0D8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --max-width: 1200px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Header & Navigation === */
.site-header {
    background: #6B916B;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.site-logo img,
.site-logo-img {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: background var(--transition), color var(--transition);
    display: block;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.main-nav a.active {
    background: #CCBA96;
    color: #705D32;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-gold {
    background: var(--color-secondary);
    color: #fff;
}

.btn-gold:hover {
    background: #B8963E;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: #fff;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 1rem;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30, 77, 67, 0.4) 0%, rgba(30, 77, 67, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px 20px;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero .subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Section Common === */
.section {
    padding: 60px 20px;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.section-title p {
    font-size: 1rem;
    color: var(--color-text-light);
}

.section-title .divider {
    width: 60px;
    height: 3px;
    background: var(--color-secondary);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* === Exhibition Hall Cards === */
.hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.hall-card {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.hall-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hall-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--color-border);
}

.hall-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hall-card:hover .hall-card-img img {
    transform: scale(1.05);
}

.hall-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.hall-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hall-card-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
}

.hall-card-body .location {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hall-card-body p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    flex: 1;
    margin-bottom: 16px;
}

.hall-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hall-card-body .btn {
    align-self: flex-start;
}

/* === Activity / News Section === */
.activity-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.activity-item {
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.activity-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.activity-img {
    height: 180px;
    overflow: hidden;
    background: var(--color-border);
}

.activity-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-body {
    padding: 20px;
}

.activity-body .date {
    font-size: 0.85rem;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.activity-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.activity-body p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

/* === Info Bar === */
.info-bar {
    background: var(--color-primary-dark);
    color: #fff;
    padding: 40px 20px;
}

.info-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.info-item {
    text-align: center;
}

.info-item .icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.info-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.info-item p {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.6;
}

/* === Hall Detail Page === */
.page-hero {
    position: relative;
    height: 360px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
    background: var(--color-primary);
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(30, 77, 67, 0.8) 0%, transparent 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

.page-hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.page-hero-content .location-info {
    font-size: 0.95rem;
    opacity: 0.85;
}

.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 20px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb span {
    margin: 0 6px;
}

.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 60px;
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-secondary-light);
}

.page-content p {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.page-content .highlight-box {
    background: linear-gradient(135deg, #f0f7f5, #faf6ee);
    border-left: 4px solid var(--color-primary);
    padding: 20px 24px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
}

.page-content .highlight-box p {
    color: var(--color-text);
    margin: 0;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    height: 200px;
    background: var(--color-border);
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Video embed */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 24px 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Info Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.info-table th,
.info-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0dcd4;
}

.info-table th {
    width: 120px;
    font-weight: 700;
    color: var(--color-primary-dark);
    background: #f5f0e8;
    white-space: nowrap;
}

.info-table td {
    color: var(--color-text);
}

/* === Footer === */
.site-footer {
    background: #6B916B;
    color: #000;
    padding: 40px 20px 24px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-col p,
.footer-col a {
    font-size: 0.9rem;
    color: #000;
    line-height: 2;
}

.footer-col a:hover {
    color: #333;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 0.8rem;
    color: #000;
}

/* === Responsive === */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-primary-dark);
        padding: 12px 20px;
        box-shadow: var(--shadow-md);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        padding: 12px 16px;
        border-radius: 0;
    }

    .header-actions {
        display: none;
    }

    .hero {
        min-height: 360px;
    }

    .hero h1 {
        font-size: 1.7rem;
        letter-spacing: 1px;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hall-grid {
        grid-template-columns: 1fr;
    }

    .activity-list {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 40px 16px;
    }

    .page-hero {
        height: 260px;
    }

    .page-hero-content h1 {
        font-size: 1.5rem;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 0.95rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* === Placeholder for missing images === */
.placeholder-img {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
    min-height: 200px;
}

/* === Exhibition Tabs (故宮南院風格) === */
.expo-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--color-border);
}

.expo-tab {
    background: none;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
    font-family: inherit;
}

.expo-tab:hover {
    color: var(--color-primary);
}

.expo-tab.active {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.expo-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px 2px 0 0;
}

/* Panels */
.expo-panel {
    display: none;
}

.expo-panel.active {
    display: block;
}

/* Exhibition Grid */
.expo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* Exhibition Card */
.expo-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.expo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.expo-card-img {
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

.expo-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.expo-card:hover .expo-card-img img,
.expo-card:hover .expo-card-img .placeholder-img {
    transform: scale(1.03);
}

.expo-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1.5px solid;
}

.expo-badge.special {
    background: rgba(255, 255, 255, 0.92);
    color: #B8453A;
    border-color: #B8453A;
}

.expo-badge.permanent {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.expo-card-body {
    padding: 20px;
}

.expo-date {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.expo-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.5;
}

.expo-card-body h3 a {
    color: inherit;
    text-decoration: none;
}

.expo-card-body h3 a:hover {
    color: var(--color-primary);
}

.expo-location {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.expo-btn {
    margin-top: 4px;
}

.expo-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.expo-empty p {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .expo-grid {
        grid-template-columns: 1fr;
    }

    .expo-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
