/* =========================================================
   GN Journal (blog) styles
   Loaded only on posts, the /gn-journal/ page (GN Journal 一覧 template), category and tag pages
   ========================================================= */
:root {
  --gnj-navy: #1d2088;
  --gnj-line: #e3e5ef;
  --gnj-bg: #f8fafe;
  --gnj-list-bg: #eaf4fd;
  --gnj-list-line: #d9e1f2;
}

/* ---------- Page background #f8fafe, content area white (revision 2) ---------- */
body.gnj-bg {
  background: var(--gnj-bg);
}

.gnj {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.gnj--pt134 {
  padding-top: 134px;
}

.gnj img {
  max-width: 100%;
  height: auto;
}

.gnj-breadcrumb {
  font-size: 12px;
  color: #888;
  margin: 0 0 32px;
}

.gnj-breadcrumb--mb80 {
  margin-bottom: 80px;
}

.gnj-breadcrumb a {
  color: #888;
  text-decoration: none;
}

.gnj-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.gnj-main {
  background: #fff;
  padding: 40px;
}

.gnj-main--no-bg {
  background: transparent;
  padding: 0;
}

.gnj-primary {
  min-width: 0;
}

.gnj-primary > .gnj-author {
  margin: 40px 0;
}

.gnj-primary > .gnj-related {
  margin-top: 40px;
}

/* ---------- Hero (list pages) ---------- */
.gnj-hero {
  background: #0b1a5c url("./src/img/gn-journal/gnj-banner.png") center / cover no-repeat;
  color: #fff;
  margin-top: 80px;
}

.gnj-hero + .gnj {
  padding-top: 24px;
}

.gnj-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 16px;
}

.gnj-hero-sub {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}

.gnj-hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  color: #fff;
}

.gnj-hero-title span {
  font-size: 22px;
  margin-left: 8px;
}

/* ---------- Post header ---------- */
.gnj-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.gnj-meta time,
.gnj-card-body time,
.gnj-card2-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #888;
  font-size: 12px;
}

.gnj-meta time {
  margin-left: 4px;
}

.gnj-cat {
  display: inline-block;
  background: var(--gnj-navy);
  border-radius: 4px;
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  text-decoration: none;
}

.gnj-title {
  font-size: 26px;
  line-height: 1.5;
  color: #333;
  margin: 12px 0 24px;
}

.gnj-thumb {
  margin-bottom: 32px;
}

/* ---------- Content ---------- */
.gnj-content {
  line-height: 1.95;
  font-size: 15px;
}

.gnj-content p {
  color: #333;
  margin: 0 0 1.5em;
}

/* h2 only (revision 6) */
.gnj-content h2 {
  font-size: 28px;
  color: #111986;
  line-height: 1.5;
  margin: 56px 0 40px;
  padding: 0 0 0 16px;
  border-left: 8px solid var(--gnj-navy);
}

/* Lists (revision 7) — light blue box, dashed border, bold items */
/* .gnj-content ul:not(.ez-toc-list),
.gnj-content ol {
  background: #eaf4fd;
  border: 1px dashed #444;
  border-radius: 0;
  padding: 24px 40px;
  margin: 0 0 1.8em;
}

.gnj-content ul:not(.ez-toc-list) {
  list-style: none;
}

.gnj-content ul:not(.ez-toc-list) > li {
  position: relative;
  padding-left: 1.1em;
  margin: 0;
  line-height: 2.2;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.gnj-content ul:not(.ez-toc-list) > li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: #333;
} */

.gnj-content ol {
  padding-left: 64px;
}

.gnj-content ol > li {
  line-height: 2.2;
  font-size: 15px;
  font-weight: 700;
  color: #333;
}

.gnj-content ul:not(.ez-toc-list) ul,
.gnj-content ol ol {
  background: none;
  border: 0;
  padding: 0 0 0 1em;
  margin: 0;
}

.gnj-content ul:not(.ez-toc-list) ul > li,
.gnj-content ol ol > li {
  font-weight: 400;
}

/* ---------- Table of contents: Easy Table of Contents (revision 4) ---------- */
#ez-toc-container {
  background: #fff;
  border: 1px solid var(--gnj-line);
  border-radius: 0;
  box-shadow: none;
  padding: 20px 24px;
  margin: 32px 0 40px;
  width: 100%;
}

#ez-toc-container .ez-toc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gnj-navy);
}

#ez-toc-container ul.ez-toc-list {
  counter-reset: gnjtoc;
  margin: 12px 0 0;
  padding: 0;
  background: none;
}

#ez-toc-container ul.ez-toc-list > li {
  counter-increment: gnjtoc;
  list-style: none;
  padding: 6px 0;
  border-bottom: 1px dashed var(--gnj-line);
}

#ez-toc-container ul.ez-toc-list > li > a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

#ez-toc-container ul.ez-toc-list > li > a::before {
  content: counter(gnjtoc, decimal-leading-zero) ". ";
  color: var(--gnj-navy);
  font-weight: 700;
}

/* ---------- CTA pattern (revision 5) ---------- */
.gnj-cta-box {
  background: #fff;
  border: 1px solid var(--gnj-list-line);
  border-radius: 4px;
  padding: 20px 24px 20px 84px;
  margin: 48px 0;
  gap: 16px 48px;
  position: relative;
  justify-content: center !important;
}

.gnj-cta-box::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  background: var(--gnj-navy);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4C6.5 4 2 7.6 2 12c0 2 .9 3.8 2.4 5.2L3.5 21l4.3-2c1.3.5 2.7.8 4.2.8 5.5 0 10-3.6 10-8S17.5 4 12 4zM8 13.2a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4zm4 0a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4zm4 0a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4C6.5 4 2 7.6 2 12c0 2 .9 3.8 2.4 5.2L3.5 21l4.3-2c1.3.5 2.7.8 4.2.8 5.5 0 10-3.6 10-8S17.5 4 12 4zM8 13.2a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4zm4 0a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4zm4 0a1.2 1.2 0 1 1 0-2.4 1.2 1.2 0 0 1 0 2.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gnj-content .gnj-cta-box-text {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: #555;
}

.gnj-content .gnj-cta-box-text strong {
  display: block;
  font-size: 15px;
  color: var(--gnj-navy);
  margin-bottom: 2px;
}

.gnj-cta-box-btn .wp-block-button__link {
  background: var(--gnj-navy);
  color: #fff;
  border-radius: 0;
  padding: 10px 24px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.gnj-cta-box-btn .wp-block-button__link::before {
  content: "› ";
}

/* ---------- Author (fixed, revision 3) ---------- */
.gnj-author {
  display: flex;
  gap: 16px;
  align-items: center;
  background-color: #fff;
  border: 1px solid #111987;
  border-radius: 8px;
  padding: 24px;
  margin: 40px 0;
}

.gnj-author-img {
  width: 102px;
  height: 102px;
}

.gnj-author-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gnj-author-wrap {
  width: calc(100% - 118px);
}

.gnj-author-name,
.gnj-author-desc {
  color: #333;
}

.gnj-author-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.gnj-author-desc {
  font-size: 16px;
  line-height: 1.8;
  margin: 0;
  color: #555;
}

/* ---------- Related posts & pager ---------- */
.gnj-section-title {
  font-size: 20px;
  color: #111986;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gnj-navy);
  margin: 0 0 12px;
}

.gnj-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  text-decoration: none;
  color: inherit;
}

.gnj-card-thumb {
  flex: 0 0 200px;
}

.gnj-card-thumb img {
  width: 200px;
  aspect-ratio: 200 / 113;
  object-fit: cover;
}

.gnj-card-body time {
  margin-left: 6px;
}

.gnj-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 6px 0 0;
  line-height: 1.6;
  color: var(--gnj-navy);
}

.gnj-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 120px;
  margin-top: 48px;
  padding-top: 50px;
  border-top: 1px solid var(--gnj-line);
}

.gnj-pager__item--prev {
  justify-self: end;
}

.gnj-pager__item--next {
  justify-self: start;
}

.gnj-pager__btn,
.gnj-pager__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gnj-navy);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.gnj-pager__btn {
  min-width: 88px;
  height: 40px;
  padding: 0 20px;
  background-color: #fff;
  border: 1px solid #111986;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  transition: background .2s, color .2s;
}

a.gnj-pager__btn:hover {
  background: var(--gnj-navy);
  color: #fff;
}

.gnj-pager__back:hover {
  opacity: .7;
}

.gnj-pager__btn.is-disabled {
  opacity: .35;
  cursor: default;
}

.gnj-pager__arrow {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.gnj-pager__arrow--left {
  transform: rotate(45deg);
}

.gnj-pager__arrow--right {
  transform: rotate(-135deg);
}

@media (max-width: 600px) {
  .gnj-pager {
    column-gap: 12px;
    padding-top: 32px;
  }

  .gnj-pager__btn {
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }

  .gnj-pager__back {
    font-size: 14px;
  }
}

/* ---------- List page cards ---------- */
.gnj-archive-title {
  font-size: 24px;
  margin: 0 0 24px;
  padding-left: 14px;
  border-left: 6px solid var(--gnj-navy);
}

.gnj-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 28px;
}

.gnj-card2-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.gnj-card2-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s ease;
}

.gnj-card2-thumb:hover {
  opacity: 0.8;
}

.gnj-card2-cat {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--gnj-navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
}

.gnj-card2-title {
  font-size: 16px;
  line-height: 1.6;
  margin: 16px 0 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gnj-line);
}

.gnj-card2-title a {
  color: var(--gnj-navy);
  text-decoration: none;
}

.gnj-card2-excerpt {
  font-size: 13px;
  line-height: 1.8;
  color: #666;
  margin: 14px 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gnj-card2-tags {
  margin-bottom: 10px;
}

.gnj-pagination {
  margin-top: 40px;
  text-align: center;
}

.gnj-pagination .page-numbers {
  display: inline-block;
  min-width: 36px;
  padding: 6px 10px;
  margin: 0 3px;
  border: 1px solid var(--gnj-navy);
  color: var(--gnj-navy);
  text-decoration: none;
}

.gnj-pagination .page-numbers.current {
  background: var(--gnj-navy);
  color: #fff;
}

/* ---------- Sidebar ---------- */
.gnj-widget {
  margin-bottom: 32px;
}

.gnj-widget-label {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--gnj-navy);
}

.gnj-widget-title {
  background: var(--gnj-navy);
  color: #fff;
  font-size: 1.6rem;
  padding: 12px 16px;
  border-radius: 5px 5px 0 0;
  margin: 0;
}

.gnj-widget-body {
  background: #fff;
  border: 1px solid var(--gnj-line);
  border-radius: 0 0 5px 5px;
  padding: 8px 12px;
  margin: 0;
}

.gnj-search {
  display: flex;
  background: #fff;
  border: 1px solid var(--gnj-navy);
  border-radius: 4px;
}

.gnj-search input {
  font-size: 1.4rem;
  font-weight: 500;
  flex: 1;
  border: 0;
  padding: 11px;
  min-width: 0;
  background: none;
}

.gnj-search button {
  border: 0;
  background: none;
  color: var(--gnj-navy);
  padding: 0 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.gnj-list {
  list-style: none;
  font-size: 13px;
}

.gnj-list li a {
  display: block;
  padding: 8px 4px;
  border-bottom: 1px solid var(--gnj-line);
  color: var(--gnj-navy);
  text-decoration: none;
}

.gnj-list li:last-child a {
  border-bottom: 0;
}

.gnj-tags.gnj-widget-body {
  padding: 16px 12px 8px;
}

.gnj-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--gnj-navy) !important;
  background-color: #f8fafe;
  border: 1px solid #d0e1fa;
  border-radius: 13.5px;
  padding: 3px 10px;
  margin: 0 4px 8px 0;
  text-decoration: none;
}

.gnj-mini {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 0;
  border-bottom: 1px solid var(--gnj-line);
  color: var(--gnj-navy);
  text-decoration: none;
}

.gnj-mini:last-child {
  border-bottom: 0;
}

.gnj-mini-thumb {
  flex: 0 0 99px;
}

.gnj-mini-thumb img {
  display: block;
  width: 99px;
  height: 56px;
  object-fit: cover;
}

.gnj-banner {
  display: block;
  border-radius: 4px;
  padding: 20px 14px 14px;
  margin-bottom: 24px;
  text-decoration: none;
}

.gnj-banner-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  line-height: 1.6;
  font-size: 14px;
}

.gnj-banner-btn {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 6px;
}

.gnj-banner--navy {
  background: var(--gnj-navy) url('./src/img/gn-journal/cta-contact.png') center / cover no-repeat;
  color: #fff;
  font-weight: 700;
}

.gnj-banner--navy .gnj-banner-btn {
  background: #fff;
  color: var(--gnj-navy);
}

.gnj-banner--light {
  background: #fff;
  border: 1px solid var(--gnj-line);
  color: var(--gnj-navy);
}

.gnj-banner--light strong {
  display: block;
  font-size: 14px;
}

.gnj-banner--light small {
  display: block;
  font-size: 11px;
  color: #555;
  font-weight: 400;
  margin-top: 4px;
}

.gnj-banner--light .gnj-banner-btn {
  border: 1px solid var(--gnj-navy);
  background: #fff;
  color: var(--gnj-navy);
}

/* ---------- Blue CTA band above footer ---------- */
.gnj-cta {
  background: var(--gnj-navy);
  color: #fff;
  text-align: center;
  padding: 48px 16px;
}

.gnj-cta h2 {
  font-size: 22px;
  margin: 0 0 28px;
  color: #fff;
}

.gnj-cta-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.gnj-cta-btns a {
  flex: 1 1 260px;
  border: 1px solid #fff;
  color: #fff;
  padding: 20px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.gnj-cta-btns small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gnj-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .gnj-main {
    padding: 24px 16px;
  }

  .gnj-title {
    font-size: 21px;
  }

  .gnj-hero-title {
    font-size: 36px;
  }

  .gnj-hero-title span {
    display: block;
    margin: 8px 0 0;
    font-size: 16px;
  }

  .gnj-hero-sub {
    font-size: 15px;
  }

  .gnj-cards {
    grid-template-columns: 1fr;
  }

  .gnj-card-thumb {
    flex-basis: 110px;
  }

  .gnj-card-thumb img {
    width: 110px;
  }

  .gnj-content ul:not(.ez-toc-list),
  .gnj-content ol {
    padding: 18px 20px;
  }

  .gnj-content ol {
    padding-left: 40px;
  }

  .gnj-cta-box {
    padding: 72px 20px 20px;
  }

  .gnj-cta-box::before {
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
  }
}

/* Cocoon stitch box (まとめ list) */
.has-ex-c-background-color {
  background-color: #eaf4fd;
}

.is-style-stitch-box {
  border: 1px dashed #444;
  box-shadow: 0 0 0 8px #fbf9f1;
  padding: 24px 40px;
  margin: 8px 8px 2em;
  font-size: 16px;
  line-height: 2.2;
  color: #333;
}

@media (max-width: 600px) {
  .is-style-stitch-box {
    padding: 18px 20px;
    font-size: 15px;
  }
}

/* Inline CTA (from old Cocoon child theme) */
.cta-inline {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  margin: 2.5em 0;
  background: linear-gradient(90deg,#f1f4fc,#fafbff);
  border: 1px solid #c8cce6;
  border-radius: 6px;
}

.cta-inline .cta-icon {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  padding: 20px;
  background: #fff;
  border-radius: 50%;
  box-sizing: border-box;
}

.cta-inline .cta-inline__body {
  flex: 1;
  text-align: center;
}

.cta-inline .cta-inline__title {
  display: inline-block;
  margin: 0 0 8px;
  padding: 0 8px 8px;
  border-bottom: 1px solid #d9dcef;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #1d2088;
}

.cta-inline .cta-inline__text {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: #444;
}

.cta-inline a.cta-btn--inline {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #3a3fcf;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
}

.cta-inline a.cta-btn--inline::before {
  content: "›";
  font-size: 18px;
  line-height: 1;
}

.cta-inline a.cta-btn--inline:hover {
  opacity: .85;
}

@media (max-width: 600px) {
  .cta-inline {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .cta-inline a.cta-btn--inline {
    width: 100%;
    justify-content: center;
  }
}