/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* 头部样式 */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #1a5276;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #1a5276;
}

/* 页面标题 */
.page-title {
  text-align: center;
  margin: 40px 0 30px;
  color: #1a5276;
  font-size: 32px;
  position: relative;
}

.page-title:after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: #1a5276;
  margin: 10px auto;
}

/* 留言表单区域 */
.contact-form {
  background-color: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: #1a5276;
  box-shadow: 0 0 0 2px rgba(26, 82, 118, 0.2);
  outline: none;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.required {
  color: #e74c3c;
}

.submit-btn {
  background-color: #1a5276;
  color: white;
  border: none;
  padding: 12px 35px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
  margin: 30px auto 0;
}

.submit-btn:hover {
  background-color: #154360;
}

/* 联系信息 */
.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 50px;
}

.info-item {
  flex: 1;
  min-width: 250px;
  margin: 0 15px 30px;
  text-align: center;
  padding: 25px 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}

.info-item:hover {
  transform: translateY(-5px);
}

.info-item h3 {
  color: #1a5276;
  margin-bottom: 15px;
  font-size: 20px;
}

/* 页脚样式 */
footer {
  background-color: #1a5276;
  color: white;
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  margin: 20px 0;
}

.footer-links a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 0.8;
}

.copyright {
  margin-top: 20px;
  font-size: 14px;
  opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
  }

  nav ul {
    margin-top: 15px;
  }

  nav ul li {
    margin: 0 10px;
  }

  .contact-form {
    padding: 25px;
  }

  .contact-info {
    flex-direction: column;
  }

  .info-item {
    margin: 0 0 20px;
  }
}

/* 表单验证样式 */
.error {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.form-control.error-border {
  border-color: #e74c3c;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
}

/* 加载动画 */
.loading {
  display: none;
  text-align: center;
  margin: 10px 0;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #1a5276;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
