/* ===================================
   江戸川国際学院 公式サイト共通CSS
   =================================== */

/* リセット・ベース */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", "Noto Sans JP", sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #1a5276;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* ===================================
   ヘッダー
   =================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 50px;
  width: auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo .logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.site-logo .logo-link:hover {
  transform: scale(1.06);
  text-decoration: none;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.site-logo-text .name-ja {
  font-size: 1.35rem;
  font-weight: 400;
  color: #1a3c5e;
}

.site-logo-text .name-en {
  font-size: 0.9rem;
  color: #7a8a9a;
  font-weight: 400;
}

/* ナビゲーション */
.global-nav ul {
  display: flex;
  gap: 0;
}

.global-nav li a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
  border-radius: 4px;
}

.global-nav li a:hover,
.global-nav li a.current {
  color: #1a5276;
  background-color: #f0f6fa;
  text-decoration: none;
}

/* Google翻訳ウィジェット */
.translate-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.translate-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f0f6fa;
  border: 1px solid #d4e2ed;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #1a3c5e;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.translate-btn:hover {
  background: #e0ecf4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.translate-btn .globe-icon {
  font-size: 1rem;
  line-height: 1;
}

.translate-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #dce6ed;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 200;
  min-width: 160px;
  padding: 5px 0;
}

.translate-dropdown.open {
  display: block;
}

.translate-dropdown a {
  display: block;
  padding: 3px 16px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #333;
  text-decoration: none;
  transition: background 0.15s;
}

.translate-dropdown a:hover {
  background: #f0f6fa;
  text-decoration: none;
}

.translate-dropdown a.lang-restore {
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid #e8edf1;
  color: #888;
  font-size: 0.73rem;
}

/* Google翻訳の元ウィジェットは非表示 */
#google_translate_element {
  position: absolute;
  left: -9999px;
  visibility: hidden;
}

.goog-te-banner-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

/* ハンバーガーメニュー（モバイル） */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  margin: 5px 0;
  transition: 0.3s;
}

/* ===================================
   メインビジュアル
   =================================== */
.hero {
  position: relative;
  overflow: hidden;
  max-height: 480px;
}

.hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  padding: 40px 20px 24px;
  color: #fff;
}

.hero-overlay h1 {
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-overlay p {
  font-size: 0.95rem;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===================================
   ページヘッダー（下層ページ）
   =================================== */
.page-header {
  background: #f7f9fb;
  border-bottom: 1px solid #e8edf1;
  padding: 36px 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 1.5rem;
  color: #1a3c5e;
  font-weight: 700;
}

.page-header p {
  font-size: 0.85rem;
  color: #7a8a9a;
  margin-top: 4px;
}

/* ===================================
   コンテンツ共通
   =================================== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section + .section {
  border-top: 1px solid #f0f0f0;
}

.section-title {
  font-size: 1.35rem;
  color: #1a3c5e;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d4e2ed;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #2c5f8a;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}

.content-text {
  line-height: 1.9;
  color: #444;
}

.content-text p {
  margin-bottom: 16px;
}

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

/* ===================================
   トップページ – 導線カード
   =================================== */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.nav-card {
  background: #f7f9fb;
  border: 1px solid #e4ecf2;
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.nav-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.nav-card h3 {
  font-size: 1.05rem;
  color: #1a3c5e;
  margin-bottom: 8px;
}

.nav-card p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
}

/* ===================================
   トップページ – 写真グリッド
   =================================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.photo-grid img {
  border-radius: 6px;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ===================================
   学校紹介 – 画像付きセクション
   =================================== */
.about-image-block {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-top: 20px;
  margin-bottom: 24px;
}

.about-image-block img {
  width: 320px;
  flex-shrink: 0;
  border-radius: 6px;
}

.about-image-block .text {
  flex: 1;
}

.about-image-block.reverse {
  flex-direction: row-reverse;
}

/* 学校紹介 – 画像行 */
.about-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.about-photos img {
  border-radius: 6px;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ===================================
   入学案内・募集要項 テーブル風
   =================================== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.info-table th,
.info-table td {
  padding: 14px 16px;
  border: 1px solid #dce6ed;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.7;
  vertical-align: top;
}

.info-table th {
  background: #f2f6fa;
  color: #1a3c5e;
  font-weight: 600;
  width: 180px;
  white-space: nowrap;
}

/* ===================================
   募集要項 – フロー
   =================================== */
.flow-list {
  counter-reset: flow;
  margin: 24px 0;
}

.flow-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: #f9fbfc;
  border-left: 3px solid #1a5276;
  border-radius: 0 6px 6px 0;
}

.flow-item::before {
  counter-increment: flow;
  content: counter(flow);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #1a5276;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.flow-item p {
  flex: 1;
}

/* ===================================
   募集要項 – 注意書き（日越併記）
   =================================== */
.notice-box {
  background: #fefbe8;
  border: 1px solid #e8dca0;
  border-radius: 6px;
  padding: 24px;
  margin-top: 32px;
}

.notice-box p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 8px;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

.notice-box .vn {
  color: #555;
  font-style: italic;
  margin-top: 16px;
}

/* ベトナム語テキスト共通 */
.vn-text {
  font-family: "Times New Roman", "Noto Serif", serif;
  color: #555;
  font-size: 0.9rem;
}

.notice-box .vn,
.notice-box .vn p {
  font-family: "Times New Roman", "Noto Serif", serif;
}

.vn-label {
  font-family: "Times New Roman", "Noto Serif", serif;
  font-weight: normal;
  font-size: 0.85rem;
  color: #666;
}

/* ===================================
   アクセス
   =================================== */
.access-info {
  margin: 20px 0;
}

.access-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 4px 16px;
  font-size: 0.95rem;
}

.access-info dt {
  font-weight: 600;
  color: #1a3c5e;
  padding: 8px 0;
}

.access-info dd {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* ===================================
   ギャラリー
   =================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 6px;
  background: #f5f5f5;
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item figcaption {
  padding: 8px 10px;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}

/* ギャラリーカテゴリ */
.gallery-category {
  margin-bottom: 40px;
}

.gallery-category h2 {
  font-size: 1.15rem;
  color: #1a3c5e;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e8ef;
}

/* ===================================
   SNS埋め込みセクション（トップページ）
   =================================== */
.sns-section {
  background: #f7f9fb;
  padding: 48px 20px;
}

.sns-section .container {
  max-width: 1080px;
  margin: 0 auto;
}

.sns-section .section-title {
  margin-bottom: 24px;
}

.sns-embed-wrapper {
  display: flex;
  justify-content: center;
}

.sns-embed-wrapper iframe {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ===================================
   フッター
   =================================== */
.site-footer {
  background: #1a3c5e;
  color: #c8d8e6;
  padding: 40px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-info h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.footer-info p {
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-info a {
  color: #a8c8e0;
}

.footer-logo img {
  height: 40px;
  width: auto;
  opacity: 0.8;
}

.footer-sns {
  margin-top: 16px;
  display: flex;
  gap: 14px;
}

.footer-sns a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #c8d8e6;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.footer-sns a:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.footer-sns svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  max-width: 1080px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.8rem;
  color: #8aa4b8;
}

/* ===================================
   ボタン
   =================================== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  background: #1a5276;
  color: #fff;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: #154360;
  text-decoration: none;
  color: #fff;
}

/* ===================================
   レスポンシブ
   =================================== */
@media screen and (max-width: 768px) {
  /* ヘッダー */
  .menu-toggle {
    display: block;
  }

  .translate-btn span.btn-label {
    display: none;
  }

  .translate-btn {
    padding: 6px 10px;
  }

  .translate-dropdown {
    right: -40px;
  }

  .global-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .global-nav.open {
    display: block;
  }

  .global-nav ul {
    flex-direction: column;
    padding: 8px 0;
  }

  .global-nav li a {
    padding: 12px 24px;
    border-radius: 0;
  }

  /* メインビジュアル */
  .hero {
    max-height: 300px;
  }

  .hero-overlay h1 {
    font-size: 1.2rem;
  }

  /* ページヘッダー */
  .page-header {
    padding: 28px 16px;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  /* セクション */
  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.15rem;
  }

  /* カード */
  .nav-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* 写真グリッド */
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* 学校紹介 */
  .about-image-block {
    flex-direction: column;
  }

  .about-image-block.reverse {
    flex-direction: column;
  }

  .about-image-block img {
    width: 100%;
  }

  .about-photos {
    grid-template-columns: 1fr;
  }

  /* テーブル */
  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table th {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .info-table td {
    padding-top: 4px;
  }

  /* アクセス */
  .access-info dl {
    grid-template-columns: 1fr;
  }

  .access-info dt {
    padding-bottom: 0;
  }

  .access-info dd {
    padding-top: 2px;
    margin-bottom: 12px;
  }

  /* ギャラリー */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* フッター */
  .footer-inner {
    flex-direction: column;
    gap: 20px;
  }
}

@media screen and (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .site-logo img {
    height: 38px;
  }

  .site-logo-text .name-ja {
    font-size: 0.95rem;
  }

  .site-logo-text .name-en {
    font-size: 0.65rem;
  }
}
