/* ========================================
   Page-specific Styles (Subpages)
======================================== */

/* Ensure brand color is available on subpages */
:root {
  --brand: #0055a0;
}

/* ========================================
   Page Hero
======================================== */
.page-hero {
  width: 100%;
  height: 60vh;
  overflow: hidden;
  position: relative;
}

.page-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   Page Content
======================================== */
.page-content {
  padding: 80px 0 60px;
}

.page-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 64px;
}

.page-tag {
  display: inline-block;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.page-title {
  font-size: 32px;
  font-weight: 300;
  color: var(--black);
  letter-spacing: 0.08em;
  line-height: 1.6;
  margin-bottom: 24px;
}

.page-description {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 2.2;
}

/* ========================================
   Page Gallery
======================================== */
.page-gallery {
  padding: 60px 0 80px;
  background: var(--gray-100);
}

.gallery-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 32px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-200);
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 20px;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-caption-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.gallery-caption-desc {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  letter-spacing: 0.02em;
}

/* ========================================
   News Detail
======================================== */
.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.news-detail-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-500);
  letter-spacing: 0.08em;
}

.news-detail-body {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 2.2;
  max-width: 680px;
}

.news-detail-body p {
  margin-bottom: 16px;
}

.news-detail-body p:last-child {
  margin-bottom: 0;
}

/* microCMS rich editor content */
.news-detail-body h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  margin: 40px 0 16px;
  letter-spacing: 0.06em;
}

.news-detail-body h2:first-child {
  margin-top: 0;
}

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

.news-detail-body a {
  color: var(--brand);
  text-decoration: underline;
}

.news-detail-body a:hover {
  opacity: 0.7;
}

.news-detail-body ul,
.news-detail-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.news-detail-body li {
  margin-bottom: 8px;
}

.news-detail-body figure {
  margin: 24px 0;
}

/* ========================================
   CMS Rich Editor Body (.cms-body)
   microCMSリッチエディタの出力を可愛くスタイリング
======================================== */
.content-loading {
  font-size: 14px;
  color: var(--gray-400);
  text-align: center;
  padding: 80px 0;
}

.content-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 60vh;
}

/* 準備中の時はpage-contentのパディングを詰める */
.content-coming-soon ~ .page-tag,
.content-coming-soon ~ .page-title,
.content-coming-soon ~ .cms-body {
  display: none;
}

.page-content:has(.content-coming-soon) {
  padding: 0;
}

.coming-soon-logo {
  width: 64px;
  height: auto;
  opacity: 0.3;
}

.coming-soon-text {
  font-size: 20px;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.1em;
}

.coming-soon-sub {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 2;
  text-align: center;
}

.cms-body {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 2.2;
}

/* 見出し */
.cms-body h2 {
  font-size: 22px;
  font-weight: 500;
  color: var(--black);
  margin: 56px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
  letter-spacing: 0.06em;
}

.cms-body h2:first-child {
  margin-top: 0;
}

.cms-body h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--black);
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--brand);
  letter-spacing: 0.04em;
}

/* 段落 */
.cms-body p {
  margin-bottom: 20px;
}

.cms-body p:last-child {
  margin-bottom: 0;
}

/* 画像 */
.cms-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

.cms-body figure {
  margin: 32px 0;
}

.cms-body figcaption {
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
  margin-top: 8px;
}

/* リンク */
.cms-body a {
  color: var(--brand);
  text-decoration: underline;
}

.cms-body a:hover {
  opacity: 0.7;
}

/* リスト */
.cms-body ul,
.cms-body ol {
  margin: 20px 0;
  padding-left: 24px;
}

.cms-body li {
  margin-bottom: 10px;
}

/* テーブル（料金表など） */
.cms-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  table-layout: fixed;
}

.cms-body thead th {
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  padding: 14px 20px;
  text-align: left;
  letter-spacing: 0.04em;
}

/* 最初の列（プラン名）は上下左右中央揃え */
.cms-body thead th:first-child,
.cms-body tbody td:first-child {
  width: 20%;
  text-align: center;
  vertical-align: middle;
}

/* 最後の列（料金）は右揃え */
.cms-body thead th:last-child,
.cms-body tbody td:last-child {
  width: 30%;
  text-align: right;
}

/* 列の間に薄い縦線 */
.cms-body thead th,
.cms-body tbody td {
  border-right: 1px solid var(--gray-200);
}

.cms-body thead th:last-child,
.cms-body tbody td:last-child {
  border-right: none;
}

.cms-body tbody td {
  font-size: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-600);
  vertical-align: top;
}

/* 引用 */
.cms-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--gray-100);
  border-radius: 12px;
  border-left: 4px solid var(--brand);
  font-style: normal;
  color: var(--gray-600);
}

/* 水平線 */
.cms-body hr {
  border: none;
  height: 1px;
  background: var(--gray-200);
  margin: 40px 0;
}

/* 太字 */
.cms-body strong {
  font-weight: 700;
  color: var(--black);
}

/* コード（あれば） */
.cms-body code {
  font-size: 13px;
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ========================================
   Back Link
======================================== */
.page-back {
  padding: 48px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--black);
}

/* ========================================
   Sidebar overrides for subpages
   (remove loading animations)
======================================== */
body .sidebar-logo img {
  opacity: 1;
  animation: none;
}

body .sidebar-tags {
  opacity: 1;
  animation: none;
}

body .sidebar-nav {
  opacity: 1;
  animation: none;
}

/* ========================================
   Responsive - Subpages
======================================== */
@media (max-width: 1024px) {
  .page-inner {
    padding: 0 40px;
  }

  .page-back {
    padding: 48px 40px;
  }
}

@media (max-width: 820px) {
  .page-hero {
    height: 40vh;
    margin-top: 64px;
  }

  .page-content {
    padding: 48px 0 40px;
  }

  .page-inner {
    padding: 0 24px;
  }

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

  .page-description {
    font-size: 14px;
  }

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

  .page-back {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
