/*
Theme Name: Kaifa K8 Smart Manufacturing
Theme URI: https://example.com/
Author: Codex
Author URI: https://example.com/
Description: Enterprise WordPress theme for Kaifa K8 intelligent manufacturing websites.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kaifa-k8
*/

:root {
  --ink: #182025;
  --muted: #60717c;
  --line: #dce4e7;
  --paper: #ffffff;
  --soft: #f4f7f5;
  --deep: #12332f;
  --signal: #18a979;
  --amber: #d78c2f;
  --steel: #7c8b91;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(220, 228, 231, 0.82);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--signal));
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(20, 92, 120, 0.22);
}

.brand strong {
  display: block;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  color: #314149;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a:hover {
  color: var(--signal);
}

.nav-cta,
.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  font-weight: 750;
}

.nav-cta,
.btn-primary {
  color: #fff;
  background: var(--signal);
}

.btn-secondary {
  color: #12332f;
  border-color: rgba(24, 169, 121, 0.36);
  background: rgba(255, 255, 255, 0.9);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #14201f;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(9, 22, 21, 0.86) 0%, rgba(9, 22, 21, 0.56) 44%, rgba(9, 22, 21, 0.18) 100%),
    url("assets/images/hero-smart-factory.png") center / cover no-repeat;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 140px;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 680px;
  align-content: center;
  max-width: 730px;
  padding: 78px 0 136px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #d7fff1;
  font-size: 14px;
  font-weight: 800;
}

.eyebrow::before {
  width: 34px;
  height: 2px;
  content: "";
  background: var(--signal);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.metric-strip {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: -82px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metric {
  padding: 26px;
  background: #fff;
}

.metric strong {
  display: block;
  color: var(--deep);
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 96px 0;
}

.section.soft {
  background: var(--soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 42px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--signal);
  font-size: 14px;
  font-weight: 850;
}

.section h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
}

.about-section {
  padding-top: 112px;
}

.about-layout,
.partners-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.about-copy {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 17px;
}

.about-copy p {
  margin: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card,
.solution-card,
.post-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-card {
  padding: 30px;
}

.service-card {
  display: grid;
  align-content: start;
  min-height: 245px;
}

.icon-box {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 8px;
  color: var(--deep);
  background: #e3f5ec;
  font-size: 25px;
}

.feature-card h3,
.solution-card h3,
.post-card h3 {
  margin: 22px 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.feature-card p,
.solution-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
  align-items: center;
}

.process {
  display: grid;
  gap: 16px;
}

.process-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.process-no {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--deep);
  font-weight: 850;
}

.process-item h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.process-item p {
  margin: 0;
  color: var(--muted);
}

.panel {
  padding: 36px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 51, 47, 0.94), rgba(26, 92, 79, 0.9)),
    url("assets/images/hero-smart-factory.png") center / cover no-repeat;
}

.panel h2 {
  color: #fff;
}

.panel p {
  color: rgba(255, 255, 255, 0.78);
}

.solution-card {
  overflow: hidden;
}

.solution-card .bar {
  height: 6px;
  background: linear-gradient(90deg, var(--signal), var(--amber));
}

.solution-card .body,
.post-card .body {
  padding: 28px;
}

.solution-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: #384850;
  font-size: 15px;
}

.solution-list li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--signal);
  font-weight: 900;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card,
.related-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.news-card:hover,
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(18, 51, 47, 0.1);
}

.news-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--deep), var(--signal));
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.news-thumb:hover img {
  transform: scale(1.04);
}

.news-thumb span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  font-size: 32px;
  font-weight: 900;
}

.news-card-body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.news-card time,
.related-card time {
  color: var(--muted);
  font-size: 14px;
}

.news-card h3,
.related-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.news-card h3 {
  min-height: 52px;
}

.news-card p {
  margin: 0;
  color: var(--muted);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.partner-grid span {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #314149;
  background: #fff;
  font-weight: 750;
}

.cta-band {
  padding: 72px 0;
  color: #fff;
  background: var(--deep);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-inner h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.cta-inner p {
  max-width: 560px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #11191b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 36px;
  padding: 60px 0;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 16px;
  color: #fff;
}

.footer-grid p,
.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin: 9px 0;
}

.copyright {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

.content-page {
  padding: 72px 0;
}

.page-hero {
  padding: 92px 0 78px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(9, 22, 21, 0.9), rgba(18, 51, 47, 0.72)),
    url("assets/images/hero-smart-factory.png") center / cover no-repeat;
}

.page-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.entry-title {
  margin: 0 0 24px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
}

.entry-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.entry-meta-line a {
  color: var(--signal);
}

.entry-content {
  max-width: 820px;
}

.entry-cover {
  max-width: 920px;
  margin: 0 0 32px;
  overflow: hidden;
  border-radius: 8px;
}

.entry-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 44px 0 0;
}

.post-links div {
  display: grid;
  gap: 8px;
  min-height: 112px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--soft);
}

.post-links span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.post-links a {
  color: var(--deep);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.related-news {
  margin-top: 72px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.related-card {
  display: grid;
}

.related-card time,
.related-card h3 {
  margin: 18px 18px 0;
}

.related-card h3 {
  margin-bottom: 22px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
}

.pagination .current {
  color: #fff;
  border-color: var(--signal);
  background: var(--signal);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  align-items: start;
}

.contact-card,
.contact-form-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: #fff;
}

.contact-card ul {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.contact-card li {
  display: grid;
  gap: 5px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.contact-card strong {
  color: var(--deep);
}

.contact-card span,
.contact-form-shell p {
  color: var(--muted);
}

.static-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.static-form label {
  display: grid;
  gap: 8px;
  color: #314149;
  font-weight: 750;
}

.static-form input,
.static-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
}

@media (max-width: 920px) {
  .header-inner,
  .section-head,
  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .metric-strip,
  .grid-3,
  .split,
  .footer-grid,
  .service-grid,
  .about-layout,
  .partners-layout,
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }

  .news-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 28px, 1180px);
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 54px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero p {
    font-size: 17px;
  }

  .metric-strip,
  .grid-3,
  .split,
  .footer-grid,
  .service-grid,
  .about-layout,
  .partners-layout,
  .partner-grid,
    .news-grid,
    .related-grid,
    .post-links,
    .contact-layout {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 70px 0;
  }

  .about-section {
    padding-top: 82px;
  }

}
