#hero {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: #ffffd6;
  position: relative;
  padding: 0; /* 以前のpaddingをリセット */
  text-align: left; /* 以前のcenterをリセット */
  flex-direction: row; /* 以前のcolumnをリセット */
  justify-content: flex-start; /* 以前のcenterをリセット */
  align-items: stretch; /* 以前のcenterをリセット */
}

/* 左側：テキストエリア */
.hero-text-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 80px;
  background: #ffffd6;
  position: relative;
  z-index: 2;
}

.hero-text-area-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 20px;
  align-self: flex-start;
}

.hero-label {
  display: inline-block;
  background: #ff4040;
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 20px;
  width: fit-content;
  align-self: flex-start;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: #333;
  line-height: 1.2;
  margin-bottom: 30px;
  letter-spacing: -0.02em;
  align-self: flex-start;
}

.hero-title span {
  color: #ff4040;
  position: relative;
  display: inline-block;
}

/* マーカー風の下線 */
.hero-title span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 15px;
  background: rgba(255, 255, 0, 0.4);
  z-index: -1;
  transform: skewX(-20deg);
}

.hero-description {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-btn-group {
  display: flex;
  gap: 20px;
  align-self: flex-start;
}

.btn-primary {
  padding: 18px 40px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.btn-primary:hover {
  background: #555;
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 18px 40px;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  border: 2px solid #333;
  transition: background 0.3s;
}
.btn-secondary:hover {
  background: #f0f0f0;
}

/* 右側:画像エリア */
.hero-image-area {
  flex: 1;
  position: relative;
  background: #ffffd6;
  overflow: hidden;
}

/* スライドショー用スタイル */
.hero-image-area .main-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero-image-area .main-image.active {
  opacity: 1;
  z-index: 1;
}

/* メイン画像 */
.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 浮かぶカード（事業内容の具体性） */
.floating-card {
  position: absolute;
  background: rgba(255, 253, 224, 0.95);
  padding: 15px 25px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: bold;
  color: #333;
  z-index: 3;
  animation: floatCard 4s ease-in-out infinite;
  min-width: 180px;
}

.floating-card i {
  font-size: 1.5rem;
  color: #ff4040;
}
.floating-card .card-label {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 2px;
}
.floating-card .card-text {
  font-size: 1rem;
}

.card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}
.card-2 {
  bottom: 25%;
  right: 10%;
  animation-delay: 2s;
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* SP対応 */
@media (max-width: 900px) {
  #hero {
    flex-direction: column-reverse;
    min-height: auto; /* モバイルでは高さを固定しない */
    padding-bottom: 40px;
  }
  .hero-image-area {
    height: 40vh;
    width: 100%;
    flex: none;
  }
  .hero-text-area {
    padding: 40px 20px;
    width: 100%;
    flex: none; /* コンテンツの高さに合わせる */
  }
  .hero-logo {
    align-self: center;
  }
  .hero-label {
    align-self: center;
  }
  .hero-title {
    font-size: 2.2rem;
    align-self: center;
    text-align: center;
  }
  .hero-description {
    display: none;
  }
  .hero-btn-group {
    justify-content: center;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    align-self: center;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .card-1 {
    top: 10%;
    left: 5%;
    transform: scale(0.8);
  }
  .card-2 {
    bottom: 10%;
    right: 5%;
    transform: scale(0.8);
  }
}

.hero-keywords {
  list-style: none;
  padding: 0;
  margin: 20px 0 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-items: start;
  gap: 15px 10px;
  max-width: 600px;
  width: 100%;
  align-self: flex-start;
}

.hero-keywords li {
  /* ポップなスタイル */
  font-size: 1.5rem;
  font-weight: 900;
  color: #ff4040;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  
  /* 白い縁取りと影 */
  text-shadow: 
    2px 2px 0 #fff, -2px -2px 0 #fff,
    -2px 2px 0 #fff, 2px -2px 0 #fff,
    4px 4px 0 rgba(0,0,0,0.1);
    
  transform: rotate(-3deg);
  transition: transform 0.3s;
  display: inline-block;
}

.hero-keywords li:nth-child(even) {
  color: #ff6b3d; /* アクセントで少し色を変える */
}

.hero-keywords li:hover {
  transform: scale(1.1) rotate(0deg);
}

.hero-keywords li::before {
  content: none;
}

/* スマホでキーワードを1列にする */
@media (max-width: 600px) {
  .hero-keywords {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* タブレット・スマホでは中央寄せに戻す */
@media (max-width: 900px) {
  .hero-keywords {
    justify-items: center;
  }
}