/* ============================================================
   Bridge — ΔT Zero Solution  (모바일 퍼스트 전면 재작성)
   팔레트:
     Paper   #F5F7F9   엔지니어링 화이트
     Card    #FFFFFF
     Ink     #10202C   저온 슬레이트
     Steel   #51687A   보조 텍스트
     Coolant #1E63D0   냉각수 블루
     Heat    #E14B33   열원 레드
     Zero    #0E9E8F   목표 상태 틸
   ============================================================ */

/* ---- 웹폰트 슬롯 ---- */
@font-face {
  font-family: "BridgeHeading";
  src: url("/assets/fonts/heading.woff2") format("woff2");
  font-weight: 400 900; font-display: swap;
}
@font-face {
  font-family: "BridgeBody";
  src: url("/assets/fonts/body.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}

/* ============================================================
   RESET / 기본
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  font-family: "BridgeBody","Pretendard Variable",Pretendard,
               -apple-system,"Segoe UI","Noto Sans KR","Malgun Gothic",
               "Microsoft YaHei","Yu Gothic",sans-serif;
  background: #F5F7F9;
  color: #10202C;
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: #1E63D0; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid #1E63D0; outline-offset: 2px; }
button { cursor: pointer; font-family: inherit; }

/* 공통 변수 */
:root {
  --paper:   #F5F7F9;
  --card:    #FFFFFF;
  --ink:     #10202C;
  --steel:   #51687A;
  --line:    #D7E0E7;
  --coolant: #1E63D0;
  --heat:    #E14B33;
  --zero:    #0E9E8F;
  --zero-dim:#E2F2F0;
  --font-head: "BridgeHeading","Pretendard Variable",Pretendard,
               -apple-system,"Segoe UI","Noto Sans KR","Malgun Gothic",
               "Microsoft YaHei","Yu Gothic",sans-serif;
  --font-mono: "IBM Plex Mono",ui-monospace,"SFMono-Regular",Consolas,monospace;
  --maxw: 1080px;
  --px: 20px;       /* 기본 좌우 여백 (모바일) */
  --header-h: 58px;
}
@media (min-width: 600px) { :root { --px: 32px; } }
@media (min-width: 1024px){ :root { --px: 40px; } }

/* ============================================================
   서버 안내 배너
   ============================================================ */
#server-notice {
  background: var(--heat); color: #fff;
  padding: 10px var(--px); text-align: center; font-size: 13px;
  line-height: 1.5;
}
#server-notice code {
  background: rgba(255,255,255,.2); padding: 1px 6px; border-radius: 4px;
  white-space: nowrap;
}

/* ============================================================
   헤더 / 네비게이션
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center;
  padding: 0 var(--px);
  height: var(--header-h);
  background: rgba(245,247,249,.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

/* 브랜드 */
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink); flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.logo-slot img { height: 26px; width: auto; }
.brand-name {
  font-family: var(--font-head); font-weight: 800;
  letter-spacing: 0.12em; font-size: 16px;
}

/* 데스크톱 인라인 네비 */
.nav {
  display: none; /* 모바일에서 숨김 — 햄버거로 대체 */
  gap: 18px; margin-left: auto; align-items: center;
}
.nav a {
  color: var(--steel); font-size: 14px; font-weight: 500;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  color: #fff !important; background: var(--ink);
  padding: 6px 16px; border-radius: 999px; font-size: 14px;
}
.nav-cta:hover { background: var(--coolant); }


/* 햄버거 버튼 (모바일 전용) */
.hamburger {
  display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; padding: 4px;
  flex-shrink: 0; margin-left: 4px;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block; height: 2px; border-radius: 1px;
  background: var(--ink); transition: transform .22s, opacity .22s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 드로어 메뉴 */
.mobile-drawer {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 190;
  background: var(--card);
  padding: 28px var(--px) 40px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  display: block; color: var(--ink); font-size: 22px;
  font-family: var(--font-head); font-weight: 700;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  letter-spacing: -0.01em;
}
.mobile-drawer a:last-child { border-bottom: none; margin-top: 8px; }
.mobile-drawer .drawer-cta {
  display: inline-block; background: var(--ink); color: #fff !important;
  padding: 14px 28px; border-radius: 999px; font-size: 17px; margin-top: 12px;
  text-align: center;
}

/* 데스크톱 레이아웃 전환 */
@media (min-width: 860px) {
  .nav { display: flex; }
  .hamburger, .mobile-drawer { display: none !important; }
}

/* ============================================================
   히어로 — 모바일 우선 (세로 단, 텍스트 → 이미지 순)
   ============================================================ */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px var(--px) 32px;
  display: flex; flex-direction: column; gap: 32px;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--zero); margin-bottom: 12px;
}
.md h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 8vw, 52px);
  font-weight: 850; line-height: 1.18;
  letter-spacing: -0.05em; margin-bottom: 14px;
}
.hero-text > .md > p,
.hero-text > p { color: var(--steel); }

.hero-media {
  border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; background: var(--card);
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 200px; /* 이미지 로드 전 영역 확보 */
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* 태블릿/데스크톱: 좌우 2열 */
@media (min-width: 860px) {
  .hero {
    flex-direction: row; align-items: center;
    padding: 12px var(--px) 32px; gap: 48px;
  }
  .hero-text { flex: 1.1; }
  .hero-media { flex: 0.9; }
}

/* ---- ΔT 수렴 바 ---- */
.dt-bar-wrap { margin-top: 32px; }
.dt-scale {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; color: var(--steel);
}
.mono { font-family: var(--font-mono); font-size: 0.82em; letter-spacing: 0.02em; }
.dt-arrow { color: var(--line); }
.dt-zero { color: var(--zero); font-weight: 700; }
.dt-bar {
  height: 14px; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line);
}
.dt-bar-inner {
  height: 100%; width: 100%;
  background: linear-gradient(90deg,#1E63D0 0%,#2FA6C9 22%,#56C98F 45%,#E8B93C 68%,#E14B33 100%);
  /* 수렴 애니메이션 제거 — 멀티컬러 그대로 유지 */
}
.dt-caption { margin-top: 8px; color: var(--steel); font-size: 12px !important; }

/* scroll-behavior: auto — 전역 적용으로 통일 */

/* ============================================================
   섹션 공통
   ============================================================ */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 48px var(--px);
}
@media (min-width: 860px) { .section { padding: 64px var(--px); } }

.section-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.tick {
  width: 28px; height: 7px; border-radius: 4px; flex-shrink: 0;
  background: #065B94;
}
.tick-zero { background: #065B94; }
.section-head h2 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(20px, 5vw, 30px); letter-spacing: -0.01em;
}

/* ============================================================
   기술 카드
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr; /* 모바일: 1열 */
  gap: 14px;
}
@media (min-width: 600px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .info-grid { grid-template-columns: repeat(3, 1fr); }
}

.tech-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px 20px;
  transition: border-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.tech-card:hover {
  border-color: var(--coolant);
  box-shadow: 0 4px 16px rgba(30,99,208,.08);
}
.tech-card .idx {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--zero); letter-spacing: .15em; margin-bottom: 8px;
}
.tech-card h3 {
  font-family: var(--font-head); font-size: 16px; font-weight: 750;
  margin-bottom: 8px; line-height: 1.35;
}
.tech-card p, .tech-card li { color: var(--steel); font-size: 14px; line-height: 1.65; }
.tech-card ul { padding-left: 16px; margin-top: 6px; }

/* ============================================================
   갤러리
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 모바일: 2열 */
  gap: 10px;
}
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (min-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

.gallery-grid figure {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--card); cursor: zoom-in; aspect-ratio: 4 / 3;
  -webkit-tap-highlight-color: transparent;
}
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s;
}
@media (hover: hover) {
  .gallery-grid figure:hover img { transform: scale(1.04); }
}

/* ============================================================
   비디오
   ============================================================ */
.video-slot video {
  width: 100%; border-radius: 12px;
  border: 1px solid var(--line); background: #000;
}

/* ============================================================
   본문 프로즈
   ============================================================ */
.prose { max-width: 72ch; }
.md h2 { font-family: var(--font-head); font-size: clamp(18px,4vw,22px); font-weight: 750; margin: 24px 0 8px; }
.md h3 { font-family: var(--font-head); font-size: 16px; font-weight: 700; margin: 18px 0 6px; }
.md p { margin-bottom: 12px; color: inherit; }
.prose p, .prose li { color: var(--steel); font-size: 15px; }
.md ul { padding-left: 18px; margin-bottom: 12px; }
.md strong { color: var(--ink); }

/* ============================================================
   문의 섹션
   ============================================================ */
.section-contact {
  background: var(--zero-dim);
  border-radius: 16px; margin: 0 var(--px) 48px;
  max-width: calc(var(--maxw) - var(--px)*2);
}
@media (min-width: 600px) {
  .section-contact { margin: 0 auto 64px; padding: 48px var(--px); border-radius: 20px; }
}

.section-contact a.btn, .md a.btn {
  display: inline-block; background: var(--zero); color: #fff;
  padding: 13px 26px; border-radius: 999px; font-weight: 600;
  margin-top: 10px; font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
.section-contact a.btn:hover { text-decoration: none; filter: brightness(1.08); }

/* ============================================================
   빈 폴더 안내
   ============================================================ */
.empty {
  border: 1.5px dashed var(--line); border-radius: 12px;
  padding: 32px 20px; text-align: center; color: var(--steel);
  font-size: 13px; grid-column: 1 / -1; line-height: 1.7;
}
.empty code {
  font-family: var(--font-mono); background: var(--card);
  border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px;
  color: var(--coolant); word-break: break-all;
}

/* ============================================================
   푸터
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 24px var(--px);
  box-sizing: border-box;
  display: flex; flex-direction: row;
  justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 8px;
  color: var(--steel); font-size: 12px;
  font-family: var(--font-mono);
  text-align: center;
}

/* ============================================================
   라이트박스
   ============================================================ */
#lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(16,32,44,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
#lightbox img {
  max-width: 100%; max-height: 90vh;
  border-radius: 8px; object-fit: contain;
}
#lightbox-close {
  position: absolute; top: 14px; right: 16px;
  font-size: 36px; line-height: 1;
  color: #fff; background: none; border: 0;
  padding: 4px 10px;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   유틸
   ============================================================ */
[hidden] { display: none !important; }

/* ============================================================
   추가 기능 v3 스타일
   ============================================================ */

/* ── 1. Hero 크로스페이드 전환 ── */
#hero-md, #hero-media {
  transition: opacity 0.25s ease;
}

/* Hero 인디케이터 (dot) */
.hero-dots {
  display: flex; gap: 8px; margin-top: 24px; align-items: center;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line); border: none; padding: 0;
  transition: background .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
.hero-dot.active {
  background: var(--zero); transform: scale(1.4);
}
/* 슬라이드 진행 바 (dot 아래 얇은 선) */
.hero-dots::after {
  content: "";
  flex: 1; height: 2px;
  background: var(--line); border-radius: 1px;
  margin-left: 4px;
}

/* ── 2. Tech 카드 이미지 오버레이 ── */
.tech-card {
  position: relative;
  overflow: hidden; /* 오버레이가 카드 밖으로 절대 넘치지 않음 */
}

/* 이미지 오버레이: 바닥에서 위로 슬라이드 업 */
.tech-card-img-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  overflow: hidden;
  border-radius: 0 0 14px 14px;
  background: var(--ink);
  transform: translateY(100%);   /* 기본: 카드 아래 숨김 */
  transition: transform 0.34s cubic-bezier(.4,0,.2,1),
              opacity   0.28s ease;
  opacity: 0;
  z-index: 2;
}
.tech-card-img-overlay img {
  width: 100%; height: 180px;
  object-fit: cover;
  display: block;
  opacity: 0.88;
}

/* 호버 시 바닥에서 위로 슬라이드 업 */
@media (hover: hover) {
  .tech-card:hover .tech-card-img-overlay {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 이미지 없을 때 오버레이 공간 차지 안 함 */
.tech-card-img-overlay:empty,
.tech-card-img-overlay:not(:has(img)) {
  display: none;
}

/* 카드 본문: 오버레이 아래 */
.tech-card-body {
  position: relative; z-index: 1;
  padding-top: 2px;
}

/* 이미지 있는 카드는 호버 시 본문이 자연스럽게 밀려 내려감 */
.tech-card {
  transition: border-color .2s, box-shadow .2s;
}

/* ── 3. Gallery 캡션 ── */
.gallery-fig {
  position: relative;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--card); aspect-ratio: 4 / 3;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.gallery-fig img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .25s;
}
@media (hover: hover) {
  .gallery-fig:hover img { transform: scale(1.04); }
}

/* 캡션 레이어: 이미지 하단에 슬라이드업 */
.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(16,32,44,.88) 0%, rgba(16,32,44,.0) 100%);
  color: #fff;
  font-size: 12px; line-height: 1.5;
  padding: 28px 12px 10px;
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

/* 마우스 올리면 캡션 슬라이드업 */
@media (hover: hover) {
  .gallery-fig.has-caption:hover .gallery-caption {
    transform: translateY(0);
  }
}
/* 터치: 탭하면 캡션 토글 (JS에서 .cap-open 클래스 추가) */
.gallery-fig.cap-open .gallery-caption {
  transform: translateY(0);
}

/* 갤러리 그리드는 기존 gallery-grid 대신 gallery-fig 사용 */
.gallery-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(2,1fr); gap: 12px; } }
@media (min-width: 860px) { .gallery-grid { grid-template-columns: repeat(2,1fr); gap: 14px; } }

/* 갤러리 캡션 내 마크다운 서식 */
.gallery-caption strong { color: #fff; font-weight: 700; }
.gallery-caption em     { font-style: italic; opacity: .9; }
.gallery-caption p      { margin: 0; }
.gallery-caption ul     { padding-left: 14px; margin: 4px 0 0; }
.gallery-caption li     { font-size: 11px; opacity: .85; }

/* 푸터 저작권 포기 문구 */
.footer-copy {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--steel);
  opacity: .7;
  letter-spacing: 0;
}
/* footer-copy 미디어쿼리 제거 — 중앙 배치로 통일 */

/* ============================================================
   분야 탭바 (옵션 B — Hero 아래)
   ============================================================ */

/* ── 탭바 래퍼 ── */
/* ══════════════════════════════════════════════
   아날로그 로터리 다이얼
   - 금속 질감 배경
   - 눈금(틱마크) + 진빨간 중앙 마커 ▲
   - 드래그/스냅 회전
   ══════════════════════════════════════════════ */
:root {
  --dial-h: 70px;
  --dial-bg: rgba(6,91,148,.16);     /* 네이비 베이스 */
  --dial-red: #C0392B;
}

.field-tab-wrap {
  background: rgba(6,91,148,.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(6,91,148,.28);
  border-bottom: 2px solid rgba(6,91,148,.24);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  user-select: none;
  overflow: visible;  /* 버튼이 띠 밖으로 나올 수 있도록 */
  box-shadow: 0 4px 16px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.12);
}

/* 다이얼 외부 레이아웃 */
.field-dial {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--dial-h);
  position: relative;
  gap: 0;
}

/* 좌·우 화살표 버튼 */
.field-dial-btn {
  flex-shrink: 0;
  width: 64px;
  height: 52px;
  border: none;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  filter: drop-shadow(0 0 6px rgba(6,91,148,.85));
  -webkit-tap-highlight-color: transparent;
  z-index: 4;
  transition: filter .15s;
}
#field-dial-prev { margin-left: 0; }
#field-dial-next { margin-right: 0; }
.field-dial-btn:hover {
  filter: drop-shadow(0 0 10px rgba(6,91,148,1));
}

/* 다이얼 트랙 */
.field-dial-track {
  flex: 1;
  overflow: visible;  /* 버튼이 띠 밖으로 나올 수 있도록 */
  position: relative;
  height: 100%;
  cursor: grab;
  /* 양단 페이드 오프 — 경계에서 선명하게 잘리는 것 방지 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}
.field-dial-track.dragging { cursor: grabbing; }

/* ── 카드 스택 레일 ── */
#field-tab-bar {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── 분야 탭 카드 ── */
.field-tab {
  /* JS가 transform: translateX+scale 로 위치/크기 제어 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  /* 기본: 중앙 정렬 */

  /* 카드 외형 */
  padding: 4px 8px;   /* JS에서 항상 명시적으로 덮어씀 — 기본값 충돌 방지 */
  background: #fff;
  border: 4px solid rgba(6,91,148,.30);
  border-radius: 8px;
  white-space: normal;   /* 번역 시 긴 영문명 2줄 허용 */
  word-break: break-word;
  text-align: center;

  /* 텍스트 */
  font-family: var(--font-mono), monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--steel);
  text-align: center;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  will-change: transform, opacity;
  transition: transform .30s cubic-bezier(.4,0,.2,1),
              width .30s cubic-bezier(.4,0,.2,1),
              padding .30s cubic-bezier(.4,0,.2,1),
              border-color .22s, background .22s,
              color .22s, font-size .22s, font-weight .22s,
              opacity .22s, box-shadow .22s;
}
.field-tab[aria-selected="true"] {
  border-color: #065B94;
  border-width: 4px;
  background: #fff;
  color: #065B94;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(6,91,148,.26);
}
/* 분야 추가 버튼 */
/* ── 분야 콘텐츠 슬라이드 래퍼 ── */
.field-content-wrap {
  background: var(--paper);
  border-bottom: none;
  /* 접힘: display none 대신 visibility+opacity로 — max-height transition 제거
     max-height: none → 0 transition은 브라우저마다 예측 불가하게 동작해
     스크롤 튐 유발 */
  display: none;
  opacity: 0;
  transition: opacity .28s ease;
}
.field-content-wrap.expanded {
  display: block;
  overflow: visible;
  opacity: 1;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(6,91,148,.13);
}

/* ── 분야 콘텐츠 영역 ── */
.field-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--px) 48px;
  display: block;           /* 항상 표시 — wrap이 접힘/펼침 제어 */
  opacity: 1;
  transition: opacity .18s ease;
}
.field-content.slide-left {
  animation: fc-slide-left .28s cubic-bezier(.4,0,.2,1);
}
.field-content.slide-right {
  animation: fc-slide-right .28s cubic-bezier(.4,0,.2,1);
}
@keyframes fc-slide-in {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fc-slide-left {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fc-slide-right {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Google 번역 버튼 ── */
.translate-wrap {
  position: relative;
  flex-shrink: 0;
}
.translate-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  width: 34px; height: 34px;
  font-size: 16px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.translate-btn:hover { border-color: var(--coolant); background: var(--paper); }

/* 드롭다운 컨테이너 */
.translate-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 8px;
  z-index: 300;
  min-width: 180px;
}
.translate-dropdown[hidden] { display: none; }
.translate-dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink, #1A2530);
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s;
}
.translate-dropdown a:hover { background: rgba(6,91,148,.10); color: #065B94; }
.translate-dropdown a.lang-reset {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #065B94;
  font-weight: 600;
}

/* ── Google 번역 바 숨김 (번역 기능은 유지) ── */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}
/* 번역 시 body/html 밀림 차단 (position은 건드리지 않음 — sticky 헤더 보호) */
html, body { top: 0 !important; }
body.translated-ltr, body.translated-rtl { top: 0 !important; }
/* 번역된 텍스트 하이라이트 제거 */
.goog-text-highlight { background: none !important; box-shadow: none !important; }
/* 위젯 컨테이너 숨김 */
#google_translate_element { position: fixed !important; top: -9999px !important; left: -9999px !important; }

/* 번역 실패 시 폴백 안내 */
.tg-fallback {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: rgba(6,91,148,.07);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.7;
  color: #555;
}
.tg-fallback[hidden] { display: none; }


/* ── 분야 메인 2단 레이아웃 (overview 좌 + 대표이미지·카드 우) ── */
.field-main-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.field-overview {
  flex: 1;
  min-width: 0;
}
/* 우측 컬럼: 슬라이더 — 페이지 폭의 1/3 */
.field-rep-col {
  flex: 0 0 33.3%;
  min-width: 0;
  max-width: 33.3%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: flex-start;   /* stretch 방지 — sticky 동작에 필수 */
  /* 스크롤 시 헤더(58px) + 분야 다이얼(80px) 아래에 고정 */
  position: sticky;
  top: calc(var(--header-h) + var(--dial-h) + 12px);
}
@media (max-width: 700px) {
  .field-main-row { flex-direction: column; }
  .field-rep-col  {
    flex: none; width: 100%; max-width: 100%;
    position: static;   /* 모바일에서는 sticky 해제 */
  }
}

/* ── 마크다운 테이블 — 네이비 외곽 + 줄무늬 ── */
.md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 2px solid #065B94;
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
}
.md table thead tr {
  background: rgba(6,91,148,.12);
}
.md table th {
  padding: 9px 13px;
  text-align: left;
  font-weight: 700;
  color: #065B94;
  border-bottom: 2px solid #065B94;
}
.md table td {
  padding: 8px 13px;
  border-bottom: 1px solid rgba(6,91,148,.15);
}
.md table tbody tr:nth-child(even) {
  background: rgba(6,91,148,.05);
}
.md table tbody tr:last-child td {
  border-bottom: none;
}

/* ── 회사소개 2단 레이아웃 ── */
.about-wrap {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.about-text { flex: 1; min-width: 0; }

.about-slider-col { flex-shrink: 0; width: 280px; }
@media (max-width: 700px) {
  .about-wrap { flex-direction: column; }
  .about-slider-col { width: 100%; }
}

.about-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(6,91,148,.08);
  /* 높이: 이미지(200px) + 캡션 자동 */
}
.about-slides {
  display: flex;
  align-items: flex-start;
  height: 100%;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.about-slide {
  flex-shrink: 0;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
.about-slide img,
.about-slide video {
  width: 100%; height: 200px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
/* 캡션 — 슬라이더 밖 별도 영역, 슬라이드 변경 시 JS가 업데이트 */
.about-caption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--steel);
  line-height: 1.7;
  background: var(--card);
  border-radius: 0 0 12px 12px;
  border-top: 0.5px solid var(--line);
  min-height: 40px;
  text-align: center;
}
.about-caption p { margin: 0; }
.about-caption strong { color: var(--ink); font-weight: 600; }
.about-caption[hidden] { display: none; }
.about-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.about-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(6,91,148,.25);
  cursor: pointer;
  transition: background .2s;
}
.about-dot.on { background: #065B94; }

/* ── 분야 대표이미지 슬라이더 ── */
.field-rep-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;    /* 슬라이드 클립 — 화살표는 slider 안에 있어 정상 클릭 가능 */
  background: rgba(6,91,148,.08);
  min-height: 180px;
  cursor: zoom-in;
}
.field-rep-slides {
  display: flex;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.field-rep-slide {
  flex-shrink: 0;
  width: 100%;
  /* 높이가 낮은 이미지도 세로 중앙 배치 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.field-rep-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition: opacity .25s ease;
}
.field-rep-slide img.fading { opacity: 0; }
/* 화살표 */
.fr-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(6,91,148,.55);
  border: none; color: #fff;
  width: 26px; height: 38px;
  border-radius: 4px;
  cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background .15s;
}
.fr-arrow:hover { background: rgba(6,91,148,.85); }
.fr-prev { left: 4px; }
.fr-next { right: 4px; }
/* dots */
.fr-dots {
  position: absolute;
  bottom: 6px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px;
}
.fr-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer; transition: background .2s;
}
.fr-dot.on { background: #fff; }

/* ── 분야 슬라이더 전체화면 오버레이 ── */
.fs-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.90);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
}
.fs-overlay.show { display: flex; }

.fs-wrap {
  position: relative;
  width: 88vw; max-width: 880px;
}
/* 클리핑 뷰포트 — 옆 슬라이드 노출 차단 (화살표는 바깥에 위치) */
.fs-viewport {
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}
.fs-slides {
  display: flex;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.fs-slide {
  flex-shrink: 0;
  width: 100%;          /* 뷰포트 기준 */
  height: 54vh;
  overflow: hidden;
  /* 높이가 낮은 이미지도 세로 중앙 배치 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.fs-slide img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  display: block;
}
/* 전체화면 화살표 */
.fs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.2);
  border: none; color: #fff;
  width: 44px; height: 60px;
  border-radius: 6px; cursor: pointer;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.fs-arrow:hover { background: rgba(255,255,255,.4); }
.fs-prev { left: -54px; }
.fs-next { right: -54px; }
/* 캡션 */
.fs-caption {
  width: 88vw; max-width: 880px;
  background: #fff;
  border-radius: 0 0 12px 12px;
  padding: 14px 20px;
  border-top: 3px solid #065B94;
  min-height: 56px;
}
.fs-caption-name {
  font-size: 11px; color: #0E9E8F;
  font-weight: 600; margin-bottom: 4px;
}
.fs-caption-body { font-size: 13px; color: #333; line-height: 1.7; }
.fs-caption-body h1,.fs-caption-body h2,.fs-caption-body h3 {
  font-size: 14px; color: #065B94; margin: 0 0 4px;
}
/* 닫기 버튼 */
.fs-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%; font-size: 18px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  z-index: 2;
}
.fs-close:hover { background: rgba(255,255,255,.3); }
/* dots */
.fs-dots {
  display: flex; gap: 8px; margin-top: 10px;
}
.fs-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  cursor: pointer; transition: background .2s;
}
.fs-dot.on { background: #fff; }
/* 힌트 */
.fr-hint {
  position: absolute; bottom: 6px; left: 50%;
  transform: translateX(-50%);
  background: rgba(6,91,148,.7); color: #fff;
  font-size: 10px; padding: 2px 8px;
  border-radius: 10px; white-space: nowrap;
  pointer-events: none;
}
.fs-hint {
  color: rgba(255,255,255,.4);
  font-size: 11px; margin-top: 8px;
}

/* ── 분야 슬라이더 하단 md 카드 ── */
.field-slide-md {
  background: var(--card, #fff);
  border: 1px solid rgba(6,91,148,.20);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink, #1A2530);
  transition: opacity .2s ease;
}
.field-slide-md:empty { display: none; }
/* 제목만 중앙 정렬 (본문은 좌측 유지) */
.field-slide-md h1,.field-slide-md h2,.field-slide-md h3 {
  text-align: center;
  font-size: 13px; font-weight: 700;
  color: #065B94; margin: 0 0 4px;
}
.field-slide-md p { margin: 0 0 6px; }
.field-slide-md ul { padding-left: 14px; margin: 0; }
/* 슬라이드 카드 내 버튼 — 우측 정렬 */
.field-slide-md a.md-btn {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: 0;
}


/* ── Hero md 영역: md 유무와 무관하게 높이 유지 ── */
#hero-md {
  /* JS가 실제 최댓값으로 min-height를 설정하기 전 기본값 */
  min-height: 120px;
}

/* ── 앵커 이동 시 sticky 헤더에 가려지지 않도록 여백 확보 ── */
/* scroll-margin-top — JS에서 동적으로 적용 (loadUI > getOrCreateSection) */
#top, #fields {
  scroll-margin-top: calc(var(--header-h) + var(--dial-h) + 8px);
}

/* ── md 버튼 ([btn:텍스트](링크)) — 외곽선 + 메일 아이콘 ── */
.md a.md-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #065B94;
  color: #065B94;
  background: transparent;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
  text-decoration: none;
  transition: background .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
}
.md a.md-btn svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.md a.md-btn:hover {
  background: #065B94;
  color: #fff;
  text-decoration: none;
}

/* ── 브라우저 스크롤 앵커링 전역 비활성 ──
   sticky 요소·지연 로딩 이미지가 앵커로 잡히면 브라우저가 스크롤을
   자동 보정하면서 화면이 서서히 밀리거나 뚝뚝 튀는 현상이 발생함 */
html, body, * { overflow-anchor: none; }
/* #video 숨김 제거 — ui.md에 없으면 JS가 섹션을 생성하지 않음 */
html, body { overscroll-behavior: none; }  /* 최하단 바운스 스크롤 방지 */

/* ── 동적 콘텐츠 영역 최소 높이 — 스크롤 튐 방지 ────────
   JS가 비동기로 채우기 전에 공간을 확보해 페이지 높이 변화를 줄임 */
/* 동적 컨테이너 최소 높이 — 타입별 클래스 기반 */
.info-grid:empty    { min-height: 200px; }
.gallery-grid:empty { min-height: 300px; }
.md.prose:empty     { min-height: 100px; }


/* ── AVI 안내 슬라이드 */
.about-slide-avi { display: flex; align-items: center; justify-content: center; background: #0d1f2d; }
.avi-notice { text-align: center; color: rgba(255,255,255,.7); padding: 20px; }
.avi-notice svg { margin-bottom: 10px; opacity: .5; }
.avi-notice p { font-size: 13px; font-weight: 500; margin: 0 0 6px; color: #fff; }
.avi-notice small { font-size: 11px; line-height: 1.6; opacity: .6; }

/* ── lazy 이미지 높이 변화 방지 — 스크롤 튐 방지 ── */
/* gallery-fig는 부모에 aspect-ratio 있으므로 제외 */
.tech-card-img-overlay img,
.about-slide img,
.field-rep-slide img,
.fs-slide img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.md-img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--card);
}
/* 이미지 공간을 미리 확보 — 로드 전 레이아웃 안정화 */
img { overflow-anchor: none; }


/* ── 인용문 (제3자 근거 인용 등) ── */
.md blockquote {
  margin: 10px 0;
  padding: 10px 16px;
  border-left: 4px solid #065B94;
  background: rgba(6,91,148,.05);
  border-radius: 0 8px 8px 0;
  color: var(--steel);
  font-size: 14px;
  line-height: 1.75;
}

/* ── info 카드 (팝업 확대형) ──────────────────────────── */
.ic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 세로: 2열 */
  gap: 18px;
  margin-top: 24px;
}
@media (orientation: landscape) {
  .ic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* 가로: 3열 이상 */
}
@media (max-width: 600px) {
  .ic-grid { grid-template-columns: 1fr; }  /* 모바일: 1열 */
}
.ic-card {
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 18px;  /* 12 × 1.5 */
  overflow: hidden;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.ic-card:hover, .ic-card:focus {
  border-color: rgba(6,91,148,.55);
  box-shadow: 0 0 0 2px rgba(6,91,148,.13);
}
.ic-thumb { width: 100%; aspect-ratio: 4/3; overflow: hidden; background: var(--card); }
.ic-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic-preview { padding: 18px 21px; }  /* 12×1.5, 14×1.5 */
.ic-preview h3 {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin: 0 0 8px; line-height: 1.4;
}
.ic-preview p {
  font-size: 14px; color: var(--steel); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.6;
}
.ic-hint {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #065B94; opacity: .7;
}

/* 상세 뷰 — 같은 자리에서 전체 폭으로 확대 */
.ic-detail {
  margin-top: 16px;
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.ic-detail-head {
  display: flex;
  justify-content: flex-end;  /* 우측 정렬 */
  padding: 12px 16px 0;
}
.ic-back {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-accent, #065B94);
  background: var(--bg-accent, rgba(6,91,148,.08));
  border: none; border-radius: 11px;  /* 높이 44px의 1/4 */
  padding: 8px 24px; cursor: pointer;
  font-weight: 500;
}
.ic-back:hover { opacity: .85; }
/* ic-detail-img 제거 — 이미지는 md 본문 안에 직접 삽입 */
.ic-detail-body {
  padding: 20px 24px 28px;
}

/* md 본문 안 이미지 */
.md-img, .ic-detail-body img, .md img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 16px auto;
}
