/* ===== 全体リセット ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  background: linear-gradient(to bottom, #2a3a55, #405b7a); /* 明るめ背景に変更 */
  color: #f2f2f2;
}

/* ===== コンテナ ===== */
.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 3rem;
}

/* ===== ヘッダー ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background: linear-gradient(to right, #111827, #1f2937); /* 暗め夜空に変更 */
  color: #fff;
  border-bottom: 1px solid #374151;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

header .logo a {
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: bold;
  background: linear-gradient(45deg, #a5f3fc, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== 共通SNSアイコンエリア ===== */
.header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 共通ボタンスタイル */
.x-link,
.insta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a1a40, #2a2a4d);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(255,255,255,0.1);
}

/* SVG画像 */
.x-link img,
.insta-link img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1); /* 白アイコン表示 */
  transition: filter 0.3s ease;
}

/* ホバー共通 */
.x-link:hover,
.insta-link:hover {
  background: linear-gradient(135deg, #444, #777);
  box-shadow: 0 0 12px rgba(255,255,255,0.4);
  transform: scale(1.05);
}

/* ホバー時の色変化 */
.x-link:hover img {
  filter: brightness(1.2) sepia(1) saturate(1.5) hue-rotate(40deg);
}

.insta-link:hover img {
  filter: brightness(1.2) sepia(1) saturate(2.5) hue-rotate(310deg);
}

/* スマホ対応 */
@media (max-width: 767px) {
  .x-link,
  .insta-link {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .x-link img,
  .insta-link img {
    width: 18px;
    height: 18px;
  }
}

/* ===== ナビ ===== */
.nav-menu a {
  color: #fff;
}

.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ===== フッター全体 ===== */
footer {
  text-align: center;
  padding: 2.5rem 0;
  background: linear-gradient(to right, #191a38, #1a1a31);
  border-top: 1px solid #333;
  color: #ccc;
  border-radius: 12px 12px 0 0;
}

/* ===== 協賛企業ロゴ／名前エリア ===== */
/* ===== フッター全体 ===== */
footer {
  text-align: center;
  padding: 2.5rem 0;
  background: linear-gradient(to right, #0b0c2a, #1a1a40);
  border-top: 1px solid #333;
  color: #ccc;
  border-radius: 12px 12px 0 0;
}

/* ===== 協賛企業ロゴエリア ===== */
.sponsor-logos {
  margin-top: 1.8rem;
}

.sponsor-logos h4 {
  font-size: 1.1rem;
  color: #e0e7ff;
  margin-bottom: 1.2rem;
  font-weight: bold;
}

/* aタグとimgタグを同等に扱う */
.sponsor-logos a,
.sponsor-logos img {
  display: inline-block;
  margin: 0.8rem 1.5rem;
  vertical-align: middle;
  transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

/* ロゴ画像のサイズを拡大（従来55px → 75px） */
.sponsor-logos img {
  max-height: 75px;
  width: auto;
  opacity: 0.9;
  filter: brightness(0.95) contrast(1.1);
}

/* ホバー時の効果（リンク付きのみ） */
.sponsor-logos a:hover img {
  transform: scale(1.08);
  opacity: 1;
  filter: brightness(1.15);
}

/* ===== スマホ対応 ===== */
@media (max-width: 767px) {
  .sponsor-logos img {
    max-height: 55px; /* スマホではやや小さめに調整 */
  }

  .sponsor-logos a,
  .sponsor-logos img {
    margin: 0.6rem 1rem;
  }
}

/* ===== トップフェードインセクション（Frontier強調版） ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh; /* ✅ 全画面 */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0b0c2a; /* 夜背景 */
  color: #fff;
  opacity: 0;
  animation: fadeInScene 2s ease-in forwards;
}

/* 背景画像 */
.hero-image {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fadeInImage 2.5s ease-in forwards;
}

/* 背景画像フェードイン */
@keyframes fadeInImage {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1.0); }
}

/* 全体フェードイン */
@keyframes fadeInScene {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== テキストエリア ===== */
.hero-text {
  position: relative;
  text-align: center;
  z-index: 10;
  animation: fadeInText 2s ease-in 0.8s forwards;
  opacity: 0;
}

/* ===== 第60回 高専祭 ===== */
.hero-text h1 {
  font-size: 3.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #17a6ff, #a5c9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(255,255,255,0.3);
}

/* ===== テーマ文字「Frontier」特大ゴールド＋白枠 ===== */
.hero-text .theme {
  font-size: 5rem;
  font-weight: 900;
  color: #f5d97d;                      /* ゴールド文字 */
  -webkit-text-stroke: 2.5px #ffffff;  /* 白い外枠 */
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  text-shadow:
    0 0 15px rgba(255, 255, 255, 0.6),
    0 0 25px rgba(245, 217, 125, 0.8),
    0 0 40px rgba(245, 217, 125, 0.4);
  animation: frontierFade 2.5s ease-out 0.8s forwards;
  opacity: 0;
}

/* Frontierフェード＋拡大アニメーション */
@keyframes frontierFade {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== テキスト共通フェードイン ===== */
@keyframes fadeInText {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== スマホ対応 ===== */
@media (max-width: 767px) {
  .hero-section {
    height: 85vh; /* スマホでは少し短く */
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text .theme {
    font-size: 3rem; /* 小さめに調整 */
    -webkit-text-stroke: 1.5px #ffffff;
    letter-spacing: 0.08em;
    text-shadow:
      0 0 10px rgba(255, 255, 255, 0.5),
      0 0 20px rgba(245, 217, 125, 0.6);
  }
}



/* ===== セクション ===== */
main section {
  margin-bottom: 3rem;
  padding: 2rem 2rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb); /* 明るいカードでコントラストUP */
  color: #222;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

main section:nth-child(even) {
  background: linear-gradient(145deg, #e0e7ff, #f0f9ff);
}

/* ===== セクションタイトル（h2） ===== */
main section h2 {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.9rem;
  font-weight: bold;
  color: #1e3a8a;
  background: linear-gradient(135deg, #f9fafb, #dbeafe);
  border-left: 6px solid #3b82f6;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-shadow: 0 0 4px rgba(255,255,255,0.4);
}

/* ===== メインタイトル（第60回高専祭） ===== */
.festival-title {
  font-size: 2.6rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, #60a5fa, #818cf8);
  border-left: 6px solid #e0f2fe;
  padding: 1rem 2rem;
  border-radius: 10px;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.6);
  display: inline-block;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(96,165,250,0.4);
}

/* ===== 本文 ===== */
main p, main li {
  margin-bottom: 1.2rem;
  color: #111;
}

/* ===== フォーム ===== */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  background-color: #2c3e50;
  color: #fff;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #1a252f;
}

/* ===== 協賛ページ：フラット＆可変ロゴ配置 ===== */
.sponsor-grid {
  display: flex;
  flex-wrap: wrap;             /* ✅ 自動で折り返し */
  justify-content: center;     /* 中央揃え */
  align-items: center;
  gap: 2rem;                   /* ロゴ間の余白 */
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding: 1rem;
}

/* ===== 協賛ページ：ロゴ自動リサイズ対応 ===== */
.sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 3rem auto;
  padding: 1rem;
  width: 90%; /* 画面幅に収まるよう調整 */
}

/* ロゴアイテム（可変幅） */
.sponsor-item {
  flex: 1 1 200px;          /* ✅ 最小200px、余白があれば広がる */
  max-width: 250px;         /* ✅ はみ出し防止の上限 */
  text-align: center;
  box-sizing: border-box;
}

/* ロゴ画像（スマホでは自動縮小） */
.sponsor-item img {
  height: 100px;
  width: auto;
  max-width: 100%;          /* ✅ はみ出し防止 */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sponsor-item img:hover {
  transform: scale(1.05);
  opacity: 1;
}

/* 社名 */
.sponsor-name {
  margin-top: 0.75rem;
  font-weight: bold;
  color: #0351c6;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

/* ===== スマホ対応 ===== */
@media (max-width: 767px) {
  .sponsor-grid {
    gap: 1.5rem;
  }

  .sponsor-item {
    flex: 1 1 45%;          /* ✅ 横2列に並べる */
    max-width: 90%;         /* ✅ 画面内に収まるよう調整 */
  }

  .sponsor-item img {
    height: auto;           /* ✅ 高さを自動調整に変更 */
    max-height: 80px;       /* ✅ 最大高さを制限 */
  }

  .sponsor-name {
    font-size: 0.9rem;
  }
}




/* ===== ハンバーガーメニュー ===== */
.hamburger {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  width: 25px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger div {
  width: 100%;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.4s ease;
}

.hamburger.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active div:nth-child(2) {
  opacity: 0;
}
.hamburger.active div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== ナビメニュー ===== */
.nav-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background-color: rgba(17,24,39,0.97);
  box-shadow: -2px 0 5px rgba(0,0,0,0.5);
  padding-top: 60px;
  z-index: 999;
  flex-direction: column;
}

.nav-menu.active {
  display: flex;
}

.nav-menu a {
  display: block;
  padding: 1.2rem 2rem;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.nav-menu a:hover {
  background-color: rgba(59,130,246,0.2);
}

/* ===== レスポンシブ ===== */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    width: auto;
    height: auto;
    box-shadow: none;
    padding: 0;
  }

  .nav-menu a {
    padding: 0 1.5rem;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 1.5rem 1.5rem;
  }

  main section {
    padding: 1.5rem 1.5rem;
    margin-bottom: 2rem;
  }

  .contact-form {
    gap: 1.5rem;
    padding: 1.5rem 1.5rem;
  }

  .nav-menu a {
    padding: 1rem 1.5rem;
  }
}

/* ===== プログラムページ ===== */
.program-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-around;
  margin-top: 2rem;
}

.program {
  flex: 1 1 450px;
  background: linear-gradient(135deg, #f0f9ff, #e0e7ff);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.program h3 {
  font-size: 1.4rem;
  color: #1e3a8a;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.program table {
  width: 100%;
  border-collapse: collapse;
}

.program th {
  width: 70px;
  text-align: right;
  padding-right: 1rem;
  color: #111;
  font-weight: bold;
}

.program td {
  padding: 0.6rem 0;
  border-bottom: 1px solid #ccc;
  color: #222;
}

@media (max-width: 767px) {
  .program-wrapper {
    flex-direction: column;
  }
}

/* ===== あいさつ文カード ===== */
.greeting-card {
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  padding: 2rem;
  margin-top: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.greeting-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* ===== あいさつ文レイアウト ===== */
.greeting-container {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap; /* スマホ対応 */
}

.greeting-photo {
  width: 200px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border: 3px solid #ffffff;
}

.greeting-text {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #111;
}

.greeting-text p {
  margin-bottom: 1.2rem;
}

/* ===== セクションタイトル ===== */
.greeting-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #1e3a8a;
  text-shadow: 0 0 5px rgba(255,255,255,0.6);
}

/* ===== スマホ対応 ===== */
@media (max-width: 767px) {
  .greeting-container {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .greeting-photo {
    width: 70%;
    max-width: 260px;
  }

  .greeting-text {
    font-size: 1rem;
  }
}

/* ===== 出店一覧表 ===== */
/* ===== 出店一覧（学年ごと） ===== */
.store-list {
  margin-top: 2rem;
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.store-list h3 {
  font-size: 1.4rem;
  color: #1e3a8a;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-left: 6px solid #3b82f6;
  padding-left: 0.8rem;
}

.store-list table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.store-list th, .store-list td {
  padding: 0.8rem;
  border-bottom: 1px solid #ccc;
  text-align: left;
}

.store-list th {
  background-color: #e0e7ff;
  color: #1e3a8a;
  font-weight: bold;
}

.store-list tr:nth-child(even) td {
  background-color: #f9fafb;
}

.store-list tr:hover td {
  background-color: #dbeafe;
}

/* ===== スマホ対応 ===== */
@media (max-width: 767px) {
  .store-list {
    padding: 1.2rem;
  }
  .store-list table {
    font-size: 0.9rem;
  }
  .store-list th, .store-list td {
    padding: 0.6rem;
  }
}

/* ===== 校内地図 ===== */
.access-map {
  text-align: center; /* 中央揃え */
  margin: 2rem 0;
}

.access-map img {
  display: inline-block; /* 中央揃えを有効化 */
  width: 80%;            /* 画面幅の80%で表示（調整可） */
  max-width: 800px;      /* 最大サイズの上限 */
  border: 2px solid #3b82f6;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* ===== タブメニュー（上部配置・浮き上がるデザイン） ===== */
.tab-menu {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  padding: 1rem 1.5rem;
  margin: 2.5rem auto 2rem auto;
  width: 90%;
  background: rgba(156, 187, 255, 0.85);  /* 夜テーマに合う半透明ネイビー */
  backdrop-filter: blur(6px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  flex-wrap: wrap;
}

/* ===== タブボタン（大きめ・押しやすく） ===== */
.tab-button {
  background: #e0e7ff;
  color: #1e3a8a;
  border: 2px solid #3b82f6;
  padding: 0.9rem 1.8rem;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}

.tab-button:hover {
  background: #3b82f6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(59,130,246,0.4);
}

.tab-button.active {
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* ===== スマホ対応 ===== */
@media (max-width: 767px) {
  .tab-menu {
    width: 95%;
    gap: 0.6rem;
    padding: 1rem;
  }

  .tab-button {
    font-size: 1rem;
    padding: 0.7rem 1.4rem;
    min-width: 90px;
  }
}


/* ===== タブ切り替え内容 ===== */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

/* フェードアニメーション */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
