.es-page-hero {
  padding: 78px 0 48px;
  background: linear-gradient(180deg, #f5fbff 0%, #ffffff 80%);
}

.es-page-hero--alt {
  background: linear-gradient(180deg, #eff7ff 0%, #ffffff 80%);
}

.es-page-content {
  padding-top: 36px;
}

.es-content-wrap {
  margin-top: 24px;
  border: 1px solid #e5ebf2;
  border-radius: 14px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 8px 28px rgba(13, 42, 67, 0.05);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.es-content > *:first-child {
  margin-top: 0;
}

.es-content > *:last-child {
  margin-bottom: 0;
}

.es-content h2,
.es-content h3 {
  color: #0d2a43;
}

.es-content p,
.es-content li {
  color: #4b5563;
}

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

.es-post-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
}

.es-project-thumb img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin-bottom: 12px;
}

.es-project-card h2 {
  font-size: 20px;
}

.es-project-hero-image img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.es-post-card h2 {
  font-size: 22px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.es-post-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.es-post-readmore {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
}

.es-pagination {
  margin-top: 18px;
}

.es-page-cta {
  margin-top: 20px;
  border: 1px solid #d8e6f3;
  background: linear-gradient(180deg, #f4f9ff 0%, #ffffff 100%);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.es-page-cta p {
  margin: 0;
  color: #1f2937;
  max-width: 680px;
}

.es-page-cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.es-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.es-filter__item {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #d6e2ee;
  border-radius: 999px;
  background: #fff;
  color: #0d2a43;
  font-weight: 600;
  font-size: 13px;
}

.es-filter__item.is-active {
  background: #0a6fae;
  border-color: #0a6fae;
  color: #fff;
}

/* FAQ page: quick nav (group anchor links) */
.es-faq-quick-nav {
  margin: 0 0 24px;
}

.es-faq-quick-nav__title {
  margin: 0 0 14px;
}

.es-faq-quick-nav__list {
  margin: 0;
  padding: 0 0 0 1.15em;
  list-style: disc;
  columns: 2;
  column-gap: clamp(24px, 4vw, 48px);
}

.es-faq-quick-nav__list li {
  break-inside: avoid;
  margin-bottom: 8px;
  line-height: 1.45;
}

.es-faq-quick-nav__list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary);
}

.es-faq-quick-nav__list a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .es-faq-quick-nav__list {
    columns: 1;
  }
}

.es-faq--page details {
  border: 1px solid #dfe8f1;
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}

.es-faq--page details + details {
  margin-top: 10px;
}

.es-single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start;
}

.es-single-sidebar h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.es-side-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.es-side-posts li + li {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e6edf5;
}

@media (max-width: 640px) {
  .es-page-hero {
    padding: 60px 0 34px;
  }

  .es-content-wrap {
    padding: 16px;
  }
}

@media (max-width: 992px) {
  .es-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .es-single-layout {
    grid-template-columns: 1fr;
  }
}

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

  .es-page-cta {
    padding: 14px;
  }
}

/* Inner pages: reference-style polish + motion targets (see main.js + main.css) */
.es-page-hero .es-kicker {
  position: relative;
  padding-bottom: 12px;
}

.es-page-hero .es-kicker::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(52px, 26vw);
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary), rgba(10, 111, 174, 0.25));
}

.es-page-hero h1 {
  letter-spacing: -0.025em;
}

.es-page-hero .es-lead {
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.65;
}

/* OEM/ODM: program tiers comparison table */
.es-oem-tiers {
  margin: 0 0 40px;
}

.es-oem-tiers h2 {
  margin: 0 0 18px;
}

.es-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(13, 42, 67, 0.05);
}

.es-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

.es-table th,
.es-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e4ebf2;
  text-align: left;
  vertical-align: top;
  color: #374151;
}

.es-table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f6fb 100%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0d2a43;
  border-bottom: 2px solid #d6e4f0;
  white-space: nowrap;
}

.es-table tbody tr:last-child td {
  border-bottom: none;
}

@media (prefers-reduced-motion: no-preference) {
  .es-table tbody tr:hover td {
    background: #f8fbff;
  }
}

.es-oem-table td:first-child {
  color: #0d2a43;
  white-space: nowrap;
}

.es-oem-table td:first-child strong {
  font-weight: 700;
}

.es-oem-table col.es-oem-col-program {
  width: 22%;
}

.es-oem-table col.es-oem-col-moq {
  width: 14%;
}

.es-oem-table col.es-oem-col-timeline {
  width: 28%;
}

.es-oem-steps {
  margin-top: 8px;
}

.es-oem-cases {
  margin: 40px 0 28px;
}

.es-oem-cases__more {
  margin: 16px 0 0;
}

@media (max-width: 640px) {
  .es-table {
    min-width: 640px;
    font-size: 14px;
  }

  .es-table th,
  .es-table td {
    padding: 12px 14px;
  }
}

.es-content-wrap:hover {
  border-color: #d6e4f0;
  box-shadow: 0 14px 40px rgba(13, 42, 67, 0.08);
}

.es-post-card,
.es-project-card {
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .es-post-card:hover,
  .es-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(13, 42, 67, 0.11);
    border-color: #d0dce8;
  }

  .es-project-thumb img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .es-project-card:hover .es-project-thumb img {
    transform: scale(1.04);
  }
}

.es-project-thumb {
  overflow: hidden;
  border-radius: 12px;
}

.es-filter__item {
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .es-filter__item:hover {
    transform: translateY(-1px);
    border-color: #b9cce0;
    box-shadow: 0 8px 20px rgba(13, 42, 67, 0.08);
  }
}

.es-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  margin: 3px;
  border-radius: 10px;
  border: 1px solid #dbe6f1;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  color: #0d2a43;
  text-decoration: none;
}

.es-pagination a.page-numbers:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #f4faff;
}

.es-pagination span.page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .es-page-cta:hover {
    box-shadow: 0 16px 44px rgba(13, 42, 67, 0.1);
    border-color: #c9daf0;
  }
}

.es-faq--page details {
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.es-faq--page details:hover {
  border-color: #c5d7eb;
  box-shadow: 0 10px 26px rgba(13, 42, 67, 0.06);
}

.es-single-head h1 {
  letter-spacing: -0.03em;
}

.es-page-content .es-grid > .es-card:not(.es-card--link) {
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .es-page-content .es-grid > .es-card:not(.es-card--link):hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(13, 42, 67, 0.1);
    border-color: #d0dce8;
  }
}

/* About page: factory video + photo grid (ACF-driven) */
.es-about-factory {
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(36px, 5vw, 56px);
}

.es-about-factory__title {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.02em;
  color: #0d2a43;
  text-align: center;
}

.es-about-factory__lead {
  margin: 0 auto clamp(24px, 3.5vw, 36px);
  max-width: min(720px, 100%);
  text-align: center;
}

.es-about-factory__video {
  display: flex;
  flex-direction: column;
  margin: 0 auto clamp(28px, 4vw, 44px);
  padding: 0;
  max-width: min(960px, 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(13, 42, 67, 0.08);
  background: #0c1824;
  box-shadow:
    0 2px 6px rgba(13, 42, 67, 0.06),
    0 22px 48px rgba(13, 42, 67, 0.1);
}

.es-about-factory__video-shell {
  position: relative;
  min-width: 0;
  background: #061522;
}

.es-about-factory__video-shell--paused .es-about-factory__video-el {
  pointer-events: none;
}

.es-about-factory__video-shell--playing .es-about-factory__video-el {
  pointer-events: auto;
}

.es-about-factory__video-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(6, 21, 34, 0.38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.25s ease,
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.es-about-factory__video-play:hover {
  background: rgba(6, 21, 34, 0.48);
}

.es-about-factory__video-play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.es-about-factory__video-shell--playing .es-about-factory__video-play {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.es-about-factory__video-play-icon {
  display: flex;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}

.es-about-factory__video-el {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #061522;
  vertical-align: middle;
}

.es-about-factory__video-caption {
  flex-shrink: 0;
  margin: 0;
  padding: 15px 22px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #0d2a43;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-align: left;
  background: linear-gradient(180deg, #f6fafd 0%, #e8f2f9 100%);
  border-top: 1px solid rgba(13, 42, 67, 0.07);
}

.es-about-factory__video-link-wrap {
  margin: 0 auto clamp(20px, 3vw, 32px);
  max-width: min(960px, 100%);
  text-align: center;
}

.es-about-factory__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(14px, 2vw, 20px);
  margin-top: clamp(8px, 1.5vw, 16px);
}

.es-about-factory__photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e4ebf2;
  background: #fff;
  box-shadow: 0 8px 28px rgba(13, 42, 67, 0.06);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.28s ease;
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .es-about-factory__photo:hover {
    transform: translateY(-3px);
    border-color: #d0dce8;
    box-shadow: 0 16px 40px rgba(13, 42, 67, 0.1);
  }
}

.es-about-factory__photo-link {
  display: block;
  line-height: 0;
  background: #f1f5f9;
}

.es-about-factory__photo-img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.es-about-factory__photo-cap {
  margin: 0;
  padding: 10px 14px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
  border-top: 1px solid #e8eff5;
}

/* Resource hub (Phase 2 GEO) */
.es-resource-hub-nav {
  margin: 0 0 24px;
}

.es-resource-hub-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.es-resource-hub-nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d4dee8;
  background: #fff;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.es-resource-hub-nav__link.is-active,
.es-resource-hub-nav__link:hover {
  border-color: #c5dff0;
  background: #ecf6fc;
  color: #0a6fae;
}

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

.es-resource-card {
  border: 1px solid #e4ebf2;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(13, 42, 67, 0.05);
}

.es-resource-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.es-resource-card__body {
  padding: 16px 18px 18px;
}

.es-resource-card__title {
  margin: 0 0 8px;
  font-size: 18px;
}

.es-resource-card__title a {
  color: #0d2a43;
  text-decoration: none;
}

.es-resource-card__excerpt {
  margin: 0 0 10px;
  color: #4b5563;
  line-height: 1.6;
}

.es-resource-card__meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: #6b7280;
}

.es-link-arrow {
  font-weight: 600;
  color: #0a6fae;
  text-decoration: none;
}

.es-resource-single {
  max-width: 920px;
}

.es-resource-summary-lead {
  max-width: 760px;
}

.es-resource-updated {
  margin-top: 10px;
  color: #6b7280;
}

.es-resource-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.es-resource-compare__table th,
.es-resource-compare__table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4ebf2;
  text-align: left;
  vertical-align: top;
}

.es-resource-compare__table thead th {
  background: #f8fafc;
  font-size: 13px;
}

.es-resource-verdict {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0f8fd;
  border: 1px solid #d6e8f4;
  color: #1f3a52;
}

.es-resource-related,
.es-resource-cross-links,
.es-resource-related-hubs {
  margin-top: 28px;
}

.es-resource-related__list {
  margin: 0;
  padding-left: 18px;
}

.es-resource-related__list li + li {
  margin-top: 6px;
}

@media (max-width: 768px) {
  .es-resource-grid {
    grid-template-columns: 1fr;
  }
}

.es-resource-eeat {
  margin: 0 0 20px;
}

.es-resource-howto__list {
  margin: 0;
  padding-left: 20px;
}

.es-resource-howto__item + .es-resource-howto__item {
  margin-top: 12px;
}

.es-resource-products__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.es-resource-products__item + .es-resource-products__item {
  margin-top: 8px;
}

.es-resource-products__meta {
  color: #6b7280;
  font-size: 13px;
}

.es-resource-cta {
  margin-top: 28px;
  padding: 20px 22px;
}

.es-post-resource-cta,
.es-post-related-products {
  margin-top: 28px;
}

.es-post-related-products h2 {
  margin-top: 0;
}

.es-post-resource-cta__list {
  margin: 0 0 12px;
  padding-left: 18px;
}

.es-post-resource-cta__hubs {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.es-post-resource-cta__hubs a {
  color: #0a6fae;
  text-decoration: none;
}

.es-resource-law-index {
  margin-bottom: 24px;
}

.es-community-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.es-community-links a {
  color: #0a6fae;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.es-cert-gallery__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.es-cert-gallery__meta {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.es-cert-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.es-cert-gallery__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.es-cert-gallery__thumb {
  display: block;
  background: #f1f5f9;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.es-cert-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.es-cert-gallery__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.es-cert-gallery__body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.es-cert-gallery__badge {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0a6fae;
  background: #e8f4fc;
  border-radius: 4px;
}

.es-cert-gallery__title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.3;
}

.es-cert-gallery__excerpt {
  margin: 0 0 10px;
  font-size: 13px;
  color: #4b5563;
  flex: 1;
}

.es-cert-gallery__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: auto;
}

.es-cert-gallery__pending {
  font-size: 12px;
  color: #b45309;
  font-weight: 600;
}

.es-cert-gallery__source {
  font-size: 13px;
}

.es-cert-card__actions {
  margin: 10px 0 0;
}
