/* =========================
   SACT Basic Styles v1
   - clean, readable, B2B tone
   - minimal but polished
   ========================= */

:root {
  --bg: #0f172a;         /* dark slate */
  --bg2: #111827;        /* deep gray */
  --text: #0b1220;       /* body text */
  --muted: #4b5563;      /* gray */
  --card: #ffffff;       /* card bg */
  --line: #e5e7eb;       /* border */
  --accent: #2563eb;     /* blue */
  --accent2: #1d4ed8;
  --heroText: #ffffff;
  --heroMuted: rgba(255,255,255,0.78);
  --max: 1040px;
}

/* Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
  color: var(--text);
  background: #f6f7fb;
  line-height: 1.6;
}

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout helpers */
section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px;
}

footer { /* 기본 footer 스타일은 유지해도 됨 */ }

#site-footer{
  text-align: initial;  /* ✅ 전역 center 느낌 제거 */
}

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* ===== Header upgrade A: Desktop one-line nav (no wrap) ===== */
@media (min-width: 769px){
  
.mnav-brand{ display: none !important; }

  nav{
    flex-wrap: nowrap;
    align-items: center;
    gap: 18px;              /* ✅ (추가) 로고/메뉴/오른쪽 버튼 사이 숨통 */
    padding: 12px 18px;     /* ✅ (선택) 살짝 컴팩트하게(원하면 유지해도 됨) */
  }

  .nav-left{ gap: 10px; }   /* ✅ (추가) 로고 주변 간격 미세 조정 */

  .nav-panel{
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;              /* ✅ (수정) 메뉴들 사이 간격 통일 + 약간 확장 */
    align-items: center;
  }

  .nav-right{
    align-items: center;
  }
}

/* Mobile hamburger button */
.nav-toggle{
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}
.nav-toggle:hover{ background: #f3f4f6; }

/* ===== Top-level nav links (Main menu) ===== */
nav a {
  color: #111827;
  font-weight: 750;        /* ✅ 600 → 750 (메인 메뉴 무게감) */
  font-size: 15px;         /* ✅ 메인만 살짝 크게 */
  padding: 9px 12px;       /* ✅ 버튼(캡슐) 느낌 강화 */
  border-radius: 12px;
  letter-spacing: -0.1px;  /* ✅ 미세하게 정돈 */
}

nav a:hover {
  background: #f3f4f6;
  text-decoration: none;
}

/* ===== Header upgrade B: Active link highlight ===== */
nav a.is-active,
nav summary.is-active{
  background: rgba(37, 99, 235, 0.10);
  color: var(--accent2);
}

nav a.is-active:hover,
nav summary.is-active:hover{
  background: rgba(37, 99, 235, 0.14);
  text-decoration: none;
}

/* Hero */
.hero {
  max-width: none;
  margin: 0;
  padding: 56px 18px;
  background: linear-gradient(135deg, var(--bg), var(--bg2));
  color: var(--heroText);
}
.hero > h1 {
  max-width: var(--max);
  margin: 0 auto 12px auto;
  padding: 0 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.hero > p {
  max-width: var(--max);
  margin: 10px auto 0 auto;
  color: var(--heroMuted);
  font-size: 16px;
}

/* Headings */
h1, h2, h3 { margin: 0 0 12px 0; }
h2 {
  font-size: 20px;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 16px;
  color: #111827;
}

/* Content blocks look like cards */
section:not(.hero):not(.cta) {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* 2x2 / 3-card grids */
.card-grid{
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* ✅ 데스크톱 3열 */
}

@media (max-width: 900px){
  .card-grid{ grid-template-columns: repeat(2, 1fr); } /* 태블릿 */
}

@media (max-width: 640px){
  .card-grid{ grid-template-columns: 1fr; } /* 모바일 */
}

/* ✅ Building Automation page only: make the 2-col detail cards stack on mobile */
@media (max-width: 640px){
  body[data-page="business-automation"] .card-grid[style*="grid-template-columns: repeat(2"]{
    grid-template-columns: 1fr !important;
  }
}

/* ✅ Communication page only: force Key Scope grid to 1 column on mobile
   (Overrides inline grid-template-columns in HTML) */
@media (max-width: 640px){
  body[data-page="business-communication"] .card-grid[style*="grid-template-columns"]{
    grid-template-columns: 1fr !important;
  }
}

/* ===== Card Title Header Bar (B-Option) ===== */
.card-title,
.philosophy-card h3,
.guide-card h3,
.timeline-block h3 {
  position: relative;
  padding-left: 14px;
  margin-bottom: 12px;
  font-weight: 600;
}

.card-title::before,
.philosophy-card h3::before,
.guide-card h3::before,
.timeline-block h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 4px;
  height: 1.2em;
  background: var(--brand-blue, #1e3a8a); /* 네이비 계열 */
  border-radius: 2px;
}

/* Home quick-link cards (refined background) */
body[data-page="home"] .card-grid > div{
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #f1f5f9 100%
  );
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 22px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

body[data-page="home"] .card-grid > div::before{
  content:"";
  display:block;
  width:32px;
  height:3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 12px;
  opacity: 0.6;
}

body[data-page="home"] .card-grid > div:hover{
  background: #ffffff;
  transform: translateY(-4px);
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 14px 30px rgba(15,23,42,0.12);
}

body[data-page="home"] .card-grid a{
  font-weight: 700;
}

/* Lists */
ul { margin: 0; padding-left: 18px; }
li { margin: 6px 0; }

/* CTA section removed across all pages (keep for reference)
.cta {
  max-width: var(--max);
  margin: 18px auto 0 auto;
  padding: 22px 18px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.cta p {
  margin: 0;
  font-weight: 700;
  color: #111827;
}
.cta a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.cta a:hover {
  background: var(--accent2);
}

*/

/* Timeline blocks */
.timeline-block {
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 12px 0;
  background: #fafafa;
}
.timeline-block h3 {
  margin-bottom: 8px;
}

/* Philosophy cards */
.philosophy-card {
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 12px 0;
  background: #fafafa;
}
.philosophy-card p { margin: 0; color: #374151; }

/* Mobile */
@media (max-width: 640px) {
  .hero > h1 { font-size: 26px; }
  nav { gap: 8px; }
  nav a { padding: 7px 9px; }
}

/* Language switch */
.nav-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.lang-btn {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
}
.lang-btn:hover {
  background: #f3f4f6;
  text-decoration: none;
}

/* Dropdown (details/summary) */
.nav-dd { position: relative; display: inline-block; }

.nav-dd > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-dd > summary::-webkit-details-marker { display: none; }

.nav-dd-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  display: none;
  z-index: 999;
}

.nav-dd[open] .nav-dd-menu { display: block; }

.nav-dd-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

/* ===== Dropdown group title (Sub menu grouping) ===== */
.nav-dd-menu .nav-group-title{
  margin: 6px 8px 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: rgba(17,24,39,0.55);
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* 첫 그룹은 위 구분선이 과하니 제거 */
.nav-dd-menu .nav-group-title:first-child{
  border-top: 0;
  margin-top: 2px;
  padding-top: 6px;
}

.nav-dd-menu a:hover { background: rgba(0,0,0,0.05); }

/* Make dropdown summary look like nav links */
nav .nav-dd > summary{
  color: #111827;
  font-weight: 750;      /* ✅ 600 → 750 (메인 메뉴와 동일) */
  font-size: 15px;       /* ✅ 추가: 메인 메뉴와 동일 */
  padding: 9px 12px;     /* ✅ 메인 메뉴와 동일 */
  border-radius: 12px;   /* ✅ 메인 메뉴와 동일 */
  display: inline-block;
  letter-spacing: -0.1px;
}

nav .nav-dd > summary:hover{
  background: #f3f4f6;
}
nav .nav-dd > summary:focus{
  outline: none;
}

/* =========================
   PC ONLY: Main vs Sub menu hierarchy
   ========================= */
@media (min-width: 769px){

  /* (A) 메인 메뉴(상위): 더 굵고 약간 크게 */
  nav a,
  nav .nav-dd > summary{
    font-weight: 800;
    font-size: 15px;
    padding: 9px 12px;
    border-radius: 12px;
  }

  /* (B) 세부 메뉴(드롭다운 안): 확실히 가볍고 작게 */
  .nav-dd-menu a{
    font-weight: 600;
    font-size: 14px;
    padding: 10px 12px 10px 16px; /* 왼쪽 들여쓰기 살짝 */
    border-radius: 10px;
  }
}

/* ===== Desktop: dropdown shows on hover (JS also toggles open) ===== */
@media (min-width: 769px) {
  /* 기본 숨김 */
  .nav-dd .nav-dd-menu {
    display: none;
    pointer-events: auto;   /* ✅ 클릭 가능 */
    z-index: 99999;         /* ✅ 덮임 방지 */
  }

  /* hover 또는 open(=JS가 켜줌)일 때 표시 */
  .nav-dd:hover .nav-dd-menu,
  .nav-dd[open] .nav-dd-menu {
    display: block;
  }
}

/* =================================================
   FINAL MOBILE HEADER & MENU (<= 768px)
   - 기본: 언어(EN/KR) + 햄버거만 표시
   - 열림: 언어 버튼도 유지 (언제든 언어 전환 가능)
   ...
   ================================================= */

@media (max-width: 768px) {

  /* ✅ Mobile top buttons: 햄버거(토글) + 언어버튼 디자인 완전 통일 */
  .nav-toggle,
  nav .nav-right a.lang-btn {
    height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .nav-toggle:hover,
  nav .nav-right a.lang-btn:hover {
    background: #f3f4f6;
    text-decoration: none;
  }

  header { position: sticky; top: 0; z-index: 1000; }

/* 상단 nav: 좌(로고) / 우(버튼) */
nav{
  max-width: none;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between; /* ✅ 핵심: flex-end → space-between */
  align-items: flex-end;
  gap: 10px;
  position: relative;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
}

/* 로고는 왼쪽 고정, 오른쪽 버튼은 끝으로 */
.nav-left{ flex: 0 0 auto; }
.nav-right{ margin-left: auto; }

/* ✅ 메뉴 패널 기본 상태(닫힘): 애니메이션 가능하도록 display 토글 제거 */
.nav-panel{
  display: flex;                 /* ← display:none 제거 */
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;

  /* 기존 absolute 패널이므로 공간 차지 없음 */
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  left: auto;

  width: min(86vw, 320px);
  padding: 10px 10px 12px;
  gap: 8px;

  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.14);
  z-index: 9999;

  /* ✅ 닫힘 상태: 보이지 않게 + 클릭 불가 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* ✅ 모션: 오른쪽에서 살짝 들어오며 페이드 */
  transform: translateX(14px);
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    visibility 0s linear 0.22s; /* 닫힐 때만 늦게 숨김 */
}

/* ✅ 열림 상태 */
nav.open .nav-panel{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateX(0);
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    visibility 0s;  /* 열릴 땐 즉시 보이게 */
}

  nav.open .nav-panel a,
  nav.open .nav-panel details{
  display: block;
  width: 100%;
}

  /* 상단 버튼(언어 + 햄버거)만 표시 */
  .nav-right { display: flex !important; gap: 8px; margin-left: 0; }
  .nav-toggle { display: inline-flex !important; }

  /* 드롭다운(details) 계층 스타일 */
  .nav-dd { width: 100%; }

  .nav-dd > summary{
    display: block;
    width: 100%;
    font-weight: 800;          /* 상위 메뉴 더 굵게 */
    font-size: 1.05rem;        /* 상위 메뉴 더 크게 */
    padding: 12px 10px;
    cursor: pointer;
  }

  /* 하위 메뉴는 오버레이 안에서 "일반 리스트"로 */
  .nav-dd-menu{
    position: static;
    min-width: auto;
    box-shadow: none;
    padding: 6px 0 0 0;
    display: block;            /* details 열림/닫힘은 브라우저가 처리 */
  }

  /* ✅ Mobile: hide dropdown group titles to keep menu short */
  .nav-dd-menu .nav-group-title{
  display: none;
  }

  /* ✅ Mobile only: 사업분야(드롭다운) 안의 설치실적/면허·인증만 숨김 (href가 달라도 잡힘) */
  @media (max-width: 768px){
    nav.open .nav-dd-menu a[href*="project"],
    nav.open .nav-dd-menu a[href*="certification"]{
      display: none !important;
    }
  }

  .nav-dd-menu a{
    font-size: 0.95rem;        /* 하위 메뉴는 약간 작게 */
    font-weight: 600;
    padding: 10px 10px 10px 28px; /* 들여쓰기 */
    opacity: 0.95;
    border-radius: 10px;
  }
  .nav-dd-menu a:hover{ background: rgba(0,0,0,0.05); }

  /* (C1) panel padding/spacing refined */
  nav.open .nav-panel{
    padding: 10px 10px 12px;
    gap: 8px;
  }

  /* (C2) Brand header block (injected by JS) */
  nav.open .nav-panel .mnav-brand{
    padding: 12px 12px 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 6px;
  }
  nav.open .nav-panel .mnav-brand .mnav-brand-title{
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #0b1220;
    line-height: 1.1;
    font-size: 16px;
  }
  nav.open .nav-panel .mnav-brand .mnav-brand-sub{
    margin-top: 6px;
    font-size: 12.5px;
    color: rgba(17,24,39,0.68);
    line-height: 1.35;
  }
  nav.open .nav-panel .mnav-brand .mnav-divider{
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin-top: 10px;
    border-radius: 1px;
  }

  /* (C3) Top-level items become "section headers" */
  /* top-level: direct child links + details */
  nav.open .nav-panel > a,
  nav.open .nav-panel > details{
    position: relative;
    border-radius: 12px;
  }

  /* ✅ FIX: 하위 메뉴(드롭다운 안 a)에는 세로 바가 나오면 안 됨 */
  nav.open .nav-panel .nav-dd-menu a::before{
    display: none !important;
    content: none !important;
  }

  /* top-level link look */
  nav.open .nav-panel > a{
    padding: 12px 12px 12px 20px; /* room for bar */
    font-weight: 900;
    font-size: 1.02rem;
    color: #0b1220;
    background: #ffffff;
  }
  nav.open .nav-panel > a:hover{
    background: rgba(15,23,42,0.04);
    text-decoration: none;
  }

  /* top-level dropdown summary look (keep your current size, but refine) */
  nav.open .nav-panel > details > summary{
    padding: 12px 12px 12px 20px; /* room for bar */
    font-weight: 900;
    font-size: 1.02rem;
    color: #0b1220;
    border-radius: 12px;
  }

  /* (C4) Sub menu links: cleaner list */
  nav.open .nav-panel .nav-dd-menu a{
    padding: 10px 10px 10px 30px; /* indent stays */
    font-weight: 650;
    color: rgba(11,18,32,0.92);
    background: transparent;
  }
  nav.open .nav-panel .nav-dd-menu a:hover{
    background: rgba(15,23,42,0.05);
    text-decoration: none;
  }

  /* (C5) Active state: restrained (no big blue pill) */
  nav.open .nav-panel a.is-active,
  nav.open .nav-panel summary.is-active{
    background: transparent !important;
    color: #1e3a8a !important;
  }

/* ✅ FIX: 하위 메뉴(active)는 세로바 제거 → 깔끔한 텍스트+미세 배경으로 */
nav.open .nav-panel .nav-dd-menu a.is-active{
  position: static;
  padding-left: 30px;                 /* 들여쓰기만 유지 */
  color: #1e3a8a !important;
  background: rgba(30,58,138,0.06) !important;
  border-radius: 10px;
}

nav.open .nav-panel .nav-dd-menu a.is-active::before{
  display: none !important;
  content: none !important;
}

  nav.open .nav-panel summary.is-active{
    box-shadow: inset 0 0 0 1px rgba(30,58,138,0.18);
    background: rgba(30,58,138,0.04) !important;
  }

  /* (C6) Contact link: quiet CTA (text-link style) */
  nav.open .nav-panel a[href*="contact"]{
    margin-top: 6px;
    padding-top: 14px;
    position: relative;
  }
  nav.open .nav-panel a[href*="contact"]::after{
    content: " \2192"; /* → */
    opacity: 0.85;
  }
  nav.open .nav-panel a[href*="contact"]{
    border-top: 1px solid rgba(0,0,0,0.10);
    border-radius: 0 0 12px 12px;
  }

  /* (선택) 접근성: 모션 줄이기 설정 대응 */
@media (prefers-reduced-motion: reduce){
  @media (max-width: 768px){
    .nav-panel{
      transition: none !important;
      transform: none !important;
    }
  }
}
}

/* Logo in header */
.nav-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.site-logo img{
  height:34px;     /* 필요하면 30~40 사이로 조정 */
  width:auto;
  display:block;
}

/* ===== Logo capsule refinement (Option B) ===== */
.site-logo{
  padding: 6px 6px !important;   /* 좌측 여백 축소 */
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
}

.site-logo:hover{
  background: rgba(243,244,246,1); /* 메뉴 hover 톤과 통일 */
}

/* ===== Global spacing: ensure breathing room before footer ===== */
main { display: block; }

body > section:last-of-type{
  margin-bottom: 18px; /* 혹시 body 직속 section 구조일 경우 보완 */
}

/* 공통 패턴: 마지막 콘텐츠 섹션(카드)과 푸터 사이 여백 확보 */
section:not(.hero){
  margin-bottom: 0;
}

section:not(.hero):last-of-type{
  margin-bottom: 22px; /* ✅ 핵심: 푸터와 살짝 분리 */
}

/* ===== Footer (navy, clean, minimal) ===== */
#site-footer{
  margin-top: 22px;
  padding: 34px 18px;
  background: #0c1a33; /* ✅ 네이비 다크 */
  color: rgba(255,255,255,0.78);
  border-top: 1px solid rgba(255,255,255,0.10);
}

#site-footer .footer-inner{
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* ✅ 2단: 브랜드 / 연락처 */
  gap: 20px;
  align-items: start;
}

#site-footer .footer-brand{
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1px;   /* ✅ 로고 느낌(자간) 강조 */
  font-size: 18px;       /* ✅ 로고 존재감 강화 */
  margin-bottom: 10px;   /* ✅ 슬로건과 간격 */
  line-height: 1.0;      /* ✅ 로고 라인 높이 정리 */
}

#site-footer .footer-note{
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
}

#site-footer .footer-right{
  text-align: right;
}

#site-footer .footer-contact{
  display: block;
  font-weight: 800;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
}

#site-footer .footer-right a{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
}
#site-footer .footer-right a:hover{
  color: #ffffff;
  text-decoration: underline;
}

#site-footer .footer-address{
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.62);
}

/* ✅ 링크(바로가기)는 '보조'로 아래에 작게 */
#site-footer .footer-mini-links{
  max-width: var(--max);
  margin: 18px auto 0 auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

#site-footer .footer-mini-links a{
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.70);
  text-decoration: none;
}
#site-footer .footer-mini-links a:hover{
  color: #ffffff;
  text-decoration: underline;
}

#site-footer .footer-bottom{
  max-width: var(--max);
  margin: 14px auto 0 auto;
  font-size: 12.5px;
  text-align: center;
  color: rgba(255,255,255,0.52);
}

/* Mobile */
@media (max-width: 760px){
  #site-footer{
    padding: 30px 18px;
  }
  #site-footer .footer-inner{
    grid-template-columns: 1fr;
  }
  #site-footer .footer-right{
    text-align: left;
  }
  #site-footer .footer-mini-links{
    display: none; /* ✅ 모바일은 더 미니멀하게 */
  }
}

/* ===== Page-specific hero backgrounds (images) ===== */

body[data-page="home"] .hero-home-inner{
  max-width: 920px;
  padding: 0 18px;
}

body[data-page="home"] .hero.hero-home h1{
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
  text-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

body[data-page="home"] .hero.hero-home p{
  font-size: 18px;
  margin: 0;
  opacity: 0.92;
}

body[data-page="home"] .hero-badge{
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
}

@media (max-width: 768px){
  body[data-page="home"] .hero.hero-home{ min-height: 72vh; }
  body[data-page="home"] .hero.hero-home h1{ font-size: 34px; }
  body[data-page="home"] .hero.hero-home p{ font-size: 16px; }
}

/* Home hero – compact & impactful */
body[data-page="home"] .hero{
  padding: 72px 18px;   /* 기존보다 여백 조금 증가 */
}

body[data-page="home"] .hero h1{
  font-size: 38px;
  max-width: 720px;
}

body[data-page="home"] .hero p{
  font-size: 18px;
  margin-top: 12px;
}

/* COMPANY (company) */
body[data-page="company"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-company.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* HISTORY (history) */
body[data-page="history"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-history.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ORGANIZATION (organization) */
body[data-page="organization"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-organization.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* VISION (vision) */
body[data-page="vision"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-vision.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* BUSINESS - Building Automation (business-automation) */
body[data-page="business-automation"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-business-automation.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* BUSINESS - Fire & Life Safety (business-fire) */
body[data-page="business-fire"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-business-fire.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* BUSINESS - Security System (business-security) */
body[data-page="business-security"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-business-security.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* BUSINESS - Communication System (business-communication) */
body[data-page="business-communication"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-business-communication.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* OVERSEAS (overseas) */
body[data-page="overseas"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-overseas.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* OVERSEAS - Bangladesh */
body[data-page="overseas-bangladesh"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-overseas-bangladesh.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* OVERSEAS - India */
body[data-page="overseas-india"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-overseas-india.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* OVERSEAS - Vietnam */
body[data-page="overseas-vietnam"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-overseas-vietnam.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* PROJECTS (projects) */
body[data-page="projects"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-projects.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* LOCATION (location) */
body[data-page="location"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-location.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* CERTIFICATION (certification) */
body[data-page="certification"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-certification.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* CONTACT (contact) */
body[data-page="contact"] .hero{
  background-image:
    linear-gradient(rgba(15,23,42,0.68), rgba(17,24,39,0.68)),
    url('/assets/img/hero-contact.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== Split sections (text + image) ===== */
.split{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: stretch;
}

.split-text{
  min-width: 0;
}

.split-media{
  display: flex;
  justify-content: flex-end;
  align-self: stretch;
}

.split-media img{
  width: 100%;
  max-width: 460px;
  height: 100%;          /* ✅ 240px → 100% */
  min-height: 240px;     /* ✅ 안전장치(너무 낮아지지 않게) */
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
}

/* Mobile: stack */
@media (max-width: 768px){
  .split{ grid-template-columns: 1fr; }
  .split-media{ justify-content: flex-start; }
  .split-media img{ max-width: 100%; height: 200px; }
}

/* ===== Timeline 2-column layout ===== */
.timeline-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.timeline-side-card{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
  padding: 14px;
}

.timeline-side-card img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  display: block;
}

/* Mobile: stack */
@media (max-width: 768px){
  .timeline-grid{ grid-template-columns: 1fr; }
  .timeline-side-card img{ height: 200px; }
}

/* ===== Projects list (year + title) ===== */
.project-list{
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0 0;
}
.project-list li{
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.project-list .year{
  min-width: 86px;
  font-weight: 800;
  color: #111827;
}
.project-list .dot{ opacity: 0.6; }
.project-sub{ margin-top: 18px; }
.project-sublist{ margin-top: 6px; }

/* =========================
   Certification (Partners + Certificates)
   ========================= */

/* ===== Contact: Inquiry guide ===== */
.guide-card{
  margin-top: 12px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafa;
}

.guide-list{
  margin: 0;
  padding-left: 18px;
}

.guide-list li{
  margin: 8px 0;
  color: #374151;
}

.guide-note{
  margin: 10px 0 0 0;
  color: #374151;
  font-size: 14px;
}

.section-lead{
  margin: 6px 0 14px 0;
  color: #374151;
}

/* ✅ 여기(바로 아래)에 추가 */
.partner-groups{
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.partner-group{
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafa;
}

.partner-title{
  margin: 0 0 6px 0;
}

.partner-desc{
  margin: 0 0 10px 0;
  color: #374151;
  font-size: 14px;
}

/* Partner logo grid */
.logo-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 900px){
  .logo-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .logo-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.logo-card{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.logo-card:hover{
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15,23,42,0.08);
}
.logo-card img{
  max-width: 88%;
  max-height: 34px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  filter: saturate(0.98);
}

/* Certificates grid */
.cert-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px){
  .cert-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .cert-grid{ grid-template-columns: 1fr; }
}

.cert-card{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* cert-thumb: 인증서 비율 고정 (세로형 기준) */
.cert-thumb{
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f3f4f6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15,23,42,0.08);
}

.cert-card img{
  width: 100%;
  height: 100%;
  object-fit: contain;   /* ❗ cover → contain */
  display: block;
}

.cert-caption{
  display: block;
  margin-top: 8px;
  font-weight: 800;
  color: #111827;
  font-size: 14px;
  text-align: center;
}

/* Note box */
.note-box{
  margin-top: 14px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
  color: #374151;
}

/* Modal */
body.modal-open{
  overflow: hidden;
}

.img-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}
.img-modal.is-open{
  display: block;
}
.img-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.img-modal__panel{
  position: relative;
  width: min(92vw, 980px);
  max-height: 86vh;
  margin: 6vh auto 0 auto;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}
.img-modal__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}
.img-modal__title{
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.2px;
}
.img-modal__close{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}
.img-modal__close:hover{ background: #f3f4f6; }

.img-modal__body{
  padding: 12px 14px 14px 14px;
  background: #ffffff;
}
.img-modal__body img{
  width: 100%;
  max-height: calc(86vh - 64px);
  object-fit: contain;
  display: block;
}
/* ===== HOME HERO : Crossfade Slider ===== */

body[data-page="home"] .hero.hero-home{
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Layer A */
body[data-page="home"] .hero.hero-home::before,
body[data-page="home"] .hero.hero-home::after{
  content:"";
  position:absolute;
  inset:0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 1.4s ease;
  z-index: 0;
}

body[data-page="home"] .hero.hero-home::before{
  background-image:
    linear-gradient(rgba(15,23,42,0.65), rgba(17,24,39,0.65)),
    var(--hero-bg-a);
  opacity: 1;
}

body[data-page="home"] .hero.hero-home::after{
  background-image:
    linear-gradient(rgba(15,23,42,0.65), rgba(17,24,39,0.65)),
    var(--hero-bg-b);
  opacity: 0;
}

/* when B is active */
body[data-page="home"] .hero.hero-home.show-b::before{ opacity: 0; }
body[data-page="home"] .hero.hero-home.show-b::after{ opacity: 1; }

/* text always on top */
body[data-page="home"] .hero-home-inner{
  position: relative;
  z-index: 1;
}

/* ===== Highlight Card : Greeting ===== */
.philosophy-card.highlight {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  border: 1px solid rgba(30, 58, 138, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  padding: 28px;
}

.philosophy-card.highlight h3::before {
  background: #1e3a8a; /* 더 진한 네이비 */
}

.philosophy-card.highlight p {
  font-size: 15.5px;
  line-height: 1.75;
}

/* 왼쪽 카드(인사말 카드) 내부를 세로 레이아웃으로 */
.split-text.philosophy-card{
  display: flex;
  flex-direction: column;
}

/* 마지막 strong(대표명) 문단을 맨 아래로 */
.split-text.philosophy-card p:last-child{
  margin-top: auto;
}
