/* ===== 新凯城·玉兰苑 网站样式 ===== */

:root {
  --green: #2e6e4e;        /* 主色：玉兰叶绿 */
  --green-dark: #24553d;
  --green-soft: #eef5f0;
  --ink: #24312a;
  --ink-light: #5b6b60;
  --paper: #fdfdfb;
  --white: #ffffff;
  --gold: #c9a96a;         /* 点缀：玉兰金 */
  --radius: 12px;
  --shadow: 0 2px 12px rgba(36, 49, 42, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 253, 251, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(46, 110, 78, .12);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--green-dark);
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--green); display: flex; }
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px rgba(46, 110, 78, .15);
}

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--ink);
  font-size: 15px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--green);
  text-decoration: none;
  border-bottom-color: var(--green);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ===== 首屏 ===== */
.hero {
  position: relative;
  padding: 110px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(201, 169, 106, .18), transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(46, 110, 78, .14), transparent 60%),
    linear-gradient(180deg, var(--green-soft), var(--paper));
}

.hero-inner { position: relative; }

.hero-eyebrow {
  color: var(--gold);
  letter-spacing: .3em;
  font-size: 14px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: .12em;
  color: var(--green-dark);
  font-weight: 700;
}

.hero-sub {
  margin-top: 16px;
  color: var(--ink-light);
  font-size: 17px;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 999px;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(46, 110, 78, .35);
}
.btn-primary:hover { background: var(--green-dark); }

.btn-ghost {
  border: 1px solid var(--green);
  color: var(--green);
  background: var(--white);
}

/* ===== 通用板块 ===== */
.section { padding: 72px 0; }
.section-alt { background: var(--green-soft); }

.section-title {
  font-size: 28px;
  color: var(--green-dark);
  letter-spacing: .1em;
  margin-bottom: 14px;
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--gold);
}

.section-desc { color: var(--ink-light); margin-bottom: 24px; }
.section-desc code {
  background: rgba(46, 110, 78, .1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ===== 小区介绍 ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 10px;
}

.about-text p + p { margin-top: 14px; }

.about-facts {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about-facts li {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.about-facts strong { color: var(--ink-light); font-size: 13px; font-weight: 500; }
.about-facts span { color: var(--green-dark); font-size: 20px; font-weight: 700; }

/* ===== 公告通知 ===== */
.notice-list { display: flex; flex-direction: column; gap: 14px; }

.notice-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  cursor: pointer;
  transition: transform .15s ease;
}
.notice-card:hover { transform: translateY(-2px); }

.notice-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notice-badge {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--white);
  background: var(--green);
  border-radius: 4px;
  padding: 2px 8px;
}
.notice-badge.urgent { background: #c0533f; }

.notice-title { font-size: 17px; font-weight: 600; color: var(--ink); }

.notice-date {
  margin-left: auto;
  color: var(--ink-light);
  font-size: 13px;
}

.notice-body {
  margin-top: 10px;
  color: var(--ink-light);
  font-size: 15px;
  display: none;
  white-space: pre-line;
}
.notice-card.open .notice-body { display: block; }

.notice-toggle-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--green);
}
.notice-empty { color: var(--ink-light); }

/* ===== 便民服务 ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border-top: 3px solid var(--green);
}
.service-card h3 { font-size: 16px; color: var(--green-dark); margin-bottom: 6px; }
.service-card p { font-size: 14px; color: var(--ink-light); }
.service-card .service-phone { font-size: 16px; font-weight: 600; margin-top: 6px; }

/* ===== 活动风采 ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.photo-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.photo-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  background: linear-gradient(135deg, var(--green), var(--gold));
}

.photo-caption {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink-light);
}

/* ===== 联系我们 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.contact-card h3 { color: var(--green-dark); margin-bottom: 10px; font-size: 17px; }
.contact-card p { font-size: 14px; color: var(--ink-light); }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, .85);
  padding: 30px 0;
  text-align: center;
  font-size: 14px;
}
.footer-beian {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-beian a {
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-beian a:hover { color: var(--white); }
.beian-icon {
  width: 14px;
  height: auto;
}
.footer-sep { color: rgba(255, 255, 255, .45); }
.footer-link {
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
}
.footer-link:hover { color: var(--white); }

/* ===== 网站维护者弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.modal-box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 30px 22px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-light);
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover { color: var(--ink); }

.modal-title {
  font-size: 17px;
  color: var(--green-dark);
  margin-bottom: 14px;
}

.modal-qr {
  width: 220px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.modal-tip {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-light);
}

/* ===== 手机适配 ===== */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(46, 110, 78, .12);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 20px; border-bottom: 1px solid rgba(46, 110, 78, .08); }

  .about-grid { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 70px; }
  .notice-date { margin-left: 0; width: 100%; }
}
