/* UQモバイル トップページ CSS */

/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* threejs セクション（フルブリード） */
.threejs-scene-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-top: 0px;
  padding-bottom: 100px;
}

@media screen and (max-width: 768px) {
  .threejs-scene-section {
    padding-bottom: 50px;
  }
}

@media screen and (max-width: 480px) {
  .threejs-scene-section {
    padding-bottom: 30px;
  }
}

.threejs-scene-section > * {
  width: 100%;
  display: block;
}

/* トップページはコンテンツ上余白を無効化 */
#main,
.l-content,
.l-mainContent,
.l-mainContent__inner,
.l-container,
.content-area,
.site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* 基本設定 */
html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", "游ゴシック", "Yu Gothic", "游ゴシック体",
    "YuGothic", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ",
    "Meiryo", sans-serif;
  color: #333333;
  line-height: 1.6;
  min-height: 100vh;
}

/* コンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }
}

/* セクション共通スタイル */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: #1a1a1a;
  position: relative;
}

.section-description {
  text-align: center;
  font-size: 1.1rem;
  color: #4b5563;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.comparison-table-wrapper {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 比較表タイトル */
#comparison h5.comparison-title {
  font-size: 2.5rem;
  font-weight: 700;
  border-top-right-radius: 2px !important;
  border-top-left-radius: 2px !important;
}

#comparison .comparison-table-wrapper {
  border: 4px solid #0082f6;
}

#comparison table.comparison-table {
  border-radius: 0px !important;
}

#comparison .load-more-button {
  border-radius: 8px !important;
}

/* 空港別eSIM検索 セクション */
.esim-sarch-section {
  padding: 4rem 0;
  margin: 2rem 0;
}

.airport-esim-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-top: 2rem;
}

.subsection-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dbeafe;
}

/* 空港一覧 */
.airport-list-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  border: 4px solid #0082f6;
  overflow: hidden;
  min-height:880px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 検索フィルター */
.airport-search-filters {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 1px solid #dbeafe;
}

.search-filter-group {
  margin-bottom: 1rem;
}

.search-filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 2px solid #dbeafe;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #ffffff;
  color: #374151;
  transition: all 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:hover,
.filter-input:hover {
  border-color: #93c5fd;
}

.filter-input::placeholder {
  color: #9ca3af;
}

.airport-list {
  max-height: 500px;
  overflow-y: auto;
}

/* 空港リストのスクロールバーカスタマイズ */
.airport-list::-webkit-scrollbar {
  width: 6px;
}

.airport-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.airport-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.airport-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* Firefox用スクロールバー */
.airport-list {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #f1f5f9;
}

.airport-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.05);
}

.airport-item:hover {
  border-color: #3b82f6;
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.airport-item.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.airport-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.airport-code {
  font-size: 0.8rem;
  opacity: 0.8;
  font-weight: 500;
}

/* eSIM一覧 */
.esim-list-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 4px solid #0082f6;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 880px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.esim-list {
  display: grid;
  /* PC/タブレットともに2列固定（1枚時も幅が広がりすぎない） */
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 1.5rem;
  justify-content: center;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .esim-list {
    gap: 1.2rem;
    /* タブレットは1列 */
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .esim-list {
    gap: 1rem;
  }
}

/* スクロールバーのカスタマイズ */
.esim-list::-webkit-scrollbar {
  width: 8px;
}

.esim-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.esim-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.esim-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* Firefox用スクロールバー */
.esim-list {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #f1f5f9;
}

/* PCでのみスクロールを有効にする */
@media (min-width: 769px) {
  .airport-list-section,
  .esim-list-section {
    height: 700px;
  }

  .esim-list-section {
    overflow-y: auto;
  }

  .esim-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  /* PCではスライダーを非表示 */
  .mobile-esim-slider {
    display: none;
  }
}

/* eSIMスライダー */
.esim-slider-wrapper {
  display: none;
}

.esim-swiper {
  padding: 0 20px;
}

.esim-swiper .swiper-slide {
  height: auto;
}

/* スライダー操作要素 */
.esim-pagination {
  position: relative;
  margin-top: 2rem;
}

.esim-pagination .swiper-pagination-bullet {
  background: #3b82f6;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.esim-pagination .swiper-pagination-bullet-active {
  opacity: 1;
  background: #3b82f6;
}

.esim-next,
.esim-prev {
  color: #3b82f6;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.esim-next:hover,
.esim-prev:hover {
  background: #3b82f6;
  color: white;
  transform: scale(1.1);
}

.esim-next::after,
.esim-prev::after {
  font-size: 16px;
  font-weight: bold;
}

.esim-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #dbeafe;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  /* 高さをある程度揃える（1枚時も他と同等の見た目に） */
  min-height: 320px;
  height: auto;
  display: flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.esim-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.esim-card:hover::before {
  width: 6px;
}

.esim-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.esim-provider {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e3a8a;
}



.esim-features {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0 1rem;
  width: 100%;
}

.esim-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.feature-icon {
  width: 16px;
  height: 16px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
}

.esim-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 1rem;
}

.esim-website {
  margin-top: 1rem;
}

.website-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: #3b82f6;
  border: 1px solid #3b82f6;
  transition: all 0.3s ease;
}

.website-link:hover {
  background: #ffffff;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  transform: translateY(-1px);
}

.website-text {
  font-size: 0.85rem;
}

/* 空港が選択されていない場合のメッセージ */
.no-airport-selected {
  text-align: center;
  padding: 3rem;
  color: #4b5563;
}

.no-airport-selected h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #1e3a8a;
}

.no-airport-selected p {
  font-size: 1rem;
  line-height: 1.6;
}

/* 検索結果が見つからない場合のメッセージ */
.no-airport-found {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 1px dashed #dbeafe;
}

.no-airport-found p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.no-airport-found p:last-child {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* エラーメッセージ */
.error-message {
  text-align: center;
  padding: 2rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
}

.error-message p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* eSIMプロバイダー情報 */
.provider-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e3a8a;
  display: block;
}

.plan-name {
  font-size: 0.9rem;
  color: #6b7280;
  display: block;
  margin-top: 0.2rem;
}

/* 最新記事セクション */
.posts-section {
  padding: 4rem 0;
  margin: 2rem 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* 投稿カード */
.post-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(59, 130, 246, 0.08);
  transition: all 0.3s ease;
  border: 4px solid #0082f6;
  height: 450px;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(59, 130, 246, 0.2);
}

.post-card-image {
  position: relative;
  height: 200px;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-img-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.post-card-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  min-height: 200px;
}

.post-card:hover .post-card-img-link img {
  transform: scale(1.05);
}

.post-card-no-image {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
}

.post-card-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.post-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  margin-bottom: 1rem;
}

.post-card-date {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
}

.post-card-title {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-card-title a {
  color: #1e3a8a;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: #3b82f6;
}

.post-card-excerpt {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 1024px) {
  .post-card-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}


/* 投稿がない場合のメッセージ */
.no-posts-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: #f0f9ff;
  border-radius: 12px;
  border: 2px dashed #bae6fd;
}

.no-posts-message p {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* 最新記事スライダー */
.posts-slider-wrapper {
    margin-top: 2rem;
    position: relative;
}

.posts-swiper {
    padding: 20px 20px;
}

.posts-swiper .swiper-slide {
    height: auto;
}

/* スライダー操作要素 */
.posts-pagination {
    position: relative;
    margin-top: 2rem;
}

.posts-pagination .swiper-pagination-bullet {
    background: #3b82f6;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.posts-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: #3b82f6;
}

.posts-next,
.posts-prev {
  color: #3b82f6;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  top: auto;
  bottom: 5px;
}

.posts-next:hover,
.posts-prev:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.posts-next::after,
.posts-prev::after {
    font-size: 16px;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) and (min-width: 769px) {
  /* タブレット用 */
  .airport-esim-layout {
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
  }

  .airport-list-section,
  .esim-list-section {
    padding: 1rem;
    height: 880px;
  }

  .airport-list {
    max-height: 450px;
  }

  .esim-list-section {
    overflow-y: auto;
  }

  .esim-card {
    padding: 1.2rem;
  }
}

@media (max-width: 768px) {
  .airport-esim-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* PC用グリッドを非表示、スライダーを表示 */
  .pc-esim-list {
    display: none;
  }

  .esim-slider-wrapper {
    display: block;
  }

  .airport-list-section,
  .esim-list-section {
    height: auto;
    min-height: auto;
  }

  .airport-list {
    max-height: 400px;
  }

  .esim-list-section {
    overflow-y: visible;
    max-height: none;
  }

  .esim-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .post-card {
    height: 400px;
    border: 1px solid #0082f6;
  }

  .post-card-image {
    height: 180px;
  }

  .post-card-img-link img,
  .post-card-no-image {
    min-height: 180px;
  }

  .post-card-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #comparison h5.comparison-title {
    font-size: 2rem;
    border-top-right-radius: 6px !important;
    border-top-left-radius: 6px !important;
  }

  #comparison .comparison-table-wrapper {
    border: 1px solid #0082f6;
  }

  .section-title {
    font-size: 2rem;
    color: #1a1a1a;
  }

  .subsection-title {
    font-size: 1.3rem;
  }

  .section-description {
    font-size: 1rem;
  }

  .airport-list-section,
  .esim-list-section {
    padding: 1.2rem;
    border: 1px solid #0082f6;
  }

  .post-card-content {
    padding: 1rem;
  }

  .post-card-title a {
    font-size: 1.1rem;
  }

    .posts-swiper {
        padding: 10px 10px;
    }

    .posts-next,
    .posts-prev {
        width: 35px;
        height: 35px;
        top: auto;
        bottom: 5px;
    }

      .posts-next::after,
  .posts-prev::after {
    font-size: 14px;
  }

  /* eSIMスライダーのレスポンシブ対応 */
  .esim-swiper {
    padding: 0 15px;
  }

  .esim-next,
  .esim-prev {
    width: 40px;
    height: 40px;
  }

  .esim-next::after,
  .esim-prev::after {
    font-size: 16px;
  }

  /* 検索フィルターのレスポンシブ対応 */
  .airport-search-filters {
    padding: 0.6rem;
  }

  .filter-label {
    font-size: 0.8rem;
  }

  .filter-select,
  .filter-input {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }

  .esim-sarch-section,
  .posts-section {
    padding: 2rem 0;
    margin: 1rem 0;
  }

  #comparison h5.comparison-title {
    font-size: 1.8rem;
    border-top-right-radius: 6px !important;
    border-top-left-radius: 6px !important;
  }

  #comparison .comparison-table-wrapper {
    border: 1px solid #0082f6;
  }

  .section-title {
    font-size: 1.8rem;
    color: #1a1a1a;
  }

  .esim-card {
    padding: 1rem;
  }

  .post-card {
    height: 380px;
    border: 1px solid #0082f6;
  }

  .post-card-image {
    height: 160px;
  }

  .post-card-img-link img,
  .post-card-no-image {
    min-height: 160px;
  }

  .post-card-excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .airport-list-section,
  .esim-list-section {
    padding: 0.8rem;
    height: auto;
    min-height: auto;
    border: 1px solid #0082f6;
  }

  .airport-list {
    max-height: 350px;
  }

  .esim-list-section {
    overflow-y: visible;
    max-height: none;
  }

  .esim-swiper {
    padding: 0 10px;
  }

  .esim-next,
  .esim-prev {
    width: 35px;
    height: 35px;
    top: auto;
    bottom: 5px;
  }

  .esim-next::after,
  .esim-prev::after {
    font-size: 14px;
  }
}

/* ========================================
  最新の海外esim調査セクション - すべて見るボタン
  ======================================== */

.posts-section-footer {
  text-align: center;
  margin-top: 30px;
  padding: 20px 0;
}

.view-all-button {
  background: #f20981;
  color: #ffffff;
  border: 2px solid #f20981;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(242, 9, 129, 0.2);
  text-decoration: none;
}

.view-all-button:hover {
  background: #ffffff;
  border-color: #f20981;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 9, 129, 0.3);
  text-decoration: none;
  color: #f20981;
}

.view-all-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(242, 9, 129, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .posts-section-footer {
    margin-top: 20px;
    padding: 15px 0;
  }

  .view-all-button {
    padding: 12px 28px;
    font-size: 15px;
    min-width: 180px;
  }
}

@media (max-width: 480px) {
  .view-all-button {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 160px;
  }
}
