:root {
  color-scheme: light; /* --- ダークモード無効 --- */
  --primary-color: #003366;
  --secondary-color: #f0f8ff;
  --accent-color: #800000;
  --text-color: #212529;
  --light-text-color: #fff;
  /* --- 背景色 --- */
  --background-color: #ffffff;
  --dark-background: #333;
  --light-background: #f0f8ff;
  --border-radius: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  --header-height: 65px;
  --font-size-xs: 0.75rem; /* 12px / 16px */
  --font-size-sm: 0.875rem; /* 14px / 16px */
  --font-size-md: 1rem; /* 16px / 16px ベース*/
  --font-size-lg: 1.25rem; /* 20px / 16px */
  --font-size-xl: 1.5rem; /* 24px / 16px */
  --font-size-2xl: 2.25rem; /* 36px / 16px */
  --font-size-3xl: 3rem; /* 48px / 16px - 必要なら追加 */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--secondary-color);
  padding-top: var(--header-height); /* 固定ヘッダー分のスペースを確保 */
}

/* TOPに戻る */
.pagetop {
  height: 40px;
  width: 40px;
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--accent-color);
  border: solid 2px var(--accent-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.pagetop__arrow {
  height: 10px;
  width: 10px;
  border-top: 3px solid var(--secondary-color);
  border-right: 3px solid var(--secondary-color);
  transform: translateY(20%) rotate(-45deg);
}

/* ナビゲーションが開いている間、背景をスクロールさせない */
body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.sp-only {
  display: block;
}
.pc-only {
  display: none;
}

.copyright-suffix {
  display: block;
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
}

/* ヘッダー */
.site-header {
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1060;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* モバイルナビゲーション (PCでは非表示) */
.mobile-nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(5px);
  height: 100vh;
  width: 100%;
  text-align: center;
  padding: var(--header-height) 2rem 2rem;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
  overflow-y: auto;
}

.mobile-nav[aria-hidden="false"] {
  transform: translateX(0);
}

.mobile-nav ul {
  list-style: none;
  cursor: default;
}

.mobile-nav li {
  margin-bottom: 2rem;
}

.mobile-nav a {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  transition: opacity 0.2s;
  cursor: pointer;
}

.mobile-nav a:hover {
  opacity: 0.7;
}

.hero {
  background: url(../img/bg_2.jpg) no-repeat center / cover;
  padding: 5rem 0;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--accent-color);
}

.hero-description {
  font-size: 1rem;
  font-weight: bold;
  max-width: 900px;
  margin: 0 auto;
  opacity: 0.9;
  text-align: left;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contest-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.contest-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-figure {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.site-footer {
  margin-top: 4rem;
  text-align: center;
  background-color: var(--dark-background);
  color: var(--light-text-color);
  padding: 1.5rem 0;
}

.copyright {
  font-size: 0.875rem;
  width: 100%;
}

.hamburger-btn {
  width: 40px;
  height: 40px;
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 1100;
  padding: 0;
  display: block;
}

.hamburger-btn span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
  position: absolute;
  left: 50%;
  transform-origin: center center;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    opacity 0.3s ease-in-out;
  margin-left: -14px;
}

.hamburger-btn span:nth-of-type(1) {
  top: 10px;
}

.hamburger-btn span:nth-of-type(2) {
  top: 18px;
}

.hamburger-btn span:nth-of-type(3) {
  top: 26px;
}

.hamburger-btn[aria-expanded="true"] span:nth-of-type(1) {
  transform: rotate(45deg);
  top: 18px;
}

.hamburger-btn[aria-expanded="true"] span:nth-of-type(2) {
  opacity: 0;
}

.hamburger-btn[aria-expanded="true"] span:nth-of-type(3) {
  transform: rotate(-45deg);
  top: 18px;
}

/* タブレットサイズ (768px以上) */
@media (min-width: 768px) {
  .sp-only {
    display: none;
  }

  .copyright-suffix {
    display: inline;
  }

  .copyright-suffix::before {
    content: " "; /* PC・タブレットの時だけ、前に半角スペースを追加 */
  }

  .hero {
    padding: 10rem 0;
    margin-bottom: 4rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: var(--font-size-lg);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .card-title {
    font-size: 1.2rem;
  }
}

/* PCサイズ (1024px以上) */
@media (min-width: 1024px) {
  .pc-only {
    display: block;
  }

  .hamburger-btn,
  .mobile-nav {
    display: none;
  }

  .hero-title {
    font-size: 4rem;
    margin-bottom: 3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
