/*
Theme Name: 老杭州
Theme URI: https://laohangzhou.com
Author: DoLike.COM
Description: 老杭州品牌形象主题，展现杭城历史韵味与地道生活。
Version: 1.0
License: GPL v2 or later
Text Domain: laohangzhou
*/

/* ========== CSS变量 ========== */
:root {
    --bg-cream: #faf6f0;
    --bg-warm: #f5ede0;
    --text-dark: #2c2416;
    --text-medium: #5c4a2e;
    --text-light: #8b7355;
    --gold: #b8860b;
    --gold-light: #d4a745;
    --jade: #6b8e6b;
    --jade-dark: #4a6b4a;
    --brick: #c45a3c;
    --brick-light: #e07b5a;
    --ink: #1a1a1a;
    --paper: #fdf8f2;
    --water-blue: #a8c8c0;
    --water-deep: #5a8a80;
    --shadow-sm: 0 2px 8px rgba(44, 36, 22, 0.06);
    --shadow-md: 0 4px 20px rgba(44, 36, 22, 0.1);
    --shadow-lg: 0 8px 40px rgba(44, 36, 22, 0.15);
    --shadow-xl: 0 20px 60px rgba(44, 36, 22, 0.2);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.2s ease;
    --max-width: 1200px;
    --header-height: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-warm); }
::-webkit-scrollbar-thumb { background: var(--gold-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ========== 导航栏 ========== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--header-height);
    background: rgba(250,246,240,0.88); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139,115,85,0.12);
    transition: all var(--transition);
    display: flex; align-items: center;
}
.navbar.scrolled { background: rgba(250,246,240,0.96); box-shadow: var(--shadow-md); height: 60px; }
.nav-inner {
    width: 100%; max-width: var(--max-width); margin: 0 auto;
    padding: 0 32px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
    color: var(--text-dark); font-family: 'Noto Serif SC', serif;
    font-weight: 700; font-size: 1.4rem; letter-spacing: 0.04em;
    white-space: nowrap; transition: var(--transition-fast);
}
.nav-logo:hover { color: var(--brick); }
.logo-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brick), var(--brick-light));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: 'Noto Serif SC', serif; font-weight: 900;
    font-size: 1.1rem; flex-shrink: 0; transition: var(--transition);
    box-shadow: 0 2px 8px rgba(196,90,60,0.3);
}
.nav-logo:hover .logo-icon {
    transform: rotate(-8deg) scale(1.05);
    box-shadow: 0 4px 16px rgba(196,90,60,0.45);
}
.nav-links { display: flex; list-style: none; gap: 8px; align-items: center; }
.nav-links a {
    text-decoration: none; color: var(--text-medium); font-weight: 500;
    font-size: 0.95rem; padding: 8px 16px; border-radius: 24px;
    transition: var(--transition-fast); position: relative; letter-spacing: 0.02em;
}
.nav-links a:hover,
.nav-links a.active { color: var(--brick); background: rgba(196,90,60,0.06); }
.nav-links a::after {
    content: ''; position: absolute; bottom: 2px; left: 50%;
    transform: translateX(-50%) scaleX(0); width: 20px; height: 2px;
    background: var(--brick); border-radius: 1px; transition: transform var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: translateX(-50%) scaleX(1); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px; z-index: 1001; }
.hamburger span { width: 26px; height: 2.5px; background: var(--text-dark); border-radius: 2px; transition: var(--transition-fast); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ========== Hero区域 ========== */
.hero {
    position: relative; min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    background: linear-gradient(170deg, #faf6f0 0%, #f0e8d8 30%, #e8dcc8 60%, #f5ede0 100%);
    overflow: hidden; padding-top: var(--header-height);
}
.hero-bg-pattern {
    position: absolute; inset: 0; pointer-events: none; opacity: 0.25;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(168,200,192,0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 30%, rgba(212,167,69,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 70%, rgba(196,90,60,0.2) 0%, transparent 50%);
}
.hero-bg-dots { position: absolute; inset: 0; pointer-events: none; opacity: 0.08; background-image: radial-gradient(circle, var(--text-dark) 1px, transparent 1px); background-size: 40px 40px; }
.hero-mountains { position: absolute; bottom: 0; left: 0; right: 0; pointer-events: none; z-index: 1; }
.mountain-svg { width: 100%; height: auto; display: block; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 700px; padding: 40px 32px; animation: fadeInUp 1s ease-out; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.hero-badge { display: inline-block; background: rgba(196,90,60,0.1); color: var(--brick); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; padding: 6px 18px; border-radius: 20px; margin-bottom: 20px; border: 1px solid rgba(196,90,60,0.2); }
.hero-title { font-family: 'Noto Serif SC', serif; font-size: clamp(2.6rem,5.5vw,4.2rem); font-weight: 900; color: var(--ink); line-height: 1.2; margin-bottom: 16px; letter-spacing: 0.03em; }
.hero-title .accent { color: var(--brick); position: relative; display: inline-block; }
.hero-title .accent::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 8px; background: rgba(212,167,69,0.35); border-radius: 4px; z-index: -1; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-medium); font-weight: 400; margin-bottom: 32px; letter-spacing: 0.04em; line-height: 1.6; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 50px; font-weight: 600; font-size: 1rem; letter-spacing: 0.03em; text-decoration: none; cursor: pointer; border: none; transition: all var(--transition); font-family: inherit; }
.btn-primary { background: var(--brick); color: #fff; box-shadow: 0 4px 16px rgba(196,90,60,0.35); }
.btn-primary:hover { background: #d46540; box-shadow: 0 6px 24px rgba(196,90,60,0.5); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text-dark); border: 2px solid var(--text-light); }
.btn-outline:hover { border-color: var(--brick); color: var(--brick); background: rgba(196,90,60,0.04); transform: translateY(-2px); }
.hero-float { position: absolute; pointer-events: none; z-index: 2; animation: floatGentle 6s ease-in-out infinite; }
.hero-float.circle1 { top: 18%; left: 8%; width: 60px; height: 60px; border-radius: 50%; background: rgba(212,167,69,0.25); }
.hero-float.circle2 { top: 60%; right: 10%; width: 80px; height: 80px; border-radius: 50%; background: rgba(168,200,192,0.3); animation-delay: 2s; }
.hero-float.circle3 { bottom: 20%; left: 20%; width: 40px; height: 40px; border-radius: 50%; background: rgba(196,90,60,0.2); animation-delay: 4s; }
@keyframes floatGentle { 0%,100% { transform: translateY(0) scale(1); } 25% { transform: translateY(-18px) scale(1.05); } 50% { transform: translateY(-6px) scale(1.02); } 75% { transform: translateY(-22px) scale(0.97); } }
.willow-branch { position: absolute; top: 0; right: 5%; width: 3px; height: 140px; background: linear-gradient(to bottom, var(--jade), transparent); border-radius: 2px; transform-origin: top; animation: sway 4s ease-in-out infinite; pointer-events: none; z-index: 0; opacity: 0.5; }
.willow-branch::after { content: ''; position: absolute; bottom: 0; left: -6px; width: 15px; height: 20px; background: rgba(107,142,107,0.4); border-radius: 0 60% 60% 0; }
.willow-branch:nth-child(2) { right: 8%; height: 100px; animation-delay: 1.5s; opacity: 0.35; }
@keyframes sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }

/* ========== 通用区块 ========== */
.section { padding: 80px 32px; position: relative; }
.section-inner { max-width: var(--max-width); margin: 0 auto; position: relative; z-index: 2; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; color: var(--brick); text-transform: uppercase; margin-bottom: 10px; background: rgba(196,90,60,0.08); padding: 4px 14px; border-radius: 12px; }
.section-title { font-family: 'Noto Serif SC', serif; font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 700; color: var(--ink); margin-bottom: 12px; letter-spacing: 0.03em; }
.section-desc { color: var(--text-medium); font-size: 1rem; max-width: 550px; margin: 0 auto; line-height: 1.7; }
.divider { width: 50px; height: 3px; background: var(--gold-light); border-radius: 2px; margin: 16px auto; opacity: 0.6; }

/* ========== 关于区块 ========== */
.about-section { background: var(--paper); overflow: hidden; position: relative; }
.about-section::before { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(168,200,192,0.15); pointer-events: none; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-image-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg, #d5c4a8, #c4b598, #b8a882, #d0c0a0); box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; }
.about-image-inner { text-align: center; color: #fff; padding: 32px; }
.about-image-inner .big-char { font-family: 'Noto Serif SC', serif; font-size: 8rem; font-weight: 900; opacity: 0.7; line-height: 1; text-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.about-image-inner .img-label { font-size: 1rem; letter-spacing: 0.06em; opacity: 0.9; margin-top: 8px; }
.about-image-wrap .decor-frame { position: absolute; inset: 12px; border: 2px solid rgba(255,255,255,0.4); border-radius: var(--radius-md); pointer-events: none; }
.about-text h3 { font-family: 'Noto Serif SC', serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; color: var(--ink); }
.about-text p { color: var(--text-medium); margin-bottom: 12px; line-height: 1.8; }
.about-stats { display: flex; gap: 32px; margin-top: 24px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-number { font-family: 'Noto Serif SC', serif; font-size: 2.4rem; font-weight: 900; color: var(--brick); line-height: 1; }
.stat-label { font-size: 0.85rem; color: var(--text-light); }

/* ========== 美食卡片 ========== */
.food-section { background: var(--bg-cream); }
.food-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.food-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.food-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.food-card-img { height: 200px; overflow: hidden; position: relative; }
.food-card-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.food-card-tag { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.9); color: var(--brick); font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 14px; backdrop-filter: blur(4px); }
.food-card-body { padding: 20px 22px; }
.food-card-body h4 { font-family: 'Noto Serif SC', serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.food-card-body p { font-size: 0.9rem; color: var(--text-medium); }
.food-card a { text-decoration: none; color: inherit; }

/* ========== 景点卡片 ========== */
.spots-section { background: var(--paper); overflow: hidden; position: relative; }
.spots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.spot-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 340px; box-shadow: var(--shadow-md); transition: all var(--transition); display: flex; align-items: flex-end; }
.spot-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.spot-card-bg { position: absolute; inset: 0; z-index: 0; }
.spot-card a { z-index: 1; width: 100%; text-decoration: none; }
.spot-card-content { padding: 28px; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%); color: #fff; }
.spot-card-content h4 { font-family: 'Noto Serif SC', serif; font-size: 1.4rem; margin-bottom: 4px; }
.spot-desc { font-size: 0.85rem; opacity: 0.9; }
.spot-tag { display: inline-block; font-size: 0.7rem; background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 10px; margin-bottom: 8px; }

/* ========== 老字号 ========== */
.brands-section { background: var(--bg-cream); }
.brands-scroll { display: flex; gap: 20px; overflow-x: auto; padding: 10px 0 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.brands-scroll::-webkit-scrollbar { display: none; }
.brand-card { flex: 0 0 220px; scroll-snap-align: start; background: #fff; border-radius: var(--radius-md); padding: 28px 20px; text-align: center; box-shadow: var(--shadow-sm); transition: all var(--transition); border: 1px solid transparent; }
.brand-card:hover { border-color: var(--gold-light); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.brand-icon { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.4rem; color: #fff; font-family: 'Noto Serif SC', serif; }
.brand-card h5 { font-family: 'Noto Serif SC', serif; font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.brand-card .since { font-size: 0.75rem; color: var(--text-light); }
.brand-card a { text-decoration: none; color: inherit; }

/* ========== CTA区块 ========== */
.cta-section { background: linear-gradient(160deg, #2c2416, #3d3020, #4a3828); color: #fff; text-align: center; overflow: hidden; position: relative; }
.cta-section .section-title { color: #fdf8f2; }
.cta-section .section-desc { color: #c8b898; }

/* ========== 页脚 ========== */
.footer { background: #1a1a1a; color: #a89880; padding: 48px 32px 28px; text-align: center; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-logo { font-family: 'Noto Serif SC', serif; font-size: 1.6rem; font-weight: 700; color: #fdf8f2; margin-bottom: 8px; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin: 20px 0; list-style: none; }
.footer-links a { color: #a89880; text-decoration: none; transition: var(--transition-fast); }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { font-size: 0.8rem; color: #6a5a40; margin-top: 20px; }

/* ========== 回到顶部 ========== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 46px; height: 46px; border-radius: 50%; background: var(--brick); color: #fff; border: none; cursor: pointer; font-size: 1.2rem; box-shadow: var(--shadow-md); z-index: 999; opacity: 0; pointer-events: none; transition: all var(--transition); display: flex; align-items: center; justify-content: center; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }

/* ========== 移动菜单 ========== */
.mobile-menu { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: var(--paper); z-index: 1000; padding: 80px 32px 32px; transition: right var(--transition); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; gap: 8px; }
.mobile-menu.active { right: 0; }
.mobile-menu a { display: block; text-decoration: none; color: var(--text-dark); font-weight: 500; font-size: 1.1rem; padding: 12px 16px; border-radius: var(--radius-sm); transition: var(--transition-fast); }
.mobile-menu a:hover, .mobile-menu a.active { background: rgba(196,90,60,0.08); color: var(--brick); }
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.mobile-overlay.active { opacity: 1; pointer-events: auto; }

/* ========== 新增模板样式 ========== */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.archive-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(44,36,22,0.06); transition: all 0.3s ease; }
.archive-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(44,36,22,0.12); }
.archive-card a { text-decoration: none; color: inherit; }
.archive-text h3 { font-family: 'Noto Serif SC', serif; font-size: 1.3rem; color: var(--ink); margin-bottom: 8px; }
.single-content { color: var(--text-medium); line-height: 1.9; font-size: 1.05rem; }
.single-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 20px 0; }
.single-content h2, .single-content h3, .single-content h4 { font-family: 'Noto Serif SC', serif; color: var(--ink); margin: 24px 0 12px; }
.single-content h2 { font-size: 1.8rem; }
.single-content h3 { font-size: 1.5rem; }
.single-content h4 { font-size: 1.2rem; }
.single-content blockquote { border-left: 4px solid var(--brick); padding-left: 20px; margin: 20px 0; color: var(--text-medium); font-style: italic; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.pagination .page-numbers { padding: 8px 14px; border-radius: 8px; background: #fff; color: var(--text-medium); text-decoration: none; border: 1px solid rgba(139,115,85,0.2); transition: var(--transition-fast); }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--brick); color: #fff; border-color: var(--brick); }
.related-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.3s; }
.related-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.related-item a { text-decoration: none; color: inherit; }
.page-content { color: var(--text-medium); line-height: 1.9; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-float, .willow-branch { display: none; }
    .section { padding: 56px 20px; }
    .food-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .spots-grid { grid-template-columns: 1fr; }
    .about-image-wrap { aspect-ratio: 3/2; }
    .about-image-inner .big-char { font-size: 5rem; }
}
@media (max-width: 560px) {
    .food-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
    .hero-content { padding: 32px 20px; }
    .btn { width: 100%; justify-content: center; }
    .about-stats { gap: 20px; justify-content: center; }
    .stat-number { font-size: 1.8rem; }
}

/* ==============================================
   文章内超链接颜色优化（砖红/鎏金配色）
   ============================================== */
/* 正文区域所有链接（排除按钮和整体卡片链接） */
.single-content a:not(.btn):not(.spot-card a):not(.archive-card a),
.page-content a:not(.btn),
.section-desc a:not(.btn),
.about-text a:not(.btn),
.guide-content a:not(.btn),
.timeline-card a:not(.btn),
.archive-text a:not(.btn),
.food-card-body a:not(.btn) {
    color: var(--brick);
    text-decoration: underline;
    text-decoration-color: rgba(196, 90, 60, 0.25);
    text-underline-offset: 3px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.single-content a:not(.btn):hover,
.page-content a:not(.btn):hover,
.section-desc a:not(.btn):hover,
.about-text a:not(.btn):hover,
.guide-content a:not(.btn):hover,
.timeline-card a:not(.btn):hover,
.archive-text a:not(.btn):hover,
.food-card-body a:not(.btn):hover {
    color: var(--gold-light);
    text-decoration-color: var(--gold-light);
}

/* 确保文章内列表、引用等处的链接也统一 */
.single-content li a,
.page-content li a,
.single-content blockquote a {
    color: var(--brick);
    text-decoration: underline;
    text-decoration-color: rgba(196, 90, 60, 0.25);
    text-underline-offset: 2px;
}
.single-content li a:hover,
.page-content li a:hover,
.single-content blockquote a:hover {
    color: var(--gold-light);
    text-decoration-color: var(--gold-light);
}