/* ========== 共通レイアウト ========== */
.container.with-sidebar {
  display: flex;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
  /* IE対応 */
}

/* サイドバー */
.sidebar {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 40px;
}

.sidebar-title i {
  font-size: 2.4rem;
  padding-right: 8px;
}

.menu-list li {
  border-bottom: 1px solid var(--light-grey);
}

.menu-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--logo-blue);
  font-size: 1.4rem;
  padding: 12px 8px;
}

.menu-list .bullet {
  width: 8px;
  height: 8px;
  background: var(--logo-blue);
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-address {
  font-size: 1.4rem;
  padding-bottom: 8px;
}

@media screen and (max-width: 1023px) {
  .container.with-sidebar {
    flex-direction: column;
    align-items: normal;
  }

  .sidebar {
    width: 100%;
    max-width: 480px;
    margin: 40px auto 0;
    padding-top: 0
  }

  .sidebar-title::after {
    height: 14px;
    margin-left: -16px;
  }
}

@media screen and (max-width: 767px) {
  .container.with-sidebar {
    padding: 0;
  }

  .sidebar {
    padding: 0 16px;
  }

  .sidebar-title::after {
    margin-left: 0;
  }

  .banner img {
    width: 80%;
    margin: 0 auto;
    min-width: 320px;
  }
}
/* Instagramレイアウト調整 */
#sb_instagram .sb_instagram_header, .sb_instagram_header{
	padding: 0;
}


/* ========== TOPページ ========== */
.hero-slider-pc {
  display: block;
  aspect-ratio: 2 / 1;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-slider-sp {
  display: none;
  aspect-ratio: 8 / 5;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.hero-img-pc,
.hero-img-sp {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero-img-pc.active,
.hero-img-sp.active {
  opacity: 1;
  z-index: 1;
}


/* 代表挨拶 */
.greeting-section .inner {
  display: flex;
  flex-direction: row;
  padding-top: 40px;
}

.greeting-img img {
  max-width: 320px;
  height: auto;
}

.greeting-text {
  background: var(--white);
  padding: 40px;
  margin-top: 40px;
  flex: 1;
  position: relative;
  margin-left: -40px;
}

.greeting-text .sec-title span {
  color: var(--red);
}

.greeting-logo {
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media screen and (max-width: 767px) {
  .hero-slider-pc {
    display: none;
  }

  .hero-slider-sp {
    display: block;
  }

  .greeting-section .inner {
    flex-direction: column-reverse;
    align-items: center;
    padding-top: 16px;
  }

  .greeting-img img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
	max-width: 240px;
	position: relative;
	z-index: 1;
  }

  .greeting-text {
    padding: 24px;
    margin: 16px 16px -16px;
  }
}

/* サービスセクション */
.service-section {
  background: url('/wp-content/themes/funscompany/assets/images/index/top_service_bg.png') no-repeat center;
  padding: 40px 24px 56px;
  margin-top: 40px;
  position: relative;
}

.service-section::before {
  content: "";
  position: absolute;
  left: 85%;
  top: 2%;
  transform: translateX(-50%);
  width: 200px;
  height: 120px;
  background: url('/wp-content/themes/funscompany/assets/images/index/CEO_pic.png') no-repeat center;
  background-size: contain;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, calc(16px + (40 - 16) * ((100vw - 1022px) / (1440 - 1022))), 40px);
  max-width: 1280px;
  margin: 40px auto 0;
}

.service-box {
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.service-box:nth-child(2) {
  position: relative;
}

.service-box-link {
  display: block;
  z-index: 1;
  transition: transform 0.3s ease;
}

.service-box-link:hover {
  transform: translateY(-4px);
}

.service-header {
  padding: 16px;
  font-size: 1.4rem;
  flex: 1;
}

.service-section .sec-title2 {
  position: relative;
  display: inline-block;
}

.service-section .sec-title2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 105%;
  height: 24px;
  background: url('/wp-content/themes/funscompany/assets/images/common/sec_title2_underline.png') no-repeat center;
  background-size: contain;
  z-index: -1;
}

.service-header .sec-title {
  font-size: 2rem;
  position: relative;
  margin-bottom: 16px;
}

.service-header .sec-title span {
  color: var(--blue);
  font-size: 2.8rem;
}

.service-header .sec-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  width: 100%;
  height: 7px;
  background: url('/wp-content/themes/funscompany/assets/images/common/service_underline.png') no-repeat center;
  background-size: contain;
}

.service-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

@media screen and (max-width: 1023px) {
  .service-grid {
    gap: 24px;
  }
}

@media screen and (max-width: 590px) {
  .service-section {
    padding: 24px 16px 32px;
  }

  .service-section::before {
    top: 1%;
	height: 96px;
	width: 100px;
  }

  .service-section .sec-title2::after {
    bottom: -6px;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px auto 0;
  }

  .service-header .sec-title {
    font-size: 1.8rem;
  }

  .service-header .sec-title span {
    font-size: 2.4rem;
  }
}

/* スタッフセクション */
.staff-section {
  padding: 64px 16px 0
}

.speech {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  max-width: 50%;
  transform: translateY(-50%);
}

.staff-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 4vw, 32px);
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 16px 16px;
  border: 1px var(--orange) solid;
  border-radius: 16px;
  text-align: center;
}

.staff-grid::before {
  content: "";
  position: absolute;
  top: -3%;
  right: 0;
  transform: translateY(-50%);
  width: 50%;
  height: auto;
  aspect-ratio: 2 / 1;
  /* 任意：高さがわからない場合は削除OK */
  background: url('/wp-content/themes/funscompany/assets/images/index/staff_fukidashi.png') no-repeat center top;
  background-size: contain;
  z-index: 10;
  min-width: 280px;
}

.staff-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

.staff-name {
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
  margin-top: 8px;
}

.staff-link {
  display: block;
  transition: transform 0.3s ease;
}

.staff-link:hover {
  transform: translateY(-4px);
}

@media screen and (max-width: 767px) {
  .staff-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 40px 8px 16px;
  }
}

/* 施工事例セクション */
.works-section {
  padding: 40px 16px 0
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 4vw, 16px);
  max-width: 960px;
  margin: 0 auto;
}

.works-card {
  background: var(--white);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.works-card:hover {
  transform: translateY(-4px);
}

.works-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.works-body {
  padding: 16px;
}

.works-category {
  display: inline-block;
  background: var(--text-brown);
  color: var(--white);
  font-size: 1.2rem;
  padding: 2px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.works-title {
  font-size: clamp(1.6rem, calc(1.6rem + (20 - 16) * ((100vw - 390px) / (1440 - 390))), 2rem);
  font-weight: bold;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  /* ← 表示最大行数 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.6em * 1);
}

.works-excerpt {
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* ← 表示最大行数 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.6em * 3);
  line-height: 1.6;
  max-height: calc(1.6 * clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem) * 3);
}

.works-btn {
  background: var(--orange);
  color: var(--white);
  text-align: center;
  padding: 4px 0;
  max-width: 148px;
  margin: 16px auto 0;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1.4rem;
}

@media screen and (max-width: 767px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .works-body {
    padding: 12px;
  }

  .works-category {
    padding: 2px 8px;
  }
	
	/* スマホでも同じ制御を確実に適用 */
/*   .works-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.6em * 3);
  } */
}

/* サービスサマリーセクション */
.service-summary-section {
  padding: 64px 16px 0
}

.service-visual {
  position: relative;
  background: url('/wp-content/themes/funscompany/assets/images/index/top_servicelist_pic.png') no-repeat center/cover;
  padding: 56px 16px;
  margin-bottom: 40px;
}

.service-visual-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-black);
  background: rgba(255, 255, 255, 0.7);
  display: inline-block;
  padding: 4px 8px;
  margin-left: 16px;
}

.bold-red {
  color: var(--red);
  font-size: 3.2rem;
}

.bold-blue {
  color: var(--blue);
  font-size: 3.2rem;
}

.service-visual::before {
  content: "";
  position: absolute;
  top: 4%;
  left: 1%;
  width: 100%;
  height: 100%;
  background: url('/wp-content/themes/funscompany/assets/images/common/stripe.png');
  background-repeat: repeat;
  opacity: 0.4;
  z-index: -1;
}

.service-visual:after {
  position: absolute;
  border: 1px solid var(--text-brown);
  content: "";
  top: 16px;
  bottom: 16px;
  left: 16px;
  right: 16px;
}

.service-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 4vw, 32px);
  max-width: 960px;
  margin: 0 auto;
}

.service-list li {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.service-list li strong {
  font-size: 1.6rem;
  display: inline-block;
}

.service-list li strong::before {
  content: "■";
  color: var(--text-brown);
  font-size: 0.8em;
  margin-right: 6px;
  vertical-align: middle;
}

@media screen and (max-width: 767px) {
  .service-summary-section {
    padding: 48px 8px 0;
  }

  .service-visual {
    padding: 40px 8px;
    margin-bottom: 24px;
  }

  .service-visual-title {
    font-size: 1.6rem;
    margin-left: 8px;
  }

  .bold-red {
    font-size: 2.4rem;
  }

  .bold-blue {
    font-size: 2.4rem;
  }

  .service-visual:after {
    position: absolute;
    border: 1px solid var(--text-brown);
    content: "";
    top: 8px;
    bottom: 8px;
    left: 8px;
    right: 8px;
  }

  .service-summary-grid {
    grid-template-columns: 1fr;
  }

  .service-list li {
    margin-bottom: 12px;
  }
}

/* SDGsセクション */
.sdgs-section {
  padding: 40px 24px 0;
  max-width: 960px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
}

.sdgs-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 2;
}

.sdgs-icons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.reform-summit {
  flex: 1;
}

@media screen and (max-width: 767px) {
  .sdgs-section {
    flex-direction: column;
    gap: 24px;
    padding: 24px 16px;
  }

  .reform-summit img {
    max-width: 240px;
  }

  .sdgs-icons {
    gap: 8px;
  }
}

/* ========== 固定ページ共通 ========== */
/* パンくず */
.breadcrumb-wrap {
  background-color: var(--beige);
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 5%;
  font-size: clamp(1.2rem, calc(1.2rem + (14 - 12) * ((100vw - 390px) / (1440 - 390))), 1.4rem);
}

/* タイトル部分 */
.page-title-wrap {
  background-color: var(--white);
  margin: 0 24px;
  padding: 16px 24px;
  position: relative;
}

.page-title-wrap::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 100%;
  height: 100%;
  background: url('/wp-content/themes/funscompany/assets/images/common/stripe.png');
  background-repeat: repeat;
  opacity: 0.4;
  z-index: -1;
}

@media screen and (max-width: 767px) {
  .page-title-wrap {
    padding: 12px 16px;
  }
}


/* ========== 会社概要ページ ========== */
.section-origin,
.section-philosophy,
.section-company,
.section-history {
  padding: 64px 16px 0;
  text-align: center;
}

.company_image img {
  max-width: 600px;
  margin: 0 auto;
}

/* Table(採用情報ページ共通) */
.company-table,
.recruit-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  max-width: 960px;
}

.company-table th,
.company-table td,
.recruit-table th,
.recruit-table td {
  padding: 16px 24px;
  vertical-align: top;
  text-align: left;
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
}

.company-table tr:nth-child(odd),
.recruit-table tr:nth-child(odd) {
  background-color: var(--light-beige2);
}

.company-table tr:nth-child(even),
.recruit-table tr:nth-child(even) {
  background-color: var(--white);
}

.company-table th,
.recruit-table th {
  white-space: nowrap;
  font-weight: bold;
  width: 160px;
}

@media screen and (max-width: 767px) {

  .company-table th,
  .company-table td,
  .recruit-table th,
  .recruit-table td {
    padding: 8px 16px;
  }

  .company-table th,
  .recruit-table th {
    width: initial;
  }
}

/* ========== 採用情報ページ ========== */
.recruit-lead {
  padding: 40px 16px 0;
}

.recruit-section, .senpai-section {
  padding: 64px 16px 0;
}

.recruit-lead .sec-title2 {
  position: relative;
  display: inline-block;
}

.recruit-lead .sec-title2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 105%;
  height: 24px;
  background: url('/wp-content/themes/funscompany/assets/images/common/sec_title2_underline.png') no-repeat center;
  background-size: contain;
  z-index: -1;
}

.recruit-lead-body {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  padding: 16px;
  background: var(--white);
  align-items: center;
  position: relative;
}

.recruit-lead-body::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 100%;
  height: 100%;
  background: url('/wp-content/themes/funscompany/assets/images/common/stripe.png');
  background-repeat: repeat;
  opacity: 0.4;
  z-index: -1;
}

.recruit-img img {
  max-width: 400px;
  width: 100%;
}

.recruit-block {
  margin-bottom: 40px;
}

.recruit-position {
  background-color: initial;
}

.entry-btn-wrap {
  text-align: center;
  margin-top: 40px;
}

.btn-entry {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 8px 40px;
  border-radius: 2px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.btn-entry:hover {
  transform: translateY(-4px);
}

.senpai-section .staff-grid {
  padding: 40px 16px 16px;
}

.senpai-section .staff-grid::before {
  content: none;
}

@media screen and (max-width: 767px) {
  .recruit-lead {
    padding: 24px 16px 0;
  }

  .recruit-lead-body {
    flex-direction: column;
    margin-top: 12px;
  }

  .recruit-img img {
    max-width: initial;
  }
}

/* ========== FAQページ ========== */
.faq-section {
  padding: 40px 16px 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  padding-top: 40px;
  gap: 20px;
}

.faq-item {
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--logo-blue);
  color: var(--white);
  padding: 8px 16px;
  width: 100%;
}

.faq-question .q-icon,
.faq-answer .a-label {
  font-size: 2.4rem;
  font-family: "Roboto";
  font-weight: bold;
  margin-right: 24px;
}

.faq-question .q-text {
  flex: 1;
  text-align: left;
}

.toggle-icon {
  font-size: 16px;
  color: var(--white);
  transition: transform 0.2s ease;
}

.faq-answer {
  display: none;
	
  align-items: center;
  background: var(--white);
  padding: 8px 16px;
  transition: transform 0.3s ease;
}

.faq-answer .a-label {
  color: var(--orange);
}

@media screen and (max-width: 767px) {
  .faq-list {
    padding-top: 24px;
    gap: 12px;
  }

  .faq-question .q-icon,
  .faq-answer .a-label {
    font-size: 2rem;
    margin-right: 16px;
  }
}

/* ========== 問い合わせページ ========== */
.contact-section {
  padding: 40px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.privacy-note {
  background: var(--light-grey);
  padding: 16px;
  font-size: 1.2rem;
  margin-top: 24px;
}

.form-area {
  display: grid;
  grid-template-columns: .3fr .6fr;
  row-gap: 2em;
  height: 100%;
}

.contact-form-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.form-area dd {
  margin: 0;
}

.wpcf7-list-item {
  display: block;
  margin: 0 0 8px 0;
}

.wpcf7-form input[type="checkbox"] {
  -webkit-appearance: auto;
  appearance: auto;
}

.form-area input[type="text"],
.form-area input[type="email"],
.form-area input[type="tel"],
.form-area textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--text-brown);
  border-radius: 4px;
  background: var(--white);
}

.form-area textarea {
  min-height: 200px;
}

.must {
  color: var(--red);
  margin-left: 4px;
  font-size: 14px;
}

.consent-check {
  margin: 24px 0;
  text-align: center;
}

.submit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.submit-btn input[type="submit"] {
  background: var(--text-brown);
  color: var(--white);
  padding: 8px 40px;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn input[type="submit"]:hover {
  background: var(--orange);
}

@media screen and (max-width: 767px) {
  .contact-form-wrap {
    padding: 0 16px;
  }

  .form-area {
    display: flex;
    flex-direction: column;
    row-gap: 1em;
  }
}

/* ========== 弊社からお電話させていただいた方へ ========== */
.followup-section {
  padding: 40px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.styled-list {
  margin: 8px 0;
  padding-left: 1.2em;
}

.styled-list li {
  list-style-type: disc;
}

.followup-image {
  text-align: center;
}

.followup-image img {
  max-width: 100%;
  height: auto;
}

/* ========== 補助金ページ ========== */
.subsidy-section {
  padding: 40px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.subsidy-image img {
  max-width: 100%;
  height: auto;
}

/* ========== 塗装サービスページ ========== */
/* hero */
.service-hero .page-title-wrap {
  max-width: 960px;
  margin: 0 auto;
}

.service-lead {
  max-width: 1080px;
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
}

.service-lead p {
  max-width: 800px;
  padding-left: clamp(24px, calc(24px + (64 - 24) * ((100vw - 1023px) / (1440 - 1023))), 64px);
}

.service-bubble {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.service-bubble img {
  max-width: clamp(200px, calc(200px + (280 - 200) * ((100vw - 767px) / (1440 - 767))), 280px);
  object-fit: contain;
}

.hero-img-top {
  display: flex;
  max-width: 1280px;
  margin: 0 auto 40px;
  z-index: -1;
  align-items: flex-start;
}

.hero-img-sub {
  flex: 2;
  object-fit: contain;
  margin-right: -40px;
  z-index: -1;
}

.hero-img-main {
  border: 6px solid var(--orange);
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  flex: 3;
  z-index: -2;
}

.hero-img-bottom {
  max-width: 1280px;
  margin: -104px auto 0;
}

.hero-img-bottom-sp {
  display: none;
}

@media screen and (max-width: 1023px) {
  .service-hero .page-title-wrap {
    margin: 0 24px;
  }

  .service-lead {
    margin: 24px 0 0;
  }
}

@media screen and (max-width: 767px) {
  .service-lead {
    flex-direction: column;
    padding: 0 16px;
  }

  .service-lead p {
    padding-left: 0;
  }

  .hero-img-top {
    flex-direction: column-reverse;
    padding: 0 16px;
    margin: 0 auto;
  }

  .hero-img-sub {
    max-width: 480px;
    margin: -32px auto 0;
  }

  .hero-img-bottom {
    display: none;
  }

  .hero-img-bottom-sp {
    display: block;
    margin: 0 auto -24px;
  }
}

/* 選ばられる理由、事業案内 */
.reason-section,
.service-list-section,
.price-section {
  padding: 40px 16px 0;
}

.reason-heading {
  margin-bottom: 40px;
}

.reason-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.reason-grid::before {
  content: "";
  position: absolute;
  top: -5%;
  right: 0;
  transform: translateY(-50%);
  width: 50%;
  height: auto;
  aspect-ratio: 2 / 1;
  background: url('/wp-content/themes/funscompany/assets/images/pages/service_staff.png') no-repeat center top;
  background-size: contain;
  z-index: -1;
  min-width: 280px;
}

.reason-box {
  flex: 1;
  padding: 16px;
  background: var(--white);
}

.reason-lead {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.reason-num {
  font-family: 'Kiwi Maru', 'Meiryo', sans-serif;
  font-size: 4.8rem;
  font-weight: bold;
  color: var(--red);
}

.reason-lead h3 {
  font-family: 'Kiwi Maru', 'Meiryo', sans-serif;
  font-size: 2.2rem;
}

.reason-text {
  font-size: 1.4rem;
  border-top: 1px solid var(--orange);
  padding-top: 16px;
}

.service-list-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.service-content {
  display: flex;
  gap: 16px;
}

.service-content p {
  flex: 3;
}

.service-content img {
  flex: 2;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.service-block:nth-child(even) .service-content {
  flex-direction: row-reverse;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 1.4rem;
  table-layout: fixed;
}

.price-table th,
.price-table td {
  border: 1px solid var(--text-brown);
  padding: 8px;
  text-align: left;
}

.price-table thead th {
  background-color: var(--beige);
  font-weight: bold;
}

.works-link {
  align-items: flex-end !important;
}

.works-link a {
  display: flex;
  border-bottom: 1px solid var(--orange);
  font-weight: bold;
  gap: 4px;
  justify-content: flex-end;
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
}

.works-link a img {
  width: 22px;
}

@media screen and (max-width: 767px) {
  .reason-heading {
    margin-bottom: 88px;
  }

  .reason-grid {
    flex-direction: column;
  }

  .reason-grid::before {
    top: -2%;
  }

  .reason-lead {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
  }

  .reason-num {
    font-size: 3.6rem;
  }

  .reason-heading h3 {
    font-size: 2rem;
    line-height: 1.4;
  }

  .service-content,
  .service-block:nth-child(even) .service-content {
    flex-direction: column;
  }
}



/* ========== スタッフアーカイブページ ========== */
.staff-archive {
  padding: 40px 16px 0;
}

.staff-archive .sec-title2 {
  position: relative;
  display: inline-block;
  margin-bottom: 48px;
}

.staff-archive .sec-title2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 105%;
  height: 24px;
  background: url('/wp-content/themes/funscompany/assets/images/common/sec_title2_underline.png') no-repeat center;
  background-size: contain;
  z-index: -1;
}

@media screen and (max-width: 767px) {
  .staff-archive {
    padding: 24px 16px 0;
  }
}

@media screen and (max-width: 590px) {
  .staff-archive .sec-title2 {
    margin-bottom: 72px;
  }
}

/* ========== スタッフ詳細ページ ========== */
.staff-detail,
.staff-gallery {
  padding: 40px 16px 0;
}

.staff-intro {
  padding: 40px 16px;
}

.staff-profile {
  display: flex;
  gap: clamp(16px, calc(16px + (40 - 16) * ((100vw - 1022px) / (1440 - 1022))), 40px);
  align-items: center;
  justify-content: space-evenly;
}

.staff-profile-img img {
  width: 100%;
  height: 100%;
  max-width: 264px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
}

.staff-profile-table {
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
}

.staff-profile-table th {
  font-weight: bold;
  width: 120px;
  padding: 8px 0;
  text-align: center;
  background-color: var(--blue);
  color: var(--white);
  border-bottom: 1px var(--white) solid;
}

.staff-profile-table tr:first-child th {
  border-radius: 4px 0 0 0;
}

.staff-profile-table tr:last-child th {
  border-radius: 0 0 0 4px;
}

.staff-profile-table td {
  padding: 8px 16px;
  background-color: var(--white);
  border-bottom: 1px var(--light-beige) solid;
  min-width: 280px;
}

.staff-profile-table tr:first-child td {
  border-radius: 0 4px 0 0;
}

.staff-profile-table tr:last-child td {
  border-radius: 0 0 4px 0;
}

.staff-profile-table tr:last-child th,
.staff-profile-table tr:last-child td {
  border-bottom: none;
}

.gallery-grid {
  display: grid;
  gap: clamp(12px, 2vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: 960px;
  margin: 0 auto;
}

/* 最大でも3列に制限 */
@media screen and (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* スマホ：2列 */
@media screen and (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-item img {
  aspect-ratio: 1/1;
  object-fit: cover;
}

.intro-text {
  font-size: clamp(1.4rem, calc(1.4rem + (16 - 14) * ((100vw - 390px) / (1440 - 390))), 1.6rem);
}

@media screen and (max-width: 767px) {
  .staff-profile {
    flex-direction: column;
  }

  .staff-profile-table th {
    width: 80px;
  }

  .staff-profile-table td {
    min-width: 200px;
  }
}

/* ========== 施工事例アーカイブページ ========== */
.pagination {
  margin: 40px auto;
  text-align: center;
}

.pagination .page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  margin: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--text-brown);
  color: var(--text-brown);
  font-size: 2rem;
  transition: all 0.3s;
}

.pagination .current {
  background: var(--text-brown);
  color: var(--white);
  border: 1px solid var(--text-brown);
}

.pagination .prev,
.pagination .next {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 2rem;
  color: var(--text-brown);
}

.pagination .prev i,
.pagination .next i {
  display: block;
  font-size: 1.6rem;
}

/* ========== 施工事例詳細ページ ========== */
.category-area {
  display: flex;
  justify-content: flex-end;
}

.works-category-single {
  display: inline-block;
  background: var(--text-brown);
  color: var(--white);
  font-size: 1.4rem;
  padding: 4px 16px;
  border-radius: 4px;
  margin: 40px 24px 0 0;
}

.works-detail {
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.before-after {
  display: flex;
  align-items: center;
  position: relative;
  justify-content: center;
  gap: 1rem;
  margin-top: 40px;
  padding: 0 clamp(48px, calc(48px + (54 - 48) * ((100vw - 767px) / (1440 - 767))), 54px);
}

/* 疑似要素で右下に三角形を追加 */
.before-after::after {
  content: "";
  position: absolute;
  bottom: -16px;
  right: -12px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 20vw 54vw;
  border-color: transparent transparent var(--beige) transparent;
  z-index: -1;
}

.before-after .before,
.before-after .after {
  flex: 1 1;
  max-width: 400px;
  text-align: center;
}

.before-after .before img,
.before-after .after img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.label-before,
.label-after {
  position: absolute;
  display: block;
  font-size: clamp(4rem, calc(4rem + (48 - 40) * ((100vw - 767px) / (1440 - 767))), 4.8rem);
  font-family: 'KFhimaji', sans-serif;
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
  line-height: 1;
}

.label-before {
  top: 0;
  left: 0;
  color: transparent;
  -webkit-text-stroke: 2px var(--beige);
  /* 白抜き効果 */
}

.label-after {
  bottom: 0;
  right: 0;
  color: var(--white);
}

.arrow i {
  font-size: 6rem;
  color: var(--beige);
  text-align: center;
}

/* 施工中写真 */
.works-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3.2rem;
  padding: 0 16px;
  margin-top: 32px;
}

.works-gallery-card {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
}

.works-gallery-card::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 100%;
  height: 100%;
  background: url('/wp-content/themes/funscompany/assets/images/common/stripe.png');
  background-repeat: repeat;
  opacity: 0.4;
  z-index: -1;
}

.works-gallery-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.caption {
  text-align: center;
  font-weight: bold;
  font-size: 1.8rem;
  background: var(--white);
  padding: 8px;
  flex: 1;
}
/* モーダルで拡大表示 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.image-modal .modal-content {
  display: block;
  margin: 5% auto;
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

.image-modal .close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 3.6rem;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}


@media screen and (max-width: 1023px) {
  .before-after::after {
    border-width: 0 0 32vw 84vw;
  }
}

@media screen and (max-width: 767px) {
  .before-after {
    margin-top: 16px;
    padding: 0 24px;
    gap: 0.5rem;
  }

  .before-after::after {
    bottom: -8px;
	right: -8px;
  }

  .arrow i {
    font-size: 3rem;
  }

  .label-before,
  .label-after {
    font-size: 2.2rem;
  }

  .caption {
    font-size: 1.6rem;
  }
}