/* WordPress integration and generic content templates. */
/* Restore the prototype typography after BusinessPress's global rules. */
body:lang(ja) {
  color: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  line-height: 1.8;
}

/* BusinessPress assigns #111 directly to every heading. Using inherit keeps
   headings dark on light sections and white on the theme's dark sections. */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  clear: none;
  color: inherit;
  font-family: inherit;
}

/* Keep multi-column headings from wrapping too early at desktop widths. */
.about-grid h2,
.section-heading h2,
.service-content h2,
.philosophy-grid h2 {
  font-size: clamp(36px, 3.5vw, 46px);
}

.global-nav > li { list-style: none; }
.global-nav > li > a { display: block; }
.global-nav .current-menu-item > a::after,
.global-nav .current_page_item > a::after { right: 0; }

.ec-cta {
  background-image: linear-gradient(90deg, rgba(26, 36, 59, 0.96), rgba(36, 49, 79, 0.78)), url('../images/generated/electronic-components.webp');
}

/* Feature the three priority makers as equal cards. */
.maker-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maker-heading-actions {
  display: flex;
  align-items: flex-end;
  gap: 34px;
}

.maker-heading-actions > p {
  margin: 0;
  font-size: 14px;
}

.maker-list-button {
  display: inline-flex;
  min-width: 170px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 17px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #1d2435;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.maker-list-button:hover {
  background: #f5b952;
  border-color: #f5b952;
  color: #1d2435;
  transform: translateY(-2px);
}

.guide-grid h3 a {
  color: inherit;
}

.admin-bar .site-header { top: 32px; }

/* Representative message without a portrait. */
.message-grid.message-grid-text-only {
  grid-template-columns: minmax(0, 760px);
  justify-content: end;
}

.business-activities {
  margin: 0;
  padding-left: 1.4em;
}

.business-activities li + li {
  margin-top: 0.55em;
}

.supplier-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35em 2em;
  margin: 0;
  padding-left: 1.2em;
}

.wp-page-content,
.post-archive,
.single-post-content,
.not-found-content {
  padding: 80px 0 120px;
}

.entry-content {
  max-width: 820px;
  margin: 0 auto;
}

.entry-content > * + * { margin-top: 1.4em; }
.entry-content img { height: auto; }

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

.post-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: #fff;
}

.post-card time {
  color: var(--blue);
  font: 500 11px "Outfit", sans-serif;
  letter-spacing: 1px;
}

.post-card h2 { margin: 18px 0 10px; font-size: 20px; line-height: 1.5; }
.post-card p { margin: 0; color: #606879; font-size: 13px; }
.pagination { margin-top: 45px; }

.news-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 52px;
}

.news-category-nav a {
  position: relative;
  padding: 0 0 9px;
  color: #727a8b;
  font-size: 12px;
  font-weight: 600;
}

.news-category-nav a.current {
  color: var(--ink);
}

.news-category-nav a.current::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--blue);
}

/* News archive: a quiet, single-column list rather than cards. */
.news-list {
  border-top: 1px solid var(--line);
}

.news-list-item {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.news-list-link {
  position: relative;
  display: block;
  padding: 34px 72px 36px 4px;
  transition: color 0.2s ease;
}

.news-list-link:hover {
  color: var(--blue);
}

.news-list-meta {
  color: #7b8290;
  font-size: 11px;
  line-height: 1.4;
}

.news-list-meta time {
  margin-right: 15px;
  font: 500 11px/1.4 "Outfit", sans-serif;
  letter-spacing: 0.06em;
}

.news-list .tag {
  display: inline-block;
  width: auto;
  min-width: 0;
  padding: 2px 8px;
  border: 0;
  background: #f0f2f6;
  color: var(--blue);
  font-size: 10px;
  line-height: 1.5;
}

.news-list h2 {
  margin: 11px 0 0;
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0;
}

.news-list-arrow {
  position: absolute;
  top: 50%;
  right: 8px;
  color: var(--blue);
  font: 500 15px/1 "Outfit", sans-serif;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.news-list-link:hover .news-list-arrow {
  transform: translate(3px, calc(-50% - 3px));
}

/* Latest three News custom posts on the front page. */
.notice-inner {
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: start;
}

.notice-inner > strong,
.notice-inner > .notice-more {
  padding-top: 24px;
}

.notice-items {
  min-width: 0;
}

.notice-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: 100px 100px minmax(0, 1fr) 20px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-item time {
  font-size: 12px;
}

.notice-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-arrow {
  text-align: right;
}

.notice-empty {
  margin: 0;
  padding: 24px 0;
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 900px) {
  .maker-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .message-grid.message-grid-text-only {
    grid-template-columns: 1fr;
  }

  .supplier-list {
    grid-template-columns: 1fr;
  }

  .maker-heading-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 700px) {
	.maker-cards { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
  .wp-page-content,
  .post-archive,
  .single-post-content,
  .not-found-content { padding: 55px 0 82px; }

  .notice-inner {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .notice-inner > strong {
    padding-top: 17px;
  }

  .notice-items {
    grid-column: 2;
  }

  .notice-inner .notice-item {
    grid-column: auto;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 5px 10px;
    padding: 14px 0;
  }

  .notice-inner .notice-item .tag {
    display: inline-block;
  }

  .notice-title {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .notice-arrow,
  .notice-inner > .notice-more {
    display: none;
  }

  .news-category-nav {
    gap: 22px;
    margin-bottom: 34px;
  }

  .news-list-link {
    padding: 25px 42px 27px 0;
  }

  .news-list h2 {
    margin-top: 9px;
    font-size: 18px;
  }

  .news-list-arrow {
    right: 2px;
  }

  .maker-list-button {
    min-width: 165px;
  }
}
