/*
Theme Name: UC Metal
Description: Custom WordPress theme for UC Metal Co., Ltd.
Version: 0.4.4
Text Domain: ucmetal
*/

:root {
  --uc-brand-blue: #4877be;
  --uc-primary: #255099;
  --uc-light-blue: #74a8ef;
  --uc-gold: #a89156;
  --uc-background: #ffffff;
  --uc-background-soft: #f4f8f5;
  --uc-text: #172d4c;
  --uc-text-muted: #4e5f73;
  --uc-border: #d8e1e7;
  --uc-border-subtle: #e7edf2;
  --uc-container-max: 1280px;
  --uc-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  font-family: var(--uc-font-sans);
  color: var(--uc-text);
  background: var(--uc-background);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--uc-primary);
  text-underline-offset: .25em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--uc-primary);
  outline-offset: 4px;
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  line-height: 1.15;
  font-weight: 600;
  color: var(--uc-text);
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  letter-spacing: -.035em;
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.screen-reader-text:focus {
  width: auto;
  height: auto;
  clip-path: none;
  top: 8px;
  left: 8px;
  padding: 12px 20px;
  background: #ffffff;
  color: var(--uc-primary);
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Site Header */
.site-header {
  padding: 20px 4vw;
  background: var(--uc-background);
  border-bottom: 1px solid var(--uc-border-subtle);
}

.site-header-inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

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

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.brand-lockup img {
  width: 46px;
  height: auto;
}

.brand-wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  color: var(--uc-text);
}

.brand-wordmark > span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--uc-text-muted);
}

.custom-logo {
  width: auto;
  max-height: 56px;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-navigation a {
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--uc-text);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--uc-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.main-navigation ul ul {
  padding-left: 16px;
}

/* Site Main */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--uc-container-max);
  margin: 0 auto;
  padding: 60px 4vw;
}

.site-main--front-page {
  max-width: none;
  padding: 0;
}

/* Section Headings */
.home-section-heading {
  max-width: 600px;
  margin-bottom: 40px;
}

.home-section-heading__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--uc-primary);
  margin-bottom: 14px;
}

/* Hero Section */
.home-hero {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  padding: 48px 4vw 72px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 5vw;
}

.home-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-hero__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--uc-primary);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--uc-gold);
  border-radius: 50%;
}

.home-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  letter-spacing: -.04em;
  line-height: 1.1;
  font-weight: 600;
  color: var(--uc-text);
}

.home-hero h1 span {
  color: var(--uc-brand-blue);
  display: block;
}

.home-hero__summary {
  max-width: 480px;
  margin-top: 24px;
  color: var(--uc-text-muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.home-enquiry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--uc-primary);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .15s ease;
}

.home-enquiry:hover {
  background: #193b76;
  color: #ffffff;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uc-primary);
  text-decoration: none;
  border-bottom: 2px solid var(--uc-border);
  padding: 10px 0;
}

.hero-secondary:hover {
  border-color: var(--uc-primary);
}

.hero-footnote {
  margin-top: 36px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--uc-text-muted);
}

.home-hero__visual {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  max-height: 460px;
  width: 100%;
  border: 1px solid var(--uc-border);
  background: var(--uc-background-soft);
}

.home-hero__visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Products Section — Clean Industrial Catalog Style */
.home-products {
  background: var(--uc-background-soft);
  padding: 80px 4vw;
  border-top: 1px solid var(--uc-border-subtle);
  border-bottom: 1px solid var(--uc-border-subtle);
}

.home-products__inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
}

.home-products .home-section-heading {
  max-width: 600px;
  margin-bottom: 40px;
}

.home-products__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

.material-card {
  padding: 24px 0;
  border-top: 1px solid var(--uc-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}

.material-card:focus-visible {
  outline: 2px solid var(--uc-primary);
  outline-offset: 4px;
}

.material-card:hover h3 {
  color: var(--uc-brand-blue);
}

.material-card__arrow {
  display: inline-block;
  font-size: 15px;
  color: var(--uc-brand-blue);
  transition: transform .15s ease;
  margin-left: 4px;
}

.material-card:hover .material-card__arrow {
  transform: translateX(4px);
}

.material-card:nth-child(5),
.material-card:nth-child(6) {
  border-bottom: 1px solid var(--uc-border);
}

.material-card h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--uc-text);
  letter-spacing: -.02em;
  transition: color .15s ease;
}

.material-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--uc-text-muted);
  margin: 0;
}

/* Services Section */
.home-services {
  padding: 80px 4vw;
  background: var(--uc-background);
}

.home-services__inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 6vw;
  align-items: start;
}

.home-services .home-section-heading {
  margin: 0;
}

.home-services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.service-card {
  border-top: 2px solid var(--uc-gold);
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}

.service-card:focus-visible {
  outline: 2px solid var(--uc-primary);
  outline-offset: 4px;
}

.service-card:hover h3 {
  color: var(--uc-brand-blue);
}

.service-card__arrow {
  display: inline-block;
  font-size: 15px;
  color: var(--uc-brand-blue);
  transition: transform .15s ease;
  margin-left: 4px;
}

.service-card:hover .service-card__arrow {
  transform: translateX(4px);
}

.service-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--uc-text);
  margin-bottom: 14px;
  transition: color .15s ease;
}

.service-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--uc-text-muted);
}

/* Why UC Metal Section */
.home-why {
  padding: 0 4vw 80px;
  background: var(--uc-background);
}

.home-why__inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  border-top: 1px solid var(--uc-border);
  padding-top: 64px;
}

.home-why .home-section-heading {
  max-width: 600px;
  margin-bottom: 36px;
}

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

.value-card {
  padding-left: 20px;
  border-left: 2px solid var(--uc-light-blue);
}

.value-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--uc-text);
  margin-bottom: 10px;
}

.value-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--uc-text-muted);
}

/* About Section — Light Editorial */
.home-about {
  padding: 80px 4vw;
  background: var(--uc-background-soft);
  border-top: 1px solid var(--uc-border-subtle);
  border-bottom: 1px solid var(--uc-border-subtle);
}

.home-about__inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 6vw;
  align-items: center;
}

.home-about .home-section-heading {
  margin: 0;
}

.home-about__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-about__content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--uc-text-muted);
  margin: 0;
}

.home-about__content p:first-child {
  font-size: 17px;
  font-weight: 500;
  color: var(--uc-text);
  line-height: 1.7;
}

/* Contact Section */
.home-contact {
  padding: 80px 4vw;
  background: var(--uc-background);
}

.home-contact__inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
}

.home-contact .home-section-heading {
  max-width: none;
  margin-bottom: 36px;
}

.home-contact h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
}

.home-contact__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr .85fr;
  gap: 40px;
  border-top: 1px solid var(--uc-border);
  padding-top: 36px;
}

.contact-card h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--uc-primary);
  margin-bottom: 16px;
}

.contact-card p,
.contact-card address {
  font-size: 14px;
  font-style: normal;
  line-height: 1.65;
  color: var(--uc-text-muted);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.contact-card a {
  color: var(--uc-primary);
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-card:first-child a {
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

/* Footer */
.site-footer {
  background: var(--uc-background-soft);
  border-top: 1px solid var(--uc-border-subtle);
  padding: 24px 4vw;
}

.site-footer-inner {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  font-size: 12px;
  color: var(--uc-text-muted);
}

/* ==========================================================================
   Inner Pages & Product Detail Templates
   ========================================================================== */

.product-page-container,
.page-container {
  max-width: var(--uc-container-max);
  margin: 0 auto;
  padding: 40px 4vw 80px;
}

/* Breadcrumb Navigation */
.breadcrumb-trail {
  margin-bottom: 28px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--uc-text-muted);
}

.breadcrumb-item a {
  color: var(--uc-text-muted);
  text-decoration: none;
  transition: color .15s ease;
}

.breadcrumb-item a:hover {
  color: var(--uc-primary);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--uc-border);
}

.breadcrumb-item--current {
  color: var(--uc-text);
  font-weight: 600;
}

/* Page & Product Headers */
.product-header,
.page-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--uc-border);
  padding-bottom: 24px;
}

.product-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--uc-brand-blue);
  font-weight: 600;
  margin-bottom: 10px;
}

.product-header__eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--uc-gold);
  border-radius: 50%;
}

.product-title,
.page-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: var(--uc-text);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

/* Product & Standard Content Layout */
.product-content,
.standard-page-article .entry-content {
  color: var(--uc-text);
  font-size: 15px;
  line-height: 1.7;
}

.product-content h2,
.standard-page-article .entry-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--uc-primary);
  letter-spacing: -.01em;
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--uc-border-subtle);
}

.product-content h3,
.standard-page-article .entry-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--uc-text);
  margin: 28px 0 12px;
}

.product-content p,
.standard-page-article .entry-content p {
  margin-bottom: 1.2em;
}

.product-content ul,
.standard-page-article .entry-content ul {
  margin: 0 0 24px 20px;
  padding: 0;
  list-style: disc;
}

.product-content li,
.standard-page-article .entry-content li {
  margin-bottom: 6px;
}

/* Specification Summary Grid */
.spec-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0 36px;
}

.spec-summary-card {
  background: var(--uc-background-soft);
  border: 1px solid var(--uc-border-subtle);
  border-left: 3px solid var(--uc-brand-blue);
  padding: 18px 20px;
  border-radius: 4px;
}

.spec-summary-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--uc-primary);
  margin: 0 0 6px;
}

.spec-summary-card p {
  font-size: 13.5px;
  color: var(--uc-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Accessible Responsive Data Tables */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0 12px;
  border: 1px solid var(--uc-border);
  border-radius: 4px;
  background: #ffffff;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--uc-primary);
  outline-offset: 2px;
}

table.metal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 14px;
  text-align: left;
}

table.metal-table caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--uc-primary);
  background: var(--uc-background-soft);
  border-bottom: 1px solid var(--uc-border);
}

table.metal-table th,
table.metal-table td {
  padding: 10px 16px;
  border: 1px solid var(--uc-border);
  vertical-align: middle;
}

table.metal-table th {
  background: var(--uc-background-soft);
  color: var(--uc-text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
}

table.metal-table tbody tr:nth-child(even) {
  background: #fafcfb;
}

table.metal-table tbody tr:hover {
  background: #f0f5fa;
}

.table-note {
  font-size: 12px;
  color: var(--uc-text-muted);
  margin-top: 6px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Product & Service Enquiry Banner */
.product-enquiry-banner {
  margin-top: 56px;
  padding: 32px 36px;
  background: var(--uc-background-soft);
  border: 1px solid var(--uc-border);
  border-left: 4px solid var(--uc-primary);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-enquiry-banner h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--uc-primary);
  margin: 0;
}

.product-enquiry-banner p {
  color: var(--uc-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.product-enquiry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.product-enquiry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--uc-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background .15s ease;
}

.product-enquiry-btn:hover {
  background: #193b76;
  color: #ffffff;
}

.product-enquiry-tel {
  font-size: 14px;
  font-weight: 600;
  color: var(--uc-primary);
  text-decoration: none;
}

.product-enquiry-tel:hover {
  text-decoration: underline;
}

/* Service Detail Showcase */
.service-detail-section {
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--uc-border);
}

.service-detail-section:last-of-type {
  border-bottom: none;
}

.service-feature-table {
  width: 100%;
  max-width: 680px;
  border-collapse: collapse;
  margin: 20px 0;
}

.service-feature-table th,
.service-feature-table td {
  padding: 10px 16px;
  border: 1px solid var(--uc-border);
  font-size: 14px;
}

.service-feature-table th {
  width: 35%;
  background: var(--uc-background-soft);
  font-weight: 600;
  color: var(--uc-text);
}

.entry-content {
  margin-top: 30px;
}

.entry-content p {
  margin-bottom: 1.2em;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .brand-wordmark > span {
    display: none;
  }
  .home-hero {
    gap: 32px;
    padding: 36px 4vw 56px;
  }
  .home-services__inner,
  .home-about__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 16px 20px;
  }
  .site-header-inner {
    flex-wrap: wrap;
    gap: 14px;
  }
  .brand-lockup img {
    width: 36px;
  }
  .brand-wordmark {
    font-size: 18px;
  }
  .main-navigation {
    width: 100%;
  }
  .main-navigation ul {
    justify-content: flex-start;
    gap: 4px 16px;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  .main-navigation a {
    font-size: 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
  }
  .home-hero {
    grid-template-columns: 1fr;
    padding: 20px 20px 48px;
    gap: 28px;
  }
  .home-hero__visual {
    aspect-ratio: 16 / 10;
    max-height: 320px;
    min-height: 240px;
  }
  .home-hero h1 {
    font-size: clamp(2.2rem, 8.5vw, 3.2rem);
  }
  .home-hero__summary {
    font-size: 15px;
    margin-top: 18px;
  }
  .hero-actions {
    gap: 14px;
    margin-top: 24px;
  }
  .hero-footnote {
    margin-top: 24px;
    font-size: 10px;
  }
  .home-products,
  .home-services,
  .home-about,
  .home-contact {
    padding: 52px 20px;
  }
  .home-why {
    padding: 0 20px 52px;
  }
  .home-why__inner {
    padding-top: 40px;
  }
  .home-section-heading {
    margin-bottom: 24px;
  }
  .home-products__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .material-card:nth-child(5) {
    border-bottom: none;
  }
  .material-card:last-child {
    border-bottom: 1px solid var(--uc-border);
  }
  .home-why__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .home-contact__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact-card + .contact-card {
    border-top: 1px solid var(--uc-border);
    padding-top: 24px;
  }
  .site-footer {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .home-services__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
