/*
Theme Name: CNC Precision Hub
Theme URI: https://example.com/cnc-precision-hub
Author: Codex
Author URI: https://example.com
Description: A multilingual WordPress theme for CNC machining technology, tooling, fixtures, inspection, and supporting services.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cnc-precision-hub
Tags: blog, custom-logo, featured-images, translation-ready, manufacturing
*/

:root {
  --ink: #17202a;
  --muted: #5c6975;
  --line: #d9e0e7;
  --panel: #ffffff;
  --paper: #f5f7f8;
  --steel: #2d5f73;
  --accent: #d44f32;
  --accent-2: #2e8c67;
  --dark: #12171d;
  --shadow: 0 18px 44px rgba(18, 23, 29, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

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

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 247, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--steel);
  border-radius: 8px;
  font-size: 14px;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 650;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--ink);
  background: #e9eef1;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #e9eef1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.language-switcher button {
  min-width: 42px;
  min-height: 32px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.language-switcher button:hover,
.language-switcher button.is-active {
  color: #fff;
  background: var(--steel);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/images/hero-cnc-toolholder.jpg") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(18, 23, 29, 0.9), rgba(18, 23, 29, 0.48) 56%, rgba(18, 23, 29, 0.16));
}

.hero-content {
  width: min(760px, 100%);
  padding: 88px 0 118px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #cddfe6;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  width: min(660px, 100%);
  margin: 22px 0 0;
  color: #e6eef2;
  font-size: clamp(17px, 2vw, 21px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.section {
  padding: 76px 0;
}

.section.white {
  background: #fff;
}

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

.section-head h2,
.archive-title {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.12;
}

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

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(18, 23, 29, 0.06);
}

.card-body {
  padding: 24px;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.24;
}

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

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dfe5e9;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.language-panel {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.language-panel strong {
  display: block;
  margin-bottom: 10px;
  color: var(--steel);
}

.language-panel.is-selected {
  border-color: var(--steel);
  box-shadow: 0 14px 34px rgba(45, 95, 115, 0.14);
}

.language-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
}

.spec-band {
  color: #fff;
  background: var(--dark);
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.spec-item {
  min-height: 128px;
  padding: 22px;
  background: var(--dark);
}

.spec-item span {
  display: block;
  color: #a8bac4;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.spec-item b {
  display: block;
  margin-top: 12px;
  font-size: 26px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.post-card .post-thumb {
  aspect-ratio: 16 / 9;
  background: #dfe5e9;
}

.post-card .post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.post-card h2,
.post-card h3 {
  margin: 8px 0 10px;
  font-size: 22px;
}

.content-area {
  padding: 58px 0 82px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.page-hero .breadcrumbs {
  color: #b9c8d0;
}

.breadcrumbs a {
  color: var(--steel);
}

.page-hero .breadcrumbs a {
  color: #fff;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 38px;
  align-items: start;
}

.article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 48px);
}

.article h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.article-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.article-summary,
.page-intro {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.page-hero .page-intro {
  color: #d9e5eb;
}

.featured-figure {
  margin: 28px 0 0;
}

.featured-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 8px;
}

.article-content {
  margin-top: 28px;
  font-size: 18px;
}

.article-content h2,
.article-content h3 {
  margin-top: 34px;
  line-height: 1.2;
}

.article-content a {
  color: var(--steel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content img {
  border-radius: 8px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-content th,
.article-content td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
}

.article-content th {
  background: #eef3f5;
}

.article-footer {
  display: grid;
  gap: 18px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.tag-list a {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fa;
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.post-nav a {
  display: block;
  min-height: 54px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--steel);
  background: #f7f9fa;
  font-weight: 750;
}

.related-posts {
  grid-column: 1 / -1;
  margin-top: 38px;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.widget,
.sidebar .wp-block-group,
.sidebar section {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.widget h2,
.widget h3 {
  margin-top: 0;
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background: var(--dark);
}

.contact-hero {
  background:
    linear-gradient(90deg, rgba(15, 20, 25, 0.96), rgba(45, 95, 115, 0.74)),
    url("assets/images/process-detail.jpg") center / cover no-repeat;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.inquiry-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.inquiry-form .full {
  grid-column: 1 / -1;
}

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

.inquiry-form textarea {
  resize: vertical;
}

.inquiry-widget .button {
  margin-top: 14px;
}

.site-footer {
  padding: 58px 0 28px;
  color: #dce5ea;
  background:
    linear-gradient(135deg, rgba(45, 95, 115, 0.28), rgba(212, 79, 50, 0.1) 38%, rgba(15, 20, 25, 0) 68%),
    #0f1419;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.footer-cta h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
}

.footer-cta p:not(.eyebrow) {
  max-width: 720px;
  margin: 12px 0 0;
  color: #bfd0d8;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  gap: 34px;
  padding: 42px 0 34px;
}

.footer-brand .brand {
  color: #fff;
}

.footer-brand p {
  max-width: 560px;
  margin: 18px 0 0;
  color: #b9c8d0;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 16px;
}

.footer-column a,
.footer-links a {
  color: #b9c8d0;
}

.footer-column a:hover,
.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: #aebdc5;
  font-size: 14px;
}

.footer-bottom p {
  margin: 0;
}

.footer-links ul,
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

  .header-tools {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .grid.three,
  .grid.two,
  .post-grid,
  .language-grid,
  .spec-list,
  .content-layout,
  .contact-layout,
  .inquiry-form,
  .post-nav,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 560px;
  }

  .site-nav ul {
    gap: 2px;
  }
}
