/* ShotSIM - メインスタイルシート */
/* カラーパレット: #1A3263 / #547792 / #EFD2B0 / #FFC570 */
/* https://colorhunt.co/palette/ffc570efd2b05477921a3263 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #f5f7fa;
  color: #333;
}

/* ヘッダー */
header {
  background: #1A3263;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

/* 言語切り替えナビ（ドロップダウン） */
.lang-nav {
  position: relative;
}

.lang-nav-trigger {
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
  user-select: none;
}

.lang-nav-trigger.open,
.lang-nav-trigger:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.lang-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 140px;
  overflow: hidden;
  z-index: 100;
}

.lang-nav-dropdown.open {
  display: block;
}

.lang-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #333;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.lang-nav-dropdown a:hover {
  background: #f0f4ff;
}

.lang-nav-dropdown a.active {
  background: #e8eef8;
  font-weight: 600;
  color: #1A3263;
}

.lang-nav-wip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #bbb;
  font-size: 0.85rem;
  cursor: default;
}

/* 検索エリア */
.search-section {
  background: #1A3263;
  padding: 40px 24px 60px;
  text-align: center;
  color: #fff;
}

.search-section h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.search-section p {
  margin-bottom: 24px;
  opacity: 0.9;
}

.search-box {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.search-box button {
  padding: 12px 20px;
  background: #FFC570;
  color: #333;
  border: none;
  border-radius: 0 4px 4px 0;
  font-weight: 700;
  cursor: pointer;
}

/* 国一覧 */
.countries-section {
  max-width: 1000px;
  margin: -30px auto 0;
  padding: 0 24px 40px;
}

.countries-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #555;
}

.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.country-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.country-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.country-card .flag {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

/* PC（マウス操作デバイス）: フラグ画像を表示・絵文字を非表示 */
@media (hover: hover) and (pointer: fine) {
  .country-card .flag .flag-emoji { display: none; }
  .country-card .flag .flag-img {
    display: block;
    width: 48px;
    height: auto;
  }
  .flag-h1 .flag-emoji { display: none; }
  .flag-h1 .flag-img {
    display: inline-block;
    width: 1em;
    height: 0.8em;
    vertical-align: middle;
    margin-right: 4px;
    object-fit: contain;
  }
}

/* スマホ（タッチデバイス）: 画像を非表示・絵文字そのまま */
.country-card .flag .flag-img { display: none; }
.flag-h1 .flag-img { display: none; }

.country-card .name {
  font-weight: 600;
}

/* 記事一覧 */
.articles-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.articles-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #555;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.article-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.article-card:hover {
  transform: translateY(-2px);
}

.article-card .tag {
  font-size: 0.75rem;
  color: #547792;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-card .date {
  font-size: 0.8rem;
  color: #999;
}

/* フッター */
footer {
  background: #333;
  color: #aaa;
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}

/* 最新記事・HOT情報 2カラム */
.articles-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 8px;
}

.articles-col h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #555;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .articles-columns {
    grid-template-columns: 1fr;
  }
  .search-section h1 {
    font-size: 1.4rem;
  }

  .countries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
