/* ======== 共通レイアウト ======== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  background-color: var(--light-color);
  z-index: 1;
  padding-top: 80px;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
}

.slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 160px;
  z-index: 10;
  pointer-events: none;
}

.hero-slider.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-slider.fade-in.animate {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease;
}

.slides {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: calc(100vh - 80px - 80px);
}

/* ======== 各スライド（アニメ付き切替） ======== */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  z-index: 5;
  background-color: var(--light-color);
  box-sizing: border-box;
  transition: opacity 1s ease, visibility 1s ease;
  padding-top: 0;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.slide:not([data-decoration]) .connection-style {
  display: block;
  position: relative;
  z-index: 2;
}

.connection-person,
.connection-client {
  background-color: transparent !important;
  background-image: var(--custom-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 50%;
  width: 120px;
  height: 120px;
}

.slide[data-decoration] .slide-bg-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 60vw;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  clip-path: polygon(20% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.slide-bg-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clipped-bg {
  width: 110%;
  height: 110%;
  object-fit: cover;
  transform: translateY(-50%);
  filter: brightness(0.6);
}

.slide-grid {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 200px;
  gap: 40px;
}


.slide-text {
  position: relative;
  z-index: 10;
  max-width: 600px;
  text-align: left;
  color: #ffffff;

}

.slide-text h1 {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 30px;
  text-shadow:
    -1px -1px 0 #ff0000,
    1px -1px 0 #ffb9b9,
    -1px 1px 0 #333,
    1px 1px 0 #dddddd;
}

.slide-text h1 span {
  color: var(--primary-color);
  position: relative;
  text-shadow: 1px 1px 1px #ffffff;
}

.slide-text h1 span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(224, 32, 32, 0.2);
  z-index: -1;
}

.slide-text p {
  font-size: 1.1rem;
  margin-bottom: 40px;
  color: #0e0e0e;
}

.primary-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: 0.3s;
}

.primary-button:hover {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

/* ======== コントロール ======== */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  background: none;
  border: none;
  font-size: 3rem;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0 10px;
}

.slider-arrow:hover {
  color: var(--primary-color);
}

.prev-arrow {
  left: 20px;
}

.next-arrow {
  right: 20px;
}


.hidden {
  display: none !important;
}

.page-content {
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  z-index: 10;
  background-color: var(--light-color);
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .slide-text h1 {
    font-size: 2.8rem;

  }

}

@media (max-width: 768px) {

  .slide-bg-wrapper img {
    display: none;
  }

  .hero-slider {
    height: auto;
    padding-top: 60px;
  }

  .slides {
    position: static;
    display: block;
    height: auto;
    overflow: visible;
  }

  .slide {
    display: none !important;
    position: static !important;
    width: 100%;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 60px 20px;
    box-sizing: border-box;
  }

  .slide:first-child {
    display: block !important;
  }

  .slide::after {
    display: none;
  }

  .slide-grid {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 0 16px;
    height: auto;
    text-align: center;
  }

  .slide-text {
    max-width: 100%;
  }

  .slide-text h1 {
    font-size: 2.2rem;
    line-height: 1.4;
    margin-bottom: 25px;
  }

  .slide-text p {
    display: none;
  }

  .connection-person,
  .connection-client {
    background-color: transparent !important;
    background-image: var(--custom-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    width: 80px;
    height: 80px;
  }

  .slide-bg-wrapper {
    position: static;
    width: 100%;
    height: auto;
    clip-path: none;
    margin-top: 20px;
  }

  .slide-bg-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .slider-arrow {
    display: none !important;
  }

  .dots {
    display: none !important;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  right: 10px;
  transform: node;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

.scroll-text {
  font-size: 0.9rem;
  color: rgba(214, 214, 214, 0.85);
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.arrow-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.arrow-icon {
  width: 24px;
  height: 24px;
  animation: floatArrow 1.8s ease-in-out infinite;
}

.arrow-icon.delay-0 {
  animation-delay: 0s;
}

.arrow-icon.delay-1 {
  animation-delay: 0.3s;
}

.arrow-icon.delay-2 {
  animation-delay: 0.6s;
}

@keyframes floatArrow {
  0% {
    transform: translateY(0);
    opacity: 0.3;
  }

  50% {
    transform: translateY(6px);
    opacity: 1;
  }

  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
}