body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
}
html, body {
  overflow-x: hidden;
}

/* ========== Header ========== */
.site-header {
  background: linear-gradient(-45deg, #004098, #2b6fc4, #004098, #2b6fc4);
  background-size: 400% 400%;
  animation: gradientMove 10s ease infinite;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1000;
}
.site-header a {
  text-decoration: none;
  color: inherit;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  height: 60px;
}

.logo-area {
  display: flex;
  align-items: center;
}

.party-logo {
  height: clamp(30px, 5vw, 50px);
  margin-right: 0.8rem;
}

.site-title {
  font-size: clamp(0.9rem, 1.8vw, 1.6rem);
  font-weight: bold;
  color: white;
  margin-left: 0.5rem;
  display: inline-block;
  white-space: nowrap; /* 改行防止 */
  vertical-align: middle;
}

.main-nav a {
  font-size: clamp(0.85rem, 1vw + 0.3rem, 1.1rem);
  font-weight: bold;
  color: white;
  text-decoration: none;
}
@media (max-width: 1000px) {
  .party-logo {
    display: none;
  }

  .site-title {
    font-size: 1rem;
    white-space: normal;
  }
}

/* ========== Nav ========== */
.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* ========== Hamburger ========== */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

#hamburger span {
  background: white;
  height: 3px;
  border-radius: 2px;
  transition: 0.4s;
}

#hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#hamburger.active span:nth-child(2) {
  opacity: 0;
}
#hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== Responsive Nav ========== */
/* PC用：常時表示 */
@media (min-width: 769px) {
  .main-nav {
    display: block !important;
  }
}

/* モバイル用 */
@media (max-width: 768px) {
  #hamburger {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #004098;
    width: 200px;
    flex-direction: column;
    padding: 1rem;
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .party-logo {
    height: 45px;
  }

  .site-title {
    font-size: 1rem;
  }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  overflow: hidden;
  margin-top: 60px;
}

.hero .slide {
  position: absolute;
  top: 0;
  left: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero .slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-button {
  position: absolute;
  bottom: 10%;
  left: 5%;
  background: rgba(0, 64, 137, 0.85);
  color: white;
  padding: 0.75rem 1.2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  font-size: 1rem;
  z-index: 2;
}
@media (max-width: 1980px) {
  .hero {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .hero .slide {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}

/* ========== Greeting Section ========== */
.greeting-section {
  padding: 2rem;
  background-color: #f8f8f8;
  display: flex;
  justify-content: center;
}

.greeting-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  background: linear-gradient(135deg, #fdfbfb, #ebedee);
  border-radius: 20px;
  padding: 2rem;
  max-width: 700px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.leader-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.greeting-text h2,
.greeting-text h3 {
  margin: 0.3rem 0;
}

.greeting-text p {
  margin-top: 1rem;
  line-height: 1.6;
  text-align: left;
}
.sns-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.sns-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.sns-icon.hp { background-image: url('icons/hp.png'); }
.sns-icon.facebook { background-image: url('icons/facebook.png'); }
.sns-icon.instagram { background-image: url('icons/instagram.png'); }
.sns-icon.x { background-image: url('icons/twitter.png'); }
.sns-icon.youtube { background-image: url('icons/youtube.png'); }

/* ========== Tile Section ========== */
.tile-section {
  background-color: #f4f4f4;
  padding: 3rem 1.5rem;
}

.tiles-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.tile {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 2rem;
  flex: 1 1 calc(33.333% - 2rem);
  max-width: 350px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center; 
  font-size: clamp(0.9rem, 1vw + 0.5rem, 1.05rem);
  box-sizing: border-box;
}

.tile h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin-bottom: 0.5rem;
}

.tile p {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: #333;
}

.tile a {
  align-self: flex-start;
  background-color: #004089;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(0.9rem, 1vw + 0.5rem, 1rem);
}

@media (max-width: 1024px) {
  .tile {
    flex: 1 1 calc(50% - 2rem);
    max-width: none;
  }
}

@media (max-width: 640px) {
  .tile {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* メインコンテンツ */
.policy-page {
  padding: 80px 1rem 2rem;
  max-width: 1200px;
  margin: auto;
}

.center-text {
  text-align: center;
}

.policylogo {
  width: 80%;
  max-width: 250px;
  margin: 1rem auto;
  display: block;
}

.highlighted-policies h2,
.policy-pdf h2 {
  font-size: 1.8rem;
  color: #003366;
  margin-bottom: 1rem;
  text-align: center;
}

/* PDF */
/* PDFのコンテナをレスポンシブに */
.pdf-container {
  width: 100%;
  max-width: 100%;
  height: 80vh;  /* ビューポートの80%の高さを確保 */
  min-height: 400px; /* 最低限の高さを確保 */
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-top: 2rem;
}

/* iframeは幅100%・高さ100%に */
.pdf-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 小さい画面でも高さを確保 */
@media (max-width: 480px) {
  .pdf-container {
    height: 60vh; /* 画面高の60%に縮小 */
    min-height: 300px;
  }
}

/* ========== Footer ========== */
.site-footer {
  background-color: #004089;
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: white;
  text-decoration: none;
  margin: 0 0.5rem;
}

/* モーダルスタイル */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  position: relative;
  box-sizing: border-box;
}

.modal-close {
  color: #aaa;
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: #000;
}

.modal h2 {
  font-size: 1.4rem;
  color: #003366;
  margin-bottom: 0.5rem;
}

.modal h3 {
  font-size: 1.2rem;
  color: #004089;
  margin-bottom: 0.5rem;
}

.modal p {
  font-size: 1rem;
  line-height: 1.6;
}

.modal-image {
  max-width: 50%;
  height: auto;
  display: block;
  margin: auto;
  margin-top: 1rem;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .modal-content {
    padding: 1.2rem;
    margin: 10% auto;
    width: 95%;
  }

  .modal h2 {
    font-size: 1.2rem;
  }

  .modal h3 {
    font-size: 1rem;
  }

  .modal p {
    font-size: 0.95rem;
  }

  .highlighted-policies h2 {
    font-size: large;
    color: #000;
  }

  .policy-pdf h2 {
    font-size: large;
  }

  .site-footer a,
  .site-footer p {
    color: white;
    text-decoration: none;
    font-size: small;
  }

  .policy-page p {
    color: black;
  }
}

