/* ==========================================
   旺海国际株式会社 - 统一样式表
   ========================================== */

/* ======== 基础设置 ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  overflow-x: hidden;
  background: #fff;
  color: #333;
  line-height: 1.8;
}

/* ======== 固定导航栏 ======== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
  z-index: 1000;
}

/* 滚动后的导航栏 */
header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  max-height: 50px;
}

.company-logo,
.company-name {
  height: 42px;
  max-height: 42px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* 隐藏备用的黑色logo */
.company-name-black {
  height: 42px;
  max-height: 42px;
  width: auto;
  object-fit: contain;
  display: none;
  transition: transform 0.3s ease;
}

/* 滚动后切换显示 */
header.scrolled .company-name {
  display: none;
}

header.scrolled .company-name-black {
  display: block;
}

.logo-link:hover img {
  transform: scale(1.06);
}

/* 导航菜单 */
nav {
  display: flex;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

nav ul li a {
  color: white;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s;
  font-weight: 500;
  position: relative;
  white-space: nowrap;
  display: block;
}

/* 导航链接下划线效果 */
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0073cc;
  transition: width 0.3s;
}

nav ul li a:hover::after {
  width: 100%;
}

/* 滚动后菜单文字变黑 */
header.scrolled nav ul li a {
  color: #333;
}

nav ul li a:hover {
  color: #0073cc;
}

/* 汉堡菜单（手机端） */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
  flex-shrink: 0;
  min-width: 40px;
  justify-content: center;
  align-items: center;
}

.menu-toggle div {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

header.scrolled .menu-toggle div {
  background: #333;
}

/* 当菜单打开时的汉堡图标动画 */
.menu-toggle.active div:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active div:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active div:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* ======== 主内容容器 ======== */
.main-container {
  width: 100%;
  min-height: 100vh;
  padding-top: 70px;
  padding-bottom: 80px;
}

.main-section {
  width: 85%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ======== 页面标题 ======== */
.page-header {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #005bac 0%, #0073cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 60px;
  margin-top: 70px;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ======== 内容区标题 ======== */
.main-section h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #003d73;
  border-left: 6px solid #005bac;
  padding-left: 20px;
}

.main-section h2 {
  font-size: 2rem;
  margin: 40px 0 20px;
  color: #005bac;
  border-bottom: 2px solid #005bac;
  padding-bottom: 10px;
}

.main-section h3 {
  font-size: 1.5rem;
  margin: 30px 0 15px;
  color: #0073cc;
}

.main-section p {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 20px;
  color: #555;
}

/* ======== 表单样式 ======== */
form {
  max-width: 700px;
  margin: 40px auto;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

form label {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: 0.3s;
  font-family: inherit;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: #0073cc;
  box-shadow: 0 0 8px rgba(0, 115, 204, 0.2);
}

form textarea {
  resize: vertical;
  min-height: 150px;
}

form button {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #005bac, #0073cc);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 115, 204, 0.4);
}

/* ======== 信息卡片 ======== */
.info-card {
  background: white;
  padding: 30px;
  margin: 30px 0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.info-card h3 {
  margin-top: 0;
}

/* ======== 服务列表 ======== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.service-item {
  background: white;
  padding: 35px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: 0.3s;
}

.service-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-item h3 {
  color: #005bac;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.service-item p {
  color: #666;
  font-size: 1rem;
}

/* ======== 公司信息表格 ======== */
.company-table {
  width: 100%;
  margin: 40px 0;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.company-table th,
.company-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.company-table th {
  background: #005bac;
  color: white;
  font-weight: bold;
  width: 200px;
}

.company-table tr:last-child td {
  border-bottom: none;
}

.company-table tr:hover {
  background: #f8f9fa;
}

/* ======== 底部 Footer ======== */
footer {
  width: 100%;
  padding: 40px 60px;
  background: #1a1a1a;
  color: white;
  text-align: center;
}

footer p {
  margin: 10px 0;
  font-size: 0.95rem;
  color: #aaa;
}

/* ======== 按钮样式 ======== */
.btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(135deg, #005bac, #0073cc);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
  box-shadow: 0 4px 15px rgba(0, 91, 172, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 91, 172, 0.4);
}

/* ======== 响应式设计 ======== */

/* 当菜单项总宽度超过可用空间时，切换为汉堡菜单 */
@media (max-width: 950px) {
  nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  nav.active {
    display: block;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px 0;
    overflow-y: auto;
  }

  header.scrolled nav.active {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  nav ul {
    flex-direction: column;
    padding: 0;
    gap: 0;
    align-items: center;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  header.scrolled nav.active ul li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  nav ul li a {
    font-size: 1.2rem;
    padding: 20px;
    display: block;
  }

  nav ul li a::after {
    display: none;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 20px;
    height: 60px;
  }

  .logo-link {
    max-height: 40px;
  }

  .company-logo,
  .company-name,
  .company-name-black {
    height: 32px;
    max-height: 32px;
    width: auto;
  }

  .main-container {
    padding-top: 60px;
  }

  .page-header {
    height: 180px;
    margin-top: 60px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .main-section {
    width: 95%;
    padding: 20px 10px;
  }

  .main-section h1 {
    font-size: 1.8rem;
  }

  .main-section h2 {
    font-size: 1.4rem;
  }

  form {
    padding: 25px;
  }

  .company-table th {
    width: auto;
    display: block;
  }

  .company-table td {
    display: block;
    text-align: left;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  nav.active {
    top: 60px;
    height: calc(100vh - 60px);
  }

  footer {
    padding: 30px 20px;
  }

  footer p {
    font-size: 0.85rem;
  }
}

/* ======== 动画效果 ======== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease;
}