/* footer.css - 広告の重なりを防ぐよう調整 */
footer {
  background: #fff;
  border-top: 1px solid #ccc;
  padding: 20px 10px;
  width: 100%;
  margin-top: auto;
  text-align: center;
  box-sizing: border-box;
  position: relative;
  z-index: 100;
  clear: both;
}

.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.footer-item {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
  padding: 2px 0;
  transition: color 0.3s;
  white-space: nowrap;
  display: inline-block;
  margin: 0 5px;
}

.footer-item:hover {
  color: #1e90ff;
}

.footer-item::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background-color: #1e90ff;
  transition: width 0.3s ease;
  margin-top: 2px;
}

.footer-item:hover::after {
  width: 100%;
}

/* 日本語用の調整 */
html[lang="ja"] .footer-wrapper {
  flex-direction: row;
  flex-wrap: wrap;
  row-gap: 10px;
  column-gap: 15px;
}

html[lang="ja"] .footer-item {
  font-size: 12px;
  margin: 0 3px;
}

/* モバイル対応 - すべての言語で縦並びに */
@media (max-width: 768px) {
  .footer-wrapper {
    flex-direction: column;
    gap: 12px;
    padding: 5px 0;
  }
  
  .footer-item {
    margin: 3px 0;
    font-size: 13px;
    padding: 5px;
  }
  
  /* 日本語のモバイル対応 */
  html[lang="ja"] .footer-wrapper {
    flex-direction: column;
  }
  
  html[lang="ja"] .footer-item {
    font-size: 12px;
    margin: 3px 0;
  }
  
  footer {
    padding: 15px 10px;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 10px 5px;
  }
}