/* main_dp.css — deeplydive 메인(theme/bootstrap4/main.php) 디자이너 시안 반영 (2026-11-16)
 *   범위 = .dp-main 안(메인 섹션)만. 다른 페이지·상단 메뉴에는 영향 없음.
 *   글꼴 = Pretendard 자체 호스팅(/fonts/pretendard, woff2 subset: 한글 2,350자+영문, 굵기 3종)
 *     · font-display: swap → 글자는 즉시 기본 글꼴로 보이고 도착하면 교체(화면을 막지 않음)
 *     · 이 파일이 쓰이는 메인에서만 내려받음. 글꼴에 없는 글자(일본어·중국어·태국어 등)는 기본 글꼴로 자동 대체
 *   글자 크기 = 디자이너 1920 기준 px 를 clamp() 로 화면 폭에 비례(휴대폰에서 자동 축소) */

@font-face { font-family: 'Pretendard'; font-weight: 400; font-style: normal; font-display: swap; src: url('../../../fonts/pretendard/Pretendard-Regular.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 700; font-style: normal; font-display: swap; src: url('../../../fonts/pretendard/Pretendard-Bold.subset.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 800; font-style: normal; font-display: swap; src: url('../../../fonts/pretendard/Pretendard-ExtraBold.subset.woff2') format('woff2'); }

.dp-main { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; color: #0f172a; word-break: keep-all; }
/* 테마가 h1~h6·p 등에 글꼴(Nanum Barun Gothic)을 직접 걸어 두어 상속이 끊김 → 메인 영역 안에서는 Pretendard 로 */
.dp-main h1, .dp-main h2, .dp-main h3, .dp-main p, .dp-main figcaption, .dp-main span { font-family: inherit; }
/* 줄바꿈은 단어 단위(테마의 글자 단위 줄바꿈 때문에 '업체입니 / 다.'처럼 끊기던 것 방지). 아주 긴 영문 단어만 예외로 끊음 */
.dp-main h1, .dp-main h2, .dp-main h3, .dp-main p, .dp-main figcaption { word-break: keep-all; overflow-wrap: break-word; }
/* 2026-11-18: 일본어·중국어는 띄어쓰기가 없어 keep-all 이면 문장 전체가 한 덩어리 → 줄이 안 바뀌고 화면 밖으로 튀어나감.
 * 이 두 언어만 각 언어 기본 줄바꿈 규칙으로(문장부호 앞 줄바꿈 금지 = strict). 언어 값은 site_lang.js 가 <html lang> 에 넣음 */
html:lang(ja) .dp-main, html:lang(ja) .dp-main h1, html:lang(ja) .dp-main h2, html:lang(ja) .dp-main h3, html:lang(ja) .dp-main p, html:lang(ja) .dp-main figcaption,
html:lang(zh) .dp-main, html:lang(zh) .dp-main h1, html:lang(zh) .dp-main h2, html:lang(zh) .dp-main h3, html:lang(zh) .dp-main p, html:lang(zh) .dp-main figcaption { word-break: normal; line-break: strict; }

/* ── 1. 상단 슬라이드 + 공통 문구(모든 장 같은 문구) ── */
.dp-hero .swiper-slide { position: relative; overflow: hidden; }
.dp-hero .dp-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dp-hero .dp-hero-shade { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .28); }
.dp-hero .dp-hero-text { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-55%); z-index: 10; text-align: center; color: #fff; padding: 0 16px; pointer-events: none; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.dp-hero .dp-hero-eyebrow { margin: 0 0 .6em; font-size: clamp(13px, 1.04vw, 20px); font-weight: 400; letter-spacing: .04em; opacity: .92; }
.dp-hero .dp-hero-title { margin: 0; font-size: clamp(30px, 4.4vw, 84px); font-weight: 800; line-height: 1.1; letter-spacing: -.005em; }   /* 'DEEPLY TOGETHER' — 시안 96px 에서 한 단계↓(11-16 사용자) */
.dp-hero .dp-hero-sub { margin: .7em 0 0; font-size: clamp(15px, 1.6vw, 30px); font-weight: 400; line-height: 1.4; }   /* 시안 36px 에서 한 단계↓ */

/* ── 2. 중간 문구(카드 묶음 제목) ── */
.dp-intro { text-align: center; padding: clamp(36px, 4vw, 64px) 16px clamp(18px, 2vw, 28px); }
.dp-intro-title { margin: 0; font-size: clamp(20px, 1.7vw, 30px); font-weight: 700; letter-spacing: -.005em; color: #0f172a; }
.dp-intro-sub { margin: .55em 0 0; font-size: clamp(14px, .95vw, 17px); font-weight: 400; color: #64748b; }

/* ── 3. 카드 4장(사진 위 제목만, 설명은 툴팁) ── */
.dp-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1vw, 16px); }
.dp-card { position: relative; margin: 0; border-radius: 18px;   /* 12 → 18(11-16 사용자: 둥글기 약간 더) */ overflow: hidden; aspect-ratio: 447 / 397; background: #0f172a; cursor: default; }
.dp-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.dp-card:hover img { transform: scale(1.04); }
/* ★[2026-11-16 사용자 A안] 제목만 보이다가 마우스를 올리면(휴대폰 = 누르면 .is-open) 설명이 아래에 펼쳐지며 제목이 자연스럽게 위로 올라감.
 *   설명 높이는 grid-template-rows 0fr → 1fr 로 펼침(높이를 몰라도 부드럽게). 카드 아래쪽은 살짝 어둡게(::after) */
.dp-card::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, 0) 100%); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.dp-card-cap { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 14px; margin: 0; text-align: center; color: #fff; }
.dp-card-t { display: block; font-size: clamp(15px, 1.15vw, 22px); font-weight: 700; line-height: 1.3; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.dp-card-d { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(6px); transition: grid-template-rows .3s ease, opacity .3s ease, transform .3s ease; }
.dp-card-d-in { min-height: 0; overflow: hidden; display: block; padding-top: 0; transition: padding-top .3s ease; max-width: 92%;   /* 위 여백은 열릴 때만(닫힘에 남으면 제목이 밀림) */ margin: 0 auto; font-size: clamp(12px, .8vw, 15px); font-weight: 400; line-height: 1.5; color: rgba(255, 255, 255, .94); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.dp-card:hover::after, .dp-card:focus-visible::after, .dp-card.is-open::after { opacity: 1; }
.dp-card:hover .dp-card-d, .dp-card:focus-visible .dp-card-d, .dp-card.is-open .dp-card-d { grid-template-rows: 1fr; opacity: 1; transform: none; }
.dp-card:hover .dp-card-d-in, .dp-card:focus-visible .dp-card-d-in, .dp-card.is-open .dp-card-d-in { padding-top: 8px; }
.dp-card:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
@media (hover: none) { .dp-card { cursor: pointer; } .dp-card:hover img { transform: none; } }   /* 휴대폰 = 눌러서 열기(호버 확대 없음) */
@media (prefers-reduced-motion: reduce) { .dp-card img, .dp-card::after, .dp-card-d { transition: none; } }

/* ── 4. 소개 2단(INNOVATION · FOUNDER'S STORY) ── */
/* 칸 폭 = minmax(0,1fr): 1fr 만 쓰면 줄바꿈 안 되는 긴 글이 칸을 화면 밖까지 넓힘(2026-11-18 일본어에서 발생) */
.dp-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 4.5vw, 80px); margin-top: clamp(56px, 7vw, 120px); }
.dp-story-img img { display: block; width: 100%; height: auto; }   /* 모서리 둥글기는 이미지에 포함(바깥 흰색) — 그림자·테두리 넣지 않음 */
.dp-story-tx { padding: 0 clamp(0px, 1vw, 12px); }
.dp-story-t { margin: 0 0 1.2em; font-size: clamp(20px, 1.6vw, 30px); font-weight: 800; line-height: 1.25; letter-spacing: -.005em; color: #0f172a; }
.dp-story-tx p { margin: 0 0 1.1em; font-size: clamp(14px, .95vw, 17px); line-height: 1.8; color: #1e293b; }
.dp-story-tx p:last-child { margin-bottom: 0; }

/* ── 5. 하단 남색 띠(로고 포함 이미지) ── */
.dp-bottom { margin: clamp(56px, 7vw, 120px) 0 clamp(36px, 4vw, 64px); }
.dp-bottom img { display: block; width: 100%; height: auto; min-height: 140px; object-fit: cover; object-position: center; }

/* ── 6. 메인 화면 관리(2026-11-18) — 편집 권한자에게만: 오른쪽 아래 관리 버튼(PC) · 미리보기의 '숨김' 표시 ── */
.dp-story, .dp-bottom { position: relative; }
.mp-admin-fab { position: fixed; right: 20px; bottom: 20px; z-index: 1040; align-items: center; gap: 6px; padding: 5px; background: #fff; border: 1px solid #cbd5e1; border-radius: 999px; box-shadow: 0 6px 20px rgba(15, 23, 42, .18); font-size: 13px; }
.mp-admin-fab a { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px; color: #1e293b; text-decoration: none; font-weight: 500; white-space: nowrap; line-height: 1.3; }
.mp-admin-fab a:hover { text-decoration: none; filter: brightness(.96); }
.mp-admin-fab a.mp-fab-main { background: #1e3a5f; color: #fff; }
.mp-admin-fab a.mp-fab-prev { border: 1px dashed #94a3b8; color: #475569; }   /* 점선 = 아직 안 켠 동작 */
.mp-admin-fab a.mp-fab-prev.on { border: 1px solid #f59e0b; background: #fef3c7; color: #92400e; }   /* 실선·색 = 켜진 상태 */
.mp-hid-badge { position: absolute; left: 10px; top: 10px; z-index: 12; padding: 2px 10px; border: 1px solid #f59e0b; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 600; pointer-events: none; }
.dp-hero .mp-hid-badge { top: 16px; left: 16px; font-size: 13px; }
.dp-card.mp-hidden, .dp-story.mp-hidden, .dp-bottom.mp-hidden { outline: 2px dashed #f59e0b; outline-offset: 4px; }

/* ── 휴대폰·태블릿 ── */
@media (max-width: 991.98px) {
  .dp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .dp-story { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dp-story .dp-story-img { order: -1; }   /* 휴대폰 = 사진 먼저, 글 아래(두 단 모두 같은 순서) */
  /* 2026-11-18 A안: 메인 사진 아래 좌우 여백 30 → 20px(테마 바깥 칸 15 + 이 안쪽 칸 15 겹침 → 안쪽만 5). PC 무변화 */
  .dp-main .container { padding-left: 5px; padding-right: 5px; }
  .dp-story-tx { padding: 0; }   /* 글 왼쪽 = 사진 왼쪽 선(PC 용 안쪽 여백 4px 제거) */
  .dp-hero .dp-hero-text { transform: translateY(-60%); }
}
