/* Home history styles extracted from style.css */

/* ===== History セクション装飾 ===== */
.home-history-section {
  position: relative;
  overflow: visible;
}

.home-history-section .heading-mobile {
  flex-direction: column !important;
  align-items: center !important;
}

.home-history-section .heading-mobile h2 {
  text-align: center;
  margin: 0;
}

.home-history-text-area {
  width: 100%;
  max-width: 838px;
  margin: 0 auto;
}

.home-history-bg-diagonal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  min-width: 0;
  transform: translate(-50%, -50%);
}

.home-history-gallery-area {
  position: relative;
  display: flex;
  align-items: center;
  width: var(--yj-vw);
  max-width: none !important;
  min-height: 493px;
  margin-left: calc(50% - (var(--yj-vw) / 2));
}

.home-history-gallery-area.has-global-padding,
.home-history-gallery-area .home-history-bg-diagonal.has-global-padding {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.home-history-gallery-area .home-history-bg-diagonal {
  max-width: none !important;
}

.home-history-section > * {
  position: relative;
  z-index: 1;
}

.home-history-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 60px;
}

.home-history-copy {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);
  width: 100%;
}

@media (width >= 769px) {
  .home-history-text-area {
    align-items: center;
  }

  .home-history-section .heading-mobile {
    width: 100%;
    justify-content: center;
  }

  .home-history-copy .text-japanese,
  .home-history-copy .is-style-en-paragraph {
    text-align: center;
  }

  .home-history-text-area .about-more {
    width: 100%;
    justify-content: center;
  }
}

.home-history-gallery {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 838px !important;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.home-history-gallery__item {
  margin: 0;
  width: 100%;
}

.home-history-gallery__item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

@media (width <= 1024px) {
  .home-history-bg-diagonal {
    top: 50%;
  }

  .home-history-text-area {
    max-width: 100%;
  }

  .home-history-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 100%;
  }

  .home-history-gallery-area {
    min-height: 400px;
  }
}

@media (width <= 768px) {
  .home-history-bg-diagonal {
    overflow: visible;
  }

  .home-history-bg-diagonal path {
    transform-box: fill-box;
    transform-origin: center;
    transform: scaleY(2);
  }

  .home-history-copy .text-japanese,
  .home-history-copy .is-style-en-paragraph {
    text-align: left;
  }

  .home-history-gallery {
    width: min(100%, var(--yj-content-width));
    padding-right: var(--yj-side-padding);
    padding-left: var(--yj-side-padding);
    box-sizing: border-box;
  }
}
