/*
Theme Name: BuZhiDao
Theme URI: https://buzhidao.com
Author: BuZhiDao
Author URI: https://buzhidao.com
Description: A bilingual Chinese-Korean portal theme for WordPress.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: buzhidao
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important; /* No rounded corners */
}

body {
    font-family: "Playfair Display", serif;
    background-color: #f9f7f2;
    color: #333333;
    line-height: 1.6;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

a {
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #b5a28c;
}

/* Base text link underline animation */
.nav-menu > li > a, .widget ul a, .module-subcats a, .footer-widget ul a, .article-content a {
    position: relative;
    display: inline-block;
}

.nav-menu > li:not(.menu-item-has-children) > a::after, .widget ul a::after, .module-subcats a::after, .footer-widget ul a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #b5a28c;
    transition: width 0.3s ease;
}

.nav-menu > li:not(.menu-item-has-children) > a:hover::after, .widget ul a:hover::after, .module-subcats a:hover::after, .footer-widget ul a:hover::after {
    width: 100%;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(181, 162, 140, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 28px 15px;
    display: block;
    color: #333;
    transition: color 0.3s ease;
}

.nav-menu > li:hover > a,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
    color: #b5a28c;
}

/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #eee;
    border-top: 2px solid #b5a28c;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 999;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu .sub-menu li a:hover {
    background: #f9f7f2;
    color: #b5a28c;
}

/* Arrow indicator for parent items */
.nav-menu > li.menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu > li.menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    flex-shrink: 0;
}

.lang-switch a {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
    padding: 2px 5px;
}

.lang-switch a.active,
.lang-switch a.gt-current-lang {
    font-weight: 700;
    color: #333;
}

/* Mobile Menu Toggle - 桌面端隐藏 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 汉堡动画 - 打开时变 X */
.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-menu-overlay {
    display: none;
}

/* Mobile Sidebar */
.mobile-sidebar {
    display: none;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.5px;
}

.mobile-sidebar-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.mobile-sidebar-close:hover {
    color: #333;
}

.mobile-sidebar-nav {
    padding: 10px 0;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #f5f5f5;
}

.mobile-nav-menu li a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    color: #333;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu li.current-menu-item a {
    background: #f9f7f2;
    color: #b5a28c;
}

.mobile-nav-menu li.menu-item-has-children {
    position: relative;
}

.mobile-nav-menu li.menu-item-has-children > a {
    padding-right: 50px;
}

.mobile-nav-menu .mobile-submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-left: 1px solid #f0f0f0;
}

.mobile-nav-menu .mobile-submenu-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #999;
    transition: transform 0.3s ease;
}

.mobile-nav-menu li.menu-item-has-children.submenu-open > .mobile-submenu-toggle::after {
    transform: rotate(180deg);
}

.mobile-nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafafa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav-menu li.menu-item-has-children.submenu-open > .sub-menu {
    max-height: 500px;
}

.mobile-nav-menu .sub-menu li a {
    padding-left: 40px;
    font-size: 14px;
    color: #666;
}

.mobile-sidebar-lang {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.mobile-sidebar-lang a {
    font-size: 14px;
    color: #666;
    padding: 2px 5px;
}

.mobile-sidebar-lang a.active,
.mobile-sidebar-lang a.gt-current-lang {
    font-weight: 700;
    color: #333;
}

/* Banner */
.main-banner {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.banner-slides {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: grab;
}

.banner-slides:active {
    cursor: grabbing;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease, transform 2s ease;
    transform: scale(1.02);
    z-index: 0;
}

.banner-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 35px 50px;
    text-align: center;
    border: 1px solid rgba(181, 162, 140, 0.3);
    z-index: 2;
    min-width: 320px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.banner-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 50% !important; /* dots are an exception */
}

.banner-dot.active {
    background: #b5a28c;
}

.banner-text h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.banner-text p {
    font-size: 16px;
    color: #555;
    font-weight: 400;
}

/* Text Lists Module */
.bg-white {
    background-color: #ffffff;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
}

.text-lists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.text-list-box {
    background: #f9f7f2;
    padding: 30px;
    border: 1px solid transparent;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.text-list-box:hover {
    background: #ffffff;
    border-color: #dddddd;
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

.text-list-header {
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid #dddddd;
    padding-bottom: 15px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-list li {
    margin-bottom: 15px;
    border-bottom: 1px dashed #eeeeee;
    padding-bottom: 15px;
}

.text-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.text-list a {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.text-list a:hover .text-list-title {
    color: #b5a28c;
}

.text-list-title {
    font-size: 15px;
    line-height: 1.5;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.text-list-date {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    margin-top: 3px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Common Section */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #222;
}

/* Focus Headline (Hero) */
.hero-section {
    padding: 40px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.hero-card {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-card a {
    display: block;
    height: 100%;
}

.hero-card a:hover {
    background-color: transparent;
}

.hero-card a:hover .hero-title {
    color: #b5a28c;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.hero-content {
    padding: 30px;
}

.hero-card.main .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-top: 1px solid #b5a28c;
}

.hero-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777;
    margin-bottom: 10px;
    display: block;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.hero-card.sub {
    border: 1px solid #b5a28c;
}

.hero-card.sub .hero-content {
    border-top: 1px solid #b5a28c;
}

.hero-card.sub .hero-title {
    font-size: 20px;
}

.hero-excerpt {
    font-size: 15px;
    color: #666;
}

.sub-heroes {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Category Modules */
.category-module {
    margin-bottom: 60px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.module-title {
    font-size: 22px;
    font-weight: 700;
}

.module-subcats {
    display: flex;
    gap: 20px;
}

.module-subcats a {
    font-size: 14px;
    color: #666;
    padding: 2px 8px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-card {
    background: #ffffff;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 1px solid #dddddd;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: #b5a28c;
}

.post-card a {
    display: block;
}

.post-card a:hover {
    background-color: transparent;
}

.post-card a:hover .post-title {
    color: #b5a28c;
}

.post-thumb-wrapper {
    overflow: hidden;
    border-bottom: 1px solid #dddddd;
}

.post-card:hover .post-thumb-wrapper {
    border-bottom-color: #b5a28c;
}

.post-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumb {
    transform: scale(1.05);
}

.post-info {
    padding: 20px;
}

.post-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-subtitle {
    font-size: 15px;
    color: #222;
    line-height: 1.5;
    margin: -4px 0 10px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    font-size: 14px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Multimedia Interactive */
.multimedia-section {
    background-color: #222222;
    color: #ffffff;
    padding: 80px 0;
}

.multimedia-section .section-title {
    color: #ffffff;
    border-bottom: none;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.media-card {
    background: #333333;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
    position: relative;
    border: 1px solid #444444;
}

.media-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: #b5a28c;
    background: #2a2a2a;
}

.media-card.video {
    position: relative;
}

.media-card-image {
    overflow: hidden;
    aspect-ratio: 16/10;
    position: relative;
}

.media-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.media-card:hover .media-card-image img {
    transform: scale(1.08);
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    border-radius: 50% !important;
    transition: background 0.3s ease, color 0.3s ease;
}

.media-card:hover .video-play-icon {
    background: #b5a28c;
}

.media-card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #b5a28c;
    color: #fff;
    font-size: 11px;
    padding: 5px 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
}

.media-card-body {
    padding: 25px;
}

.media-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    color: #ffffff;
}

.media-card:hover .media-card-body h3 {
    color: #b5a28c;
}

.media-card-body p {
    font-size: 13px;
    color: #999999;
}

.media-card.letters {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.media-card.letters .card-head {
    border-bottom: 1px solid #444444;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-card.letters .card-head h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
}

.media-card.letters .card-head span {
    font-size: 11px;
    color: #999;
    letter-spacing: 1px;
}

.letter-item {
    margin-bottom: 20px;
}

.letter-item:last-child {
    margin-bottom: 0;
}

.letter-text {
    font-style: italic;
    color: #cccccc;
    line-height: 1.7;
    font-size: 14px;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    transition: color 0.3s ease;
}

.media-card:hover .letter-text {
    color: #ffffff;
}

.letter-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 32px;
    color: #b5a28c;
    line-height: 1;
    font-family: Georgia, serif;
}

.letter-author {
    text-align: right;
    color: #b5a28c;
    font-size: 12px;
    font-weight: 600;
}

/* Reader Letters - View More Button */
.letters-more-btn {
    margin-top: 20px;
    padding: 10px 18px;
    background: transparent;
    color: #b5a28c;
    border: 1px solid #b5a28c;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}

.letters-more-btn:hover {
    background: #b5a28c;
    color: #fff;
}

/* Reader Letters Lightbox */
.letters-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
}

.letters-lightbox {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: #2a2a2a;
    color: #ccc;
    z-index: 1600;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.letters-lightbox-open .letters-lightbox-overlay {
    display: block;
}

.letters-lightbox-open .letters-lightbox {
    display: flex;
}

.letters-lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.letters-lightbox-header h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    margin: 0;
}

.letters-lightbox-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.letters-lightbox-close:hover {
    color: #fff;
}

.letters-lightbox-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.letters-lightbox-body .letter-item {
    padding-bottom: 20px;
    border-bottom: 1px solid #3a3a3a;
}

.letters-lightbox-body .letter-item:last-child {
    border-bottom: none;
}

/* Latest News Scrolling */
.latest-scrolling {
    background: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    border: 1px solid #dddddd;
}

.scrolling-label {
    font-weight: 700;
    white-space: nowrap;
    color: #b5a28c;
    border-right: 1px solid #ddd;
    padding-right: 20px;
    letter-spacing: 1px;
}

.scrolling-content {
    overflow: hidden;
    flex-grow: 1;
}

.scrolling-wrapper {
    display: flex;
    gap: 40px;
    animation: scrollText 30s linear infinite;
    white-space: nowrap;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.partner-section {
    padding: 60px 0;
    background-color: #ffffff;
    border-top: 1px solid #dddddd;
}

.partner-section .section-title {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.partner-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.partner-logo {
    font-size: 24px;
    font-weight: 700;
    color: #cccccc;
    transition: color 0.3s ease;
    letter-spacing: 1px;
}

.partner-logo:hover {
    color: #b5a28c;
}

/* Footer */
.site-footer {
    background-color: #222222;
    color: #cccccc;
    padding: 60px 0 30px;
    border-top: 1px solid #444444;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #ffffff;
}

.footer-about-text {
    font-size: 14px;
    color: #cccccc;
    line-height: 1.8;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #cccccc;
    font-size: 14px;
    display: inline-block;
    padding: 2px 5px;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: #ffffff;
}

.footer-widget .contact-info {
    font-size: 14px;
    color: #999;
}

.qrcode-placeholder {
    width: 100px;
    height: 100px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 12px;
    border: 1px solid #ddd;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444444;
    font-size: 13px;
    color: #999999;
}

.footer-copyright-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-copyright-link:hover {
    color: #b5a28c;
}

/* Category Page (category.html) */
.page-header {
    background: #ffffff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #dddddd;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-description {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.archive-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    align-items: start;
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.archive-item {
    display: flex;
    background: #ffffff;
    gap: 30px;
    border: 1px solid #dddddd;
    transition: border-color 0.3s ease;
}

.archive-item:hover {
    border-color: #b5a28c;
}

.archive-item:hover .post-title {
    color: #b5a28c;
}

.archive-thumb {
    width: 300px;
    flex-shrink: 0;
    border-right: 1px solid #dddddd;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.archive-item:hover .archive-thumb {
    border-right-color: #b5a28c;
}

.archive-thumb img {
    transition: transform 0.5s ease;
}

.archive-item:hover .archive-thumb img {
    transform: scale(1.08);
}

.archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.archive-info {
    padding: 30px 30px 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.archive-info .post-meta {
    margin-bottom: 15px;
}

.archive-info .post-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.archive-info .post-excerpt {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

.cat-badge {
    background: #f4efe6;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border: 1px solid #b5a28c;
}

.page-numbers:hover,
.page-numbers.current {
    background: #333;
    color: #f9f7f2;
}

.sidebar {
    background: #fff;
    padding: 30px;
    border: 1px solid #dddddd;
}

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 1px solid #dddddd;
    padding-bottom: 10px;
}

.widget ul a {
    padding: 2px 5px;
    display: inline-block;
}

.cat-list {
    line-height: 2.5;
    font-size: 15px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    background: #f9f7f2;
    padding: 5px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
}

.tag-item:hover {
    border-color: #b5a28c;
}

/* About Page (page-about.html) */
.about-container {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.about-content {
    background: #ffffff;
    padding: 60px;
}

.about-section-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.about-text-zh {
    color: #444;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-text-ko {
    color: #666;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 40px;
}

.about-text-ko:last-child {
    margin-bottom: 0;
}

/* Contact Page (page-contact.html) */
.contact-container {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.contact-content {
    background: #ffffff;
    padding: 60px;
}

.contact-heading {
    font-size: 24px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.contact-heading-social {
    margin-top: 50px;
    margin-bottom: 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.contact-card-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.contact-card-item {
    margin-bottom: 10px;
}

.contact-social {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.contact-qr-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-qr-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    display: block;
}

.contact-qr-placeholder {
    width: 150px;
    height: 150px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

.contact-qr-label {
    font-size: 14px;
}

.contact-form {
    margin-top: 30px;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form-field {
    margin-bottom: 20px;
}

.contact-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.contact-label .required {
    color: #c00;
}

.contact-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #f9f7f2;
    transition: border-color 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.contact-input:focus {
    border-color: #b5a28c;
}

.contact-textarea {
    resize: vertical;
    font-family: inherit;
}

.contact-submit {
    background: #b5a28c;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-submit:hover {
    background: #a08e78;
}

.contact-result {
    margin-top: 20px;
    font-size: 14px;
    display: none;
}

/* Single Page (single.html) */
.single-article {
    background: #ffffff;
    padding: 60px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.article-meta span.cat {
    border: 1px solid #b5a28c;
    padding: 4px 10px;
    color: #333;
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
}

.article-subtitle-list {
    margin-top: 15px;
}

.article-subtitle-list .article-subtitle {
    margin: 0 0 8px;
}

.article-subtitle-list .article-subtitle:last-child {
    margin-bottom: 0;
}

.article-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: #666;
    font-weight: 400;
    border-left: 3px solid #b5a28c;
    padding-left: 15px;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content blockquote {
    border-left: 4px solid #b5a28c;
    padding-left: 20px;
    margin: 30px 0;
    font-size: 18px;
    color: #555;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    display: block;
}

.article-content a {
    color: #b5a28c;
}

.article-content a:hover {
    color: #8c7a66;
}

/* Article Media: Video & Gallery */
.article-media {
    margin-bottom: 40px;
}

.article-video video {
    display: block;
    width: 100%;
    background: #000;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Media Post Archive */
.media-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.media-archive-item {
    background: #fff;
    overflow: hidden;
}

.media-archive-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.media-archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-archive-item:hover .media-archive-thumb img {
    transform: scale(1.05);
}

.media-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(181, 162, 140, 0.9);
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    letter-spacing: 0.5px;
}

.media-archive-info {
    padding: 20px;
}

.media-archive-info .post-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 10px;
}

.media-archive-info .post-title a {
    color: #333;
}

.media-archive-info .post-title a:hover {
    color: #b5a28c;
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #dddddd;
}

.nav-link {
    display: flex;
    flex-direction: column;
    max-width: 45%;
    padding: 10px;
}

.nav-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.nav-title {
    font-size: 16px;
    font-weight: 700;
}

/* Page Template (page.html) */
.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-card {
    background: #f9f7f2;
    padding: 30px;
    border: 1px solid #dddddd;
    transition: border-color 0.3s ease;
}

.contact-card:hover {
    border-color: #b5a28c;
}

/* Admin Bar Offset */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid, .archive-layout {
        grid-template-columns: 1fr;
    }
    
    .post-grid, .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .archive-item {
        flex-direction: column;
    }
    
    .archive-thumb {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #dddddd;
    }
    .archive-item:hover .archive-thumb {
        border-bottom-color: #b5a28c;
    }
    
    .archive-info {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1100;
    }

    .mobile-menu-open .mobile-menu-overlay {
        display: block;
    }

    .mobile-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: #fff;
        z-index: 1200;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-open .mobile-sidebar {
        left: 0;
    }

    .header-inner {
        height: 56px;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 18px;
    }

    .logo img {
        max-height: 36px !important;
    }
    
    .post-grid, .media-grid, .footer-grid, .contact-info, .text-lists-grid {
        grid-template-columns: 1fr;
    }
    
    .single-article {
        padding: 30px 20px;
    }
    
    .article-title {
        font-size: 26px;
    }

    .article-subtitle {
        font-size: 15px;
        margin-top: 12px;
        padding-left: 12px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .media-archive-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        padding: 30px 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-social {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }

    .contact-qr-img,
    .contact-qr-placeholder {
        width: 120px;
        height: 120px;
        font-size: 12px;
    }

    .contact-form-row {
        grid-template-columns: 1fr;
    }

    .contact-submit {
        width: 100%;
    }
}
