/* =========================================================
   HQ Background: Style
   key: dbar-post
   name: LG CASABLANCA D-Bar
   group: post
   type: Style
   layer: post
   value:
   selector:
   ========================================================= */

/* =========================================================
   01. Single
   ========================================================= */

.p-post {
  position: relative;
  margin-bottom: 36px;
  color: #f4efe8;
}

.p-post-header {
  margin-bottom: 28px;
}

.p-post-thumbnail {
  margin: 0 0 24px;
  padding: 6px;
  border: 1px solid rgba(200, 60, 60, 0.42);
  box-shadow:
    0 0 8px rgba(255, 90, 90, 0.22),
    0 0 24px rgba(200, 60, 60, 0.16),
    0 0 48px rgba(120, 10, 10, 0.12);
}

.p-post-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.p-post-title {
  margin: 0 0 10px;
  padding: 0 0 14px;
  color: #f4efe8;
  font-size: 22px;
  line-height: 1.7;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.p-post:not(:has(.p-post-thumbnail)) .p-post-title {
  padding-top: 24px;
}

.p-post-categories,
.p-post-date {
  margin: 0;
  font-family: "Title", cursive;
  font-size: 18px;
  line-height: 1.2;
  color: rgba(244, 239, 232, 0.72);
  text-align: right;
  letter-spacing: 0.08em;
}

.p-post-categories {
  justify-content: flex-end;
  margin-top: 10px;
}

.p-post-date {
  margin: 6px 2px 0 0;
}

.p-post-categories a {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(212, 175, 55, 0.32);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.p-post-categories a:hover {
  background: rgba(212, 175, 55, 0.22);
  opacity: 0.82;
}

.p-post-content {
  padding: 28px 0;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 232, 0.9);
}

.p-post-content p {
  margin-bottom: 18px;
}

.p-post-content h2,
.p-post-content h3,
.p-post-content h4,
.p-post-content h5 {
  color: #d4af37;
  font-weight: normal;
  letter-spacing: 0.08em;
}

.p-post-content h3 {
  font-size: 18px;
}

.p-post-content h4 {
  font-size: 16px;
}

.p-post-content h5 {
  font-size: 14px;
}

.p-post-content a {
  color: #d4af37;
}

.p-post.is-exhibit .p-post-thumbnail {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.p-post.is-exhibit .p-post-thumbnail img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.p-post.is-exhibit .p-post-content {
  background: rgba(12, 10, 12, 0.58);
  padding: 18px 22px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.9;
}

/* =========================================================
   02. Archive
   ========================================================= */

.p-archive-card {
  position: relative;
  margin-bottom: 18px;
  background: rgba(12, 10, 12, 0.66);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.p-archive-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.p-archive-card__thumbnail {
  margin: 0;
}

.p-archive-card__thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.p-archive-card__meta {
  padding: 12px 14px 0;
  font-family: "Title", cursive;
  font-size: 14px;
  line-height: 1.1;
  text-align: right;
  color: rgba(212, 175, 55, 0.9);
}

.p-archive-card__title {
  margin: 8px 14px 0;
  font-size: 13px;
  line-height: 1.6;
  font-weight: normal;
  color: #f4efe8;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;

  min-height: calc(1.6em * 2);
}

.p-archive-card__excerpt {
  margin: 8px 14px 16px;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(244, 239, 232, 0.72);

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;

  min-height: calc(1.7em * 2);
}

.p-archive-card.is-noimage .p-archive-card__meta {
  padding-top: 14px;
}

.p-archive-card.is-noimage .p-archive-card__title {
  margin-top: 8px;
}

/* =========================================================
   03. Post Navigation
   ========================================================= */

.p-post-nav {
  margin-top: 18px;
  border-top: 1px solid rgba(212, 175, 55, 0.24);
  font-size: 12px;
  color: rgba(244, 239, 232, 0.8);
}

.p-post-nav__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.p-post-nav__label {
  display: block;
  margin-bottom: 8px;
  color: #d4af37;
  font-family: "Title", cursive;
  letter-spacing: 0.08em;
}

.p-post-nav__grid {
  position: relative;
}

.p-post-nav__grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(212, 175, 55, 0.2);
  transform: translateX(-50%);
}

.p-post-nav__thumb {
  margin-bottom: 12px;
  max-width: 120px;
}

.p-post-nav__thumb img {
  display: block;
  width: 100%;
}

.p-post-nav__title {
  line-height: 1.5;
}

/* =========================================================
   04. Related
   ========================================================= */

.p-related {
  padding-bottom: 12px;
}

.p-related__heading {
  margin: 0 0 18px;
  color: #d4af37;
  font-size: 24px;
  font-weight: normal;
  text-align: center;
  font-family: "Title", cursive;
  letter-spacing: 0.1em;
}

/* -------------------------
   Card Inner Spacing
------------------------- */
.p-related .p-archive-card__link {
  display: block;
  padding: 12px 14px;
}

/* -------------------------
   Title / Excerpt 微調整
------------------------- */
.p-related .p-archive-card__title {
  margin: 8px 0 0;
}

.p-related .p-archive-card__excerpt {
  margin: 8px 0 0;
}

/* =========================================================
   05. Sidebar
   ========================================================= */

.p-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.p-sidebar__main > *,
.p-sidebar__categories {
  background: rgba(12, 10, 12, 0.58);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.p-sidebar__heading,
.p-sidebar h2,
.p-sidebar h3 {
  padding: 16px;
  background: rgba(12, 10, 12, 0.72);
  color: #d4af37;
  font-size: 20px;
  font-family: "Title", cursive;
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.1em;
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}

.p-sidebar ul {
  font-size: 14px;
}

.p-sidebar ul > li {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(244, 239, 232, 0.12);
}

.p-sidebar ul > li:last-child {
  border-bottom: none;
}

.p-sidebar ul > li a {
  display: inline-block;
  color: rgba(244, 239, 232, 0.86);
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.p-sidebar ul > li a:hover {
  color: #d4af37;
  opacity: 0.82;
}

.p-sidebar ul > li span {
  margin-left: 4px;
  font-size: 12px;
  color: rgba(244, 239, 232, 0.52);
}

.p-sidebar ul > li ul {
  margin-top: 6px;
  margin-left: 10px;
}

.p-sidebar ul > li ul li {
  padding: 4px 0;
  border: none;
  font-size: 13px;
}

/* =========================================================
   06. Post Pager
   ========================================================= */

.navigation.pagination {
  margin-top: 48px;
}

.navigation.pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.navigation.pagination .page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;

  width: 36px;
  height: 36px;
  border-radius: 50%;

  font-family: "Smythe", "Noto Sans JP", sans-serif;
  font-size: 14px;

  text-decoration: none;
  color: #d4af37;

  border: 1px solid rgba(212, 175, 55, 0.28);
  background: rgba(12, 10, 12, 0.58);

  transition: opacity 0.2s ease, background 0.2s ease;
}

.navigation.pagination .page-numbers:hover {
  background: rgba(212, 175, 55, 0.14);
  opacity: 0.82;
}

.navigation.pagination .page-numbers.current {
  background: rgba(212, 175, 55, 0.22);
  color: #f4efe8;
  border-color: rgba(212, 175, 55, 0.42);
  pointer-events: none;
}

.navigation.pagination .prev,
.navigation.pagination .next {
  width: auto;
  padding: 0 12px;
  border-radius: 999px;
}

/* =========================================================
   07. Responsive
   ========================================================= */

@media (max-width: 767px) {
  .p-post-title {
    font-size: 17px;
    line-height: 1.7;
  }

  .p-post-categories,
  .p-post-date {
    font-size: 16px;
  }

  .p-post-content {
    font-size: 14px;
    line-height: 1.9;
  }

  .p-post.is-exhibit .p-post-content {
    padding: 16px;
  }

  .p-related__item {
    width: 48%;
  }

  .navigation.pagination .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .navigation.pagination .page-numbers {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .navigation.pagination .prev,
  .navigation.pagination .next {
    padding: 0 10px;
  }
}
