/*
 * Philosophy Page Styles - New Kumehome Theme
 * 理念ページ専用スタイル
 */

/* Background */
.philosophy-page {
  background-image: linear-gradient(rgba(0,0,0,0.08), rgba(0,0,0,0.08)),
                    url('../images/rinen_back.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* タイトルは固定位置 */
.philosophy-page .page-hero {
  flex-shrink: 0;
}

/* カードの下マージンだけ自動調整 */
.philosophy-page .philosophy-card {
  margin-top: 60px;
  margin-bottom: auto;
}


/* デスクトップ：余白を削除してフッターまで背景で埋める */
body:has(.philosophy-page) {
  background-image: linear-gradient(rgba(0,0,0,0.08), rgba(0,0,0,0.08)),
                    url('../images/rinen_back.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body:has(.philosophy-page) .site-layout {
  min-height: auto;
  background-color: transparent;
}

body:has(.philosophy-page) .site-shell {
  gap: 0;
  display: flex;
  flex-direction: column;
  scrollbar-gutter: stable;
}

body:has(.philosophy-page) .site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: #EEF4FB;
  color: #3e5463;
  padding: 40px 24px 25px;
  font-family: var(--font-base);
  border-top: 1px solid #e0e6ed;
}

/* site-mainの白背景とシャドウとパディングを削除 */
.site-main.philosophy-page {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
}

/* コンテンツエリアの境界線削除 */
body:has(.philosophy-page) .content-area,
body:has(.philosophy-page) #primary {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background-color: transparent !important;
}

/* フッター：デスクトップでは非表示 */
body:has(.philosophy-page) .site-footer .site-info {
  display: none !important;
}

/* Philosophy card */
.philosophy-card {
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: clamp(28px, 5vw, 48px);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.philosophy-card .title {
  text-align: center;
  font-weight: 500;
  color: #284a6d;
  font-size: var(--font-size-card-title);
  margin: 0 0 24px;
  font-family: var(--font-heading);
}

.philosophy-text {
  font-size: var(--font-size-body-text);
  line-height: 2;
  color: #2c3e50;
  margin: 0 0 16px;
  text-align: justify;
}

.philosophy-text:last-child {
  margin-bottom: 0;
}

/* iOS Safari fallback - bodyのみに背景を設定してつなぎ目を防ぐ */
@supports (-webkit-touch-callout: none) {
  body:has(.philosophy-page) {
    background-attachment: scroll;
  }
  .philosophy-page {
    background-image: none;
    background-color: transparent;
  }
}

/* レスポンシブ - tablet/mobile */
@media (max-width: 960px) {
  /* html/bodyの背景で全体をカバー */
  html:has(.philosophy-page),
  body:has(.philosophy-page) {
    min-height: 100%;
    background-color: transparent;
  }

  body:has(.philosophy-page) .site-layout {
    padding: 0;
    padding-top: 0;
    min-height: 100%;
    background-color: transparent;
  }

  .site-main.philosophy-page {
    padding: 0;
  }

  .philosophy-page .page-hero {
    width: 100%;
    margin: 0 !important;
    padding: 60px 16px;
    box-sizing: border-box;
  }

  .philosophy-card {
    margin: 16px 16px 28px;
    max-width: calc(100% - 32px);
  }

  body:has(.philosophy-page) .site-shell {
    gap: 0;
  }

  .site-main.philosophy-page {
    min-height: 100vh;
  }

  /* フッター：トップページと同じスタイル */
  body:has(.philosophy-page) .site-footer {
    margin-top: auto;
    flex-shrink: 0;
    padding: 30px 16px 20px;
  }

  body:has(.philosophy-page) .footer-links-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  body:has(.philosophy-page) .footer-link {
    border-right: none;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
  }
}

.philosophy-text {
  line-height: 2;
  letter-spacing: 0.05em;
  word-break: normal;
  overflow-wrap: break-word;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .philosophy-text {
    line-height: 1.9;
    text-align: left;
    padding: 0 16px;
  }
}
