/* ===============================
 Trouble Archive Page
=============================== */
.wrapper {
 background-color: #000;
}
.trouble-lead {
 background-color: #000;
 color: #fff;
 padding: 150px 0 30px;
 text-align: center;
 font-family: "Noto Sans JP", sans-serif;
 line-height: 1.9;
}
.trouble-main-title {
 font-family: "Montserrat Alternates", sans-serif;
 font-weight: 700;
 font-size: 2.6rem;
 color: #d27a00;
 margin-bottom: 60px;
 text-align: center;
}
@media screen and (max-width: 767px) {
 .trouble-main-title {
  font-size: 2rem;
  margin-bottom: 40px;
 }
}
.trouble-category {
 background-color: #111;
 padding: 40px 0;
 text-align: center;
}

.trouble-cat-list {
 display: flex;
 justify-content: center;
 flex-wrap: wrap;
 gap: 20px;
}

.trouble-cat-list li a {
 display: inline-block;
 background-color: #d27a00;
 color: #000;
 font-weight: bold;
 padding: 10px 25px;
 border-radius: 30px;
 font-size: 1rem;
 transition: background-color 0.3s ease;
}

.trouble-cat-list li a:hover {
 background-color: #f7a800;
}

.trouble-archive {
 background-color: #000;
 color: #fff;
 padding: 30px 0 100px;
}

.trouble-list {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 50px 40px;
 justify-items: center;
}

.trouble-item {
 background-color: #111;
 border-radius: 10px;
 overflow: hidden;
 transition: transform 0.3s ease;
 width: 100%;
 max-width: 360px;
}

.trouble-item:hover {
 transform: translateY(-5px);
}

.trouble-thumb img {
 width: 100%;
 height: auto;
 display: block;
}

.trouble-info {
 padding: 20px 5px;
 text-align: left;
}
@media screen and (min-width: 768px) {
 .trouble-info {
  padding: 20px;
  text-align: left;
 }
}
.trouble-title {
 font-family: "Noto Sans JP", sans-serif;
 font-size: 1rem;
 color: #fff;
 margin-bottom: 10px;
}
@media screen and (min-width: 768px) {
 .trouble-title {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 10px;
 }
}
.trouble-excerpt {
 font-family: "Noto Sans JP", sans-serif;
 font-size: 0.95rem;
 color: #ccc;
 line-height: 1.7;
}
.screen-reader-text {
 display: none;
}
/* ページネーション */
.trouble-pagination {
 display: flex;
 text-align: center;
 margin-top: 60px;
 justify-content: center;
}

.trouble-pagination .page-numbers {
 display: inline-block;
 background: #d27a00;
 color: #000;
 padding: 10px 16px;
 border-radius: 4px;
 margin: 0 5px;
 font-weight: bold;
}

.trouble-pagination .current {
 background: #f7a800;
}

/* ===============================
 Responsive
=============================== */
@media screen and (max-width: 1023px) {
 .trouble-list {
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 20px;
 }
}

@media screen and (max-width: 767px) {
 .trouble-lead {
  padding: 40px 20px;
  font-size: 0.95rem;
 }

 .trouble-cat-list {
  gap: 10px;
 }

 .trouble-cat-list li a {
  font-size: 0.9rem;
  padding: 8px 18px;
 }

 .trouble-info {
  text-align: center;
 }
}

/* ===============================
 Trouble Category Page
=============================== */
.trouble-cat-header {
 background-color: #000;
 color: #fff;
 padding: 150px 0 100px;
 text-align: center;
}

.trouble-cat-title {
 font-family: "Montserrat Alternates", sans-serif;
 font-weight: 700;
 font-size: 2.4rem;
 color: #f7a800;
 margin-bottom: 20px;
}

.trouble-cat-desc {
 font-family: "Noto Sans JP", sans-serif;
 font-size: 1rem;
 color: #ddd;
 line-height: 1.9;
 width: 100%;
 max-width: 800px;
 margin: 0 auto;
}

/* ===============================
 Responsive
=============================== */
@media screen and (max-width: 767px) {
 .trouble-cat-header {
  padding: 100px 0px;
 }

 .trouble-cat-title {
  font-size: 1.8rem;
 }

 .trouble-cat-desc {
  font-size: 0.95rem;
 }
}

/* ===============================
 Trouble Single Page
=============================== */
.trouble-single {
 background-color: #000;
 color: #fff;
 padding: 150px 0 100px;
}

.trouble-meta {
 background-color: #000;
 text-align: center;
 padding: 20px 0;
}
@media screen and (max-width: 767px) {
 .trouble-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
 }
}
.trouble-cat {
 display: inline-block;
 background: #d27a00;
 color: #000;
 padding: 6px 20px;
 border-radius: 20px;
 font-weight: bold;
 font-size: 0.95rem;
 margin: 0 5px;
 transition: background-color 0.3s ease;
}

.trouble-cat:hover {
 background: #f7a800;
}

.trouble-title-single {
 text-align: center;
 font-family: "Noto Sans JP", sans-serif;
 font-size: 2rem;
 margin-bottom: 10px;
}

.trouble-date {
 text-align: center;
 font-family: "Poppins", sans-serif;
 color: #aaa;
 font-size: 0.9rem;
 margin-bottom: 40px;
}

.trouble-thumb-single {
 text-align: center;
 margin-bottom: 50px;
}

.trouble-content {
 font-family: "Noto Sans JP", sans-serif;
 line-height: 1.9;
 font-size: 1rem;
 color: #ddd;
 width: 100%;
 max-width: 800px;
 margin: 0 auto;
}

.trouble-content img {
 max-width: 100%;
 height: auto;
 border-radius: 6px;
 margin: 20px 0;
}

.trouble-content h2,
.trouble-content h3 {
 color: #f7a800;
 margin-top: 40px;
 margin-bottom: 20px;
 font-size: 1.4rem;
}

.trouble-content p {
 margin-bottom: 20px;
}

/* 前後ナビ */
.trouble-nav {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-top: 80px;
 border-top: 1px solid #333;
 padding-top: 40px;
}

.trouble-nav a {
 color: #d27a00;
 font-weight: bold;
 transition: color 0.3s ease;
}

.trouble-nav a:hover {
 color: #f7a800;
}

/* 関連トラブル */
.trouble-related {
 background-color: #111;
 color: #fff;
 padding: 100px 0;
 text-align: center;
}

.related-title {
 font-family: "Montserrat Alternates", sans-serif;
 font-weight: 700;
 font-size: 2.2rem;
 color: #d27a00;
 margin-bottom: 60px;
}

.trouble-related .trouble-list {
 display: grid;
 grid-template-columns: repeat(3, 1fr);
 gap: 40px;
 justify-items: center;
}

.trouble-related .trouble-item {
 background-color: #000;
 border-radius: 10px;
 overflow: hidden;
 transition: transform 0.3s ease;
 width: 100%;
 max-width: 340px;
}

.trouble-related .trouble-item:hover {
 transform: translateY(-5px);
}

.trouble-related .trouble-thumb img {
 width: 100%;
 height: auto;
 display: block;
}

.trouble-related .trouble-title {
 font-family: "Noto Sans JP", sans-serif;
 font-size: 1rem;
 color: #fff;
 padding: 20px;
}

/* ===============================
 Responsive
=============================== */
@media screen and (max-width: 1023px) {
 .trouble-related .trouble-list {
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
 }
}

@media screen and (max-width: 767px) {
 .trouble-single {
  padding: 100px 0px;
 }

 .trouble-title-single {
  font-size: 1.6rem;
 }

 .trouble-content {
  font-size: 0.95rem;
 }

 .trouble-nav {
  flex-direction: column;
  gap: 20px;
 }

 .trouble-related {
  padding: 60px 20px;
 }

 .related-title {
  font-size: 1.6rem;
  margin-bottom: 40px;
 }

 .trouble-related .trouble-list {
  grid-template-columns: 1fr;
  gap: 30px;
 }
}
/* ===============================
 Trouble Single (ACF 2column)
=============================== */
.trouble-flex {
 display: flex;
 align-items: flex-start;
 gap: 50px;
 background: #000;
 color: #fff;
 justify-content: center;
}

.trouble-thumb-single {
 flex: 0 0 45%;
}

.trouble-thumb-single img {
 width: 100%;
 height: auto;
 border-radius: 8px;
 display: block;
}

.trouble-content {
 flex: 0 0 55%;
 font-family: "Noto Sans JP", sans-serif;
 font-size: 1rem;
 line-height: 1.9;
 color: #ddd;
}

.trouble-content h2 {
 font-size: 1.3rem;
 color: #f7a800;
 margin: 30px 0 15px;
}

.trouble-block + .trouble-block {
 margin-top: 30px;
}

.trouble-note {
 font-size: 0.95rem;
 color: #aaa;
 margin-top: 30px;
}

/* ===============================
 Responsive
=============================== */
@media screen and (max-width: 767px) {
 .trouble-flex {
  flex-direction: column;
  gap: 30px;
  padding: 40px 0;
 }

 .trouble-thumb-single,
 .trouble-content {
  flex: 1 1 100%;
 }

 .trouble-content {
  font-size: 0.95rem;
 }
}
/* ===============================
 Trouble Back Button
=============================== */
.trouble-back {
 text-align: center;
 margin: 50px 0 0;
}

.trouble-back-btn {
 display: inline-block;
 background-color: #d27a00;
 color: #000;
 font-family: "Noto Sans JP", sans-serif;
 font-weight: bold;
 font-size: 1rem;
 padding: 12px 60px;
 border-radius: 8px;
 text-decoration: none;
 transition: background-color 0.3s ease, transform 0.3s ease;
}

.trouble-back-btn:hover {
 background-color: #f7a800;
 transform: translateY(-2px);
}

@media screen and (max-width: 767px) {
 .trouble-back-btn {
  font-size: 0.95rem;
  padding: 10px 40px;
 }
}
.trouble-cat {
 display: inline-block;
 background-color: #d27a00;
 color: #000;
 font-weight: bold;
 font-size: 0.9rem;
 padding: 2px 25px;
 border-radius: 30px;
 margin: 0 5px 10px;
 text-decoration: none;
 transition: background-color 0.3s ease, transform 0.3s ease;
}
@media screen and (max-width: 767px) {
 .trouble-cat {
  text-align: center;
  padding: 2px 10px;
 }
}
.trouble-cat:hover {
 background-color: #f7a800;
 transform: translateY(-2px);
}

.trouble-cat.active {
 background-color: #f7a800;
 color: #000;
 pointer-events: none;
}
.trouble-gallery-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
 gap: 15px;
 margin-bottom: 20px;
}

.trouble-gallery-item img {
 width: 100%;
 height: auto;
 border-radius: 8px;
 display: block;
 transition: transform 0.3s ease;
}

.trouble-gallery-item img:hover {
 transform: scale(1.05);
}

/* スマホ対応も一緒に */
@media screen and (max-width: 767px) {
 .trouble-gallery-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
 }
}
/* ===============================
  Trouble Gallery Swiper
================================ */
.trouble-gallery-swiper {
 width: 100%;
 max-width: 600px;
 margin: 0 auto 30px;
 border-radius: 8px;
 overflow: hidden;
}

.trouble-gallery-swiper img {
 width: 100%;
 height: auto;
 display: block;
 border-radius: 8px;
 object-fit: cover;
}

/* ページネーション＆ナビ */
.trouble-gallery-swiper .swiper-button-prev,
.trouble-gallery-swiper .swiper-button-next {
 color: #f7a800;
 transition: opacity 0.3s;
}
.trouble-gallery-swiper .swiper-button-prev:hover,
.trouble-gallery-swiper .swiper-button-next:hover {
 opacity: 0.7;
}

.trouble-gallery-swiper .swiper-pagination-bullet {
 background: #f7a800;
 opacity: 0.8;
}

/* スマホ対応も一緒に */
@media screen and (max-width: 767px) {
 .trouble-gallery-swiper {
  max-width: 100%;
 }
}
/* ===============================
  Trouble Gallery with Thumbnails
================================ */
.trouble-gallery-thumb {
 width: 100%;
 max-width: 700px;
 margin: 15px auto 0;
 display: flex;
 justify-content: flex-start; /* ← 左寄せにする */
}
.trouble-gallery-main img {
 width: 100%;
 height: auto;
 border-radius: 10px;
 object-fit: cover;
}

/* サムネイル部分 */
.trouble-gallery-thumb {
 width: 100%;
 max-width: 500px;
 margin: 15px auto 0;
}
.trouble-gallery-thumb .swiper-wrapper {
 justify-content: flex-start; /* Swiper内部でも左寄せ */
}
.trouble-gallery-thumb .swiper-slide {
 width: 80px;
 height: 80px;
 opacity: 0.4;
 cursor: pointer;
 transition: opacity 0.3s ease;
 margin-right: 10px; /* スライド間余白 */
}
.trouble-gallery-thumb .swiper-slide-thumb-active {
 opacity: 1;
}
.trouble-gallery-thumb img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 border-radius: 6px;
}

/* ナビボタン */
.trouble-gallery-main .swiper-button-prev,
.trouble-gallery-main .swiper-button-next {
 color: #f7a800;
 transition: opacity 0.3s;
}
.trouble-gallery-main .swiper-button-prev:hover,
.trouble-gallery-main .swiper-button-next:hover {
 opacity: 0.7;
}

/* スマホ対応も同時に */
@media screen and (max-width: 767px) {
 .trouble-gallery-main {
  max-width: 100%;
 }
 .trouble-gallery-thumb {
  max-width: 100%;
  margin-top: 10px;
 }
 .trouble-gallery-thumb .swiper-slide {
  width: 60px;
  height: 60px;
 }
}
.image-modal {
 display: none;
 position: fixed;
 z-index: 9999;
 padding-top: 60px;
 left: 0;
 top: 0;
 width: 100%;
 height: 100%;
 overflow: auto;
 background-color: rgba(0, 0, 0, 0.9);
}

.image-modal img.modal-content {
 margin: auto;
 display: block;
 max-width: 90%;
 max-height: 80vh;
 box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
 border-radius: 6px;
}

.image-modal .modal-close {
 position: absolute;
 top: 20px;
 right: 30px;
 color: #fff;
 font-size: 40px;
 font-weight: bold;
 cursor: pointer;
 transition: 0.3s;
}

.image-modal .modal-close:hover {
 color: #f7a800;
}
