body {
  min-height: 175vh;
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  background: linear-gradient(135deg, #fff 0%, #b2f7ef 100%);
  /* #b2f7efは薄い緑がかった水色 */
  overflow-x: hidden;
}
header {
  position: relative;
  height: 120px; /* reserve space for header logo so content below doesn't overlap */
  z-index: 2000; /* ensure header is above hero content */
}

.ipf-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  transform: translateY(-50vh);
  transition: transform 0.6s ease, opacity 0.6s ease;
  position: relative;
  z-index: 10;
}

.news-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  padding-left: 28px;
  transform: translateY(10vh);
  transition: opacity 0.6s ease;
  position: relative;
  z-index: 10;
}

.section-title {
  font-size: 2rem;
  font-weight: bold;
  color: #222;
  margin: 0;
  margin-top: 8px; /* small gap under header/logo */
}
.section-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  animation: section-char 0.45s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes section-char {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cards-wrapper {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 12px;
}

/* when title is replaced and header is present, push hero content down */
.hero-section.with-header {
  padding-top: 120px; /* reserve header area */
}
.ipf-icon {
  position: absolute;
  width: 300px;
  height: 300px;
  opacity: 0;
  animation: icon-fadein 1s ease-out 3.2s forwards;
  z-index: 5;
}
@keyframes icon-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ipf-title {
  position: relative;
  margin-top: 32px;
  font-size: 2.8rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.1em;
}
.ipf-title span {
  display: inline-block;
  opacity: 0;
  animation: char-stroke 0.6s ease-out forwards;
}
@keyframes char-stroke {
  0% { 
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
  }
  70% {
    opacity: 1;
  }
  100% { 
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left;
  }
}
.header-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2100;
  opacity: 0;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.header-logo.visible {
  animation: logo-appear 0.5s ease-out forwards;
}
@keyframes logo-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}
.header-logo .logo-icon {
  width: 100px;
  height: 100px;
}
.header-logo .logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #222;
  letter-spacing: 0.1em;
}
.cards-container {
  display: none; /* kept for legacy, hidden because cards are shown under 最新情報 */
}
.card {
  position: relative;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
  cursor: pointer;
  opacity: 0;
  animation: card-slide-in 0.6s ease-out forwards;
}
/* animation delays are set dynamically in JS */
@keyframes card-slide-in {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.card:hover {
  transform: translateY(-12px) scale(1.08);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.25);
}
.card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4), transparent);
  color: white;
}
.card-date {
  font-size: 0.8rem;
  color: #ccc;
  margin-bottom: 8px;
}
.card-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  margin-bottom: 8px;
  margin-top: 0;
}
.card-body {
  font-size: 0.9rem;
  color: #ddd;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}