/* ========================================
   Single Post Page Styles
   PC: 1920px base / SP: 390px base / Breakpoint: 768px
======================================== */
:root {
  --white: #FFFFFF;
  --navy: #3B3B3B;
  --dark-navy: #123A56;
  --gray-light: #D0D0D0;
  --orange: #F89340;
  --red: #CF1B1B;
  --gray-bg: #F3F3F3;
  --gray-border: #E1E1E1;
  --blue-light: #EAF2F4;
}
/* ========================================
   投稿詳細：ヒーロー
======================================== */
.p-single {
  background-color: #F3F3F3;
}

.p-archive__hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

@media screen and (min-width: 769px) {
  .p-archive__hero {
    height: calc(547 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-archive__hero {
    height: calc(287 / 390 * 100vw);
  }
  .p-archive__hero-inner {
    padding-top: calc(50 / 390 * 100vw);
  }
}

.p-archive__hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.p-archive__hero-bg img,
.p-archive__hero-bg picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-archive__hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(120 / 1920 * 100vw);
  text-align: center;
  margin-top: calc(50 / 1920 * 100vw);
}

.p-archive__hero-title-en {
  font-family: 'Roboto', 'Noto Serif JP', serif;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

@media screen and (min-width: 769px) {
  .p-archive__hero-title-en {
    font-size: calc(50 / 1920 * 100vw);
    letter-spacing: 0.08em;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: calc(10 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-archive__hero-title-en {
    font-size: calc(40 / 390 * 100vw);
    margin-bottom: calc(8 / 390 * 100vw);
  }
}

.p-archive__hero-title-ja {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  color: #FFFFFF;
}

@media screen and (min-width: 769px) {
  .p-archive__hero-title-ja {
    font-size: calc(18 / 1920 * 100vw);
    letter-spacing: 0.05em;
    font-weight: 500;
  }
}

@media screen and (max-width: 768px) {
  .p-archive__hero-title-ja {
    font-size: calc(16 / 390 * 100vw);
  }
}

/* ========================================
   投稿詳細：コンテンツエリア
======================================== */
.p-single__inner {
  margin: 0 auto;
  width: 100%;
}

@media screen and (min-width: 769px) {
  .p-single__inner {
    padding: calc(110 / 1920 * 100vw) 0 calc(100 / 1920 * 100vw);
    background-color: #F3F3F3;
  }
}

@media screen and (max-width: 768px) {
  .p-single__inner {
    padding: calc(40 / 390 * 100vw) calc(20 / 390 * 100vw) calc(20 / 390 * 100vw);
  }
}

/* ========================================
   投稿詳細：画像セクション（メイン画像 + サブ画像10枚・切り替え）
======================================== */
.p-single__images {
  display: flex;
  gap: calc(49 / 1920 * 100vw);
  margin-bottom: calc(59 / 1920 * 100vw);
  width: 100%;
}

@media screen and (max-width: 768px) {
  .p-single__images {
    flex-direction: column;
    gap: calc(15 / 390 * 100vw);
    margin-bottom: calc(40 / 390 * 100vw);
  }
}

.p-single__main-image {
  flex: 1;
  min-width: 0;
  aspect-ratio: 1130 / 771;
  overflow: hidden;
  background: #f0f0f0;
}

@media screen and (min-width: 769px) {
  .p-single__main-image {
    max-width: calc(1130 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-single__main-image {
    aspect-ratio: 16 / 10;
    width: 100%;
  }
}

.p-single__main-image img,
.p-single__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-single__sub-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(9 / 1920 * 100vw) calc(38 / 1920 * 100vw);
  align-content: start;
}

@media screen and (min-width: 769px) {
  .p-single__sub-images {
    width: calc(460 / 1920 * 100vw);
    flex-shrink: 0;
    grid-auto-rows: calc(147 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-single__sub-images {
    width: 100%;
    gap: calc(9 / 390 * 100vw) calc(10 / 390 * 100vw);
    grid-auto-rows: calc(120 / 390 * 100vw);
  }
}

.p-single__sub-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  transition: opacity 0.25s;
}

.p-single__sub-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.p-single__sub-image:hover {
  opacity: 0.85;
}

.p-single__sub-image.is-active {
  opacity: 0.7;
  outline: 2px solid #403110;
  outline-offset: 2px;
}

/* ========================================
   投稿詳細：テキストセクション
======================================== */
.p-single__body--two-col {
  column-count: 1;
  column-gap: 0;
  margin-top: 0;
}

@media screen and (max-width: 768px) {
  .p-single__body--two-col {
    column-count: 1;
    column-gap: 0;
  }
}

.p-single__body--two-col p {
  break-inside: avoid;
}

.p-single__body--two-col h1,
.p-single__body--two-col h2,
.p-single__body--two-col h3,
.p-single__body--two-col h4,
.p-single__body--two-col h5,
.p-single__body--two-col h6 {
  break-after: avoid;
}

/* Article Title */
.p-single__title {
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

@media screen and (min-width: 769px) {
  .p-single__title {
    font-size: calc(36 / 1920 * 100vw);
    letter-spacing: 0.08em;
    line-height: 1.3;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: calc(16 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-single__title {
    font-size: calc(20 / 390 * 100vw);
    margin-top: 0;
    margin-bottom: calc(12 / 390 * 100vw);
  }
}

/* Date */
.p-single__date {
  font-family: "Noto Serif JP", serif;
  text-align: center;
  display: block;
  color: var(--dark-navy);
}

@media screen and (min-width: 769px) {
  .p-single__date {
    font-size: calc(22 / 1920 * 100vw);
    margin-bottom: calc(58 / 1920 * 100vw);
    font-weight: 700;
  }
}

@media screen and (max-width: 768px) {
  .p-single__date {
    font-size: calc(14 / 390 * 100vw);
    margin-bottom: calc(32 / 390 * 100vw);
  }
}

/* Images Section */
@media screen and (min-width: 769px) {
  .p-single__images {
    display: flex;
    gap: calc(49 / 1920 * 100vw);
    padding: 0 calc(140 / 1920 * 100vw);
    margin: 0 auto calc(59 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-single__images {
    margin-bottom: calc(50 / 390 * 100vw);
  }
}

@media screen and (min-width: 769px) {
  .p-single__main-image {
    width: calc(1130 / 1920 * 100vw);
    height: calc(771 / 1920 * 100vw);
    flex-shrink: 0;
    overflow: hidden;
  }
}

@media screen and (max-width: 768px) {
  .p-single__main-image {
    width: 100%;
  }
}

.p-single__main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body Text */
.p-single__text,
.p-single__body {
  line-height: 2.1;
  color: #403110;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-align: left;
}

@media screen and (min-width: 769px) {
  .p-single__text,
  .p-single__body {
    font-size: calc(16 / 1920 * 100vw);
    width: 100%;
    padding: 0 calc(140 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-single__text,
  .p-single__body {
    font-size: calc(14 / 390 * 100vw);
    margin-bottom: calc(20 / 390 * 100vw);
  }
}

.p-single__text h1,
.p-single__body h1 {
  font-size: 2em;
  font-weight: 700;
  margin-top: 0.67em;
  margin-bottom: 0.67em;
  line-height: 1.3;
}

.p-single__text h2,
.p-single__body h2 {
  font-size: 1.5em;
  font-weight: 700;
  margin-top: 0.83em;
  margin-bottom: 0.83em;
  line-height: 1.3;
}

.p-single__text h3,
.p-single__body h3 {
  font-size: 1.17em;
  font-weight: 700;
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.3;
}

.p-single__text h4,
.p-single__body h4 {
  font-size: 1em;
  font-weight: 700;
  margin-top: 1.33em;
  margin-bottom: 1.33em;
  line-height: 1.3;
}

.p-single__text h5,
.p-single__body h5 {
  font-size: 0.83em;
  font-weight: 700;
  margin-top: 1.67em;
  margin-bottom: 1.67em;
  line-height: 1.3;
}

.p-single__text h6,
.p-single__body h6 {
  font-size: 0.67em;
  font-weight: 700;
  margin-top: 2.33em;
  margin-bottom: 2.33em;
  line-height: 1.3;
}

.p-single__text p,
.p-single__body p {
  margin-bottom: calc(20 / 1920 * 100vw);
  width: calc(1140 / 1920 * 100vw);
}

@media screen and (max-width: 768px) {
  .p-single__text p,
  .p-single__body p {
    margin-bottom: calc(15 / 390 * 100vw);
    width: 100%;
  }
}

/* WordPress font size classes */
.p-single__text .has-small-font-size,
.p-single__body .has-small-font-size {
  font-size: 0.875em !important;
}

.p-single__text .has-medium-font-size,
.p-single__text .has-regular-font-size,
.p-single__body .has-medium-font-size,
.p-single__body .has-regular-font-size {
  font-size: 1em !important;
}

.p-single__text .has-large-font-size,
.p-single__body .has-large-font-size {
  font-size: 1.25em !important;
}

.p-single__text .has-x-large-font-size,
.p-single__body .has-x-large-font-size {
  font-size: 1.5em !important;
}

.p-single__text .has-huge-font-size,
.p-single__body .has-huge-font-size {
  font-size: 2em !important;
}

.p-single__text ul,
.p-single__text ol,
.p-single__body ul,
.p-single__body ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.p-single__text ul li,
.p-single__text ol li,
.p-single__body ul li,
.p-single__body ol li {
  margin-bottom: 0.5em;
}

.p-single__text ul,
.p-single__body ul {
  list-style-type: disc;
}

.p-single__text ol,
.p-single__body ol {
  list-style-type: decimal;
}

.p-single__text blockquote {
  border-left: 4px solid #403110;
  padding-left: 1.5em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #666;
}

.p-single__text code {
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

.p-single__text pre {
  background-color: #f5f5f5;
  padding: 1em;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.p-single__text pre code {
  background-color: transparent;
  padding: 0;
}

.p-single__text table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.p-single__text table th,
.p-single__text table td {
  border: 1px solid #ddd;
  padding: 0.5em 1em;
  text-align: left;
}

.p-single__text table th {
  background-color: #f5f5f5;
  font-weight: 700;
}

.p-single__text hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2em 0;
}

.p-single__text strong,
.p-single__text b {
  font-weight: 700;
}

.p-single__text em,
.p-single__text i {
  font-style: italic;
}

.p-single__text img,
.p-single__body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em 0;
}

.p-single__text figure,
.p-single__body figure {
  margin: 1.5em 0;
}

.p-single__text figure img,
.p-single__body figure img {
  margin: 0;
}

.p-single__text figure figcaption,
.p-single__body figure figcaption {
  font-size: 0.875em;
  color: #666;
  margin-top: 0.5em;
  text-align: center;
}

/* ========================================
   Breadcrumbs
======================================== */
@media screen and (min-width: 769px) {
  .p-single__breadcrumbs {
    padding: calc(24 / 1920 * 100vw) 0 0;
    width: calc(1639 / 1920 * 100vw);
    margin: 0 auto;
  }
}

@media screen and (max-width: 768px) {
  .p-single__breadcrumbs {
    padding: calc(19 / 390 * 100vw) 0 0;
  }
}

.p-single--news .p-single__breadcrumbs,
.p-single--works .p-single__breadcrumbs,
body.single .p-single__breadcrumbs {
  width: 100%;
  background-color: #F3F3F3;
}

@media screen and (min-width: 769px) {
  .p-single--news .p-single__breadcrumbs .p-single__breadcrumbs-inner,
  .p-single--works .p-single__breadcrumbs .p-single__breadcrumbs-inner,
  body.single .p-single__breadcrumbs .p-single__breadcrumbs-inner {
    padding: calc(10 / 1920 * 100vw) calc(140 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-single--news .p-single__breadcrumbs .p-single__breadcrumbs-inner,
  .p-single--works .p-single__breadcrumbs .p-single__breadcrumbs-inner,
  body.single .p-single__breadcrumbs .p-single__breadcrumbs-inner {
    padding: 0 calc(15 / 390 * 100vw);
  }
}

.p-breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0 8px;
}

@media screen and (max-width: 768px) {
  .p-breadcrumbs__list {
    gap: 0;
  }
}

.p-breadcrumbs__item + .p-breadcrumbs__item::before {
  content: ">";
  display: inline-block;
  margin: 0 8px;
  color: #3B3B3B;
  font-size: calc(12 / 1920 * 100vw);
}

@media screen and (max-width: 768px) {
  .p-breadcrumbs__item + .p-breadcrumbs__item::before {
    font-size: calc(10 / 390 * 100vw);
  }
}

.p-breadcrumbs__item {
  display: flex;
  align-items: center;
  color: #403110;
}

@media screen and (min-width: 769px) {
  .p-breadcrumbs__item {
    font-size: calc(16 / 1920 * 100vw);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }
}

@media screen and (max-width: 768px) {
  .p-breadcrumbs__item {
    font-size: calc(15 / 390 * 100vw);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }
}

.p-breadcrumbs__link {
  color: #403110;
  text-decoration: none;
  transition: color 0.3s;
}

@media screen and (min-width: 769px) {
  .p-breadcrumbs__link {
    margin-left: calc(6 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-breadcrumbs__link {
    margin-left: 0;
  }
}

.p-breadcrumbs__link:hover {
  color: #2093E3;
}

.p-breadcrumbs__current {
  color: #2093E3;
}

@media screen and (min-width: 769px) {
  .p-breadcrumbs__current {
    margin-left: calc(8 / 1920 * 100vw);
  }
}

@media screen and (max-width: 768px) {
  .p-breadcrumbs__current {
    margin-left: 0;
    font-weight: 600;
  }
}

/* ========================================
   body.single Overrides
======================================== */
body.single .l-main {
  padding-top: 0 !important;
}

/* ========================================
   View More Button
======================================== */
.p-single__viewmore-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0 calc(80 / 1920 * 100vw);
  background-color: #F3F3F3;
}

@media screen and (max-width: 768px) {
  .p-single__viewmore-btn-wrap {
    padding: 0 0 calc(100 / 390 * 100vw);
  }
}

.p-single__viewmore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 / 1920 * 100vw);
  background-color: var(--dark-navy);
  transition: opacity 0.3s;
  width: calc(224 / 1920 * 100vw);
  height: calc(53 / 1920 * 100vw);
  padding: calc(12 / 1920 * 100vw) calc(30 / 1920 * 100vw);
  text-decoration: none;
}

.p-single__viewmore-btn:hover {
  opacity: 0.8;
}

.p-single__viewmore-btn-text {
  font-size: calc(15 / 1920 * 100vw);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FFFFFF;
}

@media screen and (max-width: 768px) {
  .p-single__viewmore-btn {
    width: calc(224 / 390 * 100vw);
    height: calc(53 / 390 * 100vw);
    padding: calc(10 / 390 * 100vw) calc(31 / 390 * 100vw) calc(11 / 390 * 100vw);
    border-radius: calc(5 / 390 * 100vw);
  }
  .p-single__viewmore-btn-text {
    font-size: calc(15 / 390 * 100vw);
    letter-spacing: 0.1em;
    font-weight: 700;
  }
}
