/* ========================================
   ブログ共通：パンくず・見出し
======================================== */
.oim-breadcrumb {
  width: min(1180px, calc(100% - 40px));
  margin: 24px auto 0;
}

.oim-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #8a7664;
  font-size: 12px;
}

.oim-breadcrumb__list li + li::before {
  content: "/";
  margin-right: 10px;
  color: #c5b7aa;
}

.oim-breadcrumb a {
  text-decoration: none;
}

/* ========================================
   ブログトップ：タイトルエリア
======================================== */
.oim-blog-masthead {
  border-bottom: 1px solid #f0e7de;
  background: #fff;
}

.oim-blog-masthead__inner {
  padding-top: 58px;
  padding-bottom: 52px;
  text-align: center;
}

.oim-blog-masthead h1 {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 52px);
  line-height: 1.35;
  letter-spacing: .04em;
}

.oim-blog-masthead__description {
  max-width: 720px;
  margin: 14px auto 0;
  color: #756255;
  font-size: 15px;
  line-height: 1.8;
}

.oim-front-container {
  padding-top: 54px;
  padding-bottom: 88px;
}

.oim-front-featured {
  padding-bottom: 56px;
  border-bottom: 1px solid #f2ebe4;
}

.oim-section-heading--compact {
  margin-bottom: 26px;
}

.oim-post-grid--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.oim-content-layout--front {
  padding-top: 56px;
  padding-bottom: 0;
}

.oim-post-grid--front {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oim-front-more {
  margin-top: 36px;
  text-align: center;
}

.oim-button--outline {
  border: 1px solid var(--oim-brown);
  background: #fff;
  color: var(--oim-brown);
}

.oim-button--outline:hover {
  background: var(--oim-brown);
  color: #fff;
}

/* ========================================
   記事カード
======================================== */
.oim-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.oim-post-grid--related {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oim-post-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #eee4da;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(90, 61, 43, .045);
  transition: transform .25s ease, box-shadow .25s ease;
}

.oim-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(90, 61, 43, .09);
}

.oim-post-card__image-link {
  display: block;
  text-decoration: none;
}

.oim-post-card__image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f5f1ed;
}

.oim-post-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.oim-post-card:hover .oim-post-card__image {
  transform: scale(1.035);
}

.oim-post-card__noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #aa998d;
  font-size: 13px;
}

.oim-post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 18px 20px;
}

.oim-post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.oim-post-categories a {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff1e7;
  color: var(--oim-orange);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
}

.oim-post-card__title {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.55;
}

.oim-post-card__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: #9b887a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.oim-post-card__date svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.oim-post-card__title a {
  color: inherit;
  text-decoration: none;
}

.oim-post-card__title a:hover {
  color: var(--oim-orange);
}

.oim-post-card__excerpt {
  margin: 0;
  color: #746255;
  font-size: 13px;
  line-height: 1.72;
}

/* ========================================
   カテゴリー一覧
======================================== */
.oim-category-section {
  padding-top: 60px;
}

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

.oim-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--oim-line);
  border-radius: 14px;
  text-decoration: none;
}

.oim-category-list small {
  color: #9d8b7e;
}

/* ========================================
   2カラム本文＋サイドバー
======================================== */
.oim-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 52px;
  align-items: start;
  padding-top: 54px;
  padding-bottom: 80px;
}

.oim-content-main {
  min-width: 0;
}

.oim-sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.oim-sidebar-box {
  padding: 22px;
  border: 1px solid var(--oim-line);
  border-radius: 14px;
  background: #fff;
}

.oim-sidebar-box h2 {
  margin: 0 0 16px;
  padding-bottom: 11px;
  border-bottom: 2px solid #f0e6dc;
  font-size: 19px;
  line-height: 1.4;
}

.oim-sidebar-search__row {
  position: relative;
}

.oim-sidebar-search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 46px 10px 13px;
  border: 1px solid #d9cec4;
  border-radius: 8px;
  background: #fff;
  color: var(--oim-brown);
  outline: none;
}

.oim-sidebar-search input:focus {
  border-color: var(--oim-orange);
  box-shadow: 0 0 0 3px rgba(235, 97, 0, .09);
}

.oim-sidebar-search button {
  position: absolute;
  top: 50%;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: var(--oim-brown);
  color: #fff;
  transform: translateY(-50%);
  cursor: pointer;
}

.oim-sidebar-search button svg {
  width: 18px;
  height: 18px;
}

.oim-sidebar-box ul,
.oim-sidebar-box ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.oim-sidebar-category-list li,
.oim-sidebar-archive-list li {
  border-bottom: 1px solid #f2ebe4;
}

.oim-sidebar-category-list li:last-child,
.oim-sidebar-archive-list li:last-child {
  border-bottom: 0;
}

.oim-sidebar-category-list a,
.oim-sidebar-archive-list a {
  display: inline-block;
  padding: 9px 0;
  text-decoration: none;
}

.oim-sidebar-category-list a:hover,
.oim-sidebar-archive-list a:hover {
  color: var(--oim-orange);
}

.oim-sidebar-ranking {
  counter-reset: oim-ranking;
}

.oim-sidebar-ranking li {
  position: relative;
  counter-increment: oim-ranking;
  padding: 0 0 13px 34px;
  border-bottom: 1px solid #f2ebe4;
}

.oim-sidebar-ranking li + li {
  margin-top: 13px;
}

.oim-sidebar-ranking li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.oim-sidebar-ranking li::before {
  content: counter(oim-ranking);
  position: absolute;
  top: 1px;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff1e7;
  color: var(--oim-orange);
  font-size: 11px;
  font-weight: 900;
}

.oim-sidebar-ranking a {
  display: block;
  text-decoration: none;
}

.oim-sidebar-ranking__title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.oim-sidebar-ranking time {
  display: block;
  margin-top: 3px;
  color: #9b887a;
  font-size: 10px;
}

/* ========================================
   記事詳細
======================================== */
.oim-article {
  max-width: 780px;
  margin: 0 auto;
}

.oim-article__header {
  margin-bottom: 28px;
}

.oim-article__header h1 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.45;
}

.oim-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #8d7a6d;
  font-size: 12px;
}

.oim-article__hero {
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 16px;
}

.oim-article__hero img {
  display: block;
  width: 100%;
}

.oim-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
}

.oim-share a,
.oim-share button {
  padding: 8px 14px;
  border: 1px solid var(--oim-line);
  border-radius: 999px;
  background: #fff;
  color: var(--oim-brown);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.oim-article__content {
  font-size: 17px;
  line-height: 1.95;
}

.oim-article__content > *:first-child {
  margin-top: 0;
}

.oim-article__content h2 {
  margin: 2.5em 0 1em;
  padding: 14px 18px;
  border-left: 5px solid var(--oim-orange);
  background: #fff9ee;
  font-size: 28px;
  line-height: 1.55;
}

.oim-article__content h3 {
  margin: 2.1em 0 .8em;
  padding-bottom: 8px;
  border-bottom: 2px solid #eadfd4;
  font-size: 23px;
}

.oim-article__content h4 {
  margin: 1.8em 0 .6em;
  font-size: 20px;
}

.oim-article__content p {
  margin: 0 0 1.5em;
}

.oim-article__content img {
  border-radius: 10px;
}

.oim-article__content table {
  width: 100%;
  border-collapse: collapse;
}

.oim-article__content th,
.oim-article__content td {
  padding: 10px;
  border: 1px solid var(--oim-line);
}

.oim-post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--oim-line);
}

.oim-post-navigation div:last-child {
  text-align: right;
}

.oim-post-navigation a {
  font-weight: 700;
  text-decoration: none;
}

.oim-page-container {
  max-width: 900px;
  padding-top: 54px;
  padding-bottom: 80px;
}

.oim-not-found {
  padding: 100px 0;
  text-align: center;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--oim-line);
  border-radius: 999px;
  text-decoration: none;
}

.nav-links .current {
  border-color: var(--oim-orange);
  background: var(--oim-orange);
  color: #fff;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 1020px) {
  .oim-post-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oim-content-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 34px;
  }
}

@media (max-width: 860px) {
  .oim-content-layout {
    grid-template-columns: 1fr;
  }

  .oim-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .oim-breadcrumb {
    width: calc(100% - 24px);
  }

  .oim-blog-masthead__inner {
    padding-top: 38px;
    padding-bottom: 36px;
  }

  .oim-blog-masthead h1 {
    font-size: 30px;
  }

  .oim-blog-masthead__description {
    font-size: 13px;
  }

  .oim-front-container {
    padding-top: 38px;
    padding-bottom: 64px;
  }

  .oim-front-featured {
    padding-bottom: 42px;
  }

  .oim-content-layout--front {
    padding-top: 42px;
  }

  .oim-post-grid,
  .oim-post-grid--front,
  .oim-post-grid--featured,
  .oim-post-grid--related {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .oim-post-card__title {
    font-size: 18px;
  }

  .oim-sidebar {
    display: flex;
  }

  .oim-article__content {
    font-size: 16px;
  }

  .oim-article__content h2 {
    font-size: 23px;
  }

  .oim-post-navigation {
    grid-template-columns: 1fr;
  }

  .oim-post-navigation div:last-child {
    text-align: left;
  }
}

/* ========================================
   v1.2 サイドバー・記事一覧改善
======================================== */
.oim-sidebar-search-box {
  padding: 0;
}

.oim-sidebar-search input {
  min-height: 48px;
  padding: 11px 48px 11px 4px;
  border: 0;
  border-bottom: 1px solid #d9cec4;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
}

.oim-sidebar-search input:focus {
  border-color: var(--oim-orange);
  box-shadow: none;
}

.oim-sidebar-search button {
  right: 0;
  border-radius: 999px;
}

.oim-sidebar-ranking li {
  padding: 0;
}

.oim-sidebar-ranking li::before {
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  background: var(--oim-orange);
  color: #fff;
  box-shadow: 0 3px 8px rgba(90, 61, 43, .16);
}

.oim-sidebar-ranking li:nth-child(n + 4)::before {
  background: #8f8f8f;
  color: #fff;
}

.oim-sidebar-ranking a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.oim-sidebar-ranking__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #f4efea;
}

.oim-sidebar-ranking__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oim-sidebar-ranking__noimage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #aa998d;
  font-size: 9px;
}

.oim-sidebar-ranking__content {
  min-width: 0;
}

.oim-sidebar-ranking__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 13px;
  line-height: 1.5;
}

.oim-sidebar-cta-area {
  display: grid;
  gap: 14px;
}

.oim-sidebar-widget {
  overflow: hidden;
}

.oim-sidebar-widget > *:first-child {
  margin-top: 0;
}

.oim-sidebar-widget img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.oim-sidebar-banner {
  display: flex;
  min-height: 145px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff7e8 0%, #f4dfbd 100%);
  color: var(--oim-brown);
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(90, 61, 43, .08);
}

.oim-sidebar-banner--orange {
  background: linear-gradient(145deg, #ed7b2e 0%, #d95b11 100%);
  color: #fff;
}

.oim-sidebar-banner__eyebrow {
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.oim-sidebar-banner strong {
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  line-height: 1.45;
}

.oim-sidebar-banner > span:last-child {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
}

.oim-pagination {
  margin-top: 42px;
}

.oim-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oim-pagination a,
.oim-pagination span {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--oim-line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
}

.oim-pagination .current {
  border-color: var(--oim-orange);
  background: var(--oim-orange);
  color: #fff;
}

/* ========================================
   v1.3 検索・正方形バナー・レシピ
======================================== */
.oim-sidebar-search-box {
  padding: 0;
}

.oim-sidebar-search__row {
  overflow: hidden;
  border: 1px solid #d9cec4;
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.oim-sidebar-search__row:focus-within {
  border-color: var(--oim-orange);
  box-shadow: 0 0 0 3px rgba(235, 97, 0, .09);
}

.oim-sidebar-search input {
  min-height: 48px;
  padding: 11px 50px 11px 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.oim-sidebar-search input:focus {
  border: 0;
  box-shadow: none;
}

.oim-sidebar-search button {
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.oim-sidebar-image-banner,
.oim-sidebar-widget .wp-block-image a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: #f4efea;
  box-shadow: 0 7px 18px rgba(90, 61, 43, .08);
}

.oim-sidebar-image-banner img,
.oim-sidebar-widget .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform .35s ease;
}

.oim-sidebar-image-banner:hover img,
.oim-sidebar-widget .wp-block-image a:hover img {
  transform: scale(1.03);
}

.oim-sidebar-widget .wp-block-image {
  margin: 0;
}

.oim-archive-header--recipe {
  margin-bottom: 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--oim-line);
}

.oim-archive-header--recipe h1 {
  margin: 4px 0 12px;
}

.oim-archive-header--recipe p:last-child {
  margin: 0;
  color: #806b5d;
  line-height: 1.8;
}

.oim-recipe-article .oim-eyebrow {
  margin: 0 0 8px;
}

.oim-recipe-content h2 {
  border-left: 4px solid var(--oim-orange);
}


/* ========================================
   v1.4 一覧2カラム・独立トップ・バナーのみ追従
======================================== */

/* 記事・カテゴリー・検索・レシピの一覧はPCで2カラム */
.oim-post-grid--archive,
.oim-post-grid--front,
.oim-recipe-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* おすすめ記事のみ、トップ上部の3カラムを維持 */
.oim-post-grid--featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* サイドバー全体は追従させない */
.oim-sidebar {
  position: static;
  align-self: stretch;
  height: 100%;
}

/* 正方形バナーだけを追従 */
.oim-sidebar-cta-area {
  position: sticky;
  top: 92px;
  z-index: 2;
}

.oim-recipe-masthead {
  margin-top: 22px;
}

.oim-recipe-archive-layout {
  padding-top: 54px;
}

@media (max-width: 1020px) {
  .oim-post-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .oim-sidebar {
    height: auto;
  }

  .oim-sidebar-cta-area {
    position: static;
  }
}

@media (max-width: 640px) {
  .oim-post-grid--archive,
  .oim-post-grid--front,
  .oim-post-grid--featured,
  .oim-recipe-grid {
    grid-template-columns: 1fr;
  }

  .oim-recipe-masthead {
    margin-top: 14px;
  }
}

/* ========================================
   v1.5 レシピ専用サイドバー・カテゴリー
======================================== */
.oim-sidebar--recipe .oim-sidebar-box h2 {
  border-bottom-color: #f6dccb;
}

.oim-sidebar--recipe .oim-sidebar-search button {
  background: var(--oim-orange);
}

.oim-recipe-archive-layout .oim-archive-description {
  margin-top: 12px;
  color: #806b5d;
  line-height: 1.8;
}
