:root {
  --title-shadow: 0px 0px 16px rgba(0, 0, 0, 0.40);
}

*,
*::before,
*::after {
  min-width: 0px;
  min-height: 0px;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--snow);
  letter-spacing: 0.1em;
}

#root {
  max-width: 1920px;
  margin: 0 auto;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
}
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  line-height: inherit;
}

img, iframe {
  max-width: 100%;
}
iframe {
  border: none;
  box-shadow: none;
}

a, a:hover {
  color: var(--ink);
}

[id] {
  scroll-margin-top: 3.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

button {
  position: relative;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
  border: 0;
  outline: none;
  background: none;
  padding: 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1.5rem;
  list-style: disc outside none;

  & > p {
    margin: 0;
    display: list-item;
  }
  
  &.list--ol {
    list-style-type: decimal;
  }
  
  &.list--alpha {
    list-style-type: lower-alpha
  }
}

.webgene-pagination {
  & ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0;
    margin: 0;

    & li {
      & a {
        display: inline-block;
        width: 3rem;
        line-height: 3rem;
        text-align: center;
        &:hover {
          text-decoration: none;
        }
      }

      &.selected {
        & a {
          &:hover {}
        }
      }
    }
  }
}

.webgene-no-items {
  width: 100%;
  text-align: center;
  font-size: 0.875rem;
}

.thumbnail {
  position: relative;
  padding-top: 56.25%;
  border-radius: 1rem;
  overflow: hidden;


  &.thumbnail--16x9 {
    padding-top: 56.25%;
  }

  & img,
  &:empty::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  &:empty::before {
    content: "";
    background-image: url("/system_panel/uploads/images/ogp.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
  }
}

.article-body {
  & > p {
    margin: 1em 0;
  }

  & > h1,
  & > h2,
  & > h3,
  & > h4,
  & > h5,
  & > h6 {
    margin: 2em 0 1em;
  }

  & > *:first-child {
    margin-top: 0;
  }

  & > *:last-child {
    margin-bottom: 0;
  }

  & a,
  & a:hover {
    color: var(--blue);
    text-decoration: underline;
  }
}

.backdrop-object {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.section-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  font-weight: 700;
  
  & .section-title__wrapper {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  & .section-title__en {
    color: var(--title-color, var(--blue));
    letter-spacing: 0;
    line-height: 1;
    font-size: 0.875rem;
    
    @media screen and (min-width: 768px) {
      font-size: 1.125rem
    }
    @media screen and (min-width: 1024px) {
      font-size: 1.75rem
    }
  }
  
  & .section-title__ja {
    letter-spacing: 0.1em;
    line-height: 1.25;
    font-size: 1.5rem;
    
    @media screen and (min-width: 768px) {
      font-size: 3rem
    }
    @media screen and (min-width: 1024px) {
      font-size: 3.5rem
    }
  }
  
  &::after {
    content: "";
    display: block;
    height: 6px;
    width: 90px;
    border-radius: 9999px;
    background-color: var(--title-color, var(--blue));
  }
  
  &.section-title--no-line::after {
    display: none;
  }
  
  &.section-title--start {
    align-items: start;
    
    & .section-title__wrapper {
      text-align: start;
    }
  }
  
  &.section-title--shadow {
    & .section-title__ja {
      text-shadow: var(--title-shadow);
    }
  }
  
  &.section-title--green {
    --title-color: var(--green);
  }
  &.section-title--sky {
    --title-color: var(--sky);
  }
  &.section-title--purple {
    --title-color: var(--purple);
  }
  &.section-title--enji {
    --title-color: var(--enji);
  }
  &.section-title--light-blue {
    --title-color: var(--light-blue);
  }
}

.title-shadow {
  text-shadow: var(--title-shadow);
}

.section-dec {
  position: absolute;
  
  & img {
    width: 100%;
  }
  
  &.section-dec--tr {
    width: 79.125%;
    top: 0;
    right: 0;
    transform: translate(19.747%, -12.4%);
  }
  &.section-dec--tl {
    width: 79.125%;
    top: 0;
    left: 0;
    transform: translate(-19.747%, -12.4%);
  }
  &.section-dec--cr {
    width: 79.125%;
    top: 45%;
    right: 0;
    transform: translateX(19.125%);
  }
  &.section-dec--bl {
    width: 79.125%;
    bottom: 0;
    left: 0;
    transform: translate(-30.8%, 8.68%);
  }
  &.section-dec--bl-2 {
    width: 79.125%;
    bottom: 0;
    left: 0;
    transform: translate(-41.6%, 27.624%);
  }
  &.section-dec--br {
    width: 79.125%;
    bottom: 0;
    right: 0;
    transform: translate(30.8%, 8.68%);
  }
}

.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 0.75rem 0.75rem 2rem;
  border-radius: 9999px;
  background-color: var(--blue);
  letter-spacing: 0;
  line-height: 1.25;
  font-weight: 500;
  font-size: 1rem;
  color: var(--snow);
  transition: opacity ease 400ms;
  
  &::after {
    position: relative;
    content: "";
    display: block;
    height: 0.375rem;
    width: 0.375rem;
    border-radius: 9999px;
    background-color: var(--snow);
    margin: 0.5625rem;
  }
  
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 9999px;
    background-color: hsl(from var(--snow) h s l / 20%);
    transition: transform ease 400ms;
  }
  
  &:hover {
    color: var(--snow);
    text-decoration: none;
    opacity: 90%;
    &::before {
      transform: translateY(-50%) scale(0);
    }
  }
  
  &.button--sky {
    background-color: var(--sky);
  }
  &.button--green {
    background-color: var(--green);
  }
  &.button--purple {
    background-color: var(--purple);
  }
}

.category-list {
  & .webgene-blog {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: baseline;
    
    @media screen and (min-width: 1200px) {
      flex-direction: column;
      align-items: stretch;
    }
  }
}

.history-list {
  @media screen and (min-width: 768px) {
    & > div {
      & > :nth-of-type(1) {
        padding-left: 1rem;
        padding-right: 1rem;
      }
      & > :nth-of-type(3) {
        padding-left: 1rem;
        padding-right: 1rem;
      }
    }
  }
}


.equipment-table {
  display: flex;
  flex-direction: column;
  min-width: 720px;
  gap: 0.25rem;
  
  & .equipment-table__row {
    display: flex;
    gap: 0.5rem;
  }
  & .equipment-table__heading {
    border-radius: 0.75rem;
    background-color: var(--sky);
    color: var(--snow);
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    max-width: 16.25rem;
    flex: 1 0 0%;
  }
  & .equipment-table__cell {
    padding: 0.75rem 1.25rem;
    flex: 1 0 0%;
    border-bottom: 1px solid hsl(from var(--ink) h s l / 30%);
    font-weight: 500;
    
    &.equipment-table__cell--maker {
    }
    &.equipment-table__cell--model {
      max-width: 13.75rem;
    }
    &.equipment-table__cell--quantity {
      max-width: 5rem;
    }
  }
}

.introduction-table {
  display: flex;
  flex-direction: column;
  min-width: 720px;
  gap: 0.25rem;
  
  & .introduction-table__row {
    display: flex;
    gap: 1.125rem;
    align-items: center;
    letter-spacing: 0.04em;
  }
  & .introduction__heading {
    border-radius: 0.75rem;
    background-color: var(--sky);
    color: var(--snow);
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    max-width: 20rem;
    flex: 1 0 0%;
  }
}

.news-list {
  & .webgene-blog {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

.swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  overflow: auto;
  
  & .swiper-slide {
    min-width: 100%;
  }
}

.swiper.farm-gallery .swiper-wrapper {
  transition-timing-function: linear;
}
