/* ===== 老兵部落 - 主样式表 v3（丰富版） ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Inter:wght@400;500;600&display=swap');

:root {
  --green-dark: #1a3a16;
  --green-mid: #2d6b28;
  --green-light: #4a9a42;
  --green-pale: #eaf5e8;
  --brown: #5c3d2e;
  --brown-light: #8b6b55;
  --cream: #faf6ee;
  --cream-dark: #efe6d4;
  --orange: #d4893f;
  --orange-light: #f0c89a;
  --red: #8b2500;
  --gold: #c9a84c;
  --text: #1a0f0a;
  --text-light: #6b5848;
  --shadow-sm: 0 2px 8px rgba(44, 24, 16, 0.08);
  --shadow-md: 0 4px 24px rgba(44, 24, 16, 0.1);
  --shadow-lg: 0 8px 40px rgba(44, 24, 16, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font-cn: "Noto Serif SC", "华文楷体", "KaiTi", "楷体", serif;
  --font-body: "Inter", "思源黑体", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  background-image:
    radial-gradient(ellipse 800px 600px at 0% 0%, rgba(212, 137, 63, 0.06) 0%, transparent 100%),
    radial-gradient(ellipse 600px 800px at 100% 100%, rgba(74, 154, 66, 0.05) 0%, transparent 100%),
    repeating-linear-gradient(0deg, transparent, transparent 100px, rgba(0,0,0,0.008) 100px, rgba(0,0,0,0.008) 101px),
    repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(0,0,0,0.008) 100px, rgba(0,0,0,0.008) 101px);
  background-attachment: fixed;
}

/* ===== 顶部导航 ===== */
.header-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(180deg, rgba(26, 58, 22, 0.97) 0%, rgba(26, 58, 22, 0.92) 100%);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(74, 154, 66, 0.2);
  padding: 0 2rem; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}

.header-nav .logo {
  display: flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--cream);
  font-family: var(--font-cn); font-size: 1.35rem;
  font-weight: 700; letter-spacing: 4px;
}

.header-nav .logo svg { width: 34px; height: 34px; }

.nav-links { display: flex; gap: 0.15rem; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.65); text-decoration: none;
  padding: 0.5rem 1.2rem; font-size: 0.88rem; border-radius: 8px;
  transition: all 0.25s; white-space: nowrap; font-weight: 500;
  letter-spacing: 1px; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%); width: 18px; height: 2px;
  background: var(--orange); border-radius: 2px;
}

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; margin-left: auto; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--cream); border-radius: 2px; transition: 0.3s; }

@media (max-width: 820px) {
  .header-nav { padding: 0 1rem; }
  .hamburger { display: flex; }
  .nav-links { display: none; position: absolute; top: 68px; right: 0; left: auto; width: 200px; flex-direction: column; background: rgba(26, 58, 22, 0.98); padding: 0.5rem; gap: 0.4rem; border-bottom: 1px solid rgba(74, 154, 66, 0.25); border-left: 1px solid rgba(74, 154, 66, 0.15); border-bottom-left-radius: 12px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.5rem 1rem; font-size: 0.95rem; letter-spacing: 1px; text-align: right; }
  .nav-links a.active::after { display: none; }
}

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; margin-top: 68px; }

/* ===== HERO ===== */
.hero {
  position: relative; height: 78vh; min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background: linear-gradient(160deg, #0a1f08 0%, #142e10 20%, #1f4a1a 45%, #2d6b28 70%, #3a7e30 85%, #4a9a42 100%);
}

.hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(255,255,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 70% 60%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 80% 30% at 50% 80%, rgba(255,255,255,0.03) 0%, transparent 60%);
}

.hero-pattern {
  position: absolute; inset: 0; opacity: 0.05;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.05) 50px, rgba(255,255,255,0.05) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,255,255,0.05) 50px, rgba(255,255,255,0.05) 51px);
}

.hero-mountains {
  position: absolute; bottom: 0; left: 0; right: 0; height: 150px;
  background:
    radial-gradient(ellipse 200% 100% at 5% 100%, rgba(0,0,0,0.2) 0%, transparent 100%),
    radial-gradient(ellipse 150% 100% at 20% 100%, rgba(0,0,0,0.15) 0%, transparent 100%),
    radial-gradient(ellipse 180% 100% at 40% 100%, rgba(0,0,0,0.18) 0%, transparent 100%),
    radial-gradient(ellipse 160% 100% at 70% 100%, rgba(0,0,0,0.16) 0%, transparent 100%),
    radial-gradient(ellipse 200% 100% at 97% 100%, rgba(0,0,0,0.18) 0%, transparent 100%);
}

.hero-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero-particles span {
  position: absolute; width: 3px; height: 3px;
  background: rgba(255,255,255,0.15); border-radius: 50%;
  animation: float 8s infinite ease-in-out;
}
.hero-particles span:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 7s; }
.hero-particles span:nth-child(2) { left: 35%; top: 40%; animation-delay: 2s; animation-duration: 9s; width: 4px; height: 4px; }
.hero-particles span:nth-child(3) { left: 55%; top: 15%; animation-delay: 4s; animation-duration: 8s; }
.hero-particles span:nth-child(4) { left: 75%; top: 50%; animation-delay: 1s; animation-duration: 10s; width: 2px; height: 2px; }
.hero-particles span:nth-child(5) { left: 90%; top: 25%; animation-delay: 3s; animation-duration: 7.5s; }
.hero-particles span:nth-child(6) { left: 45%; top: 70%; animation-delay: 5s; animation-duration: 8.5s; width: 4px; height: 4px; }
.hero-particles span:nth-child(7) { left: 10%; top: 60%; animation-delay: 6s; animation-duration: 9s; }
.hero-particles span:nth-child(8) { left: 65%; top: 80%; animation-delay: 2.5s; animation-duration: 7s; width: 2px; height: 2px; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-20px) scale(1.5); opacity: 0.6; }
}

.hero-content { position: relative; z-index: 2; padding: 2rem; }

.hero h1 {
  font-family: var(--font-cn); font-size: clamp(3rem, 7vw, 5.5rem);
  color: #fff; text-shadow: 0 2px 40px rgba(0,0,0,0.3);
  letter-spacing: 10px; margin-bottom: 1rem; font-weight: 900;
}

.hero-h1-deco {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 0.8rem auto 0; width: 200px;
}
.hero-h1-deco .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--orange-light), transparent); }
.hero-h1-deco .diamond { width: 8px; height: 8px; background: var(--orange-light); transform: rotate(45deg); flex-shrink: 0; opacity: 0.7; }

.hero .subtitle {
  font-family: var(--font-cn); font-size: clamp(1rem, 2vw, 1.35rem);
  color: rgba(255,255,255,0.75); letter-spacing: 8px;
  margin-bottom: 2rem; font-weight: 400;
}

.hero .desc {
  color: rgba(255,255,255,0.65); font-size: 1.05rem;
  max-width: 420px; margin: 0 auto 2.8rem; line-height: 2;
  font-weight: 400;
}

.hero-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 3rem;
  background: linear-gradient(135deg, var(--orange) 0%, #d9964a 50%, #e0a45a 100%);
  color: #fff; text-decoration: none; border-radius: 50px;
  font-size: 1.05rem; transition: all 0.35s;
  font-family: var(--font-cn); letter-spacing: 3px;
  box-shadow: 0 4px 25px rgba(212, 137, 63, 0.35);
  font-weight: 600; position: relative; overflow: hidden;
}
.hero-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform 0.6s;
}
.hero-btn:hover::before { transform: translateX(100%); }
.hero-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 35px rgba(212, 137, 63, 0.45); }

/* ===== section dividers ===== */
.section-divider-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 0.6rem auto 1.5rem; width: 140px;
}
.section-divider-wrap .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); }
.section-divider-wrap .diamond { width: 7px; height: 7px; background: var(--orange); transform: rotate(45deg); flex-shrink: 0; border-radius: 1px; }

/* ===== section ===== */
.section { padding: 5rem 2rem; max-width: 1100px; margin: 0 auto; position: relative; }

.section-title {
  font-family: var(--font-cn); font-size: 2.1rem;
  text-align: center; color: var(--green-dark);
  margin-bottom: 0.3rem; font-weight: 700; letter-spacing: 3px;
}

.section-subtitle {
  text-align: center; color: var(--text-light);
  font-size: 0.92rem; margin-bottom: 3rem; font-weight: 400; letter-spacing: 1px;
}

/* ===== CARDS ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }

.card {
  background: rgba(255,255,255,0.9); border-radius: var(--radius);
  padding: 2rem 1.8rem; box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255,255,255,0.8);
  position: relative; overflow: hidden;
}

.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-light), var(--orange), var(--green-light));
  opacity: 0; transition: opacity 0.35s;
}
.card:hover::before { opacity: 1; }

.card::after {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(74, 154, 66, 0.04) 0%, transparent 70%);
  pointer-events: none; border-radius: 50%;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(74, 154, 66, 0.12); background: rgba(255,255,255,0.97); }

.card-icon { font-size: 2.2rem; margin-bottom: 1rem; display: block; }

.card-icon-line { display: block; width: 28px; height: 2px; background: linear-gradient(90deg, var(--green-light), transparent); margin-top: 0.6rem; border-radius: 2px; }

.card h3 { font-family: var(--font-cn); color: var(--green-dark); margin-bottom: 0.6rem; font-size: 1.15rem; font-weight: 600; }
.card p { color: var(--text-light); font-size: 0.9rem; line-height: 1.8; }

/* ===== QUOTE ===== */
.quote-section { position: relative; overflow: hidden; background: linear-gradient(135deg, #0d260a 0%, #1a3a16 30%, #1f4a1a 60%, #2d6b28 100%) !important; }
.quote-bg-deco { position: absolute; inset: 0; opacity: 0.04; background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.3) 1px, transparent 1px); background-size: 30px 30px; }
.quote-mark { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: 10rem; font-family: var(--font-cn); color: rgba(255,255,255,0.04); line-height: 1; pointer-events: none; }
.quote-text { font-family: var(--font-cn); font-size: 1.4rem; letter-spacing: 4px; line-height: 2; position: relative; z-index: 1; font-weight: 600; }
.quote-author { color: rgba(255,255,255,0.45); font-size: 0.88rem; margin-top: 1rem; letter-spacing: 3px; }

/* ===== FOOTER ===== */
.footer { background: linear-gradient(180deg, #1a3a16 0%, #0a1f08 100%); color: rgba(255,255,255,0.6); text-align: center; padding: 3.5rem 1.5rem 2.5rem; font-size: 0.88rem; border-top: 1px solid rgba(74, 154, 66, 0.12); position: relative; overflow: hidden; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); }
.footer .footer-logo { font-family: var(--font-cn); font-size: 1.4rem; color: var(--cream); margin-bottom: 0.6rem; font-weight: 700; letter-spacing: 4px; }
.footer a { color: var(--green-light); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--orange-light); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.tab-btn { padding: 0.55rem 1.6rem; border: 1.5px solid rgba(74, 154, 66, 0.2); background: rgba(255,255,255,0.6); color: var(--text-light); border-radius: 50px; cursor: pointer; font-size: 0.88rem; transition: all 0.3s; font-family: var(--font-cn); font-weight: 500; }
.tab-btn.active, .tab-btn:hover { background: var(--green-dark); color: #fff; border-color: var(--green-dark); box-shadow: 0 4px 12px rgba(26, 58, 22, 0.2); }
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

/* ===== GALLERY ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: var(--shadow-sm); }
.gallery-item:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.gallery-item:hover img { transform: scale(1.08); }
.lightbox { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.92); backdrop-filter: blur(12px); align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; animation: fadeIn 0.3s ease; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 24px; right: 32px; color: #fff; font-size: 2.2rem; cursor: pointer; background: rgba(0,0,0,0.3); border: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.lightbox-close:hover { background: rgba(255,255,255,0.15); }

/* ===== GRAFFITI ===== */
.graffiti-container { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
#graffitiCanvas { width: 600px; height: 400px; border: 2px solid var(--cream-dark); border-radius: var(--radius); cursor: crosshair; background: #fff; touch-action: none; box-shadow: var(--shadow-md); display: block; flex-shrink: 0; }
.graffiti-tools { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; justify-content: center; padding: 1rem; background: rgba(255,255,255,0.85); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.graffiti-tools input[type="color"] { width: 40px; height: 40px; border: 2px solid var(--cream-dark); border-radius: 8px; cursor: pointer; padding: 2px; }
.graffiti-tools input[type="range"] { width: 100px; accent-color: var(--green-mid); }
.tool-btn { padding: 0.5rem 1.3rem; border: 1.5px solid var(--green-light); background: #fff; color: var(--green-dark); border-radius: 8px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; font-weight: 500; }
.tool-btn:hover { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }

/* ===== GUESTBOOK ===== */
.guestbook-form { display: flex; flex-direction: column; gap: 1rem; max-width: 600px; margin: 0 auto 2rem; }
.guestbook-form input, .guestbook-form textarea { padding: 0.85rem 1.2rem; border: 2px solid var(--cream-dark); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font-body); transition: all 0.2s; background: rgba(255,255,255,0.8); }
.guestbook-form input:focus, .guestbook-form textarea:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(45, 107, 40, 0.1); background: #fff; }
.guestbook-form textarea { min-height: 120px; resize: vertical; }
.submit-btn { padding: 0.85rem 2.5rem; background: linear-gradient(135deg, var(--green-dark), var(--green-mid)); color: #fff; border: none; border-radius: 50px; font-size: 1rem; cursor: pointer; transition: all 0.3s; font-family: var(--font-cn); letter-spacing: 2px; font-weight: 500; display: inline-block; width: fit-content; box-shadow: 0 4px 14px rgba(26, 58, 22, 0.25); }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26, 58, 22, 0.35); background: linear-gradient(135deg, var(--green-mid), var(--green-light)); }
.guestbook-entries { max-width: 600px; margin: 0 auto; }
.guest-entry { background: rgba(255,255,255,0.85); padding: 1rem 1.3rem; border-radius: var(--radius-sm); margin-bottom: 0.8rem; box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,0.6); }
.guest-entry .name { font-weight: 600; color: var(--green-dark); font-size: 0.95rem; }
.guest-entry .date { color: var(--text-light); font-size: 0.8rem; margin-left: 0.5rem; }
.guest-entry .msg { margin-top: 0.4rem; color: var(--text); font-size: 0.9rem; line-height: 1.6; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.contact-card { background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border-radius: var(--radius); padding: 1.8rem 2rem; box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,0.6); transition: box-shadow 0.3s; }
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-card h3 { font-family: var(--font-cn); color: var(--green-dark); margin-bottom: 0.8rem; font-size: 1.1rem; font-weight: 600; }
.contact-card p { color: var(--text-light); font-size: 0.92rem; line-height: 1.8; }
.contact-card .label { color: var(--text); font-weight: 600; }
#mapContainer { width: 100%; height: 300px; border-radius: var(--radius-sm); overflow: hidden; margin-top: 1rem; box-shadow: var(--shadow-sm); }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

/* ===== DECORATIVE STRIPS ===== */
.full-bleed { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }

.pattern-strip {
  height: 6px;
  background: repeating-linear-gradient(90deg,
    var(--green-light) 0px, var(--green-light) 20px,
    transparent 20px, transparent 24px,
    var(--orange) 24px, var(--orange) 44px,
    transparent 44px, transparent 48px
  );
  opacity: 0.08;
}

/* ===== DECORATIVE CORNER ===== */
.card-corner { position: absolute; width: 16px; height: 16px; border-color: var(--green-light); opacity: 0.2; }
.card-corner.tl { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; }
.card-corner.tr { top: 8px; right: 8px; border-top: 2px solid; border-right: 2px solid; }
.card-corner.bl { bottom: 8px; left: 8px; border-bottom: 2px solid; border-left: 2px solid; }
.card-corner.br { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-up { animation: fadeUp 0.6s ease-out forwards; }
