/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
}

a:hover {
  color: #666;
}

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

/* コンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.header {
  background: #fff;
  padding: 20px 0;
  border-bottom: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  margin-bottom: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: transform, opacity;
}

.header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.4s ease-out;
}

.header.hiding {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 24px;
  font-weight: bold;
}

.site-title a {
  color: #333;
}

/* ナビゲーション */
.nav {
  display: flex;
  gap: 30px;
}

.nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav a {
  font-size: 16px;
  transition: color 0.3s;
}

.nav a:hover {
  color: #666;
}

/* メニュートグル */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  margin: 5px 0;
  transition: 0.3s;
}

/* FV画像 */
.fv {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  background-image: url("../images/lblanc-mv.webp");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  margin-bottom: 60px;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}

.fv-inner {
  text-align: center;
}

.fv-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.fv-subtitle {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 記事一覧 */
.articles {
  margin-bottom: 60px;
}

.section-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 40px;
  padding-top: 30px;
  text-align: center;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.article-thumbnail {
  position: relative;
  padding-top: 75%;
  /* 4:3 ratio */
  overflow: hidden;
}

.article-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.article-content {
  padding: 20px;
}

.article-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.article-date i {
  margin-right: 5px;
}

.article-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* カテゴリー一覧 */
.categories {
  margin-bottom: 60px;
}

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

.category-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.category-item a {
  display: block;
  text-decoration: none;
  color: #333;
  position: relative;
}

.category-thumbnail {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.category-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
  width: 100%;
  max-width: calc(100% - 20px);
  backdrop-filter: blur(5px);
  transition: background 0.3s ease;
}

.category-item:hover .category-info {
  background: rgba(0, 0, 0, 0.8);
}

.category-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.category-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0;
}

/* アーカイブ用グリッド */
.archive-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* カテゴリーセクション */
.category-section {
  margin-bottom: 60px;
}

.category-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 30px;
  text-align: left;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.category-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.category-title a:hover {
  color: #666;
}

.category-pagination {
  text-align: center;
  margin-top: 30px;
}

.view-more-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s, transform 0.2s;
}

.view-more-btn:hover {
  background: #555;
  transform: translateY(-2px);
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.pagination a:hover {
  background: #f0f0f0;
}

.pagination .current {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* タブレット対応 */
@media (max-width: 768px) {
  .nav {
    display: flex;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0;
    border-bottom: 1px solid #eee;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
      padding 0.6s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav.active {
    position: absolute;
    top: 78px;
    max-height: 500px;
    padding: 20px 0;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  }

  .nav.active ul {
    opacity: 1;
  }

  .nav li {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav.active li {
    opacity: 1;
  }

  .nav.active li:nth-child(1) {
    transition-delay: 0.2s;
  }

  .nav.active li:nth-child(2) {
    transition-delay: 0.25s;
  }

  .nav.active li:nth-child(3) {
    transition-delay: 0.3s;
  }

  .nav.active li:nth-child(4) {
    transition-delay: 0.35s;
  }

  .nav.active li:nth-child(5) {
    transition-delay: 0.4s;
  }

  .nav.active li:nth-child(6) {
    transition-delay: 0.45s;
  }

  .menu-toggle {
    display: block;
  }

  .fv-title {
    font-size: 36px;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav a {
    display: block;
    font-size: 14px;
    transition: color 0.3s;
    padding: 15px 0 15px 20px;
  }

  .nav a:hover {
    color: #888;
  }

  .wp-block-buttons>.wp-block-button.has-custom-width {
    max-width: none;
    width: 100%;
  }

  .wp-block-buttons {
    width: 100% !important;
  }

  .wp-block-button .wp-element-button {
    display: inline-block;
    padding: 12px 24px !important;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
  }

  .wp-block-button .wp-element-button:hover {
    background: #555;
    transform: translateY(-2px);
  }

  :where(.wp-block-columns.is-layout-flex) {
    gap: 0;
  }
}

/* モバイル対応 */
@media (max-width: 480px) {
  .site-title {
    font-size: 20px;
  }

  .nav a {
    display: block;
    font-size: 14px;
    transition: color 0.3s;
    padding: 15px 0 15px 20px;
  }

  .nav a:hover {
    color: #888;
  }

  .fv {
    height: 300px;
  }

  .fv-title {
    margin-top: 120px;
    font-size: 28px;
    margin-bottom: 10px;
  }

  .fv-subtitle {
    font-size: 12px;
    font-weight: bold;
  }

  .section-title {
    font-size: 24px;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

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

  .footer {
    margin-top: 30px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-logo {
    text-align: center;
  }

  .footer-inner {
    text-align: center;
  }

  .footer-inner p {
    text-align: center;
  }

  .footer-inner button {
    margin: 0 auto;
    display: inline-block;
  }

  .footer-links {
    text-align: center;
  }

  .footer-nav {
    text-align: center;
  }

  .footer-inner button {
    padding: 6px 12px;
    font-size: 11px;
  }

  .page-top-button {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 14px;
  }
}

@media (max-width: 320px) {
  .fv-title {
    margin-top: 120px;
    margin-bottom: 10px;
    font-size: 28px;
  }

  .fv-subtitle {
    font-size: 10px;
    font-weight: bold;
  }
}

/* フッター */
.footer {
  background: #f0f0f0;
  padding: 60px 0;
  margin-top: 120px;
  text-align: center;
  border-top: 1px solid #eee;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-items: stretch;
  align-items: start;
  justify-content: space-between;
}

.footer-logo {
  margin-bottom: 0;
  text-align: center;
}

.footer-logo h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.footer-title {
  font-size: 18px;
  margin-bottom: 10px;
}

.footer-logo p {
  font-size: 12px;
  margin-bottom: 15px;
}

.footer-text {
  font-size: 12px;
  line-height: 1.6;
}

.footer-logo img {
  width: 60px;
  opacity: 0.5;
  padding: 15px 0;
}

.footer-nav h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.footer-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 30px 0;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 30px;
}

.footer-menu li {
  margin-bottom: 8px;
}

.footer-menu a {
  color: #666;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.footer-menu a:hover {
  color: #333;
  text-decoration: underline;
}

.footer-inner p {
  color: #666;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}

.footer-inner button.contact-button {
  background: #f0f0f0;
  border: 1px solid #333;
}

.footer-inner button.contact-button a {
  color: #333;
}

.footer-inner button {
  display: inline-block;
  width: 180px;
  height: 40px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  margin-bottom: 5px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.footer-inner button a {
  color: #fff;
  text-decoration: none;
  display: block;
}

.footer-inner button:hover {
  background: #555;
  transform: translateY(-1px);
}

.footer-inner button:hover a {
  color: #fff;
}

/* ページトップボタン */
.page-top-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-top-button.visible {
  opacity: 1;
  visibility: visible;
}

.page-top-button:hover {
  background: #555;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 固定ページ */
.page-content {
  padding: 0;
  padding-top: 30px;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
}

.page-body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.page-body h2 {
  font-size: 24px;
  margin: 40px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #333;
  position: relative;
}

.page-body h3 {
  font-size: 20px;
  margin: 30px 0 15px 0;
  padding-left: 15px;
  border-left: 4px solid #333;
}

.page-body h4 {
  font-size: 18px;
  margin: 25px 0 12px 0;
  color: #555;
}

.page-body p {
  margin-bottom: 20px;
}

.page-body ul,
.page-body ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.page-body img {
  max-width: 100%;
  height: auto;
  margin: 15px 0;
  border-radius: 8px;
}

/* 投稿ページ */
.single-article {
  padding: 0;
  padding-top: 30px;
}

.single-header {
  text-align: center;
  margin-bottom: 30px;
}

.single-category {
  margin-bottom: 0;
}

.single-category a {
  color: #fff;
  background: #333;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.3s;
}

.single-category a:hover {
  color: #333;
  background: #f0f0f0;
}

.single-header-meta {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  gap: 15px;
}

.single-meta i {
  margin-right: 5px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #666;
  font-size: 16px;
}

.single-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
  text-align: left;
}

.single-subtitle {
  font-size: 16px;
  margin-bottom: 60px;
  line-height: 1.3;
  text-align: left;
}

.single-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 60px;
}

.single-content h2 {
  font-size: 26px;
  margin: 50px 0 25px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #333;
  position: relative;
}

.single-content h3 {
  font-size: 22px;
  margin: 40px 0 20px 0;
  padding-left: 15px;
  border-left: 4px solid #333;
}

.single-content h4 {
  font-size: 20px;
  margin: 30px 0 15px 0;
  color: #555;
}

.single-content p {
  margin-bottom: 25px;
}

.single-content p a {
  color: #fff;
  background: #333;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.3s;
}

.single-content p a:hover {
  color: #333;
  background: #f0f0f0;
}

.single-content img {
  max-width: 100%;
  height: auto;
  margin: 15px 0;
  border-radius: 8px;
}

.single-footer {
  border-top: 1px solid #eee;
  padding-top: 40px;
}

.single-tags {
  margin-bottom: 40px;
}

.tag {
  display: inline-block;
  margin: 5px;
}

.tag a {
  background: #f0f0f0;
  color: #666;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.3s, color 0.3s;
}

.tag a:hover {
  background: #333;
  color: #fff;
}

.single-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.nav-prev,
.nav-next {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-height: 200px;
}

.nav-prev a,
.nav-next a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s;
  min-height: 200px;
  position: relative;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.nav-prev a[style*="background-image"]::before,
.nav-next a[style*="background-image"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  z-index: 0;
}

.nav-prev a:not([style*="background-image"]),
.nav-next a:not([style*="background-image"]) {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  text-shadow: none;
}

.nav-prev a:hover,
.nav-next a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-prev a:not([style*="background-image"]):hover,
.nav-next a:not([style*="background-image"]):hover {
  background: rgba(51, 51, 51, 0.9);
  color: #fff;
}

.nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
  position: relative;
}

.nav-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  opacity: 0.9;
}

.nav-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.nav-next {
  text-align: right;
}

/* モバイル対応 */
@media (max-width: 480px) {
  .page-title {
    font-size: 28px;
  }

  .single-title {
    font-size: 32px;
  }

  .single-meta {
    /* flex-direction: column; */
    gap: 10px;
  }

  .single-navigation {
    flex-direction: column;
  }

  .nav-prev:not(:has(a)),
  .nav-next:not(:has(a)) {
    display: none;
  }

  .nav-next {
    text-align: left;
  }

  .breadcrumb ol {
    font-size: 12px;
    flex-wrap: wrap;
  }

  .breadcrumb li:not(:last-child)::after {
    margin: 0 5px;
  }

  .wp-block-buttons {
    width: 100%;
  }
}

/* パンくずリスト */
.breadcrumb {
  max-width: 1200px;
  padding: 20px;
  border-bottom: 1px solid #eee;
  margin: 80px auto 40px auto;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 10px;
  color: #999;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: #333;
}

.breadcrumb li:last-child {
  color: #333;
  font-weight: 500;
}

/* WordPress ブロックボタン */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 30px 0;
  width: 85%;
  max-width: 480px;
}

.wp-block-button {
  margin: 0;
}

.wp-block-button a {
  display: inline-block;
  padding: 12px 24px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.wp-block-button a:hover {
  background: #555;
  transform: translateY(-2px);
}

.wp-block-button .wp-element-button {
  display: inline-block;
  padding: 12px 24px !important;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.wp-block-button .wp-element-button:hover {
  background: #555;
  transform: translateY(-2px);
}

/* 古い投稿メッセージ */
.old-post-message {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 20px;
  margin: 30px 0;
  position: relative;
}

.old-post-message::before {
  content: "⚠️";
  font-size: 20px;
}

.old-post-message p {
  margin: 0;
  padding-left: 30px;
  color: #856404;
  font-size: 12px;
  line-height: 1.6;
}

.old-post-message strong {
  font-weight: 600;
  color: #533f03;
}

.wp-block-buttons>.wp-block-button.has-custom-width {
  max-width: none;
  width: 100%;
}

/* モバイル対応 */
@media (max-width: 480px) {
  .page-title {
    font-size: 24px;
    margin-bottom: 0;
  }

  .single-content {
    font-size: 14px;
  }

  .single-content h2 {
    font-size: 16px;
    margin: 0 0 25px 0;
  }

  .single-content h3 {
    font-size: 16px;
    margin: 15px 0;
  }

  .single-content p {
    margin-bottom: 15px;
  }

  .single-content h4 {
    font-size: 16px;
    margin: 30px 0 0 0;
    padding-left: 0;
  }

  .single-meta {
    /* flex-direction: column; */
    gap: 10px;
  }

  .single-header {
    margin-bottom: 0;
  }

  .single-navigation {
    font-size: 14px;
    flex-direction: column;
  }

  .single-article {
    padding: 15px 0;
  }

  .nav-next {
    text-align: left;
  }

  .breadcrumb ol {
    font-size: 12px;
    flex-wrap: wrap;
  }

  .breadcrumb li:not(:last-child)::after {
    margin: 0 5px;
  }

  .wp-block-buttons {
    width: 100%;
  }

  .single-content .old-post-message {
    padding: 5px 10px;
    margin: 20px 0;
    font-size: 12px !important;
  }

  .single-content .old-post-message::before {
    top: 15px;
    left: 15px;
    font-size: 18px;
  }

  .single-content .old-post-message p {
    padding-left: 25px;
  }

  .wp-block-buttons>.wp-block-button.has-custom-width {
    max-width: none;
    width: 100%;
  }

  .wp-block-button .wp-element-button {
    font-size: 12px;
  }

  :where(.wp-block-columns.is-layout-flex) {
    gap: 0;
  }

  .page-content {
    padding: 0;
  }

  .page-body h2 {
    font-size: 16px;
    margin: 0 0 20px 0;
  }

  .page-body h3 {
    font-size: 16px;
    margin: 15px 0 0 0;
  }

  .page-body p {
    font-size: 14px;
    margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  .single-content h2 {
    font-size: 22px;
  }

  .single-title {
    font-size: 30px;
    text-align: left;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
  }

  .single-subtitle {
    font-size: 16px;
    margin-bottom: 60px;
    line-height: 1.3;
    text-align: left;
  }

  /* FV画像 */
  .fv {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    background-image: url("../images/lblanc-mv_sp.webp");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
  }

  .footer {
    padding-bottom: 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-inner p {
    text-align: center;
  }

  .footer-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 30px 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    align-content: center;
  }

  .footer-menu li {
    width: 100%;
    margin-bottom: 0;
  }

  .footer-menu li a {
    width: 100%;
    display: block;
    text-align: center;
    padding: 12px;
  }
}

/* 目次 */
.table-of-contents {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 25px;
  margin: 0 0 30px 0;
}

h2.toc-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  margin-top: 0;
  color: #333;
  text-align: center;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.toc-nav {
  margin-top: 15px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 8px;
}

.toc-link {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
  display: block;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.toc-link:hover {
  background: #333;
  color: #fff;
  transform: translateX(5px);
}

.toc-sub-item .toc-link {
  font-size: 13px;
  color: #666;
}

.toc-sub-item .toc-link:hover {
  color: #fff;
}

/* 目次ジャンプ先の見出しに上部マージンを追加 */
[id^="heading-"] {
  scroll-margin-top: 120px;
  scroll-behavior: smooth;
}

/* アンカーリンクのスムーズスクロール */
html {
  scroll-behavior: smooth;
}

/* 目次リンクのスムーズスクロール */
.toc-link {
  scroll-behavior: smooth;
}

/* モバイル対応 - 目次 */
@media (max-width: 768px) {
  .table-of-contents {
    padding: 20px;
    margin: 0 0 20px 0;
  }

  h2.toc-title {
    font-size: 16px;
  }

  .toc-link {
    font-size: 13px;
    padding: 4px 8px;
  }

  .toc-sub-item .toc-link {
    font-size: 12px;
  }

  [id^="heading-"] {
    scroll-margin-top: 120px;
  }
}

@media (max-width: 480px) {
  .table-of-contents {
    padding: 15px;
    margin: 15px 0;
  }

  h2.toc-title {
    font-size: 15px;
  }

  .toc-link {
    font-size: 12px;
    padding: 3px 6px;
  }

  .toc-sub-item .toc-link {
    font-size: 11px;
  }

  [id^="heading-"] {
    scroll-margin-top: 120px;
  }
}

/* モバイル対応 */
@media (max-width: 480px) {
  .single-title {
    font-size: 22px;
  }

  .single-content h2 {
    font-size: 16px;
    margin: 0 0 25px 0;
  }

  .category-info {
    width: 100%;
    max-width: calc(100% - 20px);
  }
}

.single-content img.p-icon {
  margin: 0;
}

/* Custom Responsive Gallery Block */
.lblanc-responsive-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.lblanc-gallery-item figure {
  margin: 0;
}

.lblanc-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  margin: 0;
}

/* Aspect ratio overrides for fewer columns */
.lblanc-responsive-gallery.columns-1 .lblanc-gallery-item img,
.lblanc-responsive-gallery.columns-2 .lblanc-gallery-item img,
.lblanc-responsive-gallery.columns-3 .lblanc-gallery-item img,
.lblanc-gallery-editor-container.columns-1 .lblanc-gallery-item img,
.lblanc-gallery-editor-container.columns-2 .lblanc-gallery-item img,
.lblanc-gallery-editor-container.columns-3 .lblanc-gallery-item img {
  aspect-ratio: 4 / 3;
}

.lblanc-gallery-item figcaption {
  padding: 0;
  font-size: 14px;
  color: #666;
  text-align: center;
  background: #fff;
}

/* Column specific styles with responsiveness */
/* PC: Default / Selected columns */
@media (min-width: 1024px) {
  .lblanc-responsive-gallery.columns-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .lblanc-responsive-gallery.columns-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .lblanc-responsive-gallery.columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-responsive-gallery.columns-1 {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Tablet: Adjust columns */
@media (min-width: 600px) and (max-width: 1023px) {
  .lblanc-responsive-gallery.columns-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .lblanc-responsive-gallery.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-responsive-gallery.columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-responsive-gallery.columns-1 {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Mobile: Further adjust columns */
@media (max-width: 599px) {
  .lblanc-responsive-gallery.columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-responsive-gallery.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-responsive-gallery.columns-2 {
    grid-template-columns: repeat(1, 1fr);
  }

  .lblanc-responsive-gallery.columns-1 {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Editor Specific Styles */
.lblanc-gallery-editor-container {
  border: 1px solid #ddd;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 20px;
}

.lblanc-gallery-editor-container .lblanc-responsive-gallery {
  margin: 0;
  display: grid;
  gap: 15px;
}

/* Editor Preview Columns */
.lblanc-gallery-editor-container.columns-4 .lblanc-responsive-gallery {
  grid-template-columns: repeat(4, 1fr);
}

.lblanc-gallery-editor-container.columns-3 .lblanc-responsive-gallery {
  grid-template-columns: repeat(3, 1fr);
}

.lblanc-gallery-editor-container.columns-2 .lblanc-responsive-gallery {
  grid-template-columns: repeat(2, 1fr);
}

.lblanc-gallery-editor-container.columns-1 .lblanc-responsive-gallery {
  grid-template-columns: repeat(1, 1fr);
}

@media (max-width: 1200px) {
  .lblanc-gallery-editor-container.columns-4 .lblanc-responsive-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-gallery-editor-container.columns-3 .lblanc-responsive-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .lblanc-gallery-editor-container.columns-2 .lblanc-responsive-gallery {
    grid-template-columns: repeat(1, 1fr);
  }

  .lblanc-gallery-editor-container.columns-1 .lblanc-responsive-gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

.lblanc-gallery-admin-hint {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lblanc-responsive-gallery-placeholder {
  border: 2px dashed #ccc;
  padding: 40px;
  background: #f9f9f9;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
}

.lblanc-edit-gallery-button {
  margin-top: 15px;
  width: 100%;
  justify-content: center;
}

.lblanc-remove-img {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 0, 0, 0.8) !important;
  color: #fff !important;
  border-radius: 50% !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 16px !important;
  line-height: 1 !important;
  z-index: 10;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lblanc-remove-img:hover {
  background: red !important;
  transform: scale(1.1);
}

/* Ensure editor figure has no extra margins */
.lblanc-gallery-editor-container figure {
  margin: 0 !important;
  padding: 0 !important;
}

.single-content .wp-block-gallery img {
  margin: 0;
  padding: 5px;
}

/* Lightbox Styles */
#lblanc-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  touch-action: none;
  /* デフォルトのズームやパンを無効化 */
}

#lblanc-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

#lblanc-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 4px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

/* モバイル・タブレット端末のみズーム機能を有効化 */
@media (max-width: 1024px) {
  .lightbox-content img {
    cursor: zoom-in;
  }

  .lightbox-content.zoomed img {
    transform: scale(2);
    cursor: zoom-out;
  }
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  color: #ccc;
}

/* お問い合わせフォーム (Contact Form 7) */
.contact-page {
  display: block;
  width: 940px;
  margin: 0 auto;
}

.contact-description {
  text-align: center;
  margin-bottom: 40px;
  color: #666;
  font-size: 14px;
  line-height: 1.8;
}

.contact-form-wrapper {
  margin-bottom: 60px;
}

.wpcf7 {
  margin: 0 auto;
}

.wpcf7-form p {
  margin-bottom: 0;
}

.wpcf7-form label {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 0;
  color: #333;
  font-size: 15px;
  font-weight: bold;
}

.wpcf7-form label br {
  display: none;
}

.wpcf7-form .wpcf7-form-control-wrap {
  width: 100%;
}


/* メッセージ本文（textarea）の場合は上揃えにする */
.wpcf7-form label:has(textarea) {
  align-items: flex-start;
}


.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fafafa;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: #333;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.wpcf7-form textarea {
  min-height: 200px;
  resize: vertical;
}

.wpcf7-form input[type="submit"] {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 40px auto 0;
  padding: 18px 24px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  letter-spacing: 2px;
}

.wpcf7-form input[type="submit"]:hover {
  background-color: #555;
  transform: translateY(-2px);
}

.form-acceptance {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.form-acceptance .wpcf7-list-item {
  margin: 0;
}

.form-acceptance label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
  font-size: 14px;
  cursor: pointer;
  border: none;
  padding: 0;
}

.form-acceptance input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
}

.contact-f_link {
  color: #333;
  text-decoration: underline;
  font-weight: bold;
}

.contact-f_link:hover {
  text-decoration: none;
  opacity: 0.7;
}


.wpcf7-not-valid-tip {
  color: #e53e3e;
  font-size: 13px;
  margin-top: 5px;
  display: block;
}

div.wpcf7-response-output {
  margin: 30px 0 0 0;
  padding: 15px;
  border-radius: 6px;
  font-size: 14px;
  border-width: 1px;
}

/* お問い合わせページ モバイル対応 */
@media (max-width: 768px) {
  .contact-page {
    width: 100%;
    padding: 0 15px;
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }

  .wpcf7-form label {
    display: block;
    padding: 15px 0;
  }

  .wpcf7-form label br {
    display: block;
  }

  .wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin-top: 10px;
  }

  .wpcf7-form input[type="submit"] {
    max-width: 100%;
    width: 100%;
  }
}

.cf7-cf-turnstile div {
  text-align: center;
}