/* JUDUN Industrial B2B Foreign Trade Design System */
:root {
  --navy: #0c3047;
  --navy-deep: #082233;
  --navy-hover: #154563;
  --ink: #102b40;
  --red: #c81728;
  --red-hover: #a10f1d;
  --muted: #5a6570;
  --line: #d6dde2;
  --pale: #f3f6f8;
  --card-bg: #ffffff;
  --studio-bg: #eef2f5;
  --success-bg: #ebf7f0;
  --success-ink: #186a43;
  --maxw: 1360px;
}

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

html {
  scroll-behavior: smooth;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: #ffffff;
}

body {
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

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

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

.container {
  width: min(calc(100% - 48px), var(--maxw));
  margin-inline: auto;
}

/* Top Utility Bar */
.utility-bar {
  background: var(--navy-deep);
  color: #dce6ee;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 16px;
  flex-wrap: wrap;
}

.utility-contacts {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.utility-contacts a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.utility-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cert-pill {
  font-size: 12px;
  color: #9fc0d6;
  letter-spacing: 0.02em;
}

@media (max-width: 820px) {
  .cert-pill { display: none; }
}

/* Language Switcher */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.lang-menu summary::-webkit-details-marker { display: none; }

.lang-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(12, 48, 71, 0.18);
  min-width: 155px;
  z-index: 90;
  display: flex;
  flex-direction: column;
}

.lang-options a {
  padding: 9px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid #eef2f5;
  display: flex;
  justify-content: space-between;
}

.lang-options a:hover, .lang-options a.active {
  background: var(--pale);
  color: var(--red);
  font-weight: 600;
}

/* Main Header — Desktop visible from 1024px+ (Fixes 1280px premature collapse!) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

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

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 26px 13px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.basket-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--pale);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.basket-trigger:hover {
  border-color: var(--navy);
}

.basket-count {
  background: var(--navy);
  color: #ffffff;
  font-size: 12px;
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.basket-count.has-items {
  background: var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
  white-space: nowrap;
}

.btn-sm {
  padding: 9px 15px;
  font-size: 13.5px;
}

.btn-red {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

.btn-red:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

.btn-navy {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.btn-navy:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.btn-outline-light {
  background: rgba(12, 48, 71, 0.45);
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline-light:hover {
  background: #ffffff;
  color: var(--navy);
}

.btn-outline {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: #ffffff;
}

.btn-whatsapp {
  background: #178048;
  color: #ffffff;
  border-color: #178048;
}

.btn-whatsapp:hover {
  background: #126639;
  border-color: #126639;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 9px 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 1023px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 2px solid var(--navy);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--pale);
  }
  .mobile-toggle { display: inline-flex; }
}

/* Hero Section with RTL-safe High Contrast Overlay */
.hero {
  position: relative;
  background: var(--navy);
  color: #ffffff;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

html[dir="rtl"] .hero-bg {
  transform: scaleX(-1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 34, 51, 0.95) 0%, rgba(12, 48, 71, 0.86) 52%, rgba(12, 48, 71, 0.35) 100%);
}

html[dir="rtl"] .hero-shade {
  background: linear-gradient(270deg, rgba(8, 34, 51, 0.96) 0%, rgba(12, 48, 71, 0.88) 56%, rgba(12, 48, 71, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-block: 72px;
}

.hero-badge {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(200, 23, 40, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  font-weight: 800;
}

.hero p {
  font-size: clamp(16px, 1.35vw, 19px);
  color: #e2ecf3;
  margin: 0 0 30px;
  max-width: 640px;
}

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

/* Metrics Strip */
.stats-strip {
  background: var(--navy-deep);
  color: #ffffff;
  border-top: 3px solid var(--red);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-inline: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-cell {
  padding: 22px 24px;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.stat-lbl {
  font-size: 13.5px;
  color: #a9c2d4;
  margin-top: 4px;
}

@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
}

/* Section Headers */
.section {
  padding-block: 68px;
}

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

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

.accent-bar {
  width: 68px;
  height: 5px;
  background: var(--red);
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

.section-sub {
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 720px;
  font-size: 16.5px;
}

/* Page Banner */
.page-banner {
  background: var(--pale);
  border-bottom: 1px solid var(--line);
  padding-block: 44px;
}

.page-banner h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  margin: 0 0 10px;
  line-height: 1.15;
}

.page-banner p {
  color: var(--muted);
  margin: 0;
  max-width: 780px;
  font-size: 17px;
}

/* Direction Cards */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 920px) {
  .dir-grid { grid-template-columns: 1fr; }
}

.dir-card {
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s, transform 0.18s;
}

.dir-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

.dir-media {
  height: 220px;
  background: var(--studio-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.dir-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dir-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dir-body h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.dir-body p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
  flex: 1;
}

.dir-link {
  font-weight: 700;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Product Catalog Controls & Uniform Grid */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.search-form {
  display: flex;
  flex: 1;
  min-width: 280px;
  max-width: 540px;
}

.search-form input {
  flex: 1;
  padding: 11px 15px;
  border: 1px solid var(--line);
  font-size: 15px;
  outline: none;
}

.search-form input:focus {
  border-color: var(--navy);
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.cat-pill {
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.15s;
}

.cat-pill:hover {
  border-color: var(--navy);
}

.cat-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.cat-pill span {
  opacity: 0.78;
  font-size: 12.5px;
  margin-inline-start: 4px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 1120px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; }
}

.product-card {
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.product-card:hover {
  border-color: var(--navy);
}

.product-thumb {
  aspect-ratio: 1 / 1;
  background: var(--studio-bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-card:hover .product-thumb img {
  transform: scale(1.03);
}

.product-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-cat-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.product-card-body h3 {
  font-size: 17.5px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.product-card-body h3 a:hover {
  color: var(--red);
}

.product-card-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.product-card-actions .btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
}

/* Product Detail Page */
.detail-top {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 44px;
  align-items: start;
}

@media (max-width: 960px) {
  .detail-top { grid-template-columns: 1fr; }
}

.detail-gallery {
  border: 1px solid var(--line);
  background: var(--studio-bg);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.std-badge {
  display: inline-block;
  background: var(--pale);
  border-inline-start: 4px solid var(--navy);
  padding: 6px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Engineering Data Tables */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.data-table th {
  background: var(--navy);
  color: #ffffff;
  text-align: start;
  padding: 13px 16px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:nth-child(even) td {
  background: #f9fbfc;
}

.spec-key {
  width: 260px;
  font-weight: 700;
  color: var(--ink);
  background: var(--pale) !important;
}

/* News Cards & Detail */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

@media (max-width: 940px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  border-color: var(--navy);
}

.news-thumb {
  aspect-ratio: 16 / 10;
  background: var(--studio-bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

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

.news-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.news-badge {
  background: var(--pale);
  color: var(--navy);
  font-weight: 700;
  padding: 2px 8px;
}

.news-body h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.news-body h3 a:hover {
  color: var(--red);
}

.news-body p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 44px;
  align-items: start;
}

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
}

.article-prose h3 {
  font-size: 22px;
  margin: 28px 0 12px;
  color: var(--navy);
}

.article-prose p, .article-prose li {
  font-size: 16.5px;
  line-height: 1.75;
  color: #243849;
}

.article-prose code {
  background: var(--pale);
  padding: 2px 6px;
  font-weight: 700;
  color: var(--red);
}

/* Resources & About Grid */
.res-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 780px) {
  .res-grid { grid-template-columns: 1fr; }
}

.res-card {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

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

@media (max-width: 880px) {
  .why-grid { grid-template-columns: 1fr; }
}

.why-card {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 28px;
  border-top: 4px solid var(--navy);
}

/* RFQ Inquiry Form */
.rfq-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 940px) {
  .rfq-layout { grid-template-columns: 1fr; }
}

.contact-box {
  background: var(--navy);
  color: #ffffff;
  padding: 32px;
}

.contact-box h3 {
  margin-top: 0;
  font-size: 22px;
}

.contact-item {
  padding-block: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-item strong {
  display: block;
  font-size: 12.5px;
  text-transform: uppercase;
  color: #9ec0d6;
  margin-bottom: 4px;
}

.rfq-form {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 32px;
}

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

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-field label {
  font-weight: 700;
  font-size: 14px;
}

.form-field input,
.form-field textarea,
.form-field select {
  padding: 11px 13px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 15px;
  border-radius: 0;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--navy);
  border-color: var(--navy);
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.alert-success {
  background: var(--success-bg);
  border-inline-start: 5px solid var(--success-ink);
  color: var(--success-ink);
  padding: 18px 22px;
  margin-bottom: 24px;
  font-weight: 600;
}

/* RFQ Basket Drawer */
.basket-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 34, 51, 0.55);
  z-index: 120;
}

.basket-drawer-backdrop.open { display: block; }

.basket-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(420px, 92vw);
  height: 100vh;
  background: #ffffff;
  z-index: 130;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.22);
  display: none;
  flex-direction: column;
}

.basket-drawer.open { display: flex; }

.basket-drawer-head {
  background: var(--navy);
  color: #ffffff;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.basket-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.basket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.basket-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.basket-qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  background: var(--pale);
  cursor: pointer;
  font-weight: 700;
}

.basket-drawer-foot {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  background: var(--pale);
}

/* Footer — Dark Navy with Transparent White-Wordmark Brand Logo */
.site-footer {
  background: var(--navy);
  color: #dbe6ee;
  padding-top: 56px;
  border-top: 4px solid var(--red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 44px;
}

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

.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 16px;
}

.footer-col h4 {
  color: #ffffff;
  margin: 0 0 16px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  background: var(--navy-deep);
  padding-block: 18px;
  font-size: 13px;
  color: #9bb4c7;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Floating Quick WhatsApp Button */
.floating-wa {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 24px;
  z-index: 95;
  background: #178048;
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.floating-wa:hover {
  background: #126639;
}

/* Certifications & Patents Showroom */
.iso-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 860px) {
  .iso-grid { grid-template-columns: 1fr; }
}

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

@media (max-width: 1024px) {
  .patent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .patent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cert-card {
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  cursor: zoom-in;
  transition: border-color 0.16s, transform 0.16s;
}

.cert-card:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

.cert-img-wrap {
  background: var(--pale);
  padding: 14px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.cert-img-wrap img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(12, 48, 71, 0.12);
}

.cert-caption {
  padding: 13px 15px;
}

.cert-caption strong {
  display: block;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink);
}

.cert-caption small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.cert-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 42, 0.88);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.cert-lightbox.open {
  display: flex;
}

.cert-lightbox img {
  max-height: 90vh;
  max-width: 92vw;
  border: 3px solid #ffffff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
