/* Reset & Basic Styles */
body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
  font-family: "MFW-PAotoGothicStdN-Regular", sans-serif;
}

body {
  color: #333;
  background-color: white;
  background-image: url("images/body-background.jpg");
  background-size: 100% auto;
  background-position: top center;
  background-repeat: repeat-y;
  background-attachment: fixed;
  position: relative;
}


a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
  color: #333;
  position: relative;
}

header.home-header {
  position: absolute;
}

header .logo {
  height: 80px; /* コンテナの高さを指定 */
}

header .logo img {
  height: 100%; /* 親要素の高さに合わせる */
  width: auto;
}

header nav ul {
  display: flex;
}

header nav li {
  margin-left: 30px;
}

header nav a {
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  font-size: 16px;
}

#hamburger-btn {
  display: none; /* Hide by default */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#hamburger-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

/* Hero Section */
.hero {
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  background-image: url("images/hero-background.svg");
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-content {
  color: white;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.hero-content h2 {
  font-size: 60px; /* Adjusted font size for the new title */
  font-family: "MFW-PAotoGothicStdN-Bold", sans-serif;
}

.hero-title-image {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 400px;
}

.hero-content p {
  margin-top: 20px;
  font-size: 18px;
}

.hero .btn {
  display: inline-block;
  margin-top: 30px;
  padding: 15px 30px;
  background-color: white;
  color: #333;
  border-radius: 50px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  display: flex;
  align-items: center;
}

.hero .btn .arrow {
  margin-left: 10px;
  border: 1px solid #333;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* About Section */
.about {
  padding: 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.about h2 {
  font-size: 36px;
  margin-bottom: 40px;
  line-height: 1.6;
  color: #003366; /* 仮の紺色 */
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  line-height: 2;
  text-align: left;
}

/* Responsive */
@media (min-width: 769px) {
  /* デスクトップ表示: ハンバーガーボタンを確実に非表示 */
  #hamburger-btn {
    display: none !important;
  }

  header nav {
    display: block !important;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }

  #hamburger-btn {
    display: flex; /* Show on mobile */
  }

  header nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-top: 1px solid #eee;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: none;
    visibility: hidden;
  }

  header nav.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }

  header nav ul {
    flex-direction: column;
    padding: 20px;
    margin: 0;
  }

  header nav li {
    margin: 0;
    margin-bottom: 15px;
    text-align: center;
  }

  header nav li:last-child {
    margin-bottom: 0;
  }

  header nav a {
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
  }

  header nav a:hover,
  header nav a.active {
    background-color: #f0f0f0;
    color: #003366;
  }

  /* ハンバーガーボタンのアニメーション */
  #hamburger-btn.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  #hamburger-btn.is-active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
  }

  #hamburger-btn.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .hero {
    padding: 40px 20px;
    height: 60vh;
  }

  .hero-content h2,
  .hero-content h3 {
    font-size: 42px;
  }

  .hero-title-image {
    max-height: 100px;
  }

  .about {
    padding: 40px 20px;
  }

  .about h2 {
    font-size: 28px;
  }
}

/* News Section */
.news {
  background-color: #eaf2f8; /* 薄い青系の背景色 */
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 32px;
  color: #003366;
  margin-bottom: 10px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
}

.section-title p {
  color: #003366;
  position: relative;
  display: inline-block;
}

.section-title p::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background-color: #003366;
  margin: 10px auto 0;
}

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.news-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  display: block;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-date {
  background-color: #003366;
  color: white;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
}

.news-card h3 {
  padding: 20px 20px 10px;
  font-size: 20px;
  font-weight: 700;
  color: #003366;
  line-height: 1.4;
  margin: 0;
}

.news-card p {
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

.coming-soon-container {
  text-align: center;
  padding: 60px 20px;
}

.coming-soon-text {
  font-size: 24px;
  color: #003366;
  font-weight: 500;
}

.arrow-btn {
  background: none;
  border: 1px solid #003366;
  color: #003366;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  margin: 0 20px;
}

.news-cards {
  display: flex;
  gap: 30px;
}

.card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 350px;
}

.card-image {
  position: relative;
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.card-image .status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 24px;
  font-weight: bold;
}

.card-content {
  padding: 20px;
}

.card-content .date {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.card-content .title {
  font-size: 18px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  margin-bottom: 20px;
  color: #003366;
}

.card-content .more-btn {
  display: inline-block;
  padding: 10px 25px;
  background-color: #003366;
  color: white;
  border-radius: 20px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
}

@media (max-width: 768px) {
  .news-container {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }
  .news-card h3 {
    font-size: 18px;
  }
  .arrow-btn {
    margin: 20px 0;
  }
}

/* Agenda Section */
.agenda {
  background-color: rgba(255, 255, 255, 0.85);
  padding: 80px 40px;
  position: relative;
  z-index: 1;
}

.agenda .section-title h2,
.agenda .section-title p {
  color: #003366;
}

.agenda-container {
  max-width: 1200px;
  margin: 50px auto 0;
}

.agenda-region {
  margin-bottom: 60px;
}

.agenda-region h3 {
  font-size: 28px;
  color: #003366;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 3px solid #003366;
  display: inline-block;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
}

.agenda-region-group {
  margin-bottom: 60px;
}

.agenda-region-group h3 {
  font-size: 28px;
  color: #666;
  margin-bottom: 20px;
}

.coming-soon-regions {
  background-color: #f8f8f8;
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

.coming-soon-info p {
  color: #666;
  font-size: 16px;
  margin: 0;
}

.agenda-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.agenda-card {
  background-color: white;
  border: 2px solid #003366;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

.agenda-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.agenda-card.coming-soon {
  background-color: #f5f5f5;
  border-style: dashed;
  cursor: default;
}

.agenda-card.coming-soon:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-icon {
  font-size: 48px;
  text-align: center;
  padding: 20px 0;
  background-color: #eaf2f8;
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.agenda-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.card-content h4 {
  font-size: 20px;
  color: #003366;
  margin-bottom: 10px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
}

.card-subtitle {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.card-department {
  font-size: 13px;
  color: #003366;
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: auto;
}

@media (max-width: 768px) {
  .agenda-cards {
    grid-template-columns: 1fr;
  }

  .agenda-region h3 {
    font-size: 24px;
  }

  .card-content h4 {
    font-size: 18px;
  }
}

/* Schedule Section */
.schedule {
  padding: 80px 40px;
  background-color: #eaf2f8;
  position: relative;
  z-index: 1;
}

.schedule .section-title {
  color: #003366;
}

.schedule-deadlines {
  margin: 40px auto;
  max-width: 800px;
}

.deadline-title {
  text-align: center;
  color: #003366;
  font-size: 20px;
  font-weight: normal;
  margin-bottom: 30px;
}

.deadline-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.deadline-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #e0e0e0;
}

.deadline-item:last-child {
  border-bottom: none;
}

.deadline-date {
  color: #003366;
  font-size: 18px;
  font-weight: bold;
  min-width: 100px;
  margin-right: 40px;
}

.deadline-text {
  color: #003366;
  font-size: 16px;
}

.schedule-note {
  text-align: center;
  margin-top: 30px;
  color: #003366;
  font-size: 16px;
}

.timeline-container {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

/* Merit Section */
.merit {
  padding: 80px 40px;
  background-color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

.merit .section-title h2,
.merit .section-title p {
  color: #003366;
}

.merit-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 50px;
}

.merit-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 15px;
  padding: 30px;
  width: 280px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

.merit-card::before,
.merit-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #f0e68c; /* 黄色系のアクセント */
}

.merit-card::before {
  top: -10px;
  left: -10px;
  border-top-left-radius: 5px;
}

.merit-card::after {
  bottom: -10px;
  right: -10px;
  border-bottom-right-radius: 5px;
}

.merit-header {
  color: #003366;
}

.merit-header p {
  font-size: 16px;
}

.merit-header .number {
  font-size: 48px;
  font-weight: bold;
  line-height: 1;
}

.merit-card img {
  height: 80px;
  margin: 20px 0;
}

.merit-card .description {
  color: #003366;
  font-size: 16px;
  line-height: 1.8;
}

@media (max-width: 992px) {
  .merit-container {
    flex-direction: column;
    align-items: center;
  }
  .merit-card {
    margin-bottom: 40px;
  }
}

/* Entry Section */
.entry {
  padding: 80px 40px;
  background-color: #eaf2f8;
  position: relative;
  z-index: 1;
}

.entry .section-title h2,
.entry .section-title p {
  color: #003366;
}

.entry-container {
  max-width: 900px;
  margin: 50px auto 0;
  background-color: white;
  border: 1px solid #ccc;
  padding: 20px 50px 50px;
}

.entry-item {
  display: flex;
  padding: 30px 0;
  border-bottom: 1px dashed #ccc;
  align-items: flex-start;
}

.entry-item:last-of-type {
  border-bottom: none;
}

.entry-label {
  width: 180px;
  flex-shrink: 0;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  color: #003366;
  position: relative;
  padding-left: 20px;
}

.entry-label::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 2px;
  color: #003366;
}

.entry-content {
  flex-grow: 1;
  line-height: 1.9;
}

.entry-content p {
  margin-bottom: 1em;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content ul {
  list-style-type: none;
  padding-left: 0;
}

.entry-content li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 0.5em;
}

.entry-content li::before {
  content: "・";
  position: absolute;
  left: 0;
}

.entry-buttons {
  text-align: center;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn.btn-download {
  display: inline-block;
  padding: 18px 40px;
  background-color: #003366;
  color: white;
  border-radius: 50px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  font-size: 18px;
  border: 2px solid #003366;
  transition: background-color 0.3s, color 0.3s;
  min-width: 280px;
  box-sizing: border-box;
}

.btn.btn-download:hover {
  background-color: white;
  color: #003366;
}

/* Disabled buttons */
.btn.btn-disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  border-color: #ccc;
}

.btn.btn-disabled:hover {
  background-color: #ccc;
  color: #666;
  transform: none;
}

.btn.btn-disabled small {
  font-size: 14px;
  font-weight: normal;
  opacity: 0.8;
}

/* Application form section */
.application-form-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #003366;
  text-align: center;
}

.application-form-section h3 {
  color: #003366;
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: bold;
}

.btn.btn-application {
  display: inline-block;
  padding: 20px 50px;
  background-color: #003366;
  color: white;
  border-radius: 50px;
  font-family: "MFW-PAotoGothicStdN-Bold", sans-serif;
  font-size: 20px;
  border: 3px solid #003366;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
  transform: translateY(0);
  position: relative;
  overflow: hidden;
}

.btn.btn-application::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn.btn-application:hover::before {
  left: 100%;
}

.btn.btn-application:hover {
  background-color: #004488;
  border-color: #004488;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 51, 102, 0.4);
}

@media (max-width: 768px) {
  .entry-item {
    flex-direction: column;
  }
  .entry-label {
    margin-bottom: 15px;
  }
  .btn.btn-download {
    width: 100%;
  }

  .application-form-section h3 {
    font-size: 20px;
  }

  .btn.btn-application {
    width: 100%;
    padding: 18px 30px;
    font-size: 18px;
  }
}

/* Footer */
footer {
  padding: 80px 40px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

footer .section-title h2 {
  color: #003366;
  font-size: 32px;
}

footer .section-title p {
  color: #003366;
}

.contact-info {
  margin-top: 40px;
  color: #003366;
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 16px;
}

.contact-info a {
  font-size: 18px;
  font-weight: bold;
}

/* Floating Button */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #ff6b6b;
  color: white;
  padding: 15px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

.floating-btn:hover {
  background-color: #ff5252;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Page Hero Section */
.page-hero {
  background-color: #003366;
  color: white;
  padding: 60px 40px 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-family: "MFW-PAotoGothicStdN-Bold", sans-serif;
}

.page-hero-content p {
  font-size: 20px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 100px 20px 60px;
  }

  .page-hero-content h1 {
    font-size: 36px;
  }

  .page-hero-content p {
    font-size: 16px;
  }
}

/* Challenges Intro Section */
.challenges-intro {
  padding: 60px 40px;
  background-color: white;
  position: relative;
  z-index: 1;
}

.challenges-intro .container {
  max-width: 1000px;
  margin: 0 auto;
}

.challenges-intro h2 {
  font-size: 28px;
  color: #003366;
  margin-bottom: 30px;
  text-align: center;
}

.challenges-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  text-align: center;
}

/* Challenges Overview */
.challenges-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 50px auto 0;
  padding: 0 20px;
}

.challenge-category {
  background-color: white;
  border: 2px solid #003366;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
}

.challenge-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.challenge-category h3 {
  font-size: 24px;
  color: #003366;
  margin-bottom: 20px;
}

.challenge-category p {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 30px;
}

.btn.btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background-color: #003366;
  color: white;
  border-radius: 50px;
  font-family: "MFW-PAotoGothicStdN-DeBold", sans-serif;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn.btn-primary:hover {
  background-color: #004488;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .challenges-overview {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .challenge-category {
    padding: 30px 20px;
  }
}

/* Active Navigation Link */
nav a.active {
  color: #ff6b6b;
  font-weight: bold;
}

/* Sub-page header style */
header.with-background {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 101;
}
