/* ============================================================
   메인 페이지
   ============================================================ */
.section { padding: var(--section-gap) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); flex-wrap: wrap; }
.section-head h2 { font-size: var(--text-h2); }
.link-more { font-size: var(--text-body-sm); font-weight: var(--weight-semibold); color: var(--color-accent-ink); white-space: nowrap; }

.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.card h3 { font-size: var(--text-h3); }
@media (max-width: 480px) { .card { padding: var(--space-5); border-radius: var(--radius-md); } }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #042f4d 0%, #065c8f 42%, var(--color-primary) 74%, #1b95d8 100%);
}

/* 배경 겹: 사진(관리자 Main Visual) → 스크림 → 항로 → 해도 격자 */
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-photo {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover;
  transform-origin: 60% 45%; animation: hero-kenburns 24s var(--ease) forwards;
}
/* 되돌아오지 않는 한 번짜리 확대 — 사진이 바뀌지 않으니 글자 대비가 흔들리지 않는다 */
@keyframes hero-kenburns { from { transform: scale(1); } to { transform: scale(1.06); } }

/* 사진 위에 덮는 겹. 사진이 없어도 이 그라데이션이 한 겹 더 깔려 색이 깊어진다. */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(4,32,54,0.95) 0%, rgba(5,60,95,0.88) 45%, rgba(6,112,170,0.74) 100%),
              radial-gradient(760px 440px at 82% 4%, rgba(255,255,255,0.15), transparent 70%);
}

/* 해도 격자 — 글자 쪽(왼쪽)은 마스크로 지워서 읽기를 방해하지 않는다 */
.hero-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: linear-gradient(105deg, transparent 20%, #000 55%);
  mask-image: linear-gradient(105deg, transparent 20%, #000 55%);
}

/* 항로 — 특정 지역을 그린 지도가 아니라 항로 개념도다 (부정확한 해안선을 그리지 않는다) */
.hero-chart { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; }
.hc-route polyline { fill: none; stroke: rgba(255,255,255,0.34); stroke-width: 1.5; stroke-dasharray: 7 8; stroke-linecap: round; stroke-linejoin: round; }
.hc-dots circle { fill: rgba(4,32,54,0.55); stroke: rgba(255,255,255,0.72); stroke-width: 1.6; }
.hc-hub circle { fill: none; stroke: rgba(255,255,255,0.2); stroke-width: 1.2; }

/* 글자 */
.hero-inner { position: relative; padding-block: clamp(36px, 5vw, 68px); }
.hero .eyebrow { color: rgba(255,255,255,0.8); }
.hero h1 { color: #fff; font-size: clamp(2.125rem, 4.6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.022em; margin-bottom: var(--space-4); }
.hero h1 span { display: block; font-size: 0.42em; font-weight: var(--weight-medium); color: rgba(255,255,255,0.86); margin-top: 10px; line-height: 1.35; letter-spacing: 0; }
.hero-sub { font-size: var(--text-body); color: rgba(255,255,255,0.82); max-width: 60ch; margin-bottom: var(--space-6); line-height: var(--leading-normal); }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* 숫자 띠 — 사진 대신 회사의 규모를 보여주는 자리 */
.hero-stats { position: relative; border-top: 1px solid rgba(255,255,255,0.16); background: rgba(3,26,45,0.3); }
.hero-stats-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero-stat { padding: var(--space-6) var(--space-5) var(--space-6) 0; }
.hero-stat + .hero-stat { padding-left: var(--space-6); border-left: 1px solid rgba(255,255,255,0.14); }
.hero-stat strong { display: block; font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: var(--weight-bold); line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-stat span { display: block; margin-top: 6px; font-size: var(--text-caption); color: rgba(255,255,255,0.74); line-height: 1.4; }

@media (max-width: 760px) {
  /* 좁은 화면에서는 항로가 잘려서 점 하나만 남으므로 숨긴다 (격자는 유지) */
  .hero-chart { display: none; }
  .hero-stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stat { padding: var(--space-5) var(--space-4) var(--space-5) 0; }
  .hero-stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .hero-stat:nth-child(n + 3) { border-top: 1px solid rgba(255,255,255,0.14); }
}
@media (prefers-reduced-motion: reduce) { .hero-photo { animation: none; } }

/* ── Port Information ─────────────────────────────────────── */
.section-port { background: var(--color-surface-alt); }
.port-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-5); }
.card-congestion h3 { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-4); }
.card-congestion .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-live); box-shadow: 0 0 0 4px rgba(217,72,15,0.15); }
.report-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-body-sm); }
.report-list li:last-child { border-bottom: 0; }
.report-list time { font-variant-numeric: tabular-nums; color: var(--color-text-subtle); font-size: var(--text-caption); }
.report-list a { color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.report-list .tag { justify-self: start; font-size: 0.7rem; padding: 2px 8px; border-radius: var(--radius-full); background: var(--color-accent-soft); color: var(--color-accent-ink); white-space: nowrap; }
.card-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-content: start; }
.card-mini { padding: var(--space-4) var(--space-5); }
.card-mini h3 { font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 6px; }
.card-mini a { display: block; color: var(--color-text); font-weight: var(--weight-medium); font-size: var(--text-body-sm); }
.card-mini time { display: block; font-size: var(--text-caption); color: var(--color-text-subtle); margin-top: 4px; }
.card-search form { display: flex; gap: 6px; }
.card-search input { flex: 1; min-width: 0; width: 100%; height: var(--btn-height-sm); padding: 0 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); font-size: 0.875rem; }
.gallery-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery-strip li a { display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface-sunken); }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease); }
.gallery-strip a:hover img { transform: scale(1.06); }
@media (max-width: 900px) { .port-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .port-grid { grid-template-columns: minmax(0, 1fr); } .report-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; } .report-list a { white-space: normal; } }

/* ── Business Scopes ──────────────────────────────────────── */
.scope-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.scope-card { display: flex; flex-direction: column; height: 100%; padding: var(--space-6) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: #fff; color: var(--color-text); transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease); }
.scope-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-accent); text-decoration: none; }
.scope-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); color: #fff; box-shadow: 0 4px 10px rgba(8, 61, 94, 0.18); margin-bottom: var(--space-4); }
.scope-icon svg { width: 22px; height: 22px; }
.scope-card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); line-height: 1.3; }
/* 5장이 한 줄일 때만: 제목이 두 줄인 카드(Business Consultation) 때문에 본문 시작선이 어긋나는 걸 막는다 */
@media (min-width: 1001px) { .scope-card h3 { min-height: 2.6em; } }
.scope-card p { font-size: var(--text-caption); color: var(--color-text-muted); flex: 1; line-height: 1.6; }
.scope-more { font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--color-accent-ink); }
@media (max-width: 1000px) { .scope-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .scope-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Notice / News ────────────────────────────────────────── */
/* Business Scopes(흰색) 와 붙어 한 덩어리로 보이던 구역 — 옅은 배경으로 떼어내고
   카드 그림자를 없애 "부차적인 소식"으로 읽히게 한다 */
.section-news { background: var(--color-surface-alt); padding-block: clamp(36px, 4.5vw, 56px); }  /* 제목이 없는 구역이라 여백을 줄여 '띠'로 읽히게 한다 */
.section-news .card { box-shadow: none; }
.section-news .card h3 { font-size: 1rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.post-list li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-body-sm); }
.post-list li:last-child { border-bottom: 0; }
.post-list a { color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.post-list time { color: var(--color-text-subtle); font-size: var(--text-caption); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 폰에서는 한 줄 말줄임이면 제목의 절반이 잘린다. 줄바꿈을 허용해 제목을 다 보여준다.
   (위 .report-list a 와 같은 처리 — 날짜는 그대로 오른쪽 같은 줄에 남는다) */
@media (max-width: 640px) { .post-list a { white-space: normal; } }
@media (max-width: 900px) { .news-grid { grid-template-columns: minmax(0, 1fr); } }  /* 1fr 이면 nowrap 제목이 카드를 넓힘 */

/* ── Contact / Partners ───────────────────────────────────── */
.section-contact { background: var(--color-primary-deep); color: #fff; }
.section-contact .eyebrow { color: var(--color-accent); }
.section-contact h2 { color: #fff; }
.section-contact .link-more { color: rgba(255,255,255,0.82); }
.section-contact .link-more:hover { color: #fff; }

/* 사무소 7곳 + Contact us 카드 = 8칸 → 4열이 두 줄로 정확히 찬다 (빈 칸 없음) */
.office-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.office-list li { padding: var(--space-4); border-radius: var(--radius-md); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); font-size: var(--text-caption); }
.office-list strong { display: block; font-size: 1rem; color: #fff; margin-bottom: 6px; }
.office-list strong span { font-weight: 400; color: rgba(255,255,255,0.55); margin-left: 6px; font-size: 0.8rem; }
.office-line { display: block; color: rgba(255,255,255,0.75); font-variant-numeric: tabular-nums; }
.office-addr { color: rgba(255,255,255,0.6); line-height: var(--leading-snug); font-variant-numeric: normal; }
.office-cta { background: rgba(45,163,228,0.16); border-color: rgba(45,163,228,0.42); }
.office-cta a { display: block; color: #fff; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.office-cta a:hover { color: var(--color-accent); text-decoration: none; }

@media (max-width: 1080px) { .office-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .office-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 좁은 화면: 고정폭 숫자(tabular-nums)가 넓어 전화번호가 두 줄로 깨지므로 여백·글자를 줄인다 */
@media (max-width: 480px)  { .office-list li { padding: var(--space-3); } .office-line { font-size: 0.75rem; } }
@media (max-width: 359px)  { .office-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) { .card-search input { font-size: 16px; } }

/* 파트너는 오른쪽 세로 칸이 아니라 아래 가로 띠 — 오른쪽에 생기던 빈 공간을 없앤다 */
.partners { display: flex; align-items: center; gap: var(--space-4) var(--space-8); flex-wrap: wrap;
            margin-top: var(--space-10); padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,0.14); }
.partners .eyebrow { margin: 0; }
.partner-list { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.partner-list li { background: #fff; border-radius: var(--radius-sm); padding: 10px 18px; display: grid; place-items: center; min-height: 56px; min-width: 148px; color: var(--color-heading); font-weight: var(--weight-semibold); font-size: var(--text-caption); text-align: center; }
.partner-list img { max-height: 36px; width: auto; }
.partner-list a { display: contents; }

/* ── Port Directory 그리드 ────────────────────────────────── */
.port-name-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.port-name-grid a { display: inline-block; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-full); color: var(--color-text-muted); font-size: var(--text-caption); font-weight: var(--weight-medium); white-space: nowrap; overflow-wrap: normal; word-break: normal; transition: border-color var(--duration), background var(--duration), color var(--duration); }
.port-name-grid a:hover { border-color: var(--color-accent); background: var(--color-accent-soft); color: var(--color-accent-ink); text-decoration: none; }
