/* ================================================
   component_main_map_tab.css
   탭 UI 전용 — 기존 CSS 파일 건드리지 않음
   ================================================ */

/* ---------- 전체 섹션 래퍼 ---------- */
.section-map-unified {
  width: 100%;
  background: #ffffff;
  padding: 70px 0 0;
  box-sizing: border-box;
  position: relative;
  z-index: 11;
  isolation: isolate;
}

/* ---------- 섹션 헤더 ---------- */
.map-unified-header {
  text-align: left;
  padding: 0 48px 48px;
  max-width: 1800px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.map-unified-header-copy h2 {
  font-size: 13px;
  font-weight: 600;
  color: #4a5a2a;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 14px;
  font-family: 'Pretendard', sans-serif;
}

.map-unified-header-copy strong {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: #000;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-family: 'Pretendard', sans-serif;
  margin-bottom: 14px;
}

.map-unified-header-copy p {
  font-size: 16px;
  color: rgba(0,0,0,0.65);
  margin: 0;
  font-family: 'Pretendard', sans-serif;
  line-height: 1.7;
}

/* ---------- 탭 바 ---------- */
.map-tab-outer {
  padding: 0 48px;
  max-width: 1800px;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 20;
}

.map-tab-bar {
  display: inline-flex;
  gap: 4px;
  background: transparent;
  padding: 0;
}

/* ---------- 탭 버튼 ---------- */
.map-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border: 1.5px solid #c0c8b0;
  border-bottom: none;
  background: linear-gradient(180deg, #eef2e8 0%, #e4eadc 100%);
  border-radius: 12px 12px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5a6a3a;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Pretendard', sans-serif;
  letter-spacing: -0.02em;
  transform-origin: bottom center;
  transform: scale(1) translateY(0px);
  transition:
    transform     0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background    0.2s ease,
    color         0.2s ease,
    border-color  0.2s ease,
    box-shadow    0.2s ease;
  position: relative;
}

.map-tab:hover:not(.active) {
  background: linear-gradient(180deg, #dde8cc 0%, #d0dfc0 100%);
  color: #3a5a1a;
  border-color: #a0b880;
}

/* 선택된 탭 */
.map-tab.active {
  background: linear-gradient(180deg, #4a8a2a 0%, #3a7a1a 100%);
  color: #fff;
  border-color: #3a7a1a;
  border-bottom: 2px solid #3a7a1a;
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 -6px 20px rgba(58, 122, 26, 0.35);
  z-index: 2;
}

.map-tab .tab-icon {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-tab.active .tab-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.map-tab .tab-label {
  font-size: 1.1rem;
  color: inherit;
}

/* ---------- 패널 래퍼 ---------- */
.map-panel-wrap {
  background: #fff;
  box-shadow: 0 -2px 60px rgba(0,0,0,0.15);
  overflow: hidden;
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #d0d0d0;
  border-radius: 0 0 12px 12px;
}

/* ---------- 패널: 숨김 / 표시 ---------- */
/* 비활성 패널은 시각적으로 숨기되, iframe src는 JS로 미리 설정해 둠
   → display:none 상태에서도 src가 설정된 iframe은 로드가 유지됨 */
.map-panel {
  display: none;
}

.map-panel.active {
  display: block;
}


/* 패널 내부 기존 섹션의 상단 패딩 줄이기 */
.map-panel > .section-main08,
.map-panel > .section-main09,
.map-panel > .section-main02 {
  padding-top: 40px;
  padding-bottom: 40px;
}

/* ---------- 반응형 ---------- */
@media (max-width: 1200px) {
  .map-unified-header {
    padding: 0 32px 40px;
    flex-direction: column;
    align-items: flex-start;
  }

  .map-unified-header-copy strong {
    font-size: 34px;
  }

  .map-tab-outer {
    padding: 0 32px;
  }
}

@media (max-width: 768px) {
  .section-map-unified {
    padding: 50px 0 0;
  }

  .map-unified-header {
    padding: 0 20px 32px;
  }

  .map-unified-header-copy strong {
    font-size: 26px;
  }

  .map-unified-header-copy p {
    font-size: 14px;
  }

  /* 탭 바: 가로 꽉 채우기 */
  .map-tab-outer {
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .map-tab-bar {
    display: flex;
    width: 100%;
    gap: 0;
  }

  .map-tab {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    font-size: 0.75rem;
    gap: 5px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 3px solid transparent;
    background: #e8ede0;
    color: #6a7a4a;
  }

  /* 모바일 첫번째 탭 왼쪽/마지막 탭 오른쪽 border 제거 */
  .map-tab:first-child {
    border-left: none;
  }
  .map-tab:last-child {
    border-right: none;
  }

  /* 모바일 탭 구분선: 탭 사이 세로선 */
  .map-tab + .map-tab {
    border-left: 1px solid #c8d4b0;
  }

  /* 모바일 active 탭 */
  .map-tab.active {
    background: linear-gradient(180deg, #4a8a2a 0%, #3a7a1a 100%);
    color: #fff;
    border-bottom: 3px solid #ff6b2b;
    transform: none;
    box-shadow: 0 4px 12px rgba(58, 122, 26, 0.3);
  }

  /* 모바일에서 아이콘 표시 (크기 줄임) */
  .map-tab .tab-icon {
    display: inline;
    font-size: 1.4rem;
    line-height: 1;
  }

  .map-tab .tab-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    word-break: keep-all;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .map-tab {
    padding: 10px 4px;
    font-size: 0.68rem;
  }
  .map-tab .tab-icon {
    font-size: 1.2rem;
  }
  .map-tab .tab-label {
    font-size: 0.65rem;
  }
}