/* ==========================================
   News Common Styles - Shared across all news pages
   ========================================== */

/* News Controls */
.news-controls {
  margin-bottom: 2rem;
  text-align: center;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.filter-btn {
  background: #f3f4f6;
  color: #374151;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.filter-btn.active {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Featured articles get special layout on larger screens */
@media (min-width: 1200px) {
  .news-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  
  .news-card--featured:first-child {
    grid-row: span 2;
  }
  
  .news-card--featured:first-child .news-card__title {
    font-size: 1.8rem;
  }
  
  .news-card--featured:first-child .news-card__excerpt {
    font-size: 1.1rem;
  }
}

/* News Card Base */
.news-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.news-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.news-card:hover::before {
  opacity: 1;
}

/* Featured News Card */
.news-card--featured {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
  border: 2px solid rgba(37, 99, 235, 0.1);
  position: relative;
}

.news-card--featured::before {
  background: linear-gradient(90deg, #2563eb, #3b82f6, #8b5cf6);
  height: 6px;
}

.news-card__featured-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #ff6b6b, #ffa500, #ffeb3b);
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom-left-radius: 8px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  animation: pulse-badge 2s infinite;
  z-index: 3;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
  }
}

/* Content wrapper */
.news-card__content {
  position: relative;
  z-index: 2;
}

/* Meta Information */
.news-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.news-card__category {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.news-card__category::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.8s;
}

.news-card:hover .news-card__category::before {
  left: 100%;
}

.news-card--featured .news-card__category {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  animation: rainbow-glow 3s infinite;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes rainbow-glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.7);
  }
}

.news-card__date {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Title */
.news-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.news-card:hover .news-card__title {
  color: #2563eb;
}

.news-card--featured .news-card__title {
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Excerpt */
.news-card__excerpt {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.news-card--featured .news-card__excerpt {
  color: #374151;
  font-weight: 500;
}

/* Tags */
.news-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag,
.news-tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tag::before,
.news-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s;
}

.tag:hover::before,
.news-tag:hover::before {
  left: 100%;
}

.tag:hover,
.news-tag:hover {
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
  color: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-card--featured .tag {
  background: linear-gradient(135deg, #ddd6fe, #e0e7ff);
  color: #5b21b6;
  font-weight: 600;
}

/* News Article Layout Styles */
.news-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.8;
  color: #374151;
}

.news-article h1 {
  font-size: 2.2rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  color: #1f2937;
  font-weight: 700;
}

.news-article h2 {
  font-size: 1.8rem;
  line-height: 1.4;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  color: #1f2937;
  font-weight: 600;
  border-left: 4px solid #2563eb;
  padding-left: 1rem;
}

.news-article h3 {
  font-size: 1.4rem;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #374151;
  font-weight: 600;
}

.news-article p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.news-article ul,
.news-article ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  line-height: 1.8;
}

.news-article li {
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.news-article blockquote {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4b5563;
}

.news-article .highlight {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  color: #1e40af;
}

.news-article-image {
  margin: 2rem 0;
  text-align: center;
}

.news-article-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-article-image figcaption {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Hero Section for individual news pages */
.news-hero {
  position: relative;
  padding: 8rem 0 4rem;
  background: linear-gradient(
    135deg,
    rgba(111, 165, 199, 0.8) 0%,
    rgba(168, 216, 185, 0.7) 100%
  );
  color: white;
  text-align: center;
  overflow: hidden;
}

.news-hero__background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.news-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(37, 99, 235, 0.1);
}

.news-hero__content {
  position: relative;
  z-index: 2;
}

.news-hero__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-hero__category {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.news-hero__date {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
}

.news-hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-hero__excerpt {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.news-hero__tags {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.breadcrumb__link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb__link:hover {
  color: white;
}

.breadcrumb__separator {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb__current {
  color: white;
  font-weight: 500;
}

/* Animation for scroll-triggered elements */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.news-card {
  animation: fadeIn 0.5s ease-out;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }

/* Service Link Button */
.service-link-btn,
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 2rem auto;
}

/* Center button containers */
.contact-cta,
.news-actions {
  text-align: center;
  margin: 3rem 0;
}

.contact-cta__actions,
.news-actions__actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.service-link-btn::before,
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.service-link-btn:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
  color: white;
}

.service-link-btn:hover::before,
.btn-primary:hover::before {
  left: 100%;
}

.service-link-btn:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .news-hero {
    padding: 6rem 0 3rem;
  }
  
  .news-hero__title {
    font-size: 2rem;
  }
  
  .news-hero__meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .news-card {
    padding: 1.5rem;
  }
  
  .news-card__title {
    font-size: 1.2rem;
  }
  
  .news-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .news-hero {
    padding: 5rem 0 2rem;
  }
  
  .news-hero__title {
    font-size: 1.8rem;
  }
  
  .news-hero__meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .news-card {
    padding: 1.2rem;
  }
  
  .news-card__featured-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .news-card {
    animation: none;
    transition: none;
  }
  
  .news-card:hover {
    transform: none;
  }
  
  .news-card__featured-badge {
    animation: none;
  }
}

/* ===== 関連記事セクション ===== */
.related-news__actions {
  text-align: center;
  margin-top: 3rem;
}

/* ===== お問い合わせCTAセクション ===== */
.contact-cta {
  padding: 4rem 2rem;
  margin-top: 6rem;
}

.contact-cta__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-cta__description {
  margin-bottom: 3rem;
  line-height: 1.7;
}

.contact-cta__buttons {
  margin-top: 3rem;
}