/*
Theme Name: Sinditek Refinery (Custom 2)
Theme URI: https://sinditek.com
Author: PT Sinergi Dinamika Teknologi Engineering Team
Author URI: https://sinditek.com
Description: Varian tema Sinditek bernuansa oil & gas: palet crude black + flare orange, foto kilang dan anjungan lepas pantai di header. Modul native (Form Submissions, SEO, Security, Katalog Spesifikasi) sama dengan theme-custom.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: theme-custom-2
*/

/*
 * Palet "crude black + flare orange".
 * Flare hanya untuk CTA utama dan teks di permukaan gelap: teks putih di atas
 * flare cuma 3.58:1, jadi tombol flare memakai teks crude (5.16:1).
 * Untuk teks oranye di permukaan terang pakai --brand-flare-deep (6.37:1).
 */
:root {
  --brand-crude: #121416;
  --brand-crude-deep: #0A0B0C;
  --brand-crude-raised: #1B1F23;
  --brand-steel: #2A3036;
  --brand-steel-hover: #3A4148;
  --brand-flare: #E8590C;
  --brand-flare-hover: #FB7A2E;
  --brand-flare-deep: #A93A06;
  --line-on-dark: #2E3439;
  --surface-clean-white: #FFFFFF;
  --surface-plate: #F4F3F1;
  --surface-plate-muted: #EAE8E4;
  --border-subtle: #DEDBD6;
  --border-strong: #C4C0B9;
  --text-primary: #141618;
  --text-secondary: #4E5257;
  --text-on-dark: #FFFFFF;
  --text-muted-on-dark: #B9BDC2;
  --nav-on-dark: #E6E8EA;
  --overlay-crude: 18, 20, 22;
  --status-success-bg: #ECFDF5;
  --status-success-text: #065F46;
  --status-success-border: #A7F3D0;
  --status-error-bg: #FEF2F2;
  --status-error-text: #991B1B;
  --status-error-border: #FECACA;
  --whatsapp-dark: #075E54;
  --whatsapp-dark-hover: #054C44;
  /* Barlow berakar dari rambu jalan dan papan industri: terbaca tegas di lapangan, cocok untuk B2B oil & gas. */
  --font-sans: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-display: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Roboto Mono', Consolas, 'Courier New', monospace;
  --container-max: 1280px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition-fast: 160ms ease-out;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--surface-plate);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-steel);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

a:hover {
  color: var(--brand-crude);
}

button,
input[type="submit"],
input[type="button"],
select,
summary,
[role="button"] {
  cursor: pointer;
  font-family: inherit;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

:focus-visible {
  outline: 2px solid var(--brand-flare);
  outline-offset: 2px;
}

/* Skip Link for Keyboard Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background-color: var(--brand-flare);
  color: var(--brand-crude);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 1.5rem;
  }
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2rem, 3.4vw + 1rem, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 2vw + 0.9rem, 2.125rem);
}

h3 {
  font-size: clamp(1.15rem, 1.2vw + 0.8rem, 1.375rem);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  max-width: 70ch;
}

.mono-code,
code,
pre,
.spec-code,
.count-badge {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Top Utility Bar */
.top-utility-bar {
  background-color: var(--brand-crude-deep);
  color: var(--text-muted-on-dark);
  border-bottom: 1px solid var(--line-on-dark);
  font-size: 0.8125rem;
}

.top-utility-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding-block: 0.5rem;
}

.utility-info-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.utility-info-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.top-utility-bar a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 600;
}

.top-utility-bar a:hover {
  color: var(--brand-flare);
  text-decoration: underline;
}

.utility-wa-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-flare) !important;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Main Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--brand-crude);
  border-bottom: 1px solid var(--line-on-dark);
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding-block: 0.625rem;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-on-dark);
  min-height: 44px;
  min-width: 0;
  flex-shrink: 1;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--brand-flare);
  color: var(--brand-crude);
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  font-weight: 700;
  color: var(--text-on-dark);
  line-height: 1.15;
  text-wrap: balance;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted-on-dark);
  font-weight: 500;
  line-height: 1.25;
  max-width: 36ch;
}

/* Logo dari Customizer; tinggi diatur via --brand-logo-h (Tampilan > Sesuaikan > Identitas Situs) */
.brand-logo {
  display: block;
  height: var(--brand-logo-h, 48px);
  width: auto;
  max-width: none;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .brand-identity--header .brand-logo {
    height: min(var(--brand-logo-h, 48px), 40px);
  }

  .brand-identity--header .brand-tagline {
    display: none;
  }
}

.footer-brand .brand-logo {
  height: 56px;
}

.header-cta-btn {
  display: none !important;
}

@media (min-width: 640px) {
  .header-cta-btn {
    display: inline-flex !important;
  }
}

/* Primary Navigation */
.primary-nav {
  display: none;
}

@media (min-width: 1280px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  padding: 0.5rem 0.5rem;
  color: var(--nav-on-dark);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background-color: var(--brand-crude-raised);
  color: var(--text-on-dark);
}

.nav-link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brand-flare);
}

/* Dropdown Submenu */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 270px;
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  margin: 0;
  list-style: none;
  display: none;
  z-index: 1100;
  box-shadow: 0 10px 25px -5px rgba(var(--overlay-crude), 0.28);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.nav-dropdown a:hover {
  background-color: var(--surface-plate);
  color: var(--brand-steel);
}

/* Header Search & CTA Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search-form {
  display: none;
  align-items: center;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-sm);
  background-color: var(--brand-crude-raised);
  overflow: hidden;
}

@media (min-width: 768px) {
  .header-search-form {
    display: flex;
  }
}

.header-search-input {
  border: 0;
  background: transparent;
  padding: 0.5rem 0.6rem;
  font-size: 0.8125rem;
  color: var(--text-on-dark);
  width: 130px;
  min-height: 40px;
}

.header-search-input::placeholder {
  color: #9AA0A6;
}

@media (min-width: 1280px) {
  .header-search-input {
    width: 120px;
  }

  .nav-link {
    padding-inline: 0.4rem;
  }

  .brand-identity--header .brand-name {
    font-size: 0.95rem;
  }
}

.header-search-input:focus {
  outline: none;
  background-color: #23282D;
}

.header-search-form:focus-within {
  outline: 2px solid var(--brand-flare);
  outline-offset: 2px;
}

.header-search-btn {
  border: 0;
  border-left: 1px solid var(--line-on-dark);
  background-color: var(--brand-steel);
  color: var(--text-on-dark);
  min-width: 44px;
  min-height: 42px;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-search-btn:hover {
  background-color: var(--brand-steel-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  max-width: 100%;
}

@media (min-width: 480px) {
  .btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.btn:active {
  transform: translateY(1px);
}

.btn-flare {
  background-color: var(--brand-flare);
  color: var(--brand-crude);
  border-color: var(--brand-flare);
}

.btn-flare:hover {
  background-color: var(--brand-flare-hover);
  border-color: var(--brand-flare-hover);
  color: var(--brand-crude);
}

.btn-crude {
  background-color: var(--brand-crude);
  color: var(--text-on-dark);
  border-color: var(--brand-crude);
}

.btn-crude:hover {
  background-color: var(--brand-steel);
  border-color: var(--brand-steel);
  color: var(--text-on-dark);
}

.btn-outline {
  background-color: var(--surface-clean-white);
  color: var(--brand-crude);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background-color: var(--surface-plate-muted);
  border-color: var(--brand-steel);
  color: var(--brand-crude);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--text-on-dark);
  border-color: var(--border-strong);
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--brand-flare);
  border-color: var(--brand-flare);
}

.btn-whatsapp {
  background-color: var(--whatsapp-dark);
  color: var(--text-on-dark);
  border-color: var(--whatsapp-dark);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-dark-hover);
  border-color: var(--whatsapp-dark-hover);
  color: var(--text-on-dark);
}

/* Mobile Menu Button & Drawer */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background-color: var(--brand-crude-raised);
  color: var(--text-on-dark);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle[aria-expanded="true"] {
  background-color: var(--brand-steel);
  border-color: var(--brand-steel-hover);
}

@media (min-width: 1280px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-drawer {
  display: none;
  background-color: var(--brand-crude);
  border-top: 1px solid var(--line-on-dark);
  border-bottom: 2px solid var(--brand-flare);
  padding: 1rem 0 1.5rem;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
}

.mobile-drawer.is-open {
  display: block;
}

@media (min-width: 1280px) {
  .mobile-drawer,
  .mobile-drawer.is-open {
    display: none;
  }
}

.mobile-nav-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  color: var(--nav-on-dark);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--line-on-dark);
}

.mobile-nav-list a:hover {
  background-color: var(--brand-crude-raised);
  color: var(--text-on-dark);
}

.mobile-search-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mobile-search-form input {
  flex: 1;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--brand-crude);
  color: var(--text-on-dark);
  border-bottom: 3px solid var(--brand-flare);
}

/*
 * Foto kilang sebagai <img> (bukan background CSS) supaya jadi kandidat LCP
 * dengan fetchpriority="high". Overlay crude menjaga kontras teks di titik
 * terang foto (lampu kilang): pada opasitas 0.86, piksel putih murni turun
 * ke ~#2E2E2E, teks muted #B9BDC2 tetap >7:1.
 */
.hero-media,
.page-banner-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
}

.hero-media picture,
.page-banner-media picture {
  display: block;
  height: 100%;
}

.hero-media img,
.page-banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img {
  object-position: 70% 55%;
}

.hero-section::before,
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(var(--overlay-crude), 0.86);
}

@media (min-width: 1024px) {
  .hero-section::before {
    background-color: transparent;
    background-image: linear-gradient(90deg, rgba(var(--overlay-crude), 0.94) 0%, rgba(var(--overlay-crude), 0.88) 58%, rgba(var(--overlay-crude), 0.45) 82%, rgba(var(--overlay-crude), 0.25) 100%);
  }
}

.hero-inner {
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
}

.hero-content {
  max-width: 680px;
}

@media (min-width: 1024px) {
  .hero-content {
    max-width: 56%;
  }
}

.hero-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted-on-dark);
  margin-bottom: 0.875rem;
}

.hero-title {
  color: var(--text-on-dark);
  font-size: clamp(2.125rem, 4vw + 1rem, 3.5rem);
  line-height: 1.05;
  margin-bottom: 1.125rem;
}

.hero-lead {
  color: var(--text-muted-on-dark);
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
  max-width: 64ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-specs-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

@media (min-width: 640px) {
  .hero-specs-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-spec-label {
  font-size: 0.75rem;
  color: var(--text-muted-on-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Nilai spesifikasi putih, bukan flare: di titik terang foto flare turun ke 3.8:1. */
.hero-spec-value {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-on-dark);
}

/* Page Banner (halaman korporat, katalog, pencarian) */
.page-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--brand-crude);
  color: var(--text-on-dark);
  border-bottom: 3px solid var(--brand-flare);
}

.page-banner-inner {
  padding-block: clamp(2.25rem, 6vw, 4.25rem);
}

.page-banner-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted-on-dark);
}

.page-banner h1 {
  color: var(--text-on-dark);
  margin: 0.4rem 0 0;
  max-width: 28ch;
}

/* Divisi Oil & Gas: panel lebar dengan foto, karena ini divisi utama */
.pillar-feature {
  display: grid;
  grid-template-columns: 1fr;
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
  .pillar-feature {
    grid-template-columns: 5fr 7fr;
  }
}

.pillar-feature-media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  background-color: var(--brand-crude);
}

@media (min-width: 900px) {
  .pillar-feature-media {
    aspect-ratio: auto;
    min-height: 100%;
  }
}

.pillar-feature-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pillar-feature-body {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pillar-feature-body h3 {
  font-size: clamp(1.4rem, 1.6vw + 0.9rem, 1.875rem);
}

@media (min-width: 640px) {
  .pillar-feature .pillar-spec-list {
    columns: 2;
    column-gap: 2rem;
  }

  .pillar-feature .pillar-spec-list li {
    break-inside: avoid;
  }
}

.pillar-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

/* Sections */
.section-block {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--border-subtle);
}

.section-white {
  background-color: var(--surface-clean-white);
}

.section-slate {
  background-color: var(--surface-plate);
}

.section-dark {
  background-color: var(--brand-crude);
  color: var(--text-on-dark);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-steel);
  margin-bottom: 0.35rem;
}

.section-dark .section-eyebrow {
  color: var(--brand-flare);
}

.section-dark h2,
.section-dark h3 {
  color: var(--text-on-dark);
}

/* 3 Industrial Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pillar-card {
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.pillar-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-steel);
  background-color: var(--surface-plate-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.pillar-spec-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pillar-spec-list li {
  margin-bottom: 0.4rem;
}

/* Technical Category Matrix */
.category-matrix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

@media (min-width: 576px) {
  .category-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .category-matrix {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 64px;
}

.category-tile:hover {
  border-color: var(--brand-steel);
  background-color: var(--surface-plate);
}

.category-tile-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--brand-crude);
}

.category-tile-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  background-color: var(--brand-steel);
  color: var(--text-on-dark);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Equipment Product Cards Grid */
.instrument-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .instrument-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .instrument-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.instrument-card {
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.instrument-card:hover {
  border-color: var(--brand-steel);
}

.instrument-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-color: var(--surface-clean-white);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}

.instrument-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.instrument-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--surface-plate);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--brand-steel);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.instrument-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.instrument-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.625rem;
}

.instrument-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  background-color: var(--surface-plate-muted);
  color: var(--brand-steel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.instrument-badge-flare {
  background-color: var(--brand-crude);
  color: var(--brand-flare);
  border-color: var(--brand-crude);
}

.instrument-card-title {
  font-size: 1.0625rem;
  line-height: 1.35;
  margin-bottom: 0.625rem;
}

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

.instrument-card-title a:hover {
  color: var(--brand-steel);
  text-decoration: underline;
}

.instrument-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex: 1;
}

.instrument-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-subtle);
}

.instrument-card-actions .btn {
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  width: 100%;
}

/* Technical Specification Table (DESIGN.md Section 5B) */
.spec-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-block: 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--surface-clean-white);
}

table,
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

table thead th,
.spec-table thead th,
table tr:first-child th {
  background-color: var(--brand-steel);
  color: var(--text-on-dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--brand-crude);
}

table th,
table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

table tbody tr:nth-child(even) {
  background-color: var(--surface-plate);
}

table tbody tr:nth-child(odd) {
  background-color: var(--surface-clean-white);
}

table td:nth-child(2),
.spec-table td.spec-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Native CPT Inquiry Form (`sinditek_form`) */
.sinditek-form-card {
  background-color: var(--surface-clean-white);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-flare);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid-2col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-required {
  color: var(--status-error-text);
  margin-left: 0.15rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-steel);
  background-color: var(--surface-clean-white);
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Honeypot anti-spam field */
.sinditek-hp-wrap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Widget CAPTCHA (Turnstile/reCAPTCHA) lebarnya tetap 300-304px */
.sinditek-captcha {
  margin-bottom: 1.25rem;
  min-height: 65px;
}

/* Layar < 380px: kartu form lebih sempit dari widget, perkecil agar tidak meluber */
@media (max-width: 379px) {
  .sinditek-captcha > div {
    transform: scale(0.82);
    transform-origin: left top;
  }
}

/* UI States: Alert Boxes (Success, Error, Empty, Loading) */
.ui-state-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.ui-state-success {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}

.ui-state-error {
  background-color: var(--status-error-bg);
  color: var(--status-error-text);
  border-color: var(--status-error-border);
}

.ui-state-empty {
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-strong);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-radius: var(--radius-md);
}

.ui-state-loading {
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background-color: var(--surface-plate-muted);
  color: var(--brand-crude);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

.ui-state-loading.is-active {
  display: inline-flex;
}

/* Breadcrumbs */
.breadcrumb-bar {
  background-color: var(--surface-clean-white);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-list a {
  color: var(--brand-steel);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

/* Single Instrument Layout */
.single-instrument-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 992px) {
  .single-instrument-layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }
}

/* Caption dari konten lama membawa lebar inline; batasi ke lebar kolom */
.wp-caption {
  max-width: 100% !important;
  margin-inline: 0;
}

.wp-caption img,
.instrument-content-card img {
  max-width: 100%;
  height: auto;
}

.instrument-content-card {
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.instrument-gallery-stage {
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 420px;
  overflow: hidden;
}

.instrument-gallery-stage img {
  max-height: 380px;
  width: auto;
  object-fit: contain;
}

.entry-content img {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-block: 1rem;
  background-color: var(--surface-clean-white);
  padding: 0.25rem;
}

/* Catalog Filter Bar & Pagination */
.catalog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 992px) {
  .catalog-layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

.catalog-sidebar {
  background-color: var(--surface-clean-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.filter-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.filter-category-list a:hover,
.filter-category-list a.is-active {
  background-color: var(--brand-crude);
  color: var(--text-on-dark);
}

.filter-category-list .count-badge {
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.filter-category-list a.is-active .count-badge {
  background-color: var(--brand-flare);
  color: var(--brand-crude);
}

.pagination-nav {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pagination-nav .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  background-color: var(--surface-clean-white);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  text-decoration: none;
}

.pagination-nav .page-numbers.current,
.pagination-nav .page-numbers:hover {
  background-color: var(--brand-crude);
  color: var(--brand-flare);
  border-color: var(--brand-crude);
}

/* Footer */
.site-footer {
  background-color: var(--brand-crude);
  color: var(--text-muted-on-dark);
  border-top: 4px solid var(--brand-flare);
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  }
}

.footer-heading {
  color: var(--text-on-dark);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-on-dark);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: var(--text-muted-on-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.footer-links a:hover {
  color: var(--brand-flare);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-on-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* Floating Action Anchor (WhatsApp + Back to Top) */
.floating-actions {
  position: fixed;
  right: 0.875rem;
  bottom: 0.875rem;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .floating-actions {
    right: 1.25rem;
    bottom: 1.25rem;
  }
}

.floating-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  background-color: var(--whatsapp-dark);
  color: var(--text-on-dark);
  border: 1.5px solid var(--surface-clean-white);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(var(--overlay-crude), 0.22);
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-wa-btn:hover {
  background-color: var(--whatsapp-dark-hover);
  color: var(--text-on-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--overlay-crude), 0.28);
}

.floating-wa-btn:active {
  transform: translateY(0);
}

.floating-wa-icon {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
}

/* Mobile: Minimalist compact pill label */
.floating-wa-label-desktop {
  display: none;
}

.floating-wa-label-mobile {
  display: inline-block;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

/* Desktop & Tablet: Expand to full informative label */
@media (min-width: 768px) {
  .floating-wa-btn {
    min-height: 46px;
    padding: 0.55rem 1.05rem;
    gap: 0.55rem;
    font-size: 0.875rem;
  }

  .floating-wa-icon {
    width: 20px;
    height: 20px;
  }

  .floating-wa-label-desktop {
    display: inline-block;
  }

  .floating-wa-label-mobile {
    display: none;
  }
}

.back-to-top-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--brand-crude);
  color: var(--brand-flare);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 25, 44, 0.22);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.back-to-top-btn.is-visible {
  display: inline-flex;
}

.back-to-top-btn:hover {
  background-color: var(--brand-steel);
  transform: translateY(-2px);
}

.back-to-top-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .back-to-top-btn {
    width: 46px;
    height: 46px;
  }

  .back-to-top-icon {
    width: 24px;
    height: 24px;
  }
}

/* Reduced Motion Respect */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Stylesheet for Technical Specifications */
@media print {
  .top-utility-bar,
  .site-header,
  .floating-actions,
  .sinditek-form-card,
  .site-footer,
  .no-print {
    display: none !important;
  }
  body {
    background: #FFFFFF;
    color: #000000;
  }
  .single-instrument-layout {
    display: block;
  }
}
