/* ==========================================
  1. 회사소개 페이지 (Introduction Page)
========================================== */

/* ==========================================================
  1.1 OVERVIEW (회사소개 페이지 전용 비율)
  공통 overview 스타일은 base.css 4.1로 이동
========================================================== */
/* [Stage2] .overview-image img 전역값 → base.css 로 이동(전 페이지 공통).
   회사소개 전용 높이가 필요하면 .introduction-page .overview-image img 로 스코프하세요. */


/* ==========================================
  1.2 MAIN SERVICES
========================================== */

/* 섹션 */
/* ==========================================
  1.2 주요 서비스 + 기타 서비스  (하나의 테두리 섹션)
========================================== */
.intro-service{
    display:flex;
    flex-direction:column;
    background:#f8fafc;
    border-radius:20px;
    padding:50px 30px;
}
.introduction-page .section-header{ text-align:center; margin-bottom:20px; }

/* 핵심 서비스 카드 (가로 배치) */
.humanebiz-services{ display:flex; gap:30px; }
.introduction-page .card{
    flex:1;
    padding:35px;
    background:#fff;
    border-radius:16px;
    transition:all .3s ease;
}
.introduction-page .card:hover{ transform:translateY(-6px); box-shadow:0 15px 35px rgba(0,0,0,.08); }

/* 기타 서비스 소제목 */
.intro-sub-title{ margin:34px 0 16px; font-size:18px; font-weight:700; color:var(--text); text-align:center; }

/* 기타 서비스 그리드: PC 는 항상 3열로 전체 표시 (접힘 없음) */
.introduction-page .intro-service-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}
.intro-service-grid .service{
    padding:25px;
    border-radius:12px;
    background:#fff;
    text-align:center;
    transition:transform .3s;
}
.intro-service-grid .service:hover{ transform:translateY(-5px); }

/* 전체보기 버튼: PC 에서는 숨김(기타 서비스가 항상 다 보이므로).
   모바일에서만 표시됨(아래 반응형 참고). */
.toggle-button.service-toggle{ display:none; }

/* ==========================================
  1.4 반응형 (≤768px)
========================================== */
@media (max-width: 768px){

    .intro-service{ padding:20px; }

    /* 핵심 서비스 카드 세로 전환 */
    .humanebiz-services{ flex-direction:column; gap:20px; }
    .introduction-page .card{ width:100%; }

    .intro-sub-title{ margin:24px 0 12px; }

    /* 기타 서비스: 모바일에서만 접힘 → 전체보기(.open) 시 1열로 표시 */
    .introduction-page .intro-service-grid{ display:none; }              /* 기본 접힘 */
    .introduction-page .intro-service-grid.service-collapse.open{
        display:grid;
        grid-template-columns:1fr;
        gap:15px;
    }
    .intro-service-grid .service{ padding:18px; }

    /* 전체보기 버튼: 모바일에서만 표시 */
    .introduction-page .toggle-button.service-toggle{ display:inline-flex; margin:16px auto 0; }

    .card:hover, .service:hover{ transform:none; }

    .introduction-page .overview-text{
        font-size:14px;
        line-height:1.8;
    }

    .introduction-page .card h3,
    .introduction-page .intro-service-grid .service h3{
        font-size:16px;
        line-height:1.4;
    }

    .introduction-page .card p,
    .introduction-page .intro-service-grid .service p{
        font-size:14px;
        line-height:1.7;
    }    
  }


/* =============================
  2. 히스토리 페이지
============================= */

/* 전체 영역 */
.history-page .history {
  position: relative;
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
  background:#f8fafc;
  border-radius:20px;
  padding:50px 30px;
}

/* .history::before 규칙을 아래로 교체 */
.history-page .history-timeline{
    position:relative;
}
.history-page .history-timeline::before{
    content:'';
    position:absolute;
    left:50%;
    top:0;
    height:100%;      /* 이제 타임라인 높이에만 맞음 */
    width:2px;
    background:#ddd;
}

/* =============================
  2.1 히스토리 아이템
============================= */

.history-page .history-item {
  position: relative;
  width: 50%;
  padding: 20px;
  box-sizing: border-box;

  opacity: 0;
  transform: translateY(40px);
  transition: 0.6s ease;
}

.history-page .history-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* 좌측 */
.history-page .history-item.left {
  left: 0;
  text-align: right;
}

/* 우측 */
.history-page .history-item.right {
  left: 50%;
}

.history-collapse .history-item:nth-child(n+4){

    display:none;

}

.history-collapse.open .history-item{
    display:block;
    opacity:1;
    transform:none;
}

/* =============================
  2.2 카드
============================= */

.history-page .history-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 연도 */
.history-page .history-year {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text);
}

/* =============================
  2.3 리스트
============================= */

.history-page .history-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-page .history-card li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  line-height: 1.5;
}

.history-page .history-card li:last-child {
  border-bottom: none;
}

/* 강조 */
.history-page .history-card li.highlight {
  font-weight: bold;
  color: var(--text);
}

/* =============================
  중앙 점
============================= */

.history-page .history-dot {
  position: absolute;
  top: 30px;
  width: 12px;
  height: 12px;
  background: #111;
  border-radius: 50%;
  z-index: 2;
}

/* 좌측 점 */
.history-page .history-item.left .history-dot {
  right: -6px;
}

/* 우측 점 */
.history-page .history-item.right .history-dot {
  left: -6px;
}

/* =============================
  반응형 (모바일)
============================= */

@media (max-width: 768px) {

  .history-page .history::before {
    left: 8px;
  }

  .history-page .history-item {
    width: 100%;
    padding-left: 30px;
    padding-right: 20px;
    text-align: left;
    left: 0 !important;
  }

  .history-page .history-dot {
    left: 2px;
  }

}


/* =============================
  3. 오시는길 페이지
============================= */
.location-page .location {
  max-width: 1024px;
  margin: 0 auto;
  padding: 20px;
  background:#f8fafc;
  border-radius:20px;
}

.location .map-section + .map-section{
    margin-top: 60px;
}

.map-section h2 {
  margin-bottom: 10px;
}

.location-page .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.location-page .card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.location-page .map {
  margin-top: 20px;
  border-radius: 20px;
  overflow: hidden;
  height: 400px;
}

#map-hq, #map-branch {
  margin: 10px;
  width: 100%;
  height: 400px;
}

.location-page .map-buttons {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.location-page .btn {
  padding: 12px 18px;
  border-radius: 12px;
  background: #111;
  color: white;
  text-decoration: none;
}

.map-badge {
  background: #111;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;

  box-shadow: 0 6px 15px rgba(0,0,0,0.2);

  transform: translateY(-10px);
  position: relative;
  transition: all 0.25s ease;
}

.map-badge:hover {
    transform: translateY(-14px) scale(1.05);
}

.map-badge::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  
  border-width: 6px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}

/* =============================
  3.1 말풍선 핀
============================= */
/* 기준점 역할 */
.pin-anchor {
    position: relative;
}

/* 실제 UI */
.map-pin {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
}

/* 말풍선 본체 */
.pin-label {
  background: #111;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;

  box-shadow: 
    0 8px 20px rgba(0,0,0,0.15),
    0 2px 6px rgba(0,0,0,0.1);
}

/* 꼬리 */
.map-pin::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);

  width: 12px;
  height: 12px;
  background: inherit;
  background: #111;
}

/* 색상 구분 */
.map-pin.hq .pin-label {
    background: #111;
}

.map-pin.branch .pin-label {
    background: var(--brand);
}

.map-pin.branch::after {
    background: var(--brand);
}