/* 金石微纳 - Custom Styles */
/* Based on myguangyao.com design system */
:root {
  --primary: #409030;
  --primary-hover: #358028;
  --primary-light: #66b050;
  --text-dark: #333;
  --text-body: #666;
  --text-light: #999;
  --border: #e1e1e1;
  --bg-light: #f5f5f5;
}

body {
  color: var(--text-body);
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fff;
}

/* Navbar */
.navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.navbar-brand img {
  height: 50px;
}
.nav-link {
  font-size: 15px;
  color: var(--text-dark) !important;
  padding: 0.5rem 1rem !important;
  transition: color .3s;
}
.nav-link:hover, .nav-item.active .nav-link {
  color: var(--primary) !important;
}

/* Banner / Slider */
.swiper-container {
  width: 100%;
}
.swiper-slide img.slideshow {
  width: 100%;
  height: auto;
  min-height: 400px;
  object-fit: cover;
}
.swiper-pagination-bullet-active {
  background: var(--primary);
}

/* Section Titles */
.section-title {
  font-size: clamp(1.375rem, 1.094rem + 1.41vw, 2.5rem);
  color: var(--text-dark);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}
.section-subtitle {
  font-size: clamp(1rem, .906rem + .47vw, 1.375rem);
  color: var(--text-body);
  text-align: center;
  margin-bottom: 2rem;
}

/* Buttons */
.btn-primary-custom {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  padding: 10px 30px;
  font-size: 14px;
  border-radius: 4px;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.btn-primary-custom:hover {
  background: var(--primary-hover);
  color: #fff;
  border-color: var(--primary-hover);
}
.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 10px 30px;
  font-size: 14px;
  border-radius: 4px;
  transition: all .3s;
}
.btn-outline-custom:hover {
  background: var(--primary);
  color: #fff;
}

/* Product Cards */
.card {
  border: none;
  transition: all .3s;
  overflow: hidden;
}
.card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,.1);
  transform: translateY(-5px);
}
.card-img-150 {
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
}
.card-img-150 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.card:hover .card-img-150 img {
  transform: scale(1.05);
}
.card-body {
  padding: 1.25rem;
}
.card-title a {
  color: var(--text-dark);
  font-size: 16px;
  text-decoration: none;
}
.card-title a:hover {
  color: var(--primary);
}

/* Category Cards (Application Fields) */
.category-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 24px;
  background: #f5f5f5;
  transition: all .3s;
}
.category-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
  transform: translateY(-3px);
}
.category-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.category-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
}
.category-card .card-overlay h5 {
  font-size: 18px;
  margin-bottom: 4px;
}

/* About section */
.about-section {
  padding: 80px 0;
  background: #fff;
}

/* News list */
.news-item {
  padding: 15px 0;
  border-bottom: 1px dashed var(--border);
}
.news-item a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color .3s;
}
.news-item a:hover {
  color: var(--primary);
}
.news-item .date {
  color: var(--text-light);
  font-size: 13px;
}

/* Footer */
.footer {
  background: #1a1a2e;
  color: #ccc;
  padding-top: 50px;
}
.footer h5 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}
.footer a {
  color: #ccc;
  text-decoration: none;
  transition: color .3s;
}
.footer a:hover {
  color: var(--primary);
}
.footer ul {
  list-style: none;
  padding: 0;
}
.footer ul li {
  padding: 6px 0;
  line-height: 1.8;
}
.footer .copyright {
  background: #111;
  color: #999;
  padding: 15px 0;
  text-align: center;
  font-size: 13px;
}

/* Page banner */
.page-banner {
  height: 300px;
  background-size: cover !important;
  background-position: center !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
}
.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.3);
}
.page-banner h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.75rem, 1.25rem + 2.5vw, 3rem);
  font-weight: 700;
}

/* Page content */
.pages {
  padding: 40px 0;
  min-height: 400px;
}
.pages .content {
  line-height: 1.8;
  font-size: 15px;
  color: var(--text-body);
}
.pages .content img {
  max-width: 100%;
  height: auto;
}

/* Breadcrumb position */
.position {
  font-size: 14px;
  color: var(--text-light);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.position a {
  color: var(--text-body);
  text-decoration: none;
}
.position a:hover {
  color: var(--primary);
}

/* Sidebar nav */
.sonsort .btn {
  font-size: 14px;
  margin: 0 4px 8px 0;
}

/* Contact page */
.contact-info .info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
}
.contact-info .info-item i {
  font-size: 22px;
  color: var(--primary);
  margin-right: 15px;
  margin-top: 3px;
}
.contact-info .info-item .info-text {
  font-size: 15px;
  line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
  .swiper-slide img.slideshow {
    min-height: 200px;
  }
  .card-img-150 {
    height: 180px;
  }
  .page-banner {
    height: 180px;
  }
  .footer {
    padding-top: 30px;
  }
}

/* Animation helpers */
.wow {
  visibility: hidden;
}

/* Override Bootstrap blue defaults with logo green */
.text-primary {
  color: var(--primary) !important;
}
a.text-primary:hover,
a.text-primary:focus {
  color: var(--primary-hover) !important;
}
.btn-info {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-info:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}
.badge-info {
  background-color: var(--primary);
}
.bg-primary {
  background-color: var(--primary) !important;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pagination .page-status {
  width: 100%;
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 5px;
}
.pagination .page-index a,
.pagination .page-pre a,
.pagination .page-next a,
.pagination .page-last a,
.pagination .page-numbar a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  transition: all .3s;
}
.pagination .page-index a:hover,
.pagination .page-pre a:hover,
.pagination .page-next a:hover,
.pagination .page-last a:hover,
.pagination .page-numbar a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination .page-numbar a.page-num-current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination .page-numbar .page-num {
  font-size: 14px;
  padding: 4px 8px;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  font-size: 18px;
  transition: all .3s;
  opacity: 0;
  visibility: hidden;
}
.scroll-top.show {
  opacity: 1;
  visibility: visible;
}
.scroll-top:hover {
  background: var(--primary-hover);
}
