/* ==========================================================
   会社概要ページ (page-company.php) 専用スタイル
   functions.php で is_page('company') のときのみ読み込み
   ========================================================== */

.company-page {
  width: 100%;
  overflow-x: hidden;
  background: #fff;
  color: #2E2A26;
}

.company-page .section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.company-page .section-label-bar {
  width: 5px;
  height: 20px;
  background: #F26522;
  border-radius: 3px;
}
.company-page .section-label-text {
  font-weight: 700;
  font-size: 16px;
}

.company-page .deco {
  position: absolute;
  pointer-events: none;
}

/* placeholder for photos not yet supplied */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: #FCF5EE;
  border: 2px dashed #F2C79B;
  border-radius: inherit;
  color: #9a938b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  padding: 20px;
}
.photo-placeholder span {
  font-weight: 400;
  font-size: 11px;
}

/* ---------- PAGE TITLE ---------- */
.company-title {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 28px 30px;
  overflow: hidden;
}
.company-title .deco-title-burst {
  right: 0;
  top: -10px;
  width: 150px;
  opacity: 0.55;
}
.company-title .deco-title-ring {
  left: -60px;
  top: -40px;
  width: 200px;
  opacity: 0.6;
}
.company-title-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.company-title h1 {
  font-size: 38px;
  font-weight: 900;
}
.company-title .eyebrow {
  font-family: 'Poppins', sans-serif;
  color: #F26522;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 13px;
  margin-top: 8px;
}
.company-title .breadcrumb {
  font-size: 13px;
  color: #9a938b;
}

/* ---------- 企業理念 ---------- */
.company-philosophy {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 28px 70px;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 50px;
  align-items: start;
}
.philosophy-text h2 {
  font-size: 26px;
  line-height: 1.55;
  font-weight: 900;
}
.philosophy-body {
  margin-top: 24px;
  font-size: 14.5px;
  line-height: 2.1;
  color: #4a453f;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.philosophy-photo-wrap {
  position: relative;
}
.philosophy-photo {
  border-radius: 46% 54% 58% 42% / 56% 46% 54% 44%;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(120, 90, 60, 0.18);
  aspect-ratio: 1 / 1;
}
.philosophy-photo img {
  width: 100%;
  display: block;
}
.deco-philosophy-blob {
  left: -34px;
  bottom: -56px;
  width: 120px;
}

/* ---------- 代表挨拶 ---------- */
.company-message {
  position: relative;
  background: #FCF5EE;
  border-radius: 60px 60px 0 0;
  padding: 70px 0;
  overflow: hidden;
}
.deco-message-ring {
  left: 0;
  top: 40px;
  width: 150px;
  opacity: 0.6;
}
.company-message-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
.message-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
}
.message-photo {
  border-radius: 38% 62% 60% 40% / 52% 44% 56% 48%;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(120, 90, 60, 0.16);
  aspect-ratio: 1 / 1.12;
}
.message-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.message-text {
  font-size: 14.5px;
  line-height: 2.1;
  color: #4a453f;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.message-signature {
  text-align: right;
  font-weight: 700;
  font-size: 15px;
  margin-top: 4px;
  color: #2E2A26;
}
.message-signature span {
  font-size: 20px;
}

/* ---------- 会社情報 ---------- */
.company-info {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 28px;
}
.company-info-card {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(120, 90, 60, 0.1);
  display: grid;
  grid-template-columns: 300px 1fr;
}
.company-info-photo {
  min-height: 280px;
}
.company-info-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.info-table-right {
  border-left: 1px solid #f0ece6;
}
.info-table tr.alt {
  background: #FCF5EE;
}
.info-table .info-label {
  padding: 16px 10px 16px 26px;
  color: #9a938b;
  white-space: nowrap;
  vertical-align: top;
  width: 120px;
}
.info-table .info-value {
  padding: 16px 20px 16px 0;
  font-weight: 700;
}

/* ---------- 会社沿革 ---------- */
.company-history {
  position: relative;
  background: #FCF5EE;
  padding: 70px 0 80px;
  overflow: hidden;
}
.deco-history-blob {
  left: -10px;
  bottom: 10px;
  width: 130px;
  opacity: 0.7;
}
.company-history-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
.history-timeline {
  display: grid;
  grid-template-columns: repeat(var(--history-cols, 9), 1fr);
  column-gap: 10px;
}
.history-years {
  grid-column: 1 / -1;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(var(--history-cols, 9), 1fr);
  align-items: end;
}
.history-year {
  font-size: 12px;
  font-weight: 700;
  color: #F26522;
  text-align: center;
  line-height: 1.4;
}
.history-line {
  grid-column: 1 / -1;
  position: relative;
  height: 20px;
}
.history-line-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #F2C79B;
}
.history-dots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--history-cols, 9), 1fr);
  grid-column: 1 / -1;
  height: 100%;
}
.history-dot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #F2C79B;
}
.history-dot--milestone {
  width: 12px;
  height: 12px;
  background: #F26522;
  border: 3px solid #FCF5EE;
  box-shadow: 0 0 0 2px #F26522;
}
.history-desc {
  font-size: 11px;
  color: #6e6862;
  text-align: center;
  line-height: 1.7;
  padding: 0 4px;
}

/* ---------- CTA ---------- */
.company-cta {
  position: relative;
  background: #F26522;
  padding: 52px 0;
  overflow: hidden;
}
.deco-cta-spark {
  top: 20px;
  left: 4%;
  width: 26px;
  opacity: 0.9;
}
.deco-cta-burst {
  bottom: -30px;
  right: 14%;
  width: 120px;
  opacity: 0.25;
  filter: brightness(0) invert(1);
}
.company-cta-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  z-index: 1;
}
.cta-text {
  color: #fff;
  flex: 1;
}
.cta-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  opacity: 0.9;
}
.cta-text h2 {
  font-size: 32px;
  font-weight: 900;
  margin-top: 6px;
}
.cta-sub {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.95;
}
.cta-button {
  background: #fff;
  color: #F26522;
  font-weight: 800;
  font-size: 18px;
  padding: 22px 40px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
}
.cta-button-arrow {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F26522;
  color: #fff;
  align-items: center;
  justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .philosophy-grid,
  .message-grid,
  .company-info-card {
    grid-template-columns: 1fr;
  }
  .company-info-tables {
    grid-template-columns: 1fr;
  }
  .info-table-right {
    border-left: none;
    border-top: 1px solid #f0ece6;
  }
  .history-timeline {
    grid-template-columns: repeat(3, 1fr) !important;
    row-gap: 30px;
  }
  .history-years,
  .history-line,
  .history-dots {
    grid-template-columns: repeat(3, 1fr);
  }
  .company-cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   会社情報セクション: 本社エントランス写真
   company-page.css の末尾に追記してください。
   ========================================================= */
.company-info-photo.has-image {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f0eae5;
  box-shadow: 0 14px 32px rgba(120, 90, 60, .18);
}
.company-info-photo.has-image img {
  display: block;
  width: 100%;
  height: auto;          /* 縦長写真をそのままの比率で表示 */
  object-fit: cover;
  object-position: center 40%;
}

/* --- 高さを揃えたい場合はこちらを有効化 ---------------------
   会社情報テーブルと横並びにしたとき縦長すぎる、という場合は
   下の2行のコメントを外すと 4:3 の横位置トリミングになります。
.company-info-photo.has-image     { aspect-ratio: 4 / 3; }
.company-info-photo.has-image img { height: 100%; }
------------------------------------------------------------ */

@media (max-width: 900px) {
  .company-info-photo.has-image { max-width: 480px; margin: 0 auto; }
}

/* =========================================================
   会社情報セクション: 本社エントランス写真
   company-page.css の末尾に追記してください。
   （前回渡したブロックがある場合は、それを丸ごと置き換え）
   --------------------------------------------------------
   会社情報カードは左右で高さが揃うレイアウトなので、
   写真枠だけがテーブルの高さまで引き伸ばされる。
   画像を absolute で枠いっぱいに敷き、object-fit: cover で
   はみ出した分をトリミングして下の余白を消す。
   ========================================================= */
.company-info-photo.has-image {
  position: relative;
  align-self: stretch;      /* カードの高さいっぱいまで伸ばす */
  margin: 0;
  min-height: 320px;        /* 単独表示になったとき潰れないための保険 */
  overflow: hidden;
  border-radius: 16px;
  background: #f0eae5;
  box-shadow: 0 14px 32px rgba(120, 90, 60, .18);
}

/* 直置き画像・アイキャッチ画像(wp-post-image)の両方に適用 */
.company-info-photo.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;  /* ロゴサインを中央に保つ */
}

/* --- 縦1列に折り返したとき --- */
@media (max-width: 900px) {
  .company-info-photo.has-image {
    aspect-ratio: 4 / 3;    /* 高さの基準が無くなるので比率で確保 */
    min-height: 0;
    max-width: 560px;
    margin: 0 auto 28px;
  }
}