/* ===================== 基础布局 ===================== */
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  background: #f8f8f8;
  color: #34495e;
  margin: 0;
  padding: 0;
}
.container {
  max-width: 900px;
  margin: 30px auto 30px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(80,120,80,0.08);
  padding: 32px 24px 32px 24px;
}

/* ===================== 头部与导航 ===================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 110px;
  margin-bottom: 18px;
  position: relative;
}
#profile {
  display: flex;
  align-items: center;
}
#lang-switch {
  background: rgba(255,255,255,0.9);
  padding: 6px 16px 6px 12px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: 1em;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}
nav#main-nav {
  margin: 18px 0 24px 0;
  font-size: 1.13em;
  text-align: center;
}
nav#main-nav a {
  color: #4B7543;
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.2s;
}
nav#main-nav a:hover {
  color: #2d4d2a;
  text-decoration: underline;
}

/* ===================== 多语言下拉菜单 ===================== */
.lang-dropdown {
  position: relative;
  display: inline-block;
}
.lang-dropbtn {
  background: #fff;
  color: #34495e;
  font-size: 1em;
  border: 2px solid #4B7543;
  border-radius: 18px;
  padding: 6px 18px 6px 12px;
  cursor: pointer;
  font-weight: 600;
  min-width: 90px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: border 0.2s, box-shadow 0.2s;
}
.lang-dropbtn:hover, .lang-dropbtn:focus {
  border-color: #2d4d2a;
  box-shadow: 0 4px 16px rgba(75,117,67,0.10);
}
.lang-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #fff;
  min-width: 120px;
  box-shadow: 0 4px 16px rgba(75,117,67,0.10);
  border-radius: 12px;
  z-index: 99;
  margin-top: 4px;
  padding: 6px 0;
}
.lang-dropdown:hover .lang-dropdown-content,
.lang-dropdown:focus-within .lang-dropdown-content {
  display: block;
}
.lang-dropdown-content a {
  color: #34495e;
  padding: 8px 18px 8px 16px;
  text-decoration: none;
  display: block;
  font-size: 1em;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-dropdown-content a.active,
.lang-dropdown-content a:hover {
  background: #e0f0e0;
  color: #4B7543;
  font-weight: 600;
}

/* ===================== 主要内容区 ===================== */
section {
  margin-bottom: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
h2 {
  font-size: 1.35em;
  color: #4B7543;
  margin-bottom: 16px;
  border-left: 5px solid #e0f0e0;
  padding-left: 12px;
  text-align: left;
  box-sizing: border-box;
}

/* ===================== 旅行故事 ===================== */
.story-content {
  background: #f8fff8;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 2px 8px #e0f0e0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.story-content p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #34495e;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ===================== 旅行贴士 ===================== */
.tips-container {
  background: #f8fff8;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 2px 8px #e0f0e0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
}
.tips-category {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.tips-category h3 {
  color: #4B7543;
  margin-bottom: 12px;
  font-size: 1.1em;
  word-wrap: break-word;
}
.tips-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tips-category li {
  padding: 4px 0;
  color: #666;
  position: relative;
  padding-left: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.tips-category li:before {
  content: "•";
  color: #4B7543;
  position: absolute;
  left: 0;
}

/* 旅行贴士地图占位区域 */
.tips-map-placeholder {
  width: 100%;
  height: 260px;
  background: #e0e0e0 url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" xmlns="http://www.w3.org/2000/svg"><rect width="100%25" height="100%25" fill="%23e0e0e0"/><text x="50%25" y="50%25" font-size="22" fill="%23999" text-anchor="middle" alignment-baseline="middle">地图展示区域</text></svg>') center center no-repeat;
  border-radius: 12px;
  margin: 18px 0 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1.2em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* ===================== 画廊 ===================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}
.gallery-item {
  background: #f6f8f6;
  border-radius: 10px;
  box-shadow: 0 2px 8px #e0f0e0;
  overflow: hidden;
  text-align: center;
  padding: 8px 0 4px 0;
  box-sizing: border-box;
}
.gallery-item img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
  box-sizing: border-box;
}
.gallery-item img:hover {
  transform: scale(1.04);
}
.gallery-desc {
  font-size: 1em;
  color: #4B7543;
  margin-bottom: 6px;
  word-wrap: break-word;
}
.gallery-pagination {
  text-align: center;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}
.gallery-pagination button {
  background: #4B7543;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 4px 14px;
  font-size: 1.1em;
  margin: 0 6px;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
}
.gallery-pagination button:disabled {
  background: #bbb;
  cursor: not-allowed;
}

/* ===================== 弹窗 ===================== */
.img-modal {
  display: none;
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.img-modal-bg {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
}
.img-modal img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 4px 24px #222;
}

/* ===================== 联系表单 ===================== */
#contact-form {
  background: #f8fff8;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px #e0f0e0;
  width: 100%;
  margin: 16px 0 12px 0;
  box-sizing: border-box;
  overflow: hidden;
}
#contact-form input[type="email"],
#contact-form input[type="text"],
#contact-form textarea {
  width: 100%;
  font-size: 1em;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 2px solid #4B7543;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
  transition: border 0.2s;
}
#contact-form input[type="email"]:focus,
#contact-form input[type="text"]:focus,
#contact-form textarea:focus {
  border-color: #2a4d2a;
}
#contact-form label {
  display: block;
  margin-bottom: 8px;
  color: #4B7543;
  font-weight: 600;
}
#contact-form input[type="file"] {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px 0;
  border: 2px dashed #4B7543;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
}
#contact-form button[type="submit"] {
  background: #4B7543;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 500;
  padding: 0.5em 1.2em;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s;
  width: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 8px #e0f0e0;
}
#contact-form button[type="submit"]:hover {
  background: #355c2e;
}
#contact-result {
  text-align: center;
  color: #4B7543;
  font-size: 1.08em;
  margin-top: 12px;
  padding: 8px;
  border-radius: 6px;
  background: #e8f5e8;
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ===================== 地图 ===================== */
#map-container {
  border-radius: 12px;
  box-shadow: 0 2px 8px #e0f0e0;
  background: #f6f8f6;
  margin-bottom: 10px;
}
#map-api-count {
  text-align: right;
  font-size: 0.98em;
  color: #4B7543;
}
#map-search-input {
  margin-bottom: 0;
}
#map-search-history {
  font-size: 1em;
}
.search-history-item:hover {
  background: #f0f4c7;
}

/* ===================== 社交账号 ===================== */
.social-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 0 0;
}
.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #4B7543;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fff8;
  box-shadow: 0 1px 4px rgba(75, 117, 67, 0.08);
  transition: all 0.2s;
  min-width: 48px;
  max-width: 60px;
}
.social-item:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 2px 8px rgba(75, 117, 67, 0.18);
  background: #e8f5e8;
}
.social-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin-bottom: 4px;
  border-radius: 5px;
}
.social-item span {
  font-size: 0.78em;
  text-align: center;
  line-height: 1.1;
  font-weight: 500;
  margin-top: 0;
}
@media (max-width: 700px) {
  .social-list { gap: 7px; }
  .social-item { min-width: 40px; max-width: 48px; padding: 4px 4px; }
  .social-item img { width: 22px; height: 22px; }
  .social-item span { font-size: 0.7em; }
}
@media (max-width: 480px) {
  .social-list { gap: 5px; }
  .social-item { min-width: 32px; max-width: 38px; padding: 2px 2px; }
  .social-item img { width: 16px; height: 16px; }
  .social-item span { font-size: 0.65em; }
} 

/* ===================== 响应式 ===================== */
@media (max-width: 700px) {
  .container { padding: 10px 24px; }
  .gallery-grid { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: flex-start; }
  #profile { margin-bottom: 10px; }
  .social-list { gap: 7px; }
  .social-item { min-width: 40px; max-width: 48px; padding: 4px 4px; }
  .social-item img { width: 22px; height: 22px; }
  .social-item span { font-size: 0.7em; }
  
  /* 确保所有区域在小屏幕上都能正确显示 */
  section { margin-bottom: 24px; }
  .story-content, .tips-container, #contact-form { padding: 16px; }
  .tips-grid { grid-template-columns: 1fr; gap: 16; }
  .gallery-grid { gap: 12px; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  #contact-form { padding: 12px; }
  .social-list { gap: 5px; }
  .social-item { min-width: 32px; max-width: 38px; padding: 2px 2px; }
  .social-item img { width: 16px; height: 16px; }
  .social-item span { font-size: 0.65em; }
  
  /* 确保所有区域在超小屏幕上都能正确显示 */
  section { margin-bottom: 20px; }
  .story-content, .tips-container, #contact-form { padding: 12px; }
  .tips-grid { gap: 12; }
  .gallery-grid { gap: 8; }
  h2 { font-size: 1.2em; padding-left: 8px; }
} 

/* 图片上传自定义按钮样式 */
.file-label {
  position: relative;
  display: inline-block;
  background: #4B7543;
  color: #fff;
  padding: 0.5em 1.2em;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 8px;
  margin-top: 6px;
  box-shadow: 0 2px 8px #e0f0e0;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
  text-align: left;
  width: auto;
  min-width: 0;
  max-width: none;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
  height: auto;
}

#img-upload {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  display: inline-block;
  margin: 0;
  padding: 0;
  background: #eae8f1;
}

#img-upload-label.file-label {
  background: #eae8f1;
  color: #4B7543;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: inherit;
  padding: 0.5em 1.2em;
  box-sizing: border-box;
}

#img-upload-label.file-label::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.5em;
  background: url('data:image/svg+xml;utf8,<svg fill="%234B7543" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 19H5V8H8.17L9.59 6.59C9.84 6.34 10.2 6.2 10.59 6.2C10.98 6.2 11.34 6.34 11.59 6.59L13.41 8.41C13.66 8.66 14.02 8.8 14.41 8.8C14.8 8.8 15.16 8.66 15.41 8.41L17.83 6H19C20.1 6 21 6.9 21 8V19C21 20.1 20.1 21 19 21ZM19 8.17L17.59 9.59C17.34 9.84 16.98 9.98 16.59 9.98C16.2 9.98 15.84 9.84 15.59 9.59L13.41 7.41C13.16 7.16 12.8 7.02 12.41 7.02C12.02 7.02 11.66 7.16 11.41 7.41L9.59 9.23C9.34 9.48 8.98 9.62 8.59 9.62C8.2 9.62 7.84 9.48 7.59 9.23L5 6.62V8H19V8.17Z"/></svg>') no-repeat center left;
  background-size: 1.2em 1.2em;
}

.file-label:hover, .file-label:focus {
  background: #355c2e;
  box-shadow: 0 4px 16px #c8e6c9;
}

.file-tip {
  display: block;
  margin: 0 0 12px 0;
  color: #888;
  font-size: 0.98em;
  min-height: 1.8em;
  letter-spacing: 0.5px;
  text-align: left;
}

.img-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.img-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px #e0f0e0;
  background: #fff;
  border: 2px solid transparent;
  cursor: grab;
  transition: border 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.img-preview-item.dragging {
  opacity: 0.6;
}
.img-preview-item.dragover {
  border: 2px solid #4B7543;
}
.img-preview-item img {
  width: 100%;
  height: 48px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  pointer-events: none;
  margin-bottom: 2px;
}
.img-preview-name {
  width: 100%;
  font-size: 0.85em;
  color: #555;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px 2px 2px;
}
.img-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 1.1em;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.img-preview-remove:hover {
  background: #d32f2f;
} 

#tips-content {
  max-width: 820px;
  margin: 0 auto 24px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #e0f0e0;
  padding: 24px 28px 18px 28px;
}
#tips-map-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto 24px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px #e0f0e0;
  position: relative;
  height: 350px;
  overflow: hidden;
} 