/* 公共样式 - 山东诺为新材料网站 */

/* 字体定义 */
@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../../fonts/HARMONYOS_SANS_SC_REGULAR.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../../fonts/HARMONYOS_SANS_SC_LIGHT.TTF') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../../fonts/HARMONYOS_SANS_SC_MEDIUM.TTF') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../../fonts/HARMONYOS_SANS_SC_BOLD.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../../fonts/HARMONYOS_SANS_SC_BLACK.TTF') format('truetype');
  font-weight: 900;
  font-style: normal;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: 'HarmonyOS Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #ffffff;
  color: #333333;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Service Hotline */
.service-hotline {
  margin-right: 20px;
  display: flex;
  align-items: center;
}

.service-hotline-text {
  color: #333333;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

/* 通用元素重置 */
a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

input {
  background-color: transparent;
  border: 0;
  outline: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

button:active {
  opacity: 0.8;
}

/* 通用布局类 */
.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.justify-start {
  display: flex;
  justify-content: flex-start;
}

.justify-center {
  display: flex;
  justify-content: center;
}

.justify-end {
  display: flex;
  justify-content: flex-end;
}

.justify-between {
  display: flex;
  justify-content: space-between;
}

.justify-around {
  display: flex;
  justify-content: space-around;
}

.justify-evenly {
  display: flex;
  justify-content: space-evenly;
}

.align-start {
  display: flex;
  align-items: flex-start;
}

.align-center {
  display: flex;
  align-items: center;
}

.align-end {
  display: flex;
  align-items: flex-end;
}

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

/* 页面主体区域 - 为固定导航栏留出空间 */
main {
  padding-top: 90px;
  min-height: calc(100vh - 90px);
}

/* 导航栏样式 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(245, 245, 245, 0.95);
  /* Light Grey background */
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-bottom: none;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(245, 245, 245, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 50px;
  cursor: pointer;
  transition: transform 0.3s ease;
  /* filter: invert(1); Removed to restore original colors. Text visibility might be an issue. */
}

.logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 60px;
  list-style: none;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  text-decoration: none;
  color: #333333;
  /* Dark text */
  font-size: 18px;
  font-weight: 400;
  transition: color 0.3s ease;
  padding: 5px 0;
  text-align: center;
  /* display: inline-block; */
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #3399ff;
  /* Light blue for hover */
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #3399ff;
  /* Light blue underline */
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* Desktop Dropdown Arrow */
@media (min-width: 768px) {
  .nav-item-dropdown>.nav-link {
    padding-right: 18px;
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .nav-item-dropdown>.nav-link::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 8px;
    margin-bottom: 2px;
    margin-right: 6px;
    transition: transform 0.3s ease;
  }

  .nav-item-dropdown:hover>.nav-link::before,
  .nav-item-dropdown.active>.nav-link::before {
    transform: rotate(225deg);
    margin-bottom: -2px;
  }

  /* Remove the underline effect for dropdown toggles to avoid conflict or visual clutter */
  .nav-item-dropdown>.nav-link::after {
    display: none;
  }
}

/* 导航栏下拉蒙版 */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
  pointer-events: none;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 下拉菜单容器 */
.nav-item-dropdown {
  position: relative;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #ffffff;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  list-style: none;
  margin-top: 15px;
}

/* 下拉菜单箭头 */
/* 下拉菜单箭头 */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: -1;
  display: block;
}

/* 悬停时显示下拉菜单 */
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 下拉菜单项 */
.dropdown-menu li {
  margin: 0;
}

/* 下拉菜单链接 */
.dropdown-link {
  display: block;
  padding: 10px 20px;
  color: #333333 !important;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.dropdown-link:hover {
  background: #f5f5f5;
  color: #ff6b00 !important;
  /* Use brand orange for hover */
}

/* 下拉菜单链接不需要下划线动画 */
.dropdown-link::after {
  display: none;
}

/* 语言切换按钮 */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 30px;
}

.lang-btn {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  font-family: 'HarmonyOS Sans SC', sans-serif;
}

.lang-btn:hover {
  border-color: #0066cc;
  color: #0066cc;
}

.lang-btn.active {
  background: #0066cc;
  color: #ffffff;
  border-color: #0066cc;
}

/* 新版语言切换按钮 */
.lang-btn-new {
  background-color: #ff6b00;
  /* Orange color from screenshot */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  margin-left: 30px;
  transition: background-color 0.3s ease;
  font-family: 'HarmonyOS Sans SC', sans-serif;
}

/* Mobile optimization for language button */
@media (max-width: 767px) {
  .lang-btn-new {
    margin-left: 8px !important;
    /* Reduced from 30px */
    padding: 6px 10px !important;
    /* Smaller button */
    font-size: 13px !important;
  }

  .lang-btn-new svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
  }
}

.lang-btn-new:hover {
  background-color: #e65c00;
}

.lang-btn-new svg {
  margin-right: 6px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: #333;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* 页脚样式 */
.footer {
  background: #f8f9fa;
  color: #333333;
  padding: 60px 0 0;
  margin-top: 100px;
  text-align: center;
}

.footer-content {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 60px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section h3 {
  font-size: 16px;
  margin-bottom: 25px;
  color: #ff6b00;
  font-weight: 400;
  position: relative;
}

.footer-section h3::after {
  display: none;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #666666;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #000000;
}

/* Footer QR Code */
.footer-qr-container {
  margin: 15px auto 0;
  width: 80px;
}

.footer-qr-code {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* 联系信息样式 */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  color: #666666;
  font-size: 14px;
  line-height: 1.6;
}

.footer-contact-item a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact-item a:hover {
  color: #000000;
}

/* 旧版页脚样式兼容 */
.footer-section p,
.footer-section a {
  font-size: 14px;
  line-height: 2;
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #000000;
}

.footer-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.footer-bottom {
  max-width: 1920px;
  margin: 60px auto 0;
  padding: 0;
  margin: 60px auto 0;
  padding: 0;
  background: #eeeeee;
}

.footer-slogan {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 30px 0;
  background: #e9ecef;
}

.footer-copyright {
  padding: 20px 60px;
  background: #eeeeee;
  color: #666;
  font-size: 12px;
}

.footer-copyright a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-copyright a:hover {
  color: #999;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: #0066cc;
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-family: 'HarmonyOS Sans SC', sans-serif;
  font-weight: 400;
  text-align: center;
}

.btn:hover {
  background: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border: 2px solid #0066cc;
  color: #0066cc;
}

.btn-outline:hover {
  background: #0066cc;
  color: #ffffff;
}

.btn-large {
  padding: 16px 40px;
  font-size: 18px;
}

.btn-small {
  padding: 8px 20px;
  font-size: 14px;
}

.btn-block {
  display: block;
  width: 100%;
}

/* 响应式设计 - Desktop First */

/* Tablet 样式 (768px - 1199px) */
@media (max-width: 1199px) {
  .nav-container {
    padding: 20px 40px;
  }

  .nav-menu {
    gap: 30px;
  }

  .nav-menu a {
    font-size: 15px;
  }

  .footer-content {
    padding: 0 40px;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .footer-bottom {
    padding: 20px 40px 0;
  }

  .container {
    padding: 0 40px;
  }
}

/* Mobile 样式 (< 768px) */
@media (max-width: 767px) {
  .service-hotline {
    display: none;
  }

  main {
    padding-top: 70px;
  }

  .nav-container {
    padding: 15px 15px;
    /* Reduced from 20px */
  }

  .logo {
    height: 40px;
    max-width: 140px;
    /* Prevent logo from pushing content */
    object-fit: contain;
    flex-shrink: 1;
    /* Allow logo to shrink if needed */
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 40px 20px;
    gap: 20px;
    transition: left 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    align-items: flex-start;
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    font-size: 18px;
    display: block;
    padding: 10px 20px;
    color: #333;
    text-align: left;
  }

  /* 移动端下拉菜单样式 */
  .nav-item-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
    left: 0 !important;
    top: auto !important;
  }

  .dropdown-menu::before {
    display: none;
  }

  .nav-item-dropdown.active .dropdown-menu {
    max-height: 500px;
    padding: 10px 0;
  }

  .dropdown-link {
    padding: 12px 20px;
    font-size: 16px;
    border-left: 3px solid transparent;
    color: #666 !important;
    text-align: left;
    white-space: normal;
  }

  .dropdown-link:hover {
    border-left-color: #0066cc;
    background: #f0f2f5;
  }

  /* 移动端下拉箭头指示器 */
  .nav-item-dropdown>.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-item-dropdown>.nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    transition: transform 0.3s ease;
  }

  .nav-item-dropdown.active>.nav-link::before {
    transform: translateY(-50%) rotate(180deg);
  }

  .lang-switch {
    margin-left: 0;
    margin-top: 20px;
  }

  .footer {
    padding: 40px 0 20px;
    margin-top: 60px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  .footer-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-bottom {
    padding: 0;
  }

  .footer-copyright {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 20px;
  }

  .footer-slogan {
    padding: 20px 0;
  }

  .container {
    padding: 0 20px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 14px;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* 滚动动画 */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-animate.active {
  opacity: 1;
  transform: translateY(0);
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* 间距工具类 */
.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.mt-40 {
  margin-top: 40px;
}

.mt-50 {
  margin-top: 50px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mb-50 {
  margin-bottom: 50px;
}

.pt-10 {
  padding-top: 10px;
}

.pt-20 {
  padding-top: 20px;
}

.pt-30 {
  padding-top: 30px;
}

.pt-40 {
  padding-top: 40px;
}

.pt-50 {
  padding-top: 50px;
}

.pb-10 {
  padding-bottom: 10px;
}

.pb-20 {
  padding-bottom: 20px;
}

.pb-30 {
  padding-bottom: 30px;
}

.pb-40 {
  padding-bottom: 40px;
}

.pb-50 {
  padding-bottom: 50px;
}

/* 响应式可见性 */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 767px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
}

/* Lightbox Styles - Global */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  padding-top: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  margin: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  animation-name: zoom;
  animation-duration: 0.3s;
  cursor: default;
}

@keyframes zoom {
  from {
    transform: scale(0.1);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.clickable-image {
  cursor: zoom-in;
  transition: transform 0.2s ease;
  display: block;
}

.clickable-image:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}