/* Core variables and base */
:root{
  --cb-bg: rgba(20,22,27,.92);
  --cb-fg: #fff;
  --font-sans: "Pretendard Variable","Noto Sans KR",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Apple SD Gothic Neo","Malgun Gothic","맑은 고딕",sans-serif;
}

html{ scroll-behavior:smooth; }
html,body{ font-family:var(--font-sans); font-weight:400; line-height:1.65; letter-spacing:-0.01em; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
body{ background:#fff; overflow-x:hidden; }
.container{ max-width:1200px; margin:0 auto; padding:0 20px; box-sizing:border-box; }
@media (max-width:768px){ .container{ padding:0 15px; } }

h1{ font-weight:800; letter-spacing:-.02em; line-height:1.25; }
h2{ font-weight:800; letter-spacing:-.015em; line-height:1.3; }

/* Header */

.site-header{
  position:fixed; inset:0 0 auto 0; height:70px; z-index:1000;
  background:transparent; transition:background-color .3s, box-shadow .3s;
}
.header-content{ display:flex; justify-content:space-between; align-items:center; height:100%; }
.logo-link{ text-decoration:none; color:inherit; }
.logo-text{ font-size:1.6rem; font-weight:800; color:#fff; letter-spacing:-.5px; white-space:nowrap; margin-right:auto; }

.site-header.scrolled{ background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.1); }
.site-header.scrolled .logo-text{ color:#222; }

/* 1뎁스 네비만 가로 정렬 */
.main-nav > ul{
  display:flex; gap:28px; list-style:none; margin:0; padding:0; align-items:center;
}
.main-nav a,
.mega-toggle{
  color:#fff; text-decoration:none; font-weight:700; font-size:1.05rem; transition:color .3s;
}
.site-header.scrolled .main-nav a,
.site-header.scrolled .mega-toggle{ color:#222; }

/* 햄버거 버튼 */
.nav-toggle{
  display:none; width:40px; height:40px; background:none; border:0; cursor:pointer;
  flex-direction:column; justify-content:center; gap:6px;
}
.nav-toggle span{ display:block; width:100%; height:3px; border-radius:2px; background:#fff; transition:background .3s; }
.site-header.scrolled .nav-toggle span{ background:#222; }

/* ========== 데스크톱 드롭다운(전국지사) ========== */
.has-mega{ position:relative; }
.mega-toggle{ background:none; border:0; cursor:pointer; padding:6px 0; font:inherit; }

/* 사각형 패널, 메뉴 바로 아래 왼쪽 정렬, 세로 나열 */
.mega-panel{
  position:absolute; left:0; top:calc(100% + 10px);
  background:#fff; color:#111; border-radius:0; border:1px solid #e5e7eb;
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  padding:8px; min-width:240px; max-width:70vw; max-height:60vh;
  overflow:auto; display:none; z-index:1001;
}
.has-mega.open .mega-panel{ display:block; }

/* 리스트 세로 고정 */
.mega-panel ul{ list-style:none; margin:0; padding:0; }
.mega-panel li a{
  display:block; padding:8px 12px; border-radius:0;
  color:#111; text-decoration:none; font-weight:600;
}
.mega-panel li a:hover{ background:#f3f4f6; }

/* 더보기(추가 항목) */
.mega-more{
  width:100%; margin-top:6px; background:#fff; border:1px solid #e5e7eb;
  padding:8px 12px; font-weight:700; cursor:pointer;
}
.mega-item.extra{ display:none; }                 /* 기본 숨김 */
.has-mega.open .mega-item.extra.show{ display:block; }  /* 토글 후 표시 */

/* ========== 모바일: 메뉴 글자 숨김, 드롭다운 비활성 ========== */
@media (max-width:768px){
  .site-header{ height:60px; }
  .main-nav > ul{ display:none !important; }  /* 햄버거만 */
  .nav-toggle{ display:flex; margin-left:auto; }

  /* 데스크톱 드롭다운은 모바일에서 강제 비활성 */
  .mega-panel{ display:none !important; }
  .has-mega.open .mega-panel{ display:none !important; }
}
#mobileNav .m-sub.is-collapsed{ display:none !important; }

/* 모바일 오프캔버스: 버튼도 a와 동일 스타일 적용 */
#mobileNav .m-sub-toggle{
  display:block; width:100%; text-align:center;
  background:none; border:0; cursor:pointer;
  color:#fff; font-weight:700; font-size:1.35rem; padding:8px 0;
}

/* 데스크톱: '전국지사' 버튼을 a와 완전히 동일한 타이포로 강제 */
.main-nav .mega-toggle{
  font-family: inherit;      /* a와 동일 */
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;            /* 높이 차이 제거 */
  letter-spacing: 0;
  -webkit-appearance:none;
  appearance:none;
  background:none;
  border:0;
  padding:6px 0;
  cursor:pointer;
}

/* 모바일: '전국지사' 토글 버튼 중앙 정렬 + a와 동일 타이포 */
#mobileNav .m-sub-toggle{
  -webkit-appearance:none; appearance:none;
  display:inline-flex; align-items:center; justify-content:center;
  background:none; border:0; cursor:pointer; margin:0 auto;
  font-family: inherit;      /* a와 동일 */
  font-weight:700; font-size:1.35rem; color:#fff;
  padding:8px 16px;
}


/* mobile offcanvas */
.mobile-nav-overlay{
  position:fixed; top:0; right:0; width:70vw; max-width:320px; height:100vh;
  background:rgba(10,20,40,.97); color:#fff; z-index:10050;
  display:flex; flex-direction:column; transform:translateX(100%);
  transition:transform .2s ease; box-shadow:-2px 0 16px rgba(0,0,0,.18);
  border-radius:0 0 0 20px; overflow-y:auto;
}
.mobile-nav-overlay.open{ transform:translateX(0); }
.mobile-nav-overlay ul{ margin:64px 0 24px; padding:0; list-style:none; }
.mobile-nav-overlay li{ margin:22px 0; text-align:center; }
.mobile-nav-overlay a{ color:#fff; font-weight:700; font-size:1.35rem; text-decoration:none; display:block; padding:8px 0; }
.close-menu-btn{ position:absolute; top:18px; right:24px; background:none; border:0; color:#fff; font-size:2.3rem; cursor:pointer; }
.mobile-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:10040; display:none; }
.mobile-backdrop.show{ display:block; }
body.no-scroll{ overflow:hidden; }

/* Hero/Banner */
.banner-wrapper{ position:relative; height:100vh; min-height:420px; max-height:880px; overflow:hidden; }
@media (max-width:768px){
  .banner-wrapper{ height:100dvh; min-height:100dvh; height:100svh; min-height:100svh; }
}
.banner-video-bg{ position:absolute; inset:0; overflow:hidden; z-index:1; }
.banner-video-bg video{
  position:absolute; top:50%; left:50%; min-width:100%; min-height:100%;
  transform:translate(-50%,-50%); object-fit:cover; z-index:1; filter:brightness(.68) saturate(1.15);
}
.video-overlay{ position:absolute; inset:0; background:rgba(0,0,0,.28); z-index:2; }

.banner-section-content{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  z-index:3; color:#fff; width:100%; max-width:680px;
  background:rgba(0,0,0,.22); padding:30px 26px; border-radius:14px;
  text-align:left; box-shadow:0 4px 24px rgba(0,0,0,.08);
}
@media (min-width:1024px){ .banner-section-content{ border-left:3px solid rgba(255,255,255,.25); } }
@media (max-width:768px){ .banner-section-content{ text-align:center; max-width:92vw; } }

.process-heading{ font-size:2rem; margin:0 0 12px; }
.process-subtext{ font-size:1.05rem; line-height:1.7; font-weight:500; margin:0 0 16px; }
.process-note{ font-size:1.18rem; font-weight:800; }

/* Credentials */
#credentials.cred-block.compact{ padding:24px 0; }
#credentials .cred-wrap{ display:grid; align-items:start; gap:18px; grid-template-columns:1fr; }
#credentials .cred-head{ text-align:center; margin-bottom:24px; }
#credentials .cred-head h2{ font-size:2.1rem; margin:0 0 6px; }
#credentials .cred-sub{ color:#555; }
#credentials .cred-grid{
  --tile: clamp(120px, 11vw, 150px);
  display:grid; grid-template-columns: repeat(4, var(--tile));
  gap:30px; justify-content:center;
}
#credentials .cred-item{
  margin:0; border-radius:0; overflow:hidden; border:1px solid #e9e9e9; background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,.04); aspect-ratio:3/4;
}
#credentials .cred-item img{ width:100%; height:100%; object-fit:contain; display:block; transition:transform .22s, filter .22s; }
#credentials .cred-item:hover img{ transform:scale(1.03); filter:saturate(1.05) contrast(1.03); }
#credentials .cred-item:hover{ box-shadow:0 8px 18px rgba(0,0,0,.08); }
@media (max-width:1024px){ #credentials .cred-grid{ grid-template-columns: repeat(3, var(--tile)); } }
@media (max-width:768px){ #credentials .cred-grid{ --tile: clamp(136px,42vw,170px); grid-template-columns:repeat(2, var(--tile)); gap:8px; padding-bottom:96px; } }

/* 5) Services (.svc8) ------------------------------------------------------ */
.svc8{ padding:64px 0; background:#fff; }
.svc8 .container{ max-width:1200px; margin:0 auto; padding:0 16px; }
.svc8-head{ text-align:center; margin-bottom:28px; }
.svc8-head h2{ font-size:clamp(1.8rem, 1.1rem + 1.2vw, 2.3rem); font-weight:600; line-height:1.2; letter-spacing:-.02em; margin:0 0 6px; }
.svc8-grid{
  display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:18px; justify-content:center;
  list-style:none; margin:0; padding:0;
}
@media (max-width:1024px){ .svc8-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width:768px){ .svc8-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:560px){ .svc8-grid{ grid-template-columns:1fr; } }
.svc8-item{ list-style:none; min-width:0; }
.svc8-link{
  display:flex; flex-direction:column; height:100%; background:#fff; border:1px solid #e9e9e9; border-radius:0;
  overflow:hidden; text-decoration:none; transition:transform .18s, box-shadow .18s, border-color .18s;
}
.svc8-link:hover{ transform:translateY(-4px); box-shadow:0 10px 26px rgba(0,0,0,.08); border-color:#d9d9d9; }
.svc8-thumb{ margin:0; display:block; aspect-ratio:16/9; overflow:hidden; }
.svc8-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.svc8 h3{
  margin:12px 14px 6px; font-size:1.12rem; font-weight:600; line-height:1.35;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
  min-height:calc(1.35em * 2); color:#111;
}
.svc8 p{
  margin:0 14px 14px; color:#555; font-size:.96rem; line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* Latest: single image */


.latest.latest--image{ padding:32px 0; background:#fff; }
.latest.latest--image .latest-wrap{ max-width:1200px; margin:0 auto; padding:0 16px; }

.latest-hero{
  max-width:1100px;
  margin:0 auto;              
  border-radius:0;
  overflow:visible;         
}

#latest .latest-hero,
#latest .latest-hero img{
  height:auto !important;
  aspect-ratio:auto !important;
}
#latest .latest-hero img{
  display:block;
  width:100% !important;
  object-fit:contain !important;   
  object-position:center !important;
}


@media (max-width:768px){
  .latest-hero{ max-width:94vw; } 
}
@media (min-width:769px) and (max-width:991px){
  .latest-hero{ max-width:95vw; }
}
@media (min-width:992px){
  .latest-hero{ max-width:1100px; } 
}

/* Contact Bar (sticky) */
.contact-bar-wrap{
  position:fixed; left:0; right:0; bottom:0; z-index:9999;
  background:rgba(31,31,31,.88); color:#fff;
  box-shadow:0 -2px 6px rgba(0,0,0,.2);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
}
.contact-bar{
  max-width:720px; margin:0 auto; display:flex; justify-content:space-between;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom)) 16px; box-sizing:border-box; gap:12px;
}
.cb-item{
  flex:1; min-width:0; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  padding:12px 10px; font-size:14px; font-weight:700; border-radius:12px;
  background:#fff; color:#0f172a; border:1px solid #e5e7eb; text-decoration:none;
  transition:transform .14s, box-shadow .14s, background-color .14s;
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}
.cb-item:hover{ background:#fff; transform:translateY(-2px); box-shadow:0 10px 22px rgba(15,23,42,.12); }
.cb-item:active{ transform:translateY(-1px); opacity:.96; }
.cb-item:focus-visible{ outline:2px solid #9ec5ff; outline-offset:3px; border-radius:14px; }

.cb-text{ color:#0f172a; } 

/* 아이콘 컨테이너 & SVG: currentColor 사용 */
.cb-ico{ width:24px; height:24px; display:inline-flex; color:inherit; }
.cb-ico svg,
.cb-ico svg *{ width:100%; height:100%; fill:currentColor !important; stroke:none !important; }

/* 버튼별 아이콘 색상 (텍스트는 그대로) */
.cb-item.tel .cb-ico      { color:#22c55e; }  
.cb-item.sms .cb-ico      { color:#2563eb; }  
.cb-item.kakao .cb-ico    { color:#facc15; }  
.cb-item.telegram .cb-ico { color:#3b82f6; } 

/* 작은 화면 배치 */
@media (max-width:360px){
  .contact-bar{ flex-wrap:wrap; row-gap:8px; }
  .cb-item{ flex:0 0 48%; }
}


/* bottom padding default (JS will adjust) */
body{ padding-bottom:90px; }

/* Contact Form */
#contact-form{ background:#fff; padding:56px 0; }
#contact-form h2{ text-align:center; font-size:clamp(28px,3.2vw,40px); font-weight:800; letter-spacing:-.02em; margin:0 0 20px; color:#111; }
#contact-form form{ display:flex; flex-direction:column; gap:14px; max-width:680px; margin:0 auto; padding:0 20px; box-sizing:border-box; }
#contact-form input, #contact-form textarea{
  width:100%; box-sizing:border-box; padding:12px 14px; border:1px solid #d9d9d9; border-radius:6px; background:#fff; font-size:16px; line-height:1.4;
}
#contact-form textarea{ min-height:150px; resize:vertical; }
#contact-form .consents{ display:flex; align-items:center; gap:8px; margin-top:8px; justify-content:center; }
.consent-label{ position:relative; padding-left:28px; cursor:pointer; user-select:none; font-size:.95rem; color:#444; display:inline-block; }
.consent-label input[type="checkbox"]{ position:absolute; opacity:0; cursor:pointer; }
.custom-checkbox{ position:absolute; top:2px; left:0; height:18px; width:18px; background:#fff; border:2px solid #2196f3; border-radius:4px; box-sizing:border-box; }
.consent-label input[type="checkbox"]:checked + .custom-checkbox::after{
  content:""; position:absolute; left:4px; top:0; width:6px; height:12px; border:solid #38a5ff; border-width:0 2px 2px 0; transform:rotate(45deg);
}
#contact-form button{ width:100%; background:#111; color:#fff; border:0; border-radius:8px; padding:14px 16px; font-weight:700; cursor:pointer; transition:filter .15s; }
#contact-form button:disabled{ background:#e9e9e9; color:#9b9b9b; cursor:not-allowed; }

/* Modal */
.modal{ display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); justify-content:center; align-items:center; z-index:2000; }
.modal-content{ background:#fff; border-radius:8px; padding:20px; max-width:500px; width:90%; box-shadow:0 2px 10px rgba(0,0,0,.1); }
.modal-content h3{ margin-top:0; font-size:1.4rem; }
.modal-body{ max-height:300px; overflow-y:auto; margin:15px 0; line-height:1.6; }
.modal-actions{ text-align:right; }
.modal-actions button{ margin-left:10px; padding:8px 15px; font-size:.9rem; border:none; border-radius:4px; cursor:pointer; }
.modal-actions .btn-close{ background:#ccc; color:#333; }
.modal-actions .btn-revoke{ background:#f44336; color:#fff; }
.modal-actions .btn-agree{ background:#4caf50; color:#fff; }

/* FAQ */
.faq-section{ padding:60px 0; background:#fff; }
.faq-section .container{ max-width:800px; margin:0 auto; padding:0 20px; }
.faq-section h2{ text-align:center; font-size:2.2rem; color:#000; margin-bottom:40px; }
.accordion-item{ background:#fff; border:1px solid #d9e1f2; border-radius:8px; margin-bottom:16px; overflow:hidden; transition:box-shadow .3s; }
.accordion-item:hover{ box-shadow:0 4px 12px rgba(0,0,0,.08); }
.accordion-header{ padding:16px 20px; font-size:1.1rem; font-weight:500; color:#414141; cursor:pointer; position:relative; }
.accordion-header::after{ content:'▾'; position:absolute; right:20px; transition:transform .3s; }
.accordion-content{ max-height:0; overflow:hidden; background:#f9fbff; transition:max-height .3s ease; }
.accordion-content p{ padding:0 20px 16px; line-height:1.6; color:#333; }
.accordion-item.active .accordion-header::after{ transform:rotate(180deg); }
.accordion-item.active .accordion-content{ max-height:300px; }

/* write */
/* Guide Block */
.guide-block {
  background:#f9fafb;
  padding:56px 20px;
}
.guide-title {
  text-align:center;
  font-size:clamp(22px,2.4vw,30px);
  font-weight:800;
  margin-bottom:12px;
  color:#111;
}
.guide-sub {
  text-align:center;
  font-size:1rem;
  color:#555;
  max-width:760px;
  margin:0 auto 40px;
  line-height:1.6;
}
.guide-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:24px;
  max-width:1100px;
  margin:0 auto;
}
.guide-item {
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:24px;
  box-shadow:0 4px 10px rgba(0,0,0,.04);
}
.guide-item h3 {
  margin-top:0;
  font-size:1.2rem;
  font-weight:700;
  margin-bottom:12px;
  color:#222;
}
.guide-item p, .guide-item ul, .guide-item ol {
  margin:0;
  font-size:.95rem;
  color:#444;
  line-height:1.65;
}
.guide-item ul, .guide-item ol { padding-left:20px; }
.guide-item li { margin-bottom:6px; }

@media (max-width:768px){
  .guide-grid { grid-template-columns:1fr; }
}

/* Footer */
.site-footer{
  background:linear-gradient(120deg,#181a24 0%,#181a24 60%,#11111a 100%);
  color:#fff; padding:24px 0; font-size:15px; text-align:center; line-height:1.8;
  border-top:1px solid #eee;
}
.site-footer a{ color:#fff; text-decoration:underline; }
