/*
Theme Name: Ichizen
Author: Ichizen
Version: 1.2
*/

/*
共通使仕様
*/
body {
  display: flex;
  flex-direction: column;
  /* cursor: url(/images/cursor.png) 0 0, auto; */
}

main {
  flex: 1;
}

a {
  text-decoration: none;
  color: #333;
  /* cursor: url(/images/cursor.png) 0 0, pointer; */
}

/* a:active {
  cursor: url(/images/click.png) 0 0, pointer;
} */

.nav__item a {
  transition-duration: .4s;
}

.nav__item a:hover {
  color: #aaa;
}

.contents__wrapper {
  margin: 0 auto;
  padding: 25px 0;
}

.contents-title {
  padding-bottom: 25px;
  border-bottom: solid 1px;
}

.contents {
  padding-top: 25px;
}

.post-detail,
.post-category {
  padding-top: 5px;
  font-size: 1rem;
}

.post-contents {
  width: 70%;
  margin: 0 auto;
  line-height: 1.7;
}

.site-footer {
  color: #333;
  padding: 20px 0;
  text-align: center;
}

/* ヘッダー */
/*
PCサイズ(min-width: 1024px)
*/
@media screen and (min-width: 1024px) {
  body {
    padding-top: 60px;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
  }

  .site-header__wrapper {
    padding-right: 60px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  .brand_wrapper {
    max-width: 200px;
  }

  .brand {
    display: block;
    padding: 0 1rem;
  }

  .logo {
    max-width: 100%;
    height: auto;
  }

  .nav {
    height: 100%;
  }

  .nav__wrapper {
    display: flex;
    height: 100%;
    align-items: center;
  }

  .nav__item {
    height: 100%;
    min-width: 120px;
    align-items: center;
  }

  .nav__item > a {
    display: block;
    padding: 0 1rem;
    height: 100%;
    align-items: center;
    text-align: center;
    line-height: 60px;
  }

  .nav-toggle {
    display: none;
  }

  .contents__wrapper {
    width: 75%;
  }

  .contents-title {
    font-size: 2rem;
  }

  .news-link {
    width: calc(50% - 12.5px);
    height: 250px;
    max-height: 250px;
  }

  .news-item {
    padding: 16px;
  }

  .news-thumb {
    max-width: 200px;
    flex: 0 0 200px;
  }

  .news-date {
    padding-bottom: 16px;
  }

  .news-title {
    padding-bottom: 24px;
    font-size: 1.4rem;
  }

  .news-detail {
    font-size: 0.9rem;
  }
}

/* ナビゲーショントグル */
/* スマホサイズ */
@media screen and (max-width: 1023px) {
  .site-header {
    position: relative;
    height: 60px;
  }

  /* ロゴ：中央 */
  .site-header__wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
  }

  .brand_wrapper {
    max-width: 200px;
  }

  .brand {
    display: block;
    padding: 0 1rem;
  }

  .logo {
    max-width: 100%;
    height: auto;
  }

  /* ハンバーガーボタン */
  .nav-toggle {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);

    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-toggle span {
    position: absolute;
    width: 20px;
    height: 1px;
    background-color: #000;
    transition: 0.3s ease;
  }

  /* 上 */
  .nav-toggle span:nth-child(1) {
    transform: translateY(-6px);
  }

  /* 中（完全中央） */
  .nav-toggle span:nth-child(2) {
    transform: translateY(0);
  }

  /* 下 */
  .nav-toggle span:nth-child(3) {
    transform: translateY(6px);
  }

  /* ===== open時（×になる） ===== */
  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
  }

  /* nav：全画面（初期は非表示） */
  .nav {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 1000;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  /* 表示時 */
  .nav.open {
    opacity: 1;
    visibility: visible;
  }

  /* メニューリスト */
  .nav__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .nav__item a {
    font-size: 20px;
  }

  .contents__wrapper {
    width: 90%;
  }

  .contents-title {
    font-size: 1.5rem;
  }

  .news-link {
    width: 100%;
    height: 200px;
    max-height: 200px;
  }

  .news-item {
    padding: 4px;
  }

  .news-thumb {
    max-width: 100px;
    flex: 0 0 100px;
  }

  .news-date {
    padding: 8px 0 16px 0;
  }

  .news-title {
    padding-bottom: 24px;
    font-size: 1.2rem;
  }

  .news-detail {
    font-size: 0.8rem;
  }

  .post-contents {
    width: 90%;
  }

  .site-footer {
    font-size: 0.8rem;
  }
}

/*
投稿一覧
*/
.news-list {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.news-link {
  display: block;
  transition-duration: .4s;
}

.news-link:hover {
  transform: scale(1.05);
}

.news-item {
  display: flex;
  width: 100%;
  height: 100%;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  overflow: hidden;
}

.news-thumb {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
}

.news-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.news-description {
  padding-left: 16px;
  flex: 1;
}

.news-date {
  font-size: 0.8rem;
  color: #888;
}

.news-title {
  color: #333;
}

.news-detail {
  color: #555;
}

.view-more {
  text-align: center;
  line-height: calc(250px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
