/* lato 字体定义 */
@font-face {
    font-family: 'lato';
    src: url('./fonts/lato/Lato-Regular.woff2') format('woff2'),
         url('./fonts/lato/Lato-Italic.woff2') format('woff2'),
         url('./fonts/lato/Lato-Bold.woff2') format('woff2'),
         url('./fonts/lato/Lato-BoldItalic.woff2') format('woff2'),
          url('./fonts/lato/Lato-Black.woff2') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,body {
  font-size: 14px;
  min-height: 100%;
  color: #5a5655;
  font-family: 'lato', sans-serif, Arial;
  line-height: 1.5;
}


.container {
  width: 100%;
  max-width: 1365px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: #007bff;
  font-weight: 100;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin: 2rem 0;
  color: #2c3e50;
}

h3 {
  font-size: 1.5rem;
  color: #34495e;
}

p {
  margin-bottom: 1rem;
}

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

input {
    outline: none;
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

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

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
}

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

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
}

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


.fade-in a:hover,
.slide-in-right a:hover {
  text-decoration: none !important;
}

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

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

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

/* Viewport-based animations using CSS only */
@supports (animation-timeline: view()) {
  .fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

  .slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

  .slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
    /*animation-timeline: view();*/
    animation-range: entry 0% cover 30%;
  }
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: #007bff;
  color: white;
  /* line-height: 39px; */
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #0056b3;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
/* Top Bar */
.top-bar {
  color: #1c2e5c;
  font-size: 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
	border-bottom: 1px solid #e6e6e6;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-bar .contact-info {
  display: flex;
  gap: 20px;
}

.top-bar .contact-info span {
  display: flex;
  align-items: center;
  gap: 5px;
	color: #1c2e5c;
}

.top-bar .contact-info span i {
	color: #007bff
}

.language-switcher {
  /* Placeholder for language switcher */
}
.main-header {
  background-color: white;
  transition: all 0.3s ease;
}

.mobile-search-bar {
    display: none;
    position: fixed;
    background: rgba(0,0,0,.5);
    left: 0;
    top: 0;
}

main {
    margin-top: 10px;
}

.main-header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-main .logo img {
  max-height: 105px;
  width: 150px;
  object-fit: contain;
}

/* Mobile menu toggle styles */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: #007bff;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #007bff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.logo img {
  max-height: 60px;
  width: auto;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #007bff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}


.search-bar .search-form {
   display: flex;
}

.search-bar input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

.search-bar button {
  padding: 10px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.search-field::placeholder {
	color: #999; /* 修改文字颜色 */
	font-style: italic; /* 斜体 */
	opacity: 1; /* 确保完全不透明 */
}

/* 导航栏容器样式 */
.main-navigation {
    border-width: 1px 0 1px 0;
    border-color: #e6e6e6;
    border-style: solid;
    padding: 0;
    margin: 0;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
  font-weight: 650;
}

.main-navigation ul li {
  position: relative;
  margin: 0;
  padding: 0 10px;
}

.main-navigation li a {
  color: #17191b;
  display: block;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  height: auto;
  padding: 15px;
}

/* 添加项目间的小分割线 */
.main-navigation ul li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px; /* 分割线高度 */
    width: 1px;
    background-color: #e6e6e6;
}

.main-navigation li a:hover::after {
  width: 100%;
}

.main-navigation li:last-child a {
  border-right: none;
}

.main-navigation ul li:hover {
  background-color: #007bff;
}

.main-navigation ul li:hover > a {
	color: white;
	text-decoration: none;
}

/* 二级菜单样式 */
.main-navigation ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
    border: 1px solid #e6e6e6;
    animation: fadeInDown 0.3s ease-out;
}

/* 鼠标悬浮时显示二级菜单 */
.main-navigation ul li:hover > ul {
    display: block;
}

/* 二级菜单项样式 */
.main-navigation ul li ul li {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    border-bottom: 1px solid #f5f5f5;
}

.main-navigation ul li ul li:last-child {
    border-bottom: none;
}

/* 二级菜单链接样式 */
.main-navigation ul li ul li a {
    display: block;
    padding: 12px 20px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: none;
    white-space: nowrap;
    color: #17191b;
}

/* 二级菜单链接悬停效果 */
.main-navigation ul li ul li a:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

/* 移除二级菜单项的分割线 */
.main-navigation ul ul li::after {
    display: none;
}

/* 二级菜单动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #007bff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Mobile Navigation */
.mobile-navigation {
  display: none;
  background-color: white;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 16%;
  left: 0;
  width: 100%;
  z-index: 9999;
}

.mobile-navigation.active {
  position: fixed;
  top: 19%;
  z-index: 9999;
}

.mobile-navigation .search-bar {
    width: 92%;
}

.mobile-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-navigation li {
  border-bottom: 1px solid #eee;
}

.mobile-navigation li:last-child {
  border-bottom: none;
}

.mobile-navigation a {
  display: block;
  padding: 15px 20px;
  color: #007bff;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-navigation a:hover {
  background-color: #007bff;
  color: white;
}

.btn-secondary {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  margin-top: auto;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}



/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
}

/* Footer */
.main-footer {
  background-color: #007bff;
  color: #fff;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.footer-column h3 {
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.4rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: #ffffff;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

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

.footer-column ul li a {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 5px 0;
}

.footer-column ul li a:hover {
  color: #ffffff;
  padding-left: 5px;
}

.footer-column input[type="email"] {
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.9);
  width: 100%;
}

.footer-column input[type="email"]:focus {
    outline: 2px solid #007bff;
  }

.footer-column button, 
.footer-column input[type="submit"] {
  padding: 12px;
  background-color: #16e00f;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.footer-column button:hover,
.footer-column input[type="submit"]:hover {
  background-color: #0056b3;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #a8d2ff;
  color: #fff;
  font-size: 0.9rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-bottom p {
  margin-top: 1rem;
  margin-bottom: 0;
}
/* Services Section */
.services-section {
  padding: 80px 0;
  background-color: white;
}

.services-section .container h2 {
  text-align: center;
  margin-bottom: 50px;
  color: #007bff;
  font-size: 2.2rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.service-card {
  text-align: center;
  padding: 40px 30px;
  transition: all 0.3s ease;
  border-right: 1px solid #eee;
}
.service-card:last-child {
  border: none;
}
.service-card p:nth-child(2) {
  text-align: left;
}

.service-card h3 {
  margin: 20px 0;
  color: #007bff;
  font-size: 1.5rem;
  text-align: left;
}

.service-card h3 i {
    margin-right: 10px;
}

.service-card p {
  color: #666;
  line-height: 1.6;
}

/* Mobile Styles */
@media (max-width: 768px) {
	
	/* Top Bar Tablet Styles */
  .top-bar {
    min-height: 40px;
	  font-size: 0.75rem;
  }
  
  .top-bar-content {
    flex-direction: column;
    height: 60px;
  }
  
  .mobile-search-bar {
     width: 100%;
     padding: 50px
  }
  
  .mobile-search-bar.visible {
      display: block;
  }
  
  .header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    order: -1;
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .main-navigation {
    display: none;
  }

  .mobile-navigation {
    display: none;
  }

  .mobile-navigation.active {
    display: block;
  }

  /* Hamburger Animation */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }

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

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

  .main-navigation ul {
    flex-wrap: wrap;
  }

  .main-navigation li {
    margin: 5px 10px;
  }
  
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.7rem;
  }
  
  .message-box-button {
      display: none;
  }
  
   .back-to-top {
        bottom: 80px; /* 避免与移动端底部导航栏重叠 */
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .back-to-top:hover {
        transform: none; /* 移动端移除hover效果，避免按钮移动 */
    }
    
    .back-to-top:active {
        transform: scale(0.95); /* 改为缩放效果，避免位置移动 */
        background-color: #004085;
    }

}

@media (max-width: 576px) {
  
  .main-header {
    text-align: center;
  }

  .header-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    margin-bottom: 0;
    order: -1;
  }

  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .category-grid,
  .product-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }


  /* Top Bar Mobile Styles */
  .top-bar {
    min-height: 40px;
  }
  
  .top-bar-content {
    flex-direction: column;
    text-align: center;
  }
  
  .top-bar-content .contact-info {
    display: flex;
    gap: 20px;
    justify-content: center;
	  flex-direction: row;
  }
  
  .message-box-button {
      display: none;
  }
  
}


/* Responsive Design */
@media (max-width: 992px) {
  .header-main {
    flex-wrap: wrap;
  }
}

@media only screen and (max-width: 768px) {
    .homepage-brand-block .block-wrapper {
        min-height: 0 !important;
        max-height: 355px;
    }
}
@media only screen and (max-width: 767px) {
    .homepage-brand-block .block-wrapper {
        padding: 20px 0;
    }
}


@media (max-width: 768px) {
  html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .container {
        max-width: 100%;
        padding: 0 15px;
        overflow-x: hidden;
    }
    
    /* 确保所有元素不会超出视口 */
    * {
        max-width: 100%;
    }
    
    /* 特别处理可能造成横向滚动的元素 */
    img, video, iframe, table {
        max-width: 100%;
        height: auto;
    }
    
    /* 防止导航菜单造成横向滚动 */
    .mobile-navigation {
        width: 100%;
        left: 0;
        right: 0;
    }
    
    /* 确保移动端底部导航栏不会造成问题 */
    .mobile-footer-navbar {
        width: 100%;
        left: 0;
        right: 0;
    }
    .header-main .search-bar {
        display: none;
    }
}
@media (max-width: 576px) {
    .header-main .search-bar {
        display: none;
    }
}

/*   Mobile Footer navbar   */
.mobile-footer-navbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* 确保不会被其他元素覆盖 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* 添加过渡效果，确保平滑显示 */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-footer-navbar .container {
    padding: 0;
    max-width: 100%;
    margin: 0;
}

.mobile-footer-navbar-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    margin: 0;
}

.mobile-footer-navbar-item {
    flex: 1;
    text-align: center;
    height: 100%;
}

.mobile-footer-navbar-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 100%;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
}

.mobile-footer-navbar-item a:hover,
.mobile-footer-navbar-item a:focus {
    background-color: #f8f9fa;
    color: #007bff;
    outline: none;
}

.mobile-footer-navbar-item .fa-icons {
    font-size: 20px;
    margin-bottom: 4px;
    color: #007bff;
    transition: color 0.3s ease;
}

.mobile-footer-navbar-item a:hover .fa-icons
.mobile-footer-navbar-item a:focus .fa-icons {
    color: #0056b3;
}

/* 只在移动端显示 */
@media (max-width: 768px) {
    .mobile-footer-navbar {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    body {
        padding-bottom: 60px;
    }
    
    html.loaded .mobile-footer-navbar,
    body.loaded .mobile-footer-navbar {
        display: block !important;
        visibility: visible !important;
    }
}

/* 小屏幕优化 */
@media (max-width: 576px) {
    .mobile-footer-navbar-grid {
        height: 55px;
    }
    
    .mobile-footer-navbar-item a {
        font-size: 11px;
        padding: 6px 0;
    }
    
    .mobile-footer-navbar-item .fa-solid {
        font-size: 18px;
    }
    
    /* 调整body底部内边距 */
    body {
        padding-bottom: 55px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .mobile-footer-navbar-grid {
        height: 50px;
    }
    
    .mobile-footer-navbar-item a {
        font-size: 10px;
    }
    
    .mobile-footer-navbar-item .fa-solid {
        font-size: 16px;
    }
    
    /* 调整body底部内边距 */
    body {
        padding-bottom: 50px;
    }
}

/* 确保在iOS设备上也能正常固定 */
@supports (-webkit-touch-callout: none) {
    .mobile-footer-navbar {
        position: -webkit-sticky;
        position: sticky;
    }
}

/* 防止在某些浏览器中出现滚动问题 */
html {
    scroll-behavior: smooth;
}

/* 确保导航栏不会被其他高z-index元素覆盖 */
* {
    box-sizing: border-box;
}

/* 添加JavaScript辅助类，确保页面加载后立即显示 */
.mobile-footer-navbar.visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}