@charset "utf-8";

:root {
  --font-family-mincho: "Hiragino Mincho ProN", "YuMincho", serif;
  --font-family-gothic: "Hiragino Kaku Gothic ProN", "YuGothic", sans-serif;
}

body {
  font-family: var(--font-family-gothic);
  color: #767676;
  background-color: #fff;
}

a {
  color: #707070;

  &:has(img) {
    transition: opacity 0.3s ease;

    @media (max-width: 992px) {
      display: block;
      margin-block-end: 10px;
    }

    @media (hover: hover) {
      &:hover {
        opacity: 0.7;
      }
    }
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-mincho);
}

h2,
h3,
h4 {
  font-size: 1.25rem;
}

table {

  th,
  td {
    line-height: 2;
  }
}

.page-section__title {
  font-size: 1.25rem;

  &::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 10px;
    background: linear-gradient(to right, #004ea2, transparent);
  }
}

.address-title {
  &::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 30px 10px;
    border-color: transparent transparent transparent #e60012;
    margin: 0 10px -10px;
    transform: rotate(50deg);
  }
}

.navbar-logo {
  font-weight: bold;
  font-size: 1.8rem;
}

.container:has(.navbar-brand) {
  @media (width <=992px) {
    align-items: flex-start;
  }

  @media (width >=1200px) {
    align-items: flex-end;
  }
}

.site-title {
  display: flex;
  align-items: flex-end;
  gap: min(0.9svw, 24px);

  @media (max-width: 992px) {
    flex-direction: column;
    gap: 6px;
  }

  >span {
    font-family: var(--font-family-gothic);
    font-size: 14px;
  }
}

.site-title__text {
  display: flex;
  row-gap: 10px;

  @media (max-width: 768px) {
    flex-direction: column;
  }

  @media (min-width: 768px) {
    align-items: flex-end;
    column-gap: 30px;
  }
}

.nav-item {
  a:not([class]) {
    color: inherit;
    text-decoration: none;
  }
}

.header-navbar {
  gap: min(0.9svw, 12px);

  .nav-link {
    font-size: 14px;

    @media (width <=992px) {
      font-size: 14px;
    }
  }
}

.hero-section {
  background: #efefef;
  text-align: center;
  position: relative;
  align-content: center;
  height: 642px;
}

.hero-message {
  text-align: center;
  color: #fff;
  position: absolute;
  inset: 0;
  align-content: center;
  z-index: 1;
  display: grid;
  gap: 10px;
  bottom: -18%;
  margin-inline: auto;
  width: calc(100% - 30px);
  text-shadow: 1px 1px 2px #000;

  @media (max-width: 600px) {
    /* bottom: -30%; */
  }
}

.hero-message__title {
  line-height: 1;
  font-size: max(4.3svw, 60px);
  font-family: var(--font-family-mincho);

  @media (max-width: 600px) {
    font-size: 30px;
    display: grid;
    gap: 5px;
  }
}

.hero-message__desc {
  /* font-size: 18px; */
  font-size: max(18px, 1.2svw);

  @media (max-width: 600px) {
    font-size: 12px;
  }
}


.main-message {
  /* text-align: center; */
  padding-block: 60px;
}

.card-section {
  padding-block-end: 100px;
}

.card-section__title {
  font-size: 1.25rem;
  margin-bottom: .5rem;
  line-height: 1.2;

  &::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 10px;
    background: linear-gradient(to right, #004ea2, transparent);
  }
}

.card-title {
  aspect-ratio: 2 / 1;
  align-content: center;
  display: block;
  transition: background-color 0.3s ease;

  @media (hover: hover) {
    &:hover {
      background-color: #f5f5f5;
    }
  }
}

.card-section__body {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 30px;
}

.address {
  background-color: #efefef;
  color: white;
  padding-block: 30px;
}

.address-title {
  color: #767676;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.address-content {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
}

.copyright {
  background-color: #666;
  color: #fff;
  text-align: right;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

/* 下層ページ */
.page-header {
  background-image: url(../img/service_kv.jpg);
  background-size: cover;
  height: 260px;
  align-content: center;
}


/* 事業内容 */
.page-service {
  .page-header {
    background-image: url(../img/service_kv.jpg);
  }
}

.container {
  @media (width >=1400px) {
    max-width: 1200px;
  }
}

.service-tech__title {
  &::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 30px 10px;
    border-color: transparent transparent transparent #e60012;
    margin: 0 10px -10px;
    transform: rotate(50deg);
  }
}

/* 企業情報 */
.page-company {
  .page-header {
    background-image: url(../img/company_kv.jpg);
  }
}

.table-company>:not(caption)>*>* {
  padding: 0;
}

.table-company>:not(caption) {
  th {
    width: 80px;
  }

  th,
  td {
    padding-block: 1rem;
  }
}

/* TOYOグループ */
.page-group {
  .page-header {
    background-image: url(../img/group_kv.jpg);
  }
}

.group-corp__name {
  &::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 30px 10px;
    border-color: transparent transparent transparent #e60012;
    margin: 0 10px -10px;
    transform: rotate(50deg);
  }
}

/* 採用情報 */
.page-recruit {
  .page-header {
    background-image: url(../img/recruit_kv.jpg);
  }
}

/* 設備紹介 */
.page-factory {
  .page-header {
    background-image: url(../img/factory_kv.jpg);
  }
}

.facility-item__name {
  margin-bottom: .5rem;
  line-height: 1.2;

  &::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 10px;
    background: linear-gradient(to right, #004ea2, transparent);
  }

}

/* ワークフロー */
.workflow-items {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-block-end: 50px;
}

.workflow-item {
  @media (width >=920px) {
    max-width: 350px;
  }
}

/* 施設紹介 */
.page-office {
  .page-header {
    background-image: url(../img/office_kv.jpg);
  }
}

.office-items {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-block-end: 50px;
}

.office-item {
  @media (width >=920px) {
    max-width: 350px;
  }
}

/* モーダル */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  background-color: transparent;
  border: 0;
}

.service-gallery img {
  cursor: pointer;
  transition: opacity 0.3s ease;

  &:hover {
    opacity: 0.8;
  }
}

#lightboxModal {
  .btn-close {
    opacity: 0.8;
    top: -40px;
    right: 0;
    background: none;
    background-color: #fff;
    mask-image: var(--bs-btn-close-bg);
  }

  #lightboxImage {
    width: 100%;
    border-radius: var(--bs-modal-border-radius);
    max-height: 90vh;
    object-fit: contain;
  }
}

/* 追加 */

.navbar {
  background-color: rgba(255, 255, 255, 0.8);
}

.nav-item:not(:has(.btn)) {
  .nav-link {
    position: relative;

    &::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 4px;
      background-color: #004ea2;
      transition: width 0.3s ease;
    }

    &:hover::after {
      width: 100%;
    }

    &.active {
      &::after {
        width: 100%;
      }
    }
  }
}

.nav-item .active {
  font-weight: bold;
}

.page-header h1 {
  color: #ffffff;
  text-shadow: 1px 1px 2px #000000;
  letter-spacing: .5rem;
}

.nav-link-recruit {
  background-color: rgb(216 227 238);

  @media (any-hover: hover) {
    &:hover {
      background-color: rgb(216 227 238 / 0.7);
    }
  }
}