/* ==========================================================================
   Location Section - 教室開催地専用スタイル
   ========================================================================== */

/* Location セクション - 縦幅最適化版 */
#location {
  background: var(--white);
  position: relative;
  overflow: hidden;
  padding: var(--section-padding) 0 !important; /* 統一値を使用 */
  scroll-margin-top: var(--scroll-offset) !important; /* 明示的に強制適用 */
}

#location::before {
  content: '';
  position: absolute;
  top: -5%;
  left: -5%;
  width: 300px; /* サイズを縮小 */
  height: 300px;
  background: var(--primary-blue);
  border-radius: 50%;
  opacity: 0.05;
  animation: float 15s ease-in-out infinite;
}

/* コンテンツレイアウト - 最適化 */
.location-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px; /* 間隔を縮める */
  align-items: start;
  position: relative;
  z-index: 2;
}

/* 教室情報カード - 縮小版 */
.location-info {
  background: var(--white);
  padding: 30px; /* パディングをさらに縮小 */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 3px solid transparent;
  background-clip: padding-box;
  position: relative;
  height: fit-content;
}

.location-info::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--primary-blue);
  border-radius: var(--radius-xl);
  z-index: -1;
}

/* タイトル - コンパクト化 */
.location-info h3 {
  font-size: 26px; /* フォントサイズを縮小 */
  margin-bottom: 25px; /* マージンを縮小 */
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: var(--font-weight-heavy);
  position: relative;
}

.location-info h3::before {
  content: '';
  width: 14px; /* サイズを縮小 */
  height: 14px;
  background: var(--primary-blue);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
}

/* 情報項目 - 縮小版 */
.info-item {
  margin-bottom: 20px; /* マージンを縮小 */
  padding-left: 40px; /* パディングを縮小 */
  position: relative;
}

.info-item::before {
  position: absolute;
  left: 0;
  top: 3px;
  width: 26px; /* サイズを縮小 */
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--font-weight-heavy);
  color: white;
}

.info-item:first-of-type::before { 
  content: '';
  background: var(--primary-blue);
}

.info-item:nth-of-type(2)::before { 
  content: '';
  background: var(--primary-blue);
}

.info-item:nth-of-type(3)::before,
.access-item::before {
  content: '';
  background: var(--primary-blue) !important;
}

.info-item strong {
  display: block;
  color: var(--navy-dark);
  font-size: 18px; /* フォントサイズを縮小 */
  margin-bottom: 6px; /* マージンを縮小 */
  font-weight: var(--font-weight-black);
}

.info-item span {
  color: var(--gray-medium);
  font-size: 15px; /* フォントサイズを調整 */
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

/* コーススケジュール - コンパクト版 */
.course-schedule {
  background: var(--gray-light);
  padding: 18px; /* パディングをさらに縮小 */
  border-radius: var(--radius-lg);
  margin-top: 18px; /* マージンをさらに縮小 */
  position: relative;
  overflow: hidden;
}

.course-schedule::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px; /* 高さを縮小 */
  background: var(--primary-blue);
}

.course-schedule h4 {
  color: var(--navy-dark);
  margin-bottom: 12px; /* マージンをさらに縮小 */
  font-size: 16px; /* フォントサイズを縮小 */
  font-weight: var(--font-weight-black);
  text-align: center;
}

/* コースアイテムを横並びに */
.course-items {
  display: flex;
  gap: 12px; /* アイテム間のギャップ */
  flex-wrap: wrap; /* 小画面では折り返し */
}

.course-item {
  margin-bottom: 0; /* 下マージンを削除 */
  padding: 12px; /* パディングを縮小 */
  background: var(--white);
  border-radius: 12px; /* 角丸を縮小 */
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
  transition: var(--transition-normal);
  flex: 1; /* 横幅を均等に */
  min-width: 0; /* flexの縮小を許可 */
  text-align: center; /* テキストを中央揃え */
}

.course-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--primary-blue);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.3;
}

.course-item:hover {
  transform: translateY(-2px); /* 移動距離を縮小 */
  box-shadow: var(--shadow-md);
}

.course-item strong {
  color: var(--primary-blue);
  font-weight: var(--font-weight-black);
  font-size: 13px; /* フォントサイズを調整 */
  line-height: 1.3;
  display: block;
  margin-bottom: 4px; /* コース名と時間の間隔 */
}

.course-time {
  font-size: 12px;
  color: var(--gray-medium);
  font-weight: var(--font-weight-bold);
}

/* マップエリア - 最適化 */
.map-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 100%;
  min-height: 350px; /* 高さをさらに縮小 */
  border: 3px solid transparent;
  background-clip: padding-box;
  position: relative;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--primary-blue);
  border-radius: var(--radius-xl);
  z-index: -1;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 350px; /* 高さをさらに縮小 */
  border-radius: 27px;
  border: none;
  background: var(--white);
  transition: opacity 0.3s ease;
}

/* マップ読み込み中の表示 */
.map-wrapper::after {
  content: '地図を読み込み中...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 15px 25px; /* パディングを縮小 */
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  color: var(--navy-dark);
  font-weight: var(--font-weight-bold);
  font-size: 14px; /* フォントサイズを調整 */
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* iframeが読み込まれていない場合に表示 */
.map-wrapper:not(:has(iframe[src*="maps"])) iframe,
.map-wrapper iframe:not([src*="maps"]) {
  opacity: 0;
}

.map-wrapper:not(:has(iframe[src*="maps"]))::after,
.map-wrapper:has(iframe:not([src*="maps"]))::after {
  opacity: 1;
}

/* レスポンシブ対応 - タブレット */
@media (max-width: 1024px) {
  #location {
    padding: var(--section-padding) 0 !important;
    scroll-margin-top: var(--scroll-offset) !important;
  }
  
  .location-content {
    gap: 30px;
  }
  
  .location-info {
    padding: 25px;
  }
  
  .map-wrapper {
    min-height: 300px; /* タブレットでさらに縮小 */
  }
  
  .map-wrapper iframe {
    min-height: 300px; /* タブレットでさらに縮小 */
  }
}

/* レスポンシブ対応 - モバイル */
@media (max-width: 768px) {
  #location {
    padding: var(--section-padding) 0 !important;
    scroll-margin-top: var(--scroll-offset) !important;
  }
  
  .location-content {
    grid-template-columns: 1fr;
    gap: 25px; /* ギャップを縮小 */
  }
  
  .location-info {
    padding: 20px 15px;
    overflow-y: visible;
  }
  
  .location-info h3 {
    font-size: 20px;
    margin-bottom: 20px;
    gap: 12px;
  }
  
  .location-info h3::before {
    width: 12px;
    height: 12px;
  }
  
  .info-item {
    margin-bottom: 18px;
    padding-left: 35px;
  }
  
  .info-item::before {
    width: 22px;
    height: 22px;
    font-size: 12px;
    top: 2px;
  }
  
  .info-item strong {
    font-size: 16px;
    margin-bottom: 5px;
  }
  
  .info-item span {
    font-size: 14px;
  }
  
  .course-schedule {
    padding: 15px;
    margin-top: 15px;
  }
  
  .course-schedule h4 {
    font-size: 14px; /* モバイルでさらに縮小 */
    margin-bottom: 10px;
  }
  
  /* モバイルでは縦並びに戻す */
  .course-items {
    flex-direction: column;
    gap: 8px;
  }
  
  .course-item {
    padding: 10px;
    margin-bottom: 8px; /* モバイルでは下マージンを復活 */
    border-radius: 10px;
    text-align: left; /* モバイルでは左寄せ */
  }
  
  .course-item::before {
    border-radius: 10px;
  }
  
  .course-item strong {
    font-size: 12px;
    margin-bottom: 3px;
  }
  
  .course-time {
    font-size: 11px;
  }
  
  .map-wrapper {
    min-height: 220px; /* モバイルでさらに縮小 */
    border-radius: 15px;
    margin: 15px 0;
  }
  
  .map-wrapper::before {
    border-radius: 15px;
  }
  
  .map-wrapper iframe {
    min-height: 220px; /* モバイルでさらに縮小 */
    border-radius: 12px;
  }
}

/* レスポンシブ対応 - 小画面モバイル */
@media (max-width: 480px) {
  .location-info {
    padding: 15px 12px;
  }
  
  .location-info h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .info-item {
    margin-bottom: 15px;
    padding-left: 30px;
  }
  
  .info-item::before {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
  
  .info-item strong {
    font-size: 15px;
  }
  
  .info-item span {
    font-size: 13px;
  }
  
  .course-schedule {
    padding: 12px;
  }
  
  .course-item {
    padding: 10px;
  }
  
  .course-item strong {
    font-size: 12px;
  }
  
  .course-time {
    font-size: 10px;
  }
}

/* アクセシビリティ改善 */
@media (prefers-reduced-motion: reduce) {
  .course-item:hover {
    transform: none;
  }
  
  #location::before {
    animation: none;
  }
} 