@charset "utf-8";

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

main {
  width: 100%;
}

main>section {
  max-width: 1080px;
  margin: 0 auto 80px;
  padding: 16px 24px 40px;
}

body.category-sakata { --accent: var(--cat-sakata); --accent-dark: var(--cat-sakata-dark); --accent-light: var(--cat-sakata-light); }
body.category-tsuruoka { --accent: var(--cat-tsuruoka); --accent-dark: var(--cat-tsuruoka-dark); --accent-light: var(--cat-tsuruoka-light); }
body.category-mikawa { --accent: var(--cat-mikawa); --accent-dark: var(--cat-mikawa-dark); --accent-light: var(--cat-mikawa-light); }
body.category-syounai { --accent: var(--cat-syounai); --accent-dark: var(--cat-syounai-dark); --accent-light: var(--cat-syounai-light); }
body.category-yusa { --accent: var(--cat-yusa); --accent-dark: var(--cat-yusa-dark); --accent-light: var(--cat-yusa-light); }

/* ふわっと表示 */


/* == メインビジュアル == */
.hero {
  background-color: var(--accent, #666);
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: auto;
  max-width: 100vw;
}
.hero-inner {
  max-width: 1000px;
  margin: auto;
}
.hero .hero-text {
  position: static;
  display: block;
  width: min(100%, 1000px);
  padding: 4px 16px 8px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.hero .hero-sub {
  margin: 0;
  font-size: clamp(18px, 1.4vw, 24px);
  opacity: 0.95;
}
.hero .hero-title {
  position: relative;
  margin: 0;
  font-size: clamp(24px, 3.6vw, 40px);
  font-weight: 900;
}
.hero .hero-title::before {
  position: absolute;
}
.hero .hero-media {
  position: relative;
}
.hero .hero-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 40px;
  border-radius: 8px;
}

.comment-wrapper {
  position: relative;
}
/* 半円 */
.comment-wrapper::before {
  z-index: 0;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 180px;
  height: 360px;
  background: var(--accent-light, #999);
  border-radius: 0 180px 180px 0;
  pointer-events: none;
}
.comment-wrapper>* {
  z-index: 1;
  position: relative;
}
.comment-title {
  width: fit-content;
  margin: 40px 0;
  margin-left: 20%;
}
.comment-title h2 {
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 8px;
}
.comment-title h3 {
  font-size: 24px;
  line-height: 1.2;
  color: #666;
}
.comment-body {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
.commentator {
  flex: 0 0 32%;
  min-width: 240px;
  text-align: center;
  padding-top: 32px;
}
.commentator img {
  width: clamp(220px, 80%, 240px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: auto;
}
.commentator .position {
  font-size: 16px;
  color: #666;
  margin: 24px 0 4px;
}
.commentator .name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}
.comment {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.comment h2 {
  font-size: 20px;
  margin: 18px auto 12px;
  line-height: 1.35;
  border-left: 4px solid var(--accent-dark, #333);
  padding-left: 8px;
}
.comment p {
  font-size: 18px;
  line-height: 1.7;
  color: #333;
  margin: 0 auto 56px;
}

section h2.caption {
  display: inline-block;
  position: relative;
  margin: calc(3.5em / 2) 0 2em calc(3.5em / 2);
  color: #333333;
  line-height: 1;
}
section h2.caption::before {
  position: absolute;
  bottom: calc(-3.5em / 4);
  left: calc(-3.5em / 2);
  z-index: -1;
  width: 3.5em;
  height: 3.5em;
  border-radius: 50%;
  background: var(--accent, #666);
  content: '';
}

/* == 小見出し == */
.deco {
  margin: 0 auto 24px;
  text-align: center;
  padding-bottom: 80px;
}
.deco img {
  display: block;
  margin: 24px auto 0; 
}

.heading {  
  position: relative;
  display: inline-block;
  padding: .5em .7em .4em;
  border-bottom: 3px solid var(--accent-light, #999);
  color: #333;
  font-weight: 700;
  font-size: 1.5rem;
}
.heading::before,
.heading::after {
  position: absolute;
  left: 30px;
  bottom: -15px;
  width: 30px;
  height: 15px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: '';
}
.heading::before {
  background-color: var(--accent-light, #999);
}
.heading::after {
  bottom: -11px;
  background-color: #fff;
}

/* == 企業概要 == */
.overview-grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
}
/* Map表示時（幅が広いときだけ2カラム） */
@media (min-width: 960px) {
  .overview-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(640px, 2fr);
    align-items: start;
  }
}
/* いまはマップなし：邪魔しないよう非表示（HTMLは置いておく） */
.overview-map {
  display: none;
}
.overview {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 0.95rem;
}
.overview th {
  width: 96px;
  padding: 8px 16px;
  text-align: left;
  font-weight: 700;
  color: #333;
  vertical-align: top;
  white-space: nowrap;
  border-right: none;
  vertical-align: top;
}
.overview td {
  padding: 8px 16px;
  color: #333;
  line-height: 1.7;
  border-left: 2px solid var(--accent-light, #999);
  background: transparent;
  vertical-align: top;
}

/* == 職場の風景 == */
.gallery {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}
.gallery .main_image {
  flex: 1 1 auto;
  max-width: 714px;
}
.gallery .main_image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
}
.gallery .side_images {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 225px; 
}
.gallery .side_images img {
  display: block;
  width: 100%;
  height: auto; 
  border-radius: 8px;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.gallery .side_images img:hover,
.gallery .side_images img:focus-visible {
  filter: brightness(1.08);
  outline: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.gallery_text{
  display: flex;
  justify-content: space-between;
  align-items: flex-end; 
  max-width: 960px;
  margin: 8px auto 0;
  border-bottom: 2px solid #fd0;
  gap: 16px;
}
.gallery_text p {
  font-size: 1.1rem; 
  font-weight: 600; 
  letter-spacing: 0.02em; 
  color: #333; 
  margin: 0;   
}
.gallery_text img {
  display: block;
  transform-origin: bottom center; 
  animation: swing 3s ease-in-out infinite alternate; 
}

@keyframes swing {
  0%   { transform: rotate(6deg); }
  25%  { transform: rotate(-5deg); }
  50%  { transform: rotate(4deg); }
  75%  { transform: rotate(-3deg); }
  100% { transform: rotate(6deg); }
}

/* == 先輩コメント == */
.voices-box {
  position: relative;
  width: 100%;
  min-height: 660px;
  background-image: url('../img/people.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  padding: 64px 0 360px;
}
.voices-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 40px;
  max-width: 880px;
  margin: 0 auto;
}
.chat_text {
  position: relative;
  display: inline-block;
  width: 360px;
  margin-bottom: 16px;
  padding: 16px 24px;
  border-radius: 16px;
  background-color: var(--accent-light, #999);
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #333333;
}
.chat_text::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  border-style: solid;
  border-width: 16px 12px 0 12px;
  border-color: var(--accent-light, #999) transparent transparent;
  transform: translate(-50%, 100%); 
}

/* == 採用情報 == */
.recruit-table {
width: 88%;
margin: auto;
margin-top: 64px;
border-collapse: separate;
border-spacing: 0px 8px;
font-size: 16px;
}
.recruit-table th,
.recruit-table td {
padding: 12px;
}
.recruit-table th {
background: var(--accent-light, #999);
vertical-align: middle;
text-align: left;
width: 96px;
overflow: visible;
position: relative;
color: #fff;
font-weight: 500;
}
.recruit-table th:after {
left: 100%;
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(136, 183, 213, 0);
border-left-color: var(--accent-light, #999);
border-width: 5px;
margin-top: -5px;
}
.recruit-table td {
background: #f8f8f8;
width: 300px;
padding-left: 24px;
}

/* == フリースペース == */
.free_area {
  margin: 64px auto 16px;
  max-width: 480px;
}
.free_area h2 {
  position: relative;
  padding: .3em 0 .2em 1em;
  border-bottom: 3px solid var(--accent, #666);
  color: #333;
}
.free_area h2:before {
  position: absolute;
  top: 0;
  left: .3em;
  transform: rotate(55deg);
  height: 11px;
  width: 12px;
  background: var(--accent-dark, #333);
  content: '';
}
.free_area h2::after {
  position: absolute;
  transform: rotate(15deg);
  top: .6em;
  left: 0;
  height: 8px;
  width: 8px;
  background: var(--accent-light, #999);
  content: '';
}
.free_area p {
  padding: 12px 32px 16px;
  font-size: 1rem; 
  line-height: 1.8; 
  color: #333; 
  background: #f8f8f8; 
  border-radius: 8px; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

/* == 企業リンク == */
.work-url a {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 40px auto 96px;
  max-width: 225px;
  padding: 8px 0px 10px 40px;
  color: #333;
  transition: 0.3s ease-in-out;
  font-weight: 500;
  text-decoration: none;
}
.work-url a:before,
.work-url a:after {
  content: "";
  position: absolute;
  display: block;
  top: 50%;
}
.work-url a:before {
  width: 0.5rem;
  height: 0.5rem;
  left: 1.1rem;
  border-top: solid 2px #fff;
  border-right: solid 2px #fff;
  z-index: 2;
  transform: translateY(-50%) rotate(45deg);
  transition: all 0.3s;
}
.work-url a:after {
  left: 0;
  background: var(--accent-dark, #333);
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 4rem;
  transform: translateY(-50%);
  transition: all 0.5s;
}
.work-url a span {
  position: relative;
  transition: all 0.3s;
  z-index: 3;
}
.work-url a:hover span {
  color: #fff;
}
.work-url a:hover:before {
  left: 2rem;
}
.work-url a:hover:after {
  right: 0;
  width: 100%;
}

/* =======================
  レスポンシブ対応（～768px）
======================= */
@media (max-width:768px) {
  main>section {
    width: 100%;
    padding: 0 0 24px;
  }
  .hero .hero-image {
    padding: 0 16px;
    box-sizing: border-box;
  }
  .comment-body {
    flex-direction: column;
    gap: 24px;
  }
  .commentator,
  .comment {
    flex: 1 1 auto;
    width: 96%;
    min-width: 0;
    margin: 0 auto;
  }
  .comment-title {
    margin: auto;
    text-align: center;
  }
  .comment-title h2 {
    font-size: 28px;
    margin-bottom: 6px;
  }
  .comment-title h3 {
    font-size: 18px;
    margin-bottom: 36px;
  }

  section h2.caption {
    display: block; 
    margin: 1.5em auto 1.2em 1.2em; 
    font-size: 1.5rem; 
  }
  section h2.caption::before {
    bottom: calc(-3em / 4); 
    left: calc(-3em / 3); 
    width: 3em; 
    height: 3em;
  }

  .deco img {
    max-width: 360px;
    margin-top: 16px;
  }

  .heading {
    width: fit-content; 
    margin: 32px auto 0; 
    font-size: 1.2em; 
  }
  .heading::before,
  .heading::after {
    left: 16%; 
    transform: translateX(-16%);
  }

  .gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 auto 24px;
    padding: 0 4%;
    box-sizing: border-box;
  }
  .gallery .main_image {
    order: 0; 
    width: 100%;
    max-width: 720px;
  }
  .gallery .main_image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
  }
  .gallery .side_images {
    order: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    flex: 0 1 auto;
  }
  .gallery .side_images img {
    display: block;
    width: calc((100% - 16px) / 3);
    height: auto;
    border-radius: 8px;
    object-fit: contain;
  } 
  .gallery_text {
    padding: 0 4%; 
    box-sizing: border-box; 
  }
  
  .voices-box{
    min-height: unset;
    padding: 24px 0 clamp(80px, 66vw, 280px);
  }
  .voices-content{
    flex-direction: column;
    align-items: center; 
    gap: 16px;
    max-width: 96vw;
  }
  .chat_text{
    width: min(88vw, 480px); 
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 16px;
  }

  .overview {
    width: 80%;
    margin: 0 auto;
  }
  .overview th {
    display: inline-block;
    width: auto;
    padding: 8px 8px 4px;
    color: #333;
    font-weight: 700;
    line-height: 1.4;
    background: linear-gradient(transparent 60%, var(--accent-light, #999) 60%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  .overview td {
    display: block;
    padding: 4px 8px 12px;
    border-left: none;
  }

  .free_area {
    width: 88%;
    margin: 48px auto;
  }
  .free_area p {
    padding: 10px 20px; 
    font-size: 0.95rem;
    line-height: 1.7;
  }
}

/* == 会社概要（マップ非表示時の調整） == */
@media (min-width: 960px) {
  .overview-grid {
    display: block; 
  }
  .overview {
    max-width: 720px; 
    margin: 0 auto; 
  }
}
