/* ========================================
   関連ツールセクション
   ======================================== */

.related-tools-section {
  margin-top: 120px; /* 広告との十分なマージン */
  padding: 4rem 1.5rem;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 1) 20%);
}

.related-tools-container {
  max-width: 1200px;
  margin: 0 auto;
}

.related-tools-header {
  text-align: center;
  margin-bottom: 3rem;
}

.related-tools-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.related-tools-subtitle {
  font-size: 1rem;
  color: #64748b;
}

/* グリッドレイアウト - モバイルファースト */
.related-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .related-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* カードスタイル */
.related-tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  overflow: hidden;
}

.related-tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.related-tool-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

.related-tool-card:hover::before {
  transform: scaleX(1);
}

.related-tool-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.related-tool-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.related-tool-category {
  display: inline-block;
  font-size: 0.75rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.related-tool-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  color: #3b82f6;
  transition: transform 0.3s ease;
}

.related-tool-card:hover .related-tool-arrow {
  transform: translateX(4px);
}

/* ========================================
   お気に入りボタン
   ======================================== */

.page-header-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.favorite-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
}

.favorite-button:hover {
  border-color: #fbbf24;
  color: #f59e0b;
  background: #fef3c7;
}

.favorite-button.is-favorite {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #d97706;
}

.favorite-button.is-favorite .favorite-icon {
  fill: #f59e0b;
  stroke: #d97706;
}

.favorite-icon {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.favorite-button:hover .favorite-icon {
  transform: scale(1.1);
}

.favorite-button.is-favorite:hover .favorite-icon {
  animation: heartbeat 0.6s ease infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* モバイル対応 */
@media (max-width: 640px) {
  .favorite-text {
    display: none;
  }
  
  .favorite-button {
    padding: 0.625rem;
  }
}

/* ========================================
   トースト通知
   ======================================== */

.cb-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: white;
  color: #1e293b;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  max-width: 320px;
}

.cb-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.cb-toast-success {
  border-left: 4px solid #10b981;
}

.cb-toast-info {
  border-left: 4px solid #3b82f6;
}

.cb-toast-warning {
  border-left: 4px solid #f59e0b;
}

.cb-toast-error {
  border-left: 4px solid #ef4444;
}

/* モバイル対応 */
@media (max-width: 640px) {
  .cb-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* ========================================
   レスポンシブ調整
   ======================================== */

@media (max-width: 768px) {
  .related-tools-section {
    margin-top: 80px;
    padding: 3rem 1rem;
  }

  .related-tools-title {
    font-size: 1.5rem;
  }

  .related-tools-subtitle {
    font-size: 0.875rem;
  }
}
