/**
 * WordPress Editor Content Styles
 * ================================
 * WordPressのエディタで生成されるコンテンツ用の標準スタイル
 * ヘッドレスWordPress環境で正しく表示するためのCSS
 */

/* ============================================
   画像の配置クラス (Image Alignment)
   ============================================ */

/* 左寄せ */
.alignleft,
img.alignleft,
figure.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
  clear: left;
}

/* 右寄せ */
.alignright,
img.alignright,
figure.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
  clear: right;
}

/* 中央寄せ */
.aligncenter,
img.aligncenter,
figure.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  clear: both;
  text-align: center;
}

/* 配置なし */
.alignnone {
  margin: 0.5rem 1.25rem 1.25rem 0;
  clear: both;
}

/* ============================================
   画像キャプション (Image Captions)
   ============================================ */

.wp-caption {
  background: #fff;
  border: 1px solid #f0f0f0;
  max-width: 100%;
  padding: 0.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.wp-caption img {
  border: 0;
  height: auto;
  margin: 0;
  max-width: 100%;
  padding: 0;
  width: auto;
}

.wp-caption .wp-caption-text,
.wp-caption-text {
  color: #666;
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0.5rem 0 0;
  padding: 0;
}

/* ============================================
   画像サイズクラス (Image Size Classes)
   ============================================ */

img.size-auto,
img.size-full,
img.size-large,
img.size-medium,
img.size-thumbnail {
  max-width: 100%;
  height: auto;
}

/* サムネイル */
img.size-thumbnail {
  max-width: 150px;
}

/* 中サイズ */
img.size-medium {
  max-width: 300px;
}

/* 大サイズ */
img.size-large {
  max-width: 1024px;
}

/* ============================================
   Gutenbergブロッククラス (Block Classes)
   ============================================ */

/* ブロック画像 */
.wp-block-image {
  margin-bottom: 1.5rem;
}

.wp-block-image img {
  display: block;
  height: auto;
  max-width: 100%;
}

.wp-block-image.aligncenter {
  text-align: center;
}

.wp-block-image.alignfull img,
.wp-block-image.alignwide img {
  width: 100%;
}

/* 幅広配置 */
.alignwide {
  margin-left: calc(-12.5%);
  margin-right: calc(-12.5%);
  max-width: 125%;
  width: 125%;
}

/* 全幅配置 */
.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

/* コンテナ内での幅広・全幅配置の調整 */
.container .alignwide,
.content .alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
  max-width: calc(100% + 4rem);
  width: calc(100% + 4rem);
}

.container .alignfull,
.content .alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

/* ============================================
   ギャラリーブロック (Gallery Block)
   ============================================ */

.wp-block-gallery {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.wp-block-gallery .blocks-gallery-item {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  margin: 0 1rem 1rem 0;
  position: relative;
  width: calc(50% - 1rem);
}

.wp-block-gallery.columns-2 .blocks-gallery-item {
  width: calc(50% - 1rem);
}

.wp-block-gallery.columns-3 .blocks-gallery-item {
  width: calc(33.3333% - 1rem);
}

.wp-block-gallery.columns-4 .blocks-gallery-item {
  width: calc(25% - 1rem);
}

/* ============================================
   引用ブロック (Quote Block)
   ============================================ */

.wp-block-quote {
  border-left: 4px solid #000;
  margin: 1.5rem 0;
  padding-left: 1rem;
}

.wp-block-quote cite {
  color: #666;
  font-size: 0.875rem;
  font-style: normal;
}

.wp-block-quote.is-style-large {
  border-left: none;
  font-size: 1.5rem;
  font-style: italic;
  padding-left: 0;
}

/* ============================================
   テキストサイズクラス (Text Size Classes)
   ============================================ */

.has-small-font-size {
  font-size: 0.875rem;
}

.has-medium-font-size {
  font-size: 1.125rem;
}

.has-large-font-size {
  font-size: 1.5rem;
}

.has-huge-font-size {
  font-size: 2rem;
}

/* ============================================
   ドロップキャップ (Drop Cap)
   ============================================ */

.has-drop-cap::first-letter {
  float: left;
  font-size: 3.5rem;
  line-height: 0.8;
  margin: 0.1em 0.1em 0 0;
  text-transform: uppercase;
}

/* ============================================
   埋め込みコンテンツ (Embeds)
   ============================================ */

.wp-block-embed {
  margin-bottom: 1.5rem;
  clear: both;
}

.wp-block-embed.alignleft {
  margin-right: 1.5rem;
}

.wp-block-embed.alignright {
  margin-left: 1.5rem;
}

.wp-block-embed.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

/* レスポンシブ埋め込み */
.wp-embed-responsive .wp-block-embed__wrapper {
  position: relative;
}

.wp-embed-responsive .wp-block-embed__wrapper::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.wp-embed-responsive .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   ボタンブロック (Button Block)
   ============================================ */

.wp-block-button {
  margin-bottom: 1.5rem;
}

.wp-block-button__link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* ============================================
   カラムブロック (Columns Block)
   ============================================ */

.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.wp-block-column {
  flex-basis: 100%;
  flex-grow: 1;
  padding: 0 1rem;
}

@media (width >= 768px) {
  .wp-block-column {
    flex-basis: 0;
  }
}

/* ============================================
   セパレーターブロック (Separator Block)
   ============================================ */

.wp-block-separator {
  border: none;
  border-bottom: 2px solid currentcolor;
  margin: 2rem auto;
  opacity: 0.4;
}

.wp-block-separator:not(.is-style-wide, .is-style-dots) {
  max-width: 100px;
}

.wp-block-separator.is-style-wide {
  max-width: 100%;
}

.wp-block-separator.is-style-dots {
  background: none;
  border: none;
  text-align: center;
  max-width: none;
  height: auto;
}

.wp-block-separator.is-style-dots::before {
  content: "···";
  font-size: 1.5rem;
  letter-spacing: 2em;
  padding-left: 2em;
}

/* ============================================
   テーブルブロック (Table Block)
   ============================================ */

.wp-block-table {
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table td,
.wp-block-table th {
  padding: 0.5rem;
  border: 1px solid #ddd;
}

.wp-block-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

/* ============================================
   プルクォート (Pullquote)
   ============================================ */

.wp-block-pullquote {
  border-top: 4px solid currentcolor;
  border-bottom: 4px solid currentcolor;
  color: currentcolor;
  margin: 2rem 0;
  padding: 2rem 0;
  text-align: center;
}

.wp-block-pullquote blockquote {
  border: none;
  margin: 0;
  padding: 0;
}

.wp-block-pullquote cite {
  display: block;
  font-size: 0.875rem;
  margin-top: 1rem;
  text-transform: uppercase;
}

/* ============================================
   モバイル対応の調整
   ============================================ */

@media (width <= 640px) {
  .alignleft,
  .alignright {
    display: block;
    float: none;
    margin-left: auto;
    margin-right: auto;
  }

  .wp-block-gallery.columns-3 .blocks-gallery-item,
  .wp-block-gallery.columns-4 .blocks-gallery-item {
    width: calc(50% - 1rem);
  }

  .alignwide,
  .alignfull {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* ============================================
   印刷対応
   ============================================ */

@media print {
  .alignleft,
  .alignright,
  .aligncenter {
    display: block;
    float: none;
    margin: 1rem auto;
  }

  .wp-caption {
    border: 1px solid #000;
  }
}

/* ============================================
   Japanese Content Styling (日本語コンテンツ)
   WordPressから取得した記事コンテンツ向けスタイル
   ============================================ */

.japanese-content {
  line-height: 1.75;
  letter-spacing: 0.03em;
  font-feature-settings: 'palt' 1;
  font-size: 17px;
}

/* 見出し */
.japanese-content h1,
.japanese-content h2,
.japanese-content h3 {
  color: #006994;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.japanese-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.japanese-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
}

/* 段落 */
.japanese-content p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

/* リスト */
.japanese-content ul,
.japanese-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.japanese-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

/* リンク */
.japanese-content a {
  color: #006994;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.japanese-content a:hover {
  color: #004d6b;
}

/* 強調テキスト */
.japanese-content strong {
  font-weight: 700;
  color: #111827;
}

/* 引用 */
.japanese-content blockquote {
  padding-left: 1.5rem;
  border-left: 4px solid #b3d9e8;
  margin: 2rem 0;
  color: #4b5563;
  line-height: 1.8;
}

/* 画像 */
.japanese-content img {
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  margin: 1.5rem 0;
}

/* レスポンシブ対応 */
@media (width <= 640px) {
  .japanese-content {
    font-size: 16px !important;
  }

  .japanese-content h2 {
    font-size: 1.5rem;
  }

  .japanese-content h3 {
    font-size: 1.25rem;
  }
}

/* ============================================
   Ocean Content Styling (オーシャンテーマ記事)
   activity.njk向けのスタイル
   ============================================ */

.ocean-content {
  line-height: 1.75;
  letter-spacing: 0.03em;
  font-feature-settings: 'palt' 1;
  font-size: 17px;
}

/* Ocean-themed headings */
.ocean-content h1,
.ocean-content h2,
.ocean-content h3 {
  font-family: 'Libre Baskerville', 'Noto Serif JP', serif;
  color: var(--ocean-deep, #0A2440);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.ocean-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sand, #F4F6F8);
}

.ocean-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
}

.ocean-content p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
  color: var(--text-dark, #1C2833);
}

.ocean-content ul,
.ocean-content ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.ocean-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.ocean-content ul li::marker {
  color: var(--coral, #E76F51);
}

.ocean-content a {
  color: var(--ocean-light, #2A6B8E);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--coral, #E76F51);
  transition: all 0.3s ease;
}

.ocean-content a:hover {
  color: var(--ocean-deep, #0A2440);
  text-decoration-color: var(--ocean-light, #2A6B8E);
}

.ocean-content strong {
  font-weight: 700;
  color: var(--ocean-deep, #0A2440);
}

.ocean-content blockquote {
  padding: 1.5rem;
  border-left: 4px solid var(--coral, #E76F51);
  margin: 2rem 0;
  background: var(--sand-light, #FAFBFC);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--ocean-mid, #1A4D6F);
  line-height: 1.8;
}

.ocean-content img {
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgb(10 36 64 / 10%);
  margin: 2rem 0;
}

@media (width <= 640px) {
  .ocean-content {
    font-size: 16px !important;
  }

  .ocean-content h2 {
    font-size: 1.5rem;
  }

  .ocean-content h3 {
    font-size: 1.25rem;
  }
}

/* ============================================
   Privacy Content Styling (プライバシーポリシー)
   privacy.njk向けのスタイル
   ============================================ */

.privacy-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  border-bottom: 2px solid #d1d5db;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.privacy-content h2:first-child {
  margin-top: 0;
}

.privacy-content p {
  color: #374151;
  line-height: 1.75;
}

.privacy-content ul,
.privacy-content ol {
  color: #374151;
  margin-left: 1rem;
}

.privacy-content li {
  margin-bottom: 0.5rem;
}

/* ============================================
   Prose Styling (会員専用コンテンツ)
   members/members-info.njk, minutes-detail.njk向けスタイル
   ============================================ */

.prose {
  color: #374151;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  color: #1f2937;
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.prose ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: #059669;
  text-decoration: underline;
}

.prose a:hover {
  color: #047857;
}

.prose strong {
  font-weight: 600;
  color: #111827;
}

.prose table {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.prose th {
  background-color: #f3f4f6;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid #d1d5db;
}

.prose td {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
}