/*
Theme Name: Hirarin Portfolio
Theme URI: https://www.sota-hirarin.website
Author: Sota Hirarin
Author URI: https://www.sota-hirarin.website
Description: フリーランスフロントエンドエンジニア・平林颯太のポートフォリオサイト兼活動記録用オリジナルテーマ。制作実績の紹介と日々の活動を記録するブログ機能を備えています。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hirarin-portfolio
Tags: portfolio, blog, custom-menu, featured-images, custom-post-type, translation-ready, responsive-layout
*/

/* ページ内リンクのスクロール位置調整 */
.scroll-point {
  scroll-margin-top: 120px;
}

@media screen and (max-width: 990px) {
  .scroll-point {
    scroll-margin-top: 95px;
  }
}

/* ヘッダー検索フォーム */
.header-search {
  position: relative;
  margin-left: 20px;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #333;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-toggle:hover {
  color: #2e98e5;
}

.search-toggle svg {
  width: 20px;
  height: 20px;
}

.search-form-container {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  min-width: 300px;
  display: none;
  z-index: 1000;
}

.search-form-container.active {
  display: block;
}

.header-search .search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-search .search-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #666;
  font-size: 14px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.header-search .search-submit {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #333;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search .search-submit:hover {
  color: #2e98e5;
}

.header-search .search-submit svg {
  width: 20px;
  height: 20px;
}

/* サイドバーと検索結果ページの検索フォームボタンスタイル */
.sidebar .search-form button[type="submit"],
.sidebar .search-form input[type="submit"],
body.search .search-form-wrapper .search-form button[type="submit"],
body.search .search-form-wrapper .search-form input[type="submit"] {
  padding: 8px 16px;
  border: 2px solid #333;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: normal;
  min-width: 80px;
}

.sidebar .search-form button[type="submit"]:hover,
.sidebar .search-form input[type="submit"]:hover,
body.search .search-form-wrapper .search-form button[type="submit"]:hover,
body.search .search-form-wrapper .search-form input[type="submit"]:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}

.sidebar .search-form button[type="submit"] svg,
body.search .search-form-wrapper .search-form button[type="submit"] svg {
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

@media screen and (max-width: 990px) {
  .header-search {
    display: none !important;
  }

  .search-toggle {
    display: none !important;
  }
}

#header h1 {
  display: block;
  visibility: visible;
}

#header h1 a {
  display: block;
  text-decoration: none;
}

#header h1 .bgappearTrigger {
  opacity: 1 !important;
  display: inline-block;
}

#pc-nav {
  display: block;
  visibility: visible;
}

@media screen and (max-width: 990px) {
  #pc-nav {
    display: none !important;
  }
}

#pc-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

#pc-nav li {
  display: list-item;
}

#pc-nav li a {
  display: block;
  text-decoration: none;
}

#pc-nav li a .bgappearTrigger {
  opacity: 1 !important;
  display: inline-block;
}

#top-main {
  display: block;
  visibility: visible;
}

.top-lead {
  display: block;
  visibility: visible;
}

.top-lead .bgappearTrigger {
  opacity: 1 !important;
  display: inline-block;
}

.bx-wrapper {
  margin-bottom: 0 !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

.slider a {
  transition: all 0.3s;
}

.slider a:hover {
  color: #2e98e5;
}

.slider-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-category {
  font-size: 12px;
  color: #999;
  padding: 2px 8px;
  background: #f5f5f5;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-block;
  margin-left: 8px;
  transition: all 0.3s;
}

.slider-category:hover {
  background: #e0e0e0;
  color: #666;
}

.cat-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.topics-more {
  margin-top: 20px;
  text-align: left;
}

#vision .img.flipLeftTrigger {
  display: block;
  visibility: visible;
}

#vision .img.flipLeft {
  opacity: 1 !important;
}

body.single #container,
body.page #container {
  padding-top: 120px;
}

body.single-post #container {
  padding-top: 0;
}

@media screen and (max-width: 990px) {
  body.single #container,
  body.page #container {
    padding-top: 75px;
  }

  body.single-post #container {
    padding-top: 0;
  }
}

body.blog #container,
body.home.blog #container,
body.search #container,
body.category #container {
  padding-top: 0;
}

body.blog #main-area,
body.home.blog #main-area,
body.search #main-area,
body.category #main-area {
  padding-top: 0;
}

@media screen and (max-width: 990px) {
  body.blog #container,
  body.home.blog #container,
  body.search #container,
  body.category #container {
    padding-top: 0;
  }
}

body.single .entry-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  display: block;
}

body.single .entry-title {
  position: static !important;
  top: auto !important;
  left: auto !important;
  margin-bottom: 20px;
  margin-top: 20px;
  font-size: 2rem;
  line-height: 1.4;
  display: block;
  text-transform: none !important;
  letter-spacing: normal !important;
}

body.single .entry-meta {
  margin-bottom: 0;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #777;
  display: block;
}

body.single .entry-meta time {
  margin-right: 10px;
}

body.single .entry-content {
  margin-top: 40px;
  line-height: 1.8;
  display: block;
  font-size: 1rem;
}

body.single .entry-content p {
  margin-bottom: 1.5em;
  font-size: 1rem;
}

body.single .entry-content h2 {
  font-size: 1.5rem;
  text-transform: none;
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: bold;
  line-height: 1.5;
}

body.single .entry-content h3 {
  font-size: 1.3rem;
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: bold;
  line-height: 1.5;
}

body.single .entry-content h4 {
  font-size: 1.1rem;
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: bold;
  line-height: 1.5;
}

body.single .entry-content h5,
body.single .entry-content h6 {
  font-size: 1rem;
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: bold;
  line-height: 1.5;
}

body.single .post-thumbnail {
  margin: 30px 0;
}

body.single .entry-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

body.single .post-navigation {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

body.single .back-to-list {
  text-align: center;
}

@media screen and (max-width: 768px) {
  body.single .entry-title {
    font-size: 1.5rem;
  }
}

body.blog .page-header,
body.home.blog .page-header,
body.search .page-header,
body.category .page-header {
  padding-top: 0;
  padding-bottom: 20px;
  border-left: 3px solid #000;
  padding-left: 20px;
  position: relative;
  display: block;
}

body.blog .page-title,
body.home.blog .page-title,
body.search .page-title,
body.category .page-title {
  font-size: 1.5rem;
  margin: 0 !important;
  padding: 0;
  text-transform: uppercase;
  display: block;
}

body.search .page-title .search-query {
  text-transform: none;
  font-weight: normal;
  color: #2e98e5;
}

body.blog .posts-list,
body.home.blog .posts-list,
body.search .posts-list,
body.category .posts-list {
  margin-top: 0 !important;
  padding-top: 50px !important;
  border-left: 3px solid #000;
  padding-left: 20px;
  display: block;
}

body.blog .posts-list article,
body.home.blog .posts-list article,
body.search .posts-list article,
body.category .posts-list article {
  margin-bottom: 60px;
  padding-bottom: 30px;
  border-bottom: 1px dashed #ccc;
}

body.blog .posts-list article:last-child,
body.home.blog .posts-list article:last-child,
body.search .posts-list article:last-child,
body.category .posts-list article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

body.blog .entry-header,
body.home.blog .entry-header,
body.search .entry-header,
body.category .entry-header {
  margin-bottom: 20px;
}

body.blog .entry-title,
body.home.blog .entry-title,
body.search .entry-title,
body.category .entry-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

body.blog .entry-title a,
body.home.blog .entry-title a,
body.search .entry-title a,
body.category .entry-title a {
  color: #333;
  text-decoration: none;
  transition: all 0.3s;
}

body.blog .entry-title a:hover,
body.home.blog .entry-title a:hover,
body.search .entry-title a:hover,
body.category .entry-title a:hover {
  color: #2e98e5 !important;
}

body.blog .entry-meta,
body.home.blog .entry-meta,
body.search .entry-meta,
body.category .entry-meta {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #777;
}

body.blog .entry-meta time,
body.home.blog .entry-meta time,
body.search .entry-meta time,
body.category .entry-meta time {
  margin-right: 10px;
}

body.blog .entry-meta time::after,
body.home.blog .entry-meta time::after,
body.search .entry-meta time::after,
body.category .entry-meta time::after {
  content: " ";
}

body.blog .post-thumbnail,
body.home.blog .post-thumbnail,
body.search .post-thumbnail,
body.category .post-thumbnail {
  margin: 20px 0;
}

body.blog .post-thumbnail img,
body.home.blog .post-thumbnail img,
body.search .post-thumbnail img,
body.category .post-thumbnail img {
  width: 100%;
  height: auto;
}

body.blog .entry-content,
body.home.blog .entry-content,
body.search .entry-content,
body.category .entry-content {
  margin-top: 20px;
  line-height: 1.8;
}

body.blog .entry-content p,
body.home.blog .entry-content p,
body.search .entry-content p,
body.category .entry-content p {
  margin-bottom: 1.2em;
}

body.blog .read-more,
body.home.blog .read-more,
body.search .read-more,
body.category .read-more {
  margin-top: 20px;
  text-align: left;
}

body.blog .pagination,
body.home.blog .pagination,
body.search .pagination,
body.category .pagination {
  margin-top: 60px;
  padding-top: 0;
  border-top: none;
  text-align: center;
}

@media screen and (max-width: 768px) {
  body.blog .page-header,
  body.blog .posts-list,
  body.home.blog .page-header,
  body.home.blog .posts-list,
  body.search .page-header,
  body.search .posts-list,
  body.category .page-header,
  body.category .posts-list {
    padding-left: 15px;
  }

  body.blog .entry-title,
  body.home.blog .entry-title,
  body.search .entry-title,
  body.category .entry-title {
    font-size: 1.1rem;
  }

  body.blog .posts-list article,
  body.home.blog .posts-list article,
  body.search .posts-list article,
  body.category .posts-list article {
    margin-bottom: 40px;
    padding-bottom: 20px;
  }
}

/* サイドバーレイアウト */
body.blog .content-with-sidebar,
body.home.blog .content-with-sidebar,
body.search .content-with-sidebar,
body.category .content-with-sidebar,
body.single-post .content-with-sidebar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 40px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 150px 0 50px;
}

body.blog .content-primary,
body.home.blog .content-primary,
body.search .content-primary,
body.category .content-primary,
body.single-post .content-primary {
  flex: 1 1 auto;
  min-width: 0;
  order: 1;
}

body.blog #main-area,
body.home.blog #main-area,
body.search #main-area,
body.category #main-area,
body.single-post #main-area {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.blog .sidebar,
body.home.blog .sidebar,
body.search .sidebar,
body.category .sidebar,
body.single-post .sidebar {
  flex: 0 0 300px;
  width: 300px;
  order: 2;
}

body.single-post #container {
  padding-top: 0;
}

/* サイドバーウィジェットスタイル */
.sidebar .widget {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.sidebar .widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar .widget-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2e98e5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333;
  font-family: 'Lato', sans-serif;
}

.sidebar .wp-block-heading {
  font-size: 1.6rem;
}

@media screen and (max-width: 768px) {
  .sidebar .widget-title,
  .sidebar .wp-block-heading {
    font-size: 1.2rem;
  }
}

.sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar .widget ul li {
  margin-bottom: 12px;
  padding-left: 0;
  line-height: 1.6;
}

.sidebar .widget ul li:last-child {
  margin-bottom: 0;
}

.sidebar .widget ul li a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
  display: block;
}

.sidebar .widget ul li a:hover {
  color: #2e98e5;
}

.sidebar .widget .count {
  color: #777;
  font-size: 0.9em;
  margin-left: 5px;
}

.sidebar .widget_recent_entries ul li a {
  font-size: 0.95rem;
}

/* サイドバー内の検索フォーム */
.sidebar .search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.sidebar .search-form .search-field {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #666;
  font-size: 14px;
  min-width: 0;
}

.sidebar .search-form .search-submit,
.sidebar .search-form button[type="submit"],
.sidebar .search-form input[type="submit"] {
  padding: 8px 16px;
  border: 2px solid #333;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: normal;
  min-width: 80px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar .search-form .search-submit:hover,
.sidebar .search-form button[type="submit"]:hover,
.sidebar .search-form input[type="submit"]:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}

.sidebar .search-form .search-submit svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* 最近のコメントを完全に非表示 */
.sidebar .widget_recent_comments,
.sidebar .wp-block-latest-comments,
.sidebar section.widget_recent_comments,
.sidebar section:has(.wp-block-latest-comments) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ウィジェット側の検索を非表示（カスタム検索フォーム以外） */
.sidebar .widget_search:not(.sidebar-custom-search),
.sidebar .wp-block-search {
  display: none !important;
}

/* サイドバー検索フォーム：タイトル・ボーダーなし */
.sidebar .sidebar-custom-search {
  border-bottom: none;
  padding-bottom: 20px;
}

.sidebar .sidebar-custom-search .search-form {
  margin-top: 0;
}

/* モバイル対応 */
@media screen and (max-width: 990px) {
  body.blog .content-with-sidebar,
  body.home.blog .content-with-sidebar,
  body.search .content-with-sidebar,
  body.category .content-with-sidebar,
  body.single-post .content-with-sidebar {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 30px;
    padding: 125px 0 50px;
  }

  body.blog .content-primary,
  body.home.blog .content-primary,
  body.search .content-primary,
  body.category .content-primary,
  body.single-post .content-primary {
    order: 1;
  }

  body.blog .sidebar,
  body.home.blog .sidebar,
  body.search .sidebar,
  body.category .sidebar,
  body.single-post .sidebar {
    flex: 1 1 auto;
    width: 100%;
    order: 2;
  }

  body.single-post #container {
    padding-top: 0;
  }
}

  .sidebar .widget {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }
}

body.post-type-archive-work #container,
body.archive.work #container {
  padding-top: 120px;
}

@media screen and (max-width: 990px) {
  body.post-type-archive-work #container,
  body.archive.work #container {
    padding-top: 75px;
  }
}

body.post-type-archive-work .page-header,
body.archive.work .page-header {
  padding-top: 0;
  padding-bottom: 50px;
  border-left: none;
  padding-left: 0;
  position: relative;
  display: block;
  margin-bottom: 0;
}

body.post-type-archive-work .page-title,
body.archive.work .page-title {
  font-size: 1.5rem;
  margin: 0 !important;
  padding: 0;
  text-transform: uppercase;
  display: block;
}

body.post-type-archive-work .page-header .works-note,
body.archive.work .page-header .works-note {
  margin-top: 20px;
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.8;
}

body.post-type-archive-work .works-list,
body.archive.work .works-list {
  margin-top: 0 !important;
  padding-top: 50px !important;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  border-left: none;
  padding-left: 0;
}

body.post-type-archive-work .works-list .work-item,
body.archive.work .works-list .work-item {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.post-type-archive-work .works-list .work-item:last-of-type,
body.archive.work .works-list .work-item:last-of-type {
  border-bottom: none;
}

body.post-type-archive-work .work-thumbnail,
body.archive.work .work-thumbnail {
  margin: 0;
  width: 100%;
  overflow: hidden;
}

body.post-type-archive-work .work-thumbnail img,
body.archive.work .work-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

body.post-type-archive-work .work-thumbnail:hover img,
body.archive.work .work-thumbnail:hover img {
  transform: scale(1.05);
}

body.post-type-archive-work .entry-header,
body.archive.work .entry-header {
  margin-bottom: 15px;
  padding: 20px 20px 0;
}

body.post-type-archive-work .entry-title,
body.archive.work .entry-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

body.post-type-archive-work .entry-title a,
body.archive.work .entry-title a {
  color: #333;
  text-decoration: none;
  transition: all 0.3s;
}

body.post-type-archive-work .entry-title a:hover,
body.archive.work .entry-title a:hover {
  color: #2e98e5 !important;
}

body.post-type-archive-work .entry-meta,
body.archive.work .entry-meta {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #777;
}

body.post-type-archive-work .work-type,
body.archive.work .work-type {
  margin-right: 10px;
  font-weight: bold;
}

body.post-type-archive-work .genre-links,
body.archive.work .genre-links {
  margin-left: 10px;
}

body.post-type-archive-work .genre-links a,
body.archive.work .genre-links a {
  color: #777;
  text-decoration: none;
}

body.post-type-archive-work .genre-links a:hover,
body.archive.work .genre-links a:hover {
  color: #2e98e5;
}

body.post-type-archive-work .entry-content,
body.archive.work .entry-content {
  margin-top: 0;
  padding: 0 20px 20px;
  line-height: 1.8;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

body.post-type-archive-work .entry-content p,
body.archive.work .entry-content p {
  margin-bottom: 1.2em;
}

body.post-type-archive-work .work-actions,
body.archive.work .work-actions {
  margin-top: auto;
  padding-top: 20px;
  text-align: left;
}

body.post-type-archive-work .work-actions a,
body.archive.work .work-actions a {
  margin-right: 10px;
}

body.post-type-archive-work .pagination,
body.archive.work .pagination {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #eee;
  text-align: center;
}

body.single.work #container {
  padding-top: 120px;
}

@media screen and (max-width: 990px) {
  body.single.work #container {
    padding-top: 75px;
  }
}

body.single.work .entry-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  display: block;
}

body.single.work .entry-title {
  position: static !important;
  top: auto !important;
  left: auto !important;
  margin-bottom: 20px;
  margin-top: 20px;
  font-size: 2rem;
  line-height: 1.4;
  display: block;
  text-transform: none !important;
  letter-spacing: normal !important;
}

body.single.work .entry-meta {
  margin-bottom: 0;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #777;
  display: block;
}

body.single.work .work-type {
  margin-right: 10px;
  font-weight: bold;
}

body.single.work .genre-links {
  margin-left: 10px;
}

body.single.work .genre-links a {
  color: #777;
  text-decoration: none;
}

body.single.work .genre-links a:hover {
  color: #2e98e5;
}

body.single.work .entry-content {
  margin-top: 40px;
  line-height: 1.8;
  display: block;
  font-size: 1rem;
}

body.single.work .entry-content p {
  margin-bottom: 1.5em;
  font-size: 1rem;
}

body.single.work .entry-content h2 {
  font-size: 1.5rem;
  text-transform: none;
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: bold;
  line-height: 1.5;
}

body.single.work .entry-content h3 {
  font-size: 1.3rem;
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: bold;
  line-height: 1.5;
}

body.single.work .entry-content h4 {
  font-size: 1.1rem;
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: bold;
  line-height: 1.5;
}

body.single.work .post-thumbnail {
  margin: 30px 0;
}

body.single.work .work-url {
  margin-top: 40px;
  text-align: center;
}

body.single.work .post-navigation {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

body.single.work .back-to-list {
  text-align: center;
}

@media screen and (max-width: 768px) {
  body.post-type-archive-work .page-header,
  body.archive.work .page-header {
    padding-left: 0;
    padding-bottom: 30px;
  }

  body.post-type-archive-work .works-list,
  body.archive.work .works-list {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-left: 0;
  }

  body.post-type-archive-work .page-header .works-note,
  body.archive.work .page-header .works-note {
    font-size: 13px;
    margin-top: 15px;
  }

  body.post-type-archive-work .entry-title,
  body.archive.work .entry-title {
    font-size: 1.2rem;
  }

  body.post-type-archive-work .works-list .work-item,
  body.archive.work .works-list .work-item {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  body.single.work .entry-title {
    font-size: 1.5rem;
  }
}

#works .works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

#works .work-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 0 20px #ccc;
  overflow: hidden;
}

#works .work-card .img {
  width: 100%;
  margin: 0;
  padding: 0;
}

#works .work-card .img img {
  width: 100%;
  height: auto;
  display: block;
}

#works .work-card .content {
  padding: 20px;
  flex: 1;
  display: flex;
  align-items: center;
}

#works .work-card .content-area {
  width: 100%;
}

#works .work-card h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

#works .work-card h3 span {
  display: block;
  font-size: 0.9rem;
  color: #2e98e5;
  margin-bottom: 5px;
}

#works .work-card p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 15px;
  color: #333;
}

#works .work-card .btn {
  margin-top: 15px;
  text-align: left;
}

#works .works-note {
  margin-top: 20px;
  margin-bottom: 40px;
  font-size: 14px;
  color: #666;
  text-align: center;
  line-height: 1.8;
}

#works .works-more {
  margin-top: 50px;
  text-align: center;
}

@media screen and (max-width: 1024px) {
  #works .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media screen and (max-width: 768px) {
  #works .works-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  #works .works-note {
    font-size: 13px;
    margin-top: 15px;
    margin-bottom: 30px;
  }
}

/* 固定ページのスタイル */
body.page .page-header {
  padding-top: 0;
  padding-bottom: 50px;
  margin-bottom: 0;
}

body.page .page-title {
  font-size: 1.5rem;
  margin: 0 !important;
  padding: 0;
  text-transform: uppercase;
  display: block;
}

body.page .page-thumbnail {
  margin: 0 0 30px 0;
}

body.page .page-thumbnail img {
  width: 100%;
  height: auto;
}

body.page .entry-content {
  line-height: 1.8;
}

body.page .entry-content p {
  margin-bottom: 1.2em;
}

body.page .entry-content h2 {
  font-size: 1.5rem;
  margin-top: 2em;
  margin-bottom: 1em;
  text-transform: none;
}

body.page .entry-content h3 {
  font-size: 1.3rem;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  text-transform: none;
}

body.page .entry-content ul,
body.page .entry-content ol {
  margin: 1em 0;
  padding-left: 2em;
}

body.page .entry-content li {
  margin-bottom: 0.5em;
}

@media screen and (max-width: 768px) {
  body.page .page-header {
    padding-bottom: 30px;
  }

  body.page .page-title {
    font-size: 1.3rem;
  }
}

/* サイトマップページ */
.sitemap-content {
  max-width: 900px;
  margin: 0 auto;
}

.sitemap-section {
  margin-bottom: 3em;
}

.sitemap-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #2e98e5;
  color: #2e98e5;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list li {
  padding: 0.8em 0;
  border-bottom: 1px dotted #ddd;
  line-height: 1.6;
}

.sitemap-list li:last-child {
  border-bottom: none;
}

.sitemap-list a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.sitemap-list a:hover {
  color: #2e98e5;
}

.sitemap-count,
.sitemap-date {
  color: #888;
  font-size: 0.9em;
  margin-left: 0.5em;
}

@media screen and (max-width: 768px) {
  .sitemap-section {
    margin-bottom: 2em;
  }

  .sitemap-section h2 {
    font-size: 1.3rem;
  }

  .sitemap-list li {
    padding: 0.6em 0;
  }

  .sitemap-count,
  .sitemap-date {
    display: block;
    margin-left: 0;
    margin-top: 0.3em;
  }
}

/* 404エラーページ */
body.error404 #container {
  padding-top: 120px;
}

@media screen and (max-width: 990px) {
  body.error404 #container {
    padding-top: 75px;
  }
}

.error-404 .page-header {
  padding-top: 0;
  padding-bottom: 50px;
  margin-bottom: 0;
}

.error-404 .page-title {
  font-size: 3rem;
  margin: 0 !important;
  padding: 0;
  text-align: center;
  color: #2e98e5;
  position: static !important;
  top: auto !important;
  left: auto !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
}

.error-404 .entry-content {
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.error-404 .entry-content p {
  margin-bottom: 1.5em;
  font-size: 1rem;
}

.error-404-actions {
  margin: 40px 0;
}

.error-404-actions p {
  margin-bottom: 30px;
}

.error-404-actions .search-form {
  max-width: 400px;
  margin: 0 auto;
}

.error-404-actions .search-form input[type="search"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #666;
  font-size: 16px;
}

.error-404-actions .search-form input[type="submit"] {
  margin-top: 10px;
  padding: 10px 20px;
  border: 2px solid #333;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
}

.error-404-actions .search-form input[type="submit"]:hover {
  background: #333;
  color: #fff;
}

.error-404-links {
  margin-top: 60px;
  text-align: left;
}

.error-404-links h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
  color: #333;
}

.error-404-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 400px;
  margin: 0 auto;
}

.error-404-links li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.error-404-links li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #2e98e5;
}

.error-404-links a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.error-404-links a:hover {
  color: #2e98e5;
}

@media screen and (max-width: 768px) {
  .error-404 .page-title {
    font-size: 2rem;
  }

  .error-404 .entry-content {
    padding: 0 20px;
  }

  .error-404-links {
    margin-top: 40px;
  }
}

/* 検索結果ページ */
body.search .no-results {
  margin-top: 40px;
}

body.search .no-results .entry-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

body.search .no-results .entry-content p {
  margin-bottom: 1.5em;
}

body.search .search-form-wrapper {
  margin-top: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

body.search .search-form-wrapper .search-form {
  display: flex;
  gap: 10px;
}

body.search .search-form-wrapper .search-form input[type="search"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #666;
  font-size: 16px;
}

body.search .search-form-wrapper .search-form input[type="submit"],
body.search .search-form-wrapper .search-form button[type="submit"] {
  padding: 10px 20px;
  border: 2px solid #333;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: normal;
  min-width: 100px;
}

body.search .search-form-wrapper .search-form input[type="submit"]:hover,
body.search .search-form-wrapper .search-form button[type="submit"]:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}

@media screen and (max-width: 768px) {
  body.search .search-form-wrapper .search-form {
    flex-direction: column;
  }

  body.search .search-form-wrapper .search-form input[type="submit"] {
    width: 100%;
  }
}

/* Contact Form 7のスタイル（既存のフォームスタイルに合わせる） */
#contact .wpcf7-form {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

#contact .wpcf7-form p {
  margin: 0;
  padding: 0;
}

#contact .wpcf7-form dl {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 0 20px 0;
  margin: 0;
}

#contact .wpcf7-form dt {
  width: 30%;
  margin: 0;
  padding: 0;
}

#contact .wpcf7-form dd {
  width: 66%;
  margin: 0;
  padding: 0;
}

#contact .wpcf7-form label {
  margin: 0;
  padding: 0;
  display: block;
}

#contact .wpcf7-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

#contact .wpcf7-form input[type="text"],
#contact .wpcf7-form input[type="email"],
#contact .wpcf7-form input[type="tel"],
#contact .wpcf7-form textarea {
  width: 100%;
  border: 1px solid #666;
  background: #fff;
  padding: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
  font-size: 16px;
}

#contact .wpcf7-form input[type="text"],
#contact .wpcf7-form input[type="email"],
#contact .wpcf7-form input[type="tel"] {
  height: 50px;
}

#contact .wpcf7-form textarea {
  height: 200px;
}

#contact .wpcf7-form input[type="submit"] {
  border: 2px solid #333;
  color: #333;
  text-align: center;
  padding: 5px 20px;
  width: 152px;
  margin: 0 auto;
  display: block;
  transition: all 0.3s;
  background: #fff;
  cursor: pointer;
}

#contact .wpcf7-form input[type="submit"]:hover {
  background: #333;
  color: #fff;
}

#contact .wpcf7-form .wpcf7-submit {
  width: 152px;
  margin: 0 auto;
  display: block;
}

#contact .wpcf7-response-output {
  margin: 20px 0;
  padding: 10px;
  border: 1px solid #666;
  background: #fff;
}

#contact .wpcf7-mail-sent-ok {
  border-color: #46b450;
  background: #f0f8f0;
}

#contact .wpcf7-mail-sent-ng,
#contact .wpcf7-aborted,
#contact .wpcf7-spam {
  border-color: #dc3232;
  background: #fff0f0;
}

#contact .wpcf7-validation-errors,
#contact .wpcf7-acceptance-missing {
  border-color: #ffb900;
  background: #fffbf0;
}

#contact .wpcf7-not-valid-tip {
  color: #dc3232;
  font-size: 0.9rem;
  margin-top: 5px;
  display: block;
}

@media screen and (max-width: 768px) {
  #contact .wpcf7-form label {
    width: 100%;
    margin: 0 0 10px 0;
  }

  #contact .wpcf7-form .wpcf7-form-control-wrap {
    width: 100%;
  }
}
