/* Theme Name: shirouto-lab */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111;
  color: #fff;
  line-height: 1.7;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ヘッダー */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #1e1e1e;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.logo span {
  color: #e60023;
}

.header-left,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.header-right {
  justify-content: flex-end;
}

.header-center a {
  color: #bbb;
  text-decoration: none;
  font-size: 13px;
}

.header-center a:hover {
  color: #fff;
}

/* ヒーロー */
.hero {
  text-align: center;
  padding: 56px 20px 44px;
  background: #0a0a0a;
  border-bottom: 1px solid #1e1e1e;
}

.hero h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.4;
}

.hero p {
  font-size: 13px;
  color: #999;
}

.category-description,
.tag-description {
  max-width: 760px;
  margin: 12px auto 0;
  font-size: 13px;
  color: #aaa;
  line-height: 1.8;
}

/* セクション */
.section {
  padding: 28px 20px;
  border-bottom: 1px solid #1a1a1a;
  max-width: 1000px;
  margin: auto;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 17px;
  font-weight: 700;
  border-left: 3px solid #e60023;
  padding-left: 10px;
}

/* 記事リスト */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-item {
  color: #fff;
  border-radius: 8px;
  background: #161616;
  border: 1px solid #222;
  transition: border-color 0.2s, transform 0.2s;
  padding: 0;
  overflow: hidden;
}

.post-item:hover {
  border-color: #444;
  transform: translateY(-1px);
}

.post-item-link {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  color: inherit;
  text-decoration: none;
  align-items: flex-start;
}

.post-item-link:hover {
  text-decoration: none;
}

.post-thumb {
  width: 300px;
  height: 170px;
  background: #2a2a2a;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: hidden;
}

.post-thumb img {
  /* width: 100%;
  height: 100%; */
  object-fit: cover;
  display: block;
}

.post-info {
  flex: 1;
  min-width: 0;
}

.post-taxonomies {
  margin-bottom: 6px;
}

.post-cat {
  display: inline-block;
  font-size: 12px;
  color: #e60023;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

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

.post-cat a:hover {
  text-decoration: underline;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-tag {
  display: inline-block;
  font-size: 11px;
  line-height: 1.4;
  color: #999;
  background: #202020;
  border: 1px solid #2d2d2d;
  border-radius: 999px;
  padding: 3px 8px;
}

.post-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
}

.post-excerpt {
  font-size: 13px;
  line-height: 1.9;
  color: #8f8f8f;
}

.post-date {
  font-size: 11px;
  color: #666;
}

/* ランキング */
.rank-badge {
  font-size: 24px;
  font-weight: 800;
  min-width: 24px;
  color: #555;
  flex-shrink: 0;
  padding-top: 2px;
  align-self: flex-start;
}

/* ジャンル */
.genre-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.genre-links a {
  background: #1a1a1a;
  padding: 8px 14px;
  border-radius: 20px;
  text-decoration: none;
  color: #bbb;
  font-size: 12px;
  border: 1px solid #2a2a2a;
  transition: all 0.2s;
}

.genre-links a:hover {
  color: #fff;
  border-color: #555;
}

/* ページネーション */
.pagination {
  margin-top: 24px;
  text-align: center;
}

.pagination .page-numbers {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #bbb;
  text-decoration: none;
  font-size: 13px;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  color: #fff;
  border-color: #555;
}

/* お問い合わせ */
.wpcf7 {
  max-width: 600px;
  margin: auto;
}

.wpcf7 label {
  display: block;
  font-size: 13px;
  margin-top: 15px;
}

.wpcf7 input,
.wpcf7 textarea {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  border-radius: 6px;
}

.wpcf7 textarea {
  min-height: 140px;
}

.wpcf7 input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.wpcf7 input[type="submit"] {
  background: #e60023;
  border: none;
  cursor: pointer;
  font-weight: bold;
  margin-top: 20px;
}

.consent {
  font-size: 12px;
  color: #aaa;
}

/* フッター */
.footer {
  text-align: center;
  padding: 20px;
  background: #000;
  font-size: 11px;
  color: #555;
  border-top: 1px solid #1a1a1a;
}

.footer a {
  color: #555;
  text-decoration: none;
}

/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #fff;
  display: block;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* モバイルメニュー */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100%;
  background: #111;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: right 0.3s ease;
  z-index: 200;
}

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.mobile-menu.active {
  right: 0;
}

.search {
  display: flex;
}

.search input {
  width: 100%;
  padding: 8px;
  background: #222;
  border: none;
  color: #fff;
  margin-right: 10px;
}

.search button {
  width: 60px;
  background: #222;
  border: none;
  color: #fff;
}

/* サイト説明 */
.about {
  padding: 28px 20px;
  background: #0d0d0d;
}

.about-box {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 20px;
  max-width: 960px;
  margin: auto;
}

.about-box h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-box p {
  font-size: 13px;
  color: #999;
  line-height: 1.7;
}

/* レスポンシブ */
@media (max-width: 945px) {
  .hero h1 {
    font-size: 19px;
  }

  .header-center,
  .header-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .post-thumb {
    width: 144px;
    height: 100px;
  }

  .post-item-link {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 22px 14px;
  }

  .post-item-link {
    flex-direction: column;
  }

  .post-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-badge {
    font-size: 18px;
    min-width: auto;
    padding-top: 0;
  }

  .post-excerpt {
    font-size: 12px;
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 42px 14px 32px;
  }

  .hero h1 {
    font-size: 17px;
  }

  .section-header h2 {
    font-size: 15px;
  }

  .post-title {
    font-size: 14px;
  }

  .post-excerpt {
    font-size: 12px;
  }
}

/* 固定ページ・汎用本文エリア */
.content-area {
  padding: 40px 20px;
}

.content-area__inner {
  max-width: 820px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.9;
  color: #ddd;
}

.content-area h2 {
  font-size: 20px;
  margin: 0 0 18px;
  border-left: 4px solid #e60023;
  padding-left: 10px;
  color: #fff;
  line-height: 1.5;
}

.content-area h3 {
  font-size: 16px;
  margin: 30px 0 12px;
  color: #fff;
  line-height: 1.5;
}

.content-area p {
  margin-bottom: 18px;
  color: #bbb;
}

.content-area a {
  color: #e60023;
  text-decoration: underline;
}

.content-area a:hover {
  color: #fff;
}

.content-area ul,
.content-area ol {
  margin: 15px 0 20px;
  padding-left: 20px;
}

.content-area li {
  margin-bottom: 8px;
}

/* 固定ページ内の情報ボックス風 */
.content-area__inner > p,
.content-area__inner > h2,
.content-area__inner > h3 {
  max-width: 100%;
}

/* スマホ */
@media (max-width: 768px) {
  .content-area {
    padding: 28px 14px;
  }

  .content-area__inner {
    font-size: 14px;
    line-height: 1.8;
  }

  .content-area h2 {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .content-area h3 {
    font-size: 15px;
    margin: 24px 0 10px;
  }
}

@media (max-width: 480px) {
  .content-area h2 {
    font-size: 17px;
  }

  .content-area h3 {
    font-size: 14px;
  }
}

/* 一覧カード：カテゴリー・タグ・日付 */
.post-taxonomies {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}

.post-taxonomies .meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
}

.post-taxonomies .meta-right {
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 記事詳細と近い見た目 */
.post-taxonomies .post-cat,
.post-taxonomies .post-date {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  box-sizing: border-box;
}

.post-taxonomies .post-cat {
  color: #fff;
  background: #333;
}

.post-taxonomies .post-date {
  color: #bbb;
  background: #1a1a1a;
  border: 1px solid #222;
}

/* タグ並び */
.post-taxonomies .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 個別タグ */
.post-taxonomies .post-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #f0f0f0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}

/* タグ先頭の # */
.post-taxonomies .post-tag::before {
  content: "#";
  margin-right: 2px;
  color: #ff6b81;
  font-weight: 700;
}

@media (max-width: 768px) {
  .post-taxonomies {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
  }

  .post-taxonomies .meta-left {
    gap: 6px;
  }

  .post-taxonomies .post-cat,
  .post-taxonomies .post-date {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .post-taxonomies .post-tag {
    font-size: 11px;
  }
}

/* =========================
   共通レイアウト：メイン + 右サイドバー
========================= */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 20px;
  align-items: start;
}

.layout-main,
.layout-sidebar {
  min-width: 0;
}

.layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.layout .section {
  max-width: none;
  margin: 0;
  padding: 0;
  border-bottom: none;
}

/* =========================
   メイン：新着記事 3列
========================= */
.section--grid .post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.section--grid .post-item-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.section--grid .post-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.section--grid .post-thumb img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
}

.section--grid .post-title {
  font-size: 14px;
}

.section--grid .post-excerpt {
  font-size: 12px;
}

/* =========================
   右サイドバー共通
========================= */
.section--sidebar .post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================
   ランキング：横1行カード
========================= */
.section--ranking .post-item-link {
  display: grid !important;
  grid-template-columns: 24px 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
}

.section--ranking .rank-badge {
  font-size: 18px;
  min-width: 0;
  padding-top: 0;
  line-height: 1;
}

.section--ranking .post-thumb {
  width: 96px !important;
  height: 64px !important;
  aspect-ratio: auto;
}

.section--ranking .post-thumb img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
}

.section--ranking .post-info {
  min-width: 0;
}

.section--ranking .post-taxonomies {
  margin-bottom: 6px;
}

.section--ranking .post-tags,
.section--ranking .post-excerpt,
.section--ranking .meta-right {
  /* display: none; */
}

.section--ranking .post-cat {
  min-height: auto;
  padding: 4px 7px;
  font-size: 11px;
}

.section--ranking .post-title {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 0;
}

/* =========================
   レスポンシブ
========================= */
@media (max-width: 945px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout-main {
    order: 1;
  }

  .layout-sidebar {
    order: 2;
  }

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

@media (max-width: 600px) {
  .layout {
    padding: 22px 14px;
  }

  .section--grid .post-list {
    grid-template-columns: 1fr;
  }

  .section--ranking .post-item-link {
    grid-template-columns: 22px 88px minmax(0, 1fr);
  }

  .section--ranking .post-thumb {
    width: 88px !important;
    height: 58px !important;
  }
}

/* 新着記事：画像下にカテゴリー・タグ */
.section--grid .post-taxonomies {
  display: block;
  margin: 10px 0 12px;
}

.section--grid .post-taxonomies .meta-left {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.section--grid .post-taxonomies .meta-right {
  display: none;
}

/* 本文抜粋下の日付 */
.section--grid .post-date-wrap {
  margin-top: 12px;
  text-align: end;
}

.section--grid .post-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: auto;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  color: #bbb;
  background: #1a1a1a;
  border: 1px solid #222;
}

/* 日付の左に更新マーク */
.section--grid .post-date::before {
  content: "↻";
  font-size: 12px;
  line-height: 1;
}

/* =========================
   右サイド：ランキングカード調整
   画像上に順位、下にタイトル
========================= */

.section--ranking .post-item-link {
  display: block !important;
  padding: 10px;
}

.section--ranking .post-item {
  overflow: hidden;
}

.section--ranking .rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.rank-badge.r1 {
  color: #ffd700;
}

.rank-badge.r2 {
  color: #c0c0c0;
}

.rank-badge.r3 {
  color: #cd7f32;
}

.section--ranking .post-thumb {
  position: relative;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  margin-bottom: 10px;
  border-radius: 6px;
}

.section--ranking .post-thumb img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
}

.section--ranking .post-info {
  min-width: 0;
}

.section--ranking .post-cat,
.section--ranking .post-tags,
.section--ranking .post-taxonomies,
.section--ranking .post-excerpt,
.section--ranking .meta-right {
  /* display: none !important; */
}

.section--ranking .post-title {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #f0f0f0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
}

.tag-links a::before {
  content: "#";
  margin-right: 2px;
  color: #ff6b81;
  font-weight: 700;
}

.tag-links a:hover {
  border-color: #555;
  color: #fff;
}

#load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: 100%;
  max-width: 360px;
  margin: 40px auto 0;
  padding: 14px 28px;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;

  color: #e60023;
  background: transparent;

  border: 1px solid #e60023;
  border-radius: 999px;

  cursor: pointer;
  transition: all 0.25s ease;
}

/* 矢印 */
#load-more-btn::after {
  content: "→";
  font-size: 13px;
  transition: transform 0.25s ease;
}

/* ホバー時だけ主張 */
#load-more-btn:hover {
  background: #e60023;
  color: #fff;
}

/* 矢印が少し動く（クリックしたくなるポイント） */
#load-more-btn:hover::after {
  transform: translateX(4px);
}

/* 押した感 */
#load-more-btn:active {
  transform: scale(0.98);
}

/* 無効 */
#load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.content-area .layout-sidebar a {
  color: #bbb;
  text-decoration: none;
}

.post-work-title{
  font-size:12px;
  color:#999;
  margin-bottom:6px;
  line-height:1.5;
}

.post-title{
  font-size:15px;
  font-weight:700;
  line-height:1.7;
  color:#fff;
}

.post-work-title span{
  color:#666;
}

.breadcrumb {
  max-width: 1300px;
  margin: 18px auto 0;
  padding: 0 20px;
  font-size: 12px;
  color: #888;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.breadcrumb li + li::before {
  content: ">";
  margin-right: 6px;
  color: #555;
}

.breadcrumb a {
  color: #aaa;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span {
  color: #777;
}

.tag-feature-box {
  max-width: 1300px;
  margin: 30px auto;
  padding: 24px;
  border-radius: 12px;
  background: #151515;
  border: 1px solid #222;
}

.tag-feature-box h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: #fff;
  border-left: 4px solid #e60023;
  padding-left: 12px;
}

.tag-feature-box p {
  font-size: 15px;
  line-height: 1.9;
  color: #ddd;
  margin-bottom: 18px;
}

.tag-feature-box ul {
  padding-left: 20px;
}

.tag-feature-box li {
  margin-bottom: 10px;
  line-height: 1.8;
  color: #ccc;
}

.tag-related-box {
  max-width: 1300px;
  margin: 24px auto 0;
  padding: 20px;
  border: 1px solid #222;
  border-radius: 12px;
  background: #151515;
}

.tag-related-box h2 {
  font-size: 18px;
  margin-bottom: 14px;
  color: #fff;
  border-left: 4px solid #e60023;
  padding-left: 10px;
}

.tag-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-related-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #222;
  color: #ddd;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #333;
}

.tag-related-links a::before {
  content: "#";
  color: #ff6b81;
  margin-right: 3px;
  font-weight: bold;
}

.tag-related-links a:hover {
  background: #2a2a2a;
  color: #fff;
}
