:root {
  --primary-color: #1e293b;
  --secondary-color: #334155;
  --text-color: #475569;
  --light-text: #64748b;
  --bg-white: rgba(255, 255, 255, 0.7);
  --bg-light: rgba(248, 250, 252, 0.6);
  --border-light: rgba(0, 0, 0, 0.08);
  --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.1);
  --radius-medium: 16px;
  --radius-large: 20px;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.top {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.top img {
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.services {
  padding-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.service-box {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
  border-radius: var(--radius-medium);
  padding: 2.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-light);
  backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

.service-content {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-color);
}

.service-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--light-text);
}

.service-content ul {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--light-text);
  list-style: none;
  padding-left: 0;
}

.service-content li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
}

.service-content li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-size: 0.8em;
}

.service-image {
  height: 180px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.strengths-section {
  padding: 4rem 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  padding-bottom: 6rem;
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
  border-radius: var(--radius-large);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-medium);
}

.strengths-inner {
  display: flex;
  align-items: stretch;
  gap: 3rem;
  flex-wrap: wrap;
}

.strengths-image {
  flex: 0 0 450px;
  display: flex;
  align-items: stretch;
}

.strengths-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius-medium);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.strengths-content {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.strengths-content h3 {
  position: relative;
  display: inline-block;
  font-size: 1.4em;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.strengths-content h3::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.strengths-content > div {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

.strengths-content > div:last-child {
  border-bottom: none;
}

.strengths-content div,
.strengths-content p {
  color: var(--text-color);
  font-size: 1.1rem;
  line-height: 1.7;
}

.carousel-track {
  display: flex;
  gap: 32px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  padding: 4rem 0;
}

.case-card {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
  border-radius: var(--radius-medium);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  width: 360px;
  min-width: 360px;
  height: auto;
  flex: 0 0 auto;
  flex-direction: column;
  padding-bottom: 0;
  backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-light);
}

.case-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.4);
}

.case-card:first-child {
  border-left: 2px solid #3b82f6;
}

.case-card:last-child {
  border-right: 2px solid #3b82f6;
}

.case-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.case-img:hover {
  transform: scale(1.02);
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-arrow {
  flex: 0 0 auto;
  position: static;
  margin: 0 1.5vw;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #475569;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(59, 130, 246, 0.3);
  font-size: 1.3rem;
  opacity: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.carousel-arrow:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
  border-color: rgba(59, 130, 246, 0.6);
}

.carousel-arrow svg {
  width: 26px;
  height: 26px;
  display: block;
}

.carousel-arrow svg circle {
  display: none;
}

.carousel-container {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  background: transparent;
}

.carousel-arrow svg circle {
  display: none;
}

.carousel-arrow svg path {
  stroke: currentColor;
  fill: none;
}

.case-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.8em;
  letter-spacing: 0.02em;
}

.case-desc {
  color: var(--light-text);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}

.case-body {
  padding: 1.5em 2em 1.5em 2em;
}

.signage {
  width: 100%;
  height: auto;
  max-height: 700px;
  display: block;
  margin: 0 auto 1rem auto;
  object-fit: contain;
}

/* 事業紹介セクションの背景をより透明に */
#services {
  background: linear-gradient(
    135deg,
    var(--bg-white) 0%,
    var(--bg-light) 100%
  ) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid var(--border-light) !important;
}

/* 事例紹介セクションの背景をより透明に */
#cases {
  background: linear-gradient(
    135deg,
    var(--bg-white) 0%,
    var(--bg-light) 100%
  ) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid var(--border-light) !important;
}

.image-with-text {
  position: relative;
  display: block;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  margin-bottom: 2rem;
}

.image-with-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 10;
  pointer-events: none;
}

.image-with-text .top {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: bottom;
  display: block;
}

.image-overlay-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 3.2rem;
  font-weight: 700;
  text-align: center;
  padding: 2rem;
  max-width: 85%;
  line-height: 1.4;
  letter-spacing: 0.02em;
  z-index: 20;
  width: 100%;

  /* 強化されたテキスト視認性 */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 4px 8px rgba(0, 0, 0, 0.7),
    0 8px 16px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0.8px rgba(0, 0, 0, 0.4);

  /* アニメーション効果 */
  opacity: 0;
  transform: translate(-50%, -60%);
  animation: fadeInUp 1.5s ease-out 0.5s forwards;
}

/* ふわっと出てくるアニメーション */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* スクロールアニメーション用のスタイル */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* 事業紹介セクションのアニメーション */
.service-box.scroll-animate {
  transform: translateY(50px) scale(0.95);
}

.service-box.scroll-animate.animate-in {
  transform: translateY(0) scale(1);
}

/* 強みセクションのアニメーション */
.strengths-section.scroll-animate {
  transform: translateY(60px);
}

.strengths-section.scroll-animate.animate-in {
  transform: translateY(0);
}

/* 事例紹介カードのアニメーション */
.case-card.scroll-animate {
  opacity: 0;
  transform: translateY(40px) rotateX(10deg);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.case-card.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* 特定の画像の位置調整 */
.case-img[src*="work-fire.png"] {
  object-position: center top;
}

.case-img[src*="work-aqua.png"] {
  object-position: center center;
}

.case-img[src*="work-newspark.png"] {
  object-position: center center;
}

.case-img[src*="work-katsu.png"] {
  object-position: center center;
}

.case-img[src*="work-halloween.png"] {
  object-position: center center;
}

@media (max-width: 480px) {
  .image-with-text {
    height: 20vh;
    min-height: 235px;
    margin-bottom: 1rem;
  }

  .image-with-text .top {
    min-height: 100%;
    width: 100%;
    height: auto;
  }

  .image-overlay-text {
    font-size: 1rem;
    padding: 1rem;
    max-width: 95%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 4px 8px rgba(0, 0, 0, 0.7),
      0 8px 16px rgba(0, 0, 0, 0.5);
    -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.4);
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .signage {
    width: 100%;
  }

  .service-content p {
    font-size: 1rem;
  }

  .service-content li {
    font-size: 1rem;
  }

  .strengths-image {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
  }

  .strengths-image img {
    width: 100%;
  }

  .strengths-content h3 {
    font-size: medium;
  }

  .strengths-content div,
  .strengths-content p {
    font-size: 1rem;
  }

  .carousel-wrapper {
    flex-wrap: wrap;
  }

  .carousel-container {
    margin-bottom: 1rem;
  }

  .carousel-track {
    gap: 0;
  }

  .case-card {
    min-width: 92.5vw;
    width: 92.5vw;
    flex-shrink: 0;
    transition: all 0.2s ease-out;
    margin: 0;
    box-sizing: border-box;
  }

  .case-img {
    height: 200px;
    object-fit: cover;
    object-position: center;
  }

  .case-body {
    padding: 1.5rem;
  }

  .case-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
  }

  .case-desc {
    font-size: 1rem;
    line-height: 1.5;
  }

  .carousel-arrow {
    position: static;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    transition: all 0.3s ease-out;
    background: #ffffff;
    border: 3px solid #3b82f6;
    flex-shrink: 0;
    color: #1e40af;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    order: 2;
  }

  .carousel-arrow:hover {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
  }

  .carousel-arrow.left {
    margin-right: 1rem;
  }

  .carousel-arrow.right {
    margin-left: 1rem;
  }

  .carousel-arrow svg {
    width: 28px;
    height: 28px;
    stroke-width: 3;
  }

  .services {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1rem;
  }
}

/* iPad用のレスポンシブ対応 (768px - 1366px) */
@media (min-width: 481px) and (max-width: 1366px) {
  .image-overlay-text {
    font-size: 2rem;
    padding: 1.5rem;
    max-width: 90%;
  }

  .services {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
  }

  .service-box {
    padding: 2rem;
  }

  .strengths-section {
    padding: 3rem 1.5rem;
  }

  .strengths-inner {
    gap: 2rem;
  }

  .strengths-image {
    flex: 0 0 350px;
  }

  .carousel-track {
    gap: 20px;
    padding: 2rem 0;
  }

  .case-card {
    width: 300px;
    min-width: 300px;
  }

  .case-body {
    padding: 1.5rem;
  }

  .carousel-arrow {
    width: 45px;
    height: 45px;
    margin: 0 1rem;
  }

  .carousel-arrow svg {
    width: 24px;
    height: 24px;
  }
}
