/* ===== CMS TOOLBAR ===== */
#cmsBar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 44px; background: #0f172a; border-bottom: 1px solid #1e293b;
  font-family: 'Noto Sans KR', sans-serif;
}
#cmsBarInner {
  padding: 0 16px; height: 100%;
  display: flex; align-items: center; gap: 10px;
}
.cms-badge {
  background: #e8401c; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 100px; white-space: nowrap;
}
.cms-page-name { font-size: 12px; color: #64748b; }
.cms-hint { font-size: 12px; color: #22c55e; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.cms-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.cms-actions button, .cms-actions a {
  padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; border: none; transition: .2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
#cmsEditBtn  { background: #3b82f6; color: #fff; }
#cmsEditBtn:hover  { background: #2563eb; }
#cmsSaveBtn  { background: #22c55e; color: #fff; }
#cmsSaveBtn:hover  { background: #16a34a; }
#cmsCancelBtn { background: #475569; color: #fff; }
#cmsCancelBtn:hover { background: #334155; }
#cmsResetBtn { background: transparent; color: #94a3b8; border: 1px solid #334155 !important; }
#cmsResetBtn:hover { color: #fff; border-color: #64748b !important; }
.cms-admin-link { background: transparent; color: #94a3b8; border: 1px solid #334155 !important; }
.cms-admin-link:hover { color: #fff; }
.cms-logout-btn { background: transparent; color: #64748b; border: 1px solid #334155 !important; }
.cms-logout-btn:hover { color: #ef4444; border-color: #ef4444 !important; }

/* EDIT MODE — 편집 가능 요소 강조 */
body.cms-edit-active [data-cms]:not(img) {
  outline: 2px dashed #3b82f6;
  outline-offset: 3px;
  border-radius: 4px;
  cursor: text;
  transition: outline-color .2s, background .2s;
  /* 인라인(span) 요소도 클릭 가능하도록 */
  display: inline-block;
  min-height: 1em;
  position: relative;
  z-index: 10;
}
/* block 요소는 display 유지 */
body.cms-edit-active h1[data-cms],
body.cms-edit-active h2[data-cms],
body.cms-edit-active h3[data-cms],
body.cms-edit-active h4[data-cms],
body.cms-edit-active p[data-cms],
body.cms-edit-active ul[data-cms],
body.cms-edit-active div[data-cms] {
  display: block;
}
body.cms-edit-active [data-cms]:not(img):hover {
  outline-color: #f59e0b;
  background: rgba(245,158,11,.06);
}
body.cms-edit-active [data-cms]:not(img):focus {
  outline: 2px solid #3b82f6 !important;
  background: rgba(59,130,246,.05);
}
/* 편집 중 내부 링크 클릭 방지 (contenteditable 내 a 태그) */
body.cms-edit-active [data-cms] a { pointer-events: none; }
/* 편집 영역 밖의 일반 링크/버튼은 항상 클릭 가능 */
body.cms-edit-active a:not([data-cms]),
body.cms-edit-active button:not([data-cms]) { pointer-events: auto; cursor: pointer; }
body.cms-edit-active img.cms-img-editable {
  outline: 3px dashed #0ea5e9; outline-offset: 4px;
  cursor: pointer; border-radius: 4px;
  display: inline-block; position: relative; z-index: 10;
}
body.cms-edit-active img.cms-img-editable:hover { outline-color: #f59e0b; }

/* CMS TOAST */
.cms-toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  background: #0f172a; color: #fff; padding: 12px 22px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
  border-left: 4px solid #22c55e; pointer-events: none;
}
.cms-toast.show { opacity: 1; transform: translateY(0); }

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif; color: #222; background: #fff; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== VARIABLES ===== */
:root {
  --primary: #1a4fa0;
  --primary-dark: #0f3270;
  --accent: #e8401c;
  --light-bg: #f5f7fc;
  --border: #dde3ef;
  --text-muted: #666;
  --header-h: 72px;
}

/* ===== HEADER ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px; background: var(--primary);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.logo-icon svg { width: 24px; height: 24px; fill: #fff; }
.logo-img { height: 40px; width: auto; max-width: 240px; object-fit: contain; }
.logo-text { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.logo-text span { color: var(--accent); }

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  padding: 8px 18px; border-radius: 6px; font-size: 14px; font-weight: 600;
  color: #333; transition: background .2s, color .2s;
  white-space: nowrap;
}
nav a:hover, nav a.active { background: var(--primary); color: #fff; }

.nav-cta {
  margin-left: 12px; padding: 8px 20px !important;
  background: var(--accent) !important; color: #fff !important;
  border-radius: 6px; font-weight: 700 !important;
}
.nav-cta:hover { background: #c0320e !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: #333; border-radius: 2px; transition: .3s; }

/* ===== HERO ===== */
.hero {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2d6fd4 100%);
  padding: 100px 24px 80px;
  text-align: center; color: #fff; position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none; /* 오버레이가 클릭 이벤트를 가로채지 않도록 */
}
/* 히어로 내 모든 자식은 오버레이보다 위에 표시 */
.hero > * { position: relative; z-index: 1; }
.hero-btns { position: relative; z-index: 2; }
.hero-btns a { pointer-events: auto; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 13px; font-weight: 600; padding: 6px 16px;
  border-radius: 100px; margin-bottom: 24px; letter-spacing: .5px;
}
.hero h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 900; line-height: 1.2; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: #7dd3fc; }
.hero p { font-size: clamp(15px, 2vw, 18px); opacity: .85; max-width: 640px; margin: 0 auto 36px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  padding: 14px 32px; background: #fff; color: var(--primary);
  border-radius: 8px; font-weight: 700; font-size: 15px; transition: .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn-outline {
  padding: 14px 32px; border: 2px solid rgba(255,255,255,.6); color: #fff;
  border-radius: 8px; font-weight: 700; font-size: 15px; transition: .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }

.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,.2);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 32px; font-weight: 900; }
.hero-stat span { font-size: 13px; opacity: .7; }

/* ===== SECTION COMMON ===== */
section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  display: inline-block; background: #e8f0fc; color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 100px;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px;
}
.section-title { font-size: clamp(22px, 3.5vw, 36px); font-weight: 800; color: #111; margin-bottom: 12px; }
.section-sub { font-size: 16px; color: var(--text-muted); max-width: 560px; }

/* ===== SERVICES ===== */
.services { background: var(--light-bg); }
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px; margin-top: 48px;
}
.service-card {
  background: #fff; border-radius: 16px; padding: 36px 30px;
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--primary);
}
.service-card.accent::before { background: var(--accent); }
.service-card.teal::before { background: #0ea5e9; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(26,79,160,.12); }
.service-icon {
  width: 60px; height: 60px; border-radius: 14px;
  background: var(--light-bg); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 30px; height: 30px; }
.service-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; color: #111; }
.service-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--light-bg); color: var(--primary);
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--border);
}

/* ===== WHY MLD ===== */
.why { background: #fff; }
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px; margin-top: 48px;
}
.why-item { text-align: center; }
.why-num {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #2d6fd4);
  color: #fff; font-size: 22px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.why-item h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.why-item p { font-size: 14px; color: var(--text-muted); }

/* ===== SOLUTIONS (index 미리보기) ===== */
.solutions { background: var(--light-bg); }
.solutions-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 48px;
}
.solution-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); transition: .25s;
}
.solution-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.09); }
.solution-card-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 28px 24px; color: #fff;
}
.solution-card-header.ai { background: linear-gradient(135deg, #0c4a6e, #0284c7); }
.solution-card-header.si { background: linear-gradient(135deg, #1e3a5f, #1a6aa0); }
.solution-card-header h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.solution-card-header p { font-size: 13px; opacity: .8; }
.solution-card-body { padding: 20px 24px; }
.solution-card-body ul li {
  padding: 7px 0; font-size: 14px; color: #444;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px;
}
.solution-card-body ul li:last-child { border-bottom: none; }
.solution-card-body ul li::before {
  content: '✓'; color: var(--primary); font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.solution-link {
  display: block; margin: 16px 24px 20px;
  padding: 10px; text-align: center;
  background: var(--light-bg); color: var(--primary);
  border-radius: 8px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--border); transition: .2s;
}
.solution-link:hover { background: var(--primary); color: #fff; }

/* ===== CONTACT BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 70px 24px; text-align: center; color: #fff;
}
.cta-banner h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 800; margin-bottom: 12px; }
.cta-banner p { font-size: 16px; opacity: .85; margin-bottom: 32px; }

/* ===== FOOTER ===== */
footer {
  background: #111827; color: #9ca3af; padding: 48px 24px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: flex; gap: 48px; flex-wrap: wrap;
  padding-bottom: 36px; border-bottom: 1px solid #374151;
  margin-bottom: 28px;
}
.footer-brand { flex: 1; min-width: 220px; }
.footer-logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: #60a5fa; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-col h5 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: #9ca3af; transition: color .2s; }
.footer-col ul li a:hover { color: #60a5fa; }
.footer-info { font-size: 12px; color: #6b7280; line-height: 1.9; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: 12px; }

/* ===== PAGE HERO (서브 페이지) ===== */
.page-hero {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 60px 24px; text-align: center; color: #fff;
}
.page-hero h1 { font-size: clamp(24px, 4vw, 42px); font-weight: 900; margin-bottom: 10px; }
.page-hero p { font-size: 16px; opacity: .8; }
.breadcrumb { font-size: 13px; opacity: .6; margin-bottom: 12px; }
.breadcrumb a { color: #fff; }

/* ===== ABOUT PAGE ===== */
.about-section { padding: 80px 24px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.about-text p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.8; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.value-box { background: var(--light-bg); border-radius: 10px; padding: 18px; }
.value-box strong { display: block; color: var(--primary); font-size: 15px; margin-bottom: 4px; }
.value-box span { font-size: 13px; color: var(--text-muted); }
.about-visual {
  background: linear-gradient(135deg, var(--primary-dark), #2d6fd4);
  border-radius: 20px; padding: 40px; color: #fff; text-align: center;
}
.about-visual h3 { font-size: 20px; font-weight: 800; margin-bottom: 24px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-stat { background: rgba(255,255,255,.12); border-radius: 12px; padding: 20px 10px; }
.about-stat strong { font-size: 28px; font-weight: 900; display: block; }
.about-stat span { font-size: 12px; opacity: .75; }
.org-section { background: var(--light-bg); padding: 80px 24px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 40px; }
.org-card { background: #fff; border-radius: 12px; padding: 24px; text-align: center; border: 1px solid var(--border); }
.org-card .dept { font-size: 13px; color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.org-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.org-card p { font-size: 12px; color: var(--text-muted); }
.history-section { padding: 80px 24px; }
.timeline { max-width: 700px; margin: 40px auto 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { padding-left: 56px; position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute; left: 11px; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-year { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.timeline-text { font-size: 14px; color: #444; }
.map-section { background: var(--light-bg); padding: 80px 24px; }
.map-placeholder {
  background: #e5e7eb; border-radius: 14px; height: 280px;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280; font-size: 15px; margin-top: 32px;
  border: 2px dashed #d1d5db;
}

/* ===== SOLUTION PAGE ===== */
.sol-section { padding: 80px 24px; }

/* ===== 프로그램 화면 갤러리 ===== */
.screens-section { padding: 80px 24px; background: var(--light-bg); }
.screens-section.alt { background: #fff; }
.section-sub.wide { max-width: 820px; }
.screen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.screen-grid.two { grid-template-columns: repeat(2, 1fr); }
.screen-card {
  display: block; margin: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(15, 50, 112, .06);
}
.screen-card img { display: block; width: 100%; height: auto; }
.screen-card figcaption { padding: 16px 18px 18px; border-top: 1px solid var(--border); }
.screen-card h4 { font-size: 16px; font-weight: 700; color: #111; margin-bottom: 4px; }
.screen-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.pain-list {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px; margin-top: 28px; padding: 0;
}
.pain-list li { position: relative; padding-left: 22px; font-size: 15px; color: #333; line-height: 1.6; }
.pain-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pain-answer { margin-top: 24px; font-size: 16px; font-weight: 600; color: var(--primary); line-height: 1.7; }
.about-banner { display: block; width: 100%; height: auto; border-radius: 12px; margin-bottom: 48px; }
.about-wide-img { display: block; width: 100%; max-width: 960px; height: auto; margin: 32px auto 0; }
@media (max-width: 900px) {
  .screen-grid { grid-template-columns: repeat(2, 1fr); }
  .pain-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .screen-grid, .screen-grid.two { grid-template-columns: 1fr; }
  .screens-section { padding: 56px 16px; }
}
.sol-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; margin-bottom: 80px;
}
.sol-detail.reverse { direction: rtl; }
.sol-detail.reverse > * { direction: ltr; }
.sol-detail-text h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.sol-detail-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.feature-list li {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.feature-list li::before { content: '▶'; color: var(--primary); font-size: 10px; margin-top: 3px; flex-shrink: 0; }
.sol-visual {
  background: linear-gradient(135deg, var(--primary-dark), #2d6fd4);
  border-radius: 16px; padding: 32px; color: #fff; min-height: 240px;
  display: flex; flex-direction: column; justify-content: center;
}
.sol-visual.ai-bg { background: linear-gradient(135deg, #0c4a6e, #0284c7); }
.sol-visual.si-bg { background: linear-gradient(135deg, #1e1b4b, #3730a3); }
.sol-visual h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; opacity: .8; }
.sol-module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sol-module {
  background: rgba(255,255,255,.12); border-radius: 8px; padding: 12px;
  font-size: 13px; text-align: center; font-weight: 600;
}

/* ===== CONTACT PAGE ===== */
.contact-section { padding: 80px 24px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.contact-info h3 { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.contact-item { display: flex; gap: 14px; margin-bottom: 24px; align-items: flex-start; }
.contact-item-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--light-bg); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; stroke: var(--primary); fill: none; stroke-width: 2; }
.contact-item-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.contact-item-text span { font-size: 14px; color: var(--text-muted); }
.contact-form { background: var(--light-bg); border-radius: 16px; padding: 36px; }
.contact-form h3 { font-size: 20px; font-weight: 800; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fff; font-family: inherit;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btn-submit {
  width: 100%; padding: 14px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: .2s; font-family: inherit;
}
.btn-submit:hover { background: var(--primary-dark); }

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 12px 24px; flex-direction: column; gap: 4px; z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 11px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: #333;
  transition: background .2s;
}
.mobile-nav a:hover { background: var(--light-bg); }

/* ===== LOGIN PAGE ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--light-bg); padding: 24px;
}
.login-box {
  background: #fff; border-radius: 16px; padding: 44px 40px;
  width: 100%; max-width: 420px; box-shadow: 0 8px 40px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}
.login-box .logo { justify-content: center; margin-bottom: 28px; }
.login-box h2 { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 28px; }
.login-tab { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.login-tab button {
  flex: 1; padding: 10px; background: none; border: none; font-size: 14px;
  font-weight: 700; cursor: pointer; color: var(--text-muted); font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .2s;
}
.login-tab button.active { color: var(--primary); border-bottom-color: var(--primary); }
.login-error { background: #fef2f2; color: #dc2626; font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; display: none; }
.login-error.show { display: block; }
.login-back { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.login-back:hover { color: var(--primary); }

/* ===== BOARD PAGE ===== */
.board-section { padding: 60px 24px; min-height: calc(100vh - 72px); }
.board-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.board-toolbar h3 { font-size: 18px; font-weight: 800; }
.btn-write {
  padding: 9px 20px; background: var(--primary); color: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 700; border: none;
  cursor: pointer; font-family: inherit; transition: .2s;
}
.btn-write:hover { background: var(--primary-dark); }
.board-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.board-table thead { background: var(--light-bg); }
.board-table th { padding: 13px 16px; font-size: 13px; font-weight: 700; color: #555; text-align: left; border-bottom: 1px solid var(--border); }
.board-table td { padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.board-table tr:last-child td { border-bottom: none; }
.board-table tr:hover td { background: #fafbff; }
.board-table .col-no { width: 60px; text-align: center; color: var(--text-muted); }
.board-table .col-title { min-width: 200px; }
.board-table .col-title a { font-weight: 600; color: #111; }
.board-table .col-title a:hover { color: var(--primary); }
.board-table .col-author, .board-table .col-date, .board-table .col-views { width: 100px; text-align: center; color: var(--text-muted); font-size: 13px; }
.board-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.badge-secret { background: #fef3c7; color: #b45309; font-size: 11px; padding: 2px 7px; border-radius: 100px; margin-left: 6px; font-weight: 600; }
.badge-new { background: #dcfce7; color: #166534; font-size: 11px; padding: 2px 7px; border-radius: 100px; margin-left: 6px; font-weight: 600; }
.badge-reply { background: #dbeafe; color: #1e40af; font-size: 11px; padding: 2px 7px; border-radius: 100px; margin-left: 6px; font-weight: 600; }
.board-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; cursor: pointer; font-family: inherit; transition: .2s;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== BOARD WRITE/VIEW ===== */
.board-write-form { background: #fff; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.board-write-form .form-group { padding: 0 24px 16px; }
.board-write-form .form-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-write-form .form-header input[type=text] {
  flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; font-family: inherit;
}
.board-write-form .form-header input:focus { outline: none; border-color: var(--primary); }
.secret-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.board-write-form textarea {
  width: 100%; min-height: 320px; padding: 16px; border: none; border-top: 1px solid var(--border);
  font-size: 14px; font-family: inherit; resize: vertical; line-height: 1.7;
}
.board-write-form textarea:focus { outline: none; }
.board-write-actions { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.btn-cancel { padding: 9px 20px; background: #f3f4f6; color: #555; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-cancel:hover { background: #e5e7eb; }

/* 게시글 뷰 */
.post-view { background: #fff; border-radius: 14px; border: 1px solid var(--border); }
.post-view-header { padding: 24px; border-bottom: 1px solid var(--border); }
.post-view-header h2 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.post-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.post-view-body { padding: 28px 24px; min-height: 200px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; border-bottom: 1px solid var(--border); }
.post-view-actions { padding: 14px 24px; display: flex; gap: 8px; justify-content: flex-end; }
.btn-del { padding: 8px 16px; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-del:hover { background: #fee2e2; }
.btn-back { padding: 8px 16px; background: var(--light-bg); color: #444; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-back:hover { background: #e5e7eb; }

/* 댓글(답변) */
.replies { margin-top: 24px; }
.replies h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.reply-item { background: var(--light-bg); border-radius: 10px; padding: 16px; margin-bottom: 10px; position: relative; }
.reply-item.admin-reply { background: #eff6ff; border-left: 3px solid var(--primary); }
.reply-author { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.reply-author .admin-badge { background: var(--primary); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 100px; margin-left: 4px; }
.reply-content { font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.reply-date { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.reply-del { position: absolute; top: 12px; right: 12px; background: none; border: none; color: #dc2626; font-size: 12px; cursor: pointer; }
.reply-form { margin-top: 16px; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.reply-form textarea { width: 100%; padding: 14px; border: none; font-size: 14px; font-family: inherit; resize: vertical; min-height: 80px; }
.reply-form textarea:focus { outline: none; }
.reply-form-footer { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
.btn-reply { padding: 8px 18px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ===== ADMIN PAGE ===== */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.admin-tab-btn {
  padding: 10px 20px; background: none; border: none; font-size: 14px;
  font-weight: 700; cursor: pointer; color: var(--text-muted); font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .2s;
}
.admin-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); font-size: 14px; }
.data-table th { background: var(--light-bg); padding: 11px 14px; font-weight: 700; text-align: left; border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.role-badge { font-size: 11px; padding: 2px 8px; border-radius: 100px; font-weight: 700; }
.role-admin { background: #dbeafe; color: #1e40af; }
.role-user { background: #f3f4f6; color: #555; }

/* ===== GOOGLE MAP ===== */
.gmap-wrap { margin-top: 32px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.gmap-wrap iframe { display: block; width: 100%; height: 320px; border: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .about-grid, .sol-detail, .contact-grid { grid-template-columns: 1fr; }
  .sol-detail.reverse { direction: ltr; }
  .hero { padding: 70px 20px 60px; }
  .hero-stats { gap: 24px; }
  .about-values { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; gap: 28px; }
}

/* ===== 섹션 편집기: 추가 섹션 ===== */
.cms-block { position: relative; padding: 72px 24px; }
.cms-block.bg-white { background: #fff; }
.cms-block.bg-gray  { background: var(--light-bg); }
.cms-block.bg-dark  { background: #0f172a; color: #e2e8f0; }
.cms-block.bg-dark .section-title { color: #fff; }
.cms-block.bg-none  { background: transparent; }
.bk-inner { margin: 0 auto; }
.bk-inner.w-narrow { max-width: 720px; }
.bk-inner.w-normal { max-width: 1000px; }
.bk-inner.w-wide   { max-width: 1200px; }
.bk-inner.al-center { text-align: center; }
.bk-inner.al-left   { text-align: left; }
.bk-inner .section-title { margin-bottom: 24px; }
.bk-desc { margin-top: 20px; font-size: 16px; line-height: 1.8; color: var(--text-muted); }
.bk-text .bk-desc { margin-top: 0; color: #333; }
.cms-block.bg-dark .bk-desc { color: #cbd5e1; }
.bk-img { display: block; width: 100%; height: auto; border-radius: 12px; }
.cms-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.cms-player video, .cms-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* 배경 동영상 + 글자 */
.cms-block.bk-hero {
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #0f172a; color: #fff; padding: 64px 24px;
}
.cms-block.bk-hero.h-s    { min-height: 320px; }
.cms-block.bk-hero.h-m    { min-height: 480px; }
.cms-block.bk-hero.h-l    { min-height: 640px; }
.cms-block.bk-hero.h-full { min-height: 100vh; }
.cms-block.bk-hero.ov-light { color: #111; }
.bk-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1000px; }
.bk-hero.al-center .bk-hero-inner { text-align: center; }
.bk-hero.al-left .bk-hero-inner   { text-align: left; }
.bk-hero-title { font-size: clamp(26px, 4.5vw, 48px); font-weight: 900; line-height: 1.25; margin-bottom: 16px; }
.bk-hero-sub   { font-size: clamp(15px, 2vw, 19px); line-height: 1.7; opacity: .92; }
.bk-hero-btn   { display: inline-block; margin-top: 32px; }

/* 배경 레이어 (동영상/이미지 + 덮개) */
.cms-bg-layer {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-size: cover; background-position: center;
}
.cms-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cms-bg-iframe { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; transform: translate(-50%, -50%); border: 0; }
.cms-bg-overlay { position: absolute; inset: 0; }

/* 기존 섹션에 배경을 넣었을 때 */
.has-cms-bg { position: relative; overflow: hidden; }
.has-cms-bg > .cms-bg-layer { position: absolute; z-index: 0; }
.has-cms-bg > *:not(.cms-bg-layer):not(.cms-sec-tool) { position: relative; z-index: 1; }
.has-cms-bg.cms-light-text,
.has-cms-bg.cms-light-text > h1, .has-cms-bg.cms-light-text > h2, .has-cms-bg.cms-light-text > p,
.has-cms-bg.cms-light-text > .section-inner > .section-title,
.has-cms-bg.cms-light-text > .section-inner > .section-sub,
.has-cms-bg.cms-light-text > .section-inner > .pain-list li,
.has-cms-bg.cms-light-text > .section-inner > .pain-answer { color: #fff; }

/* 페이지 전체 배경 */
#cmsPageBg { position: fixed; inset: 0; z-index: -1; }
body.has-page-bg > section:not(.cms-block) { background: rgba(255, 255, 255, var(--veil, .8)) !important; }
body.has-page-bg > .hero,
body.has-page-bg > .page-hero,
body.has-page-bg > section.cta-banner { background: rgba(15, 50, 112, var(--veil, .8)) !important; }
body.has-page-bg > .cms-block.bg-white { background: rgba(255, 255, 255, var(--veil, .8)); }
body.has-page-bg > .cms-block.bg-gray  { background: rgba(245, 247, 252, var(--veil, .8)); }
body.has-page-bg > .cms-block.bg-dark  { background: rgba(15, 23, 42, var(--veil, .8)); }

/* ===== 섹션 편집기: 편집 도구 ===== */
.cms-add-bar { position: relative; height: 0; z-index: 40; text-align: center; }
.cms-add-bar button {
  position: relative; top: -15px; padding: 6px 18px; border: 2px dashed #22c55e; border-radius: 100px;
  background: #fff; color: #16a34a; font: 700 13px 'Noto Sans KR', sans-serif; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.cms-add-bar button:hover { background: #22c55e; color: #fff; }
.cms-block-tools, section > .cms-sec-tool, .page-hero > .cms-sec-tool {
  position: absolute; top: 10px; right: 10px; z-index: 30; display: flex; gap: 4px;
}
.cms-block-tools button, .cms-sec-tool button {
  padding: 5px 10px; border: 0; border-radius: 6px; background: #0f172a; color: #fff;
  font: 700 12px 'Noto Sans KR', sans-serif; cursor: pointer; opacity: .88;
}
.cms-block-tools button:hover, .cms-sec-tool button:hover { opacity: 1; background: #2563eb; }
body.cms-edit-active .page-hero { position: relative; }
body.cms-edit-active .cms-block { outline: 2px solid rgba(34, 197, 94, .55); outline-offset: -2px; }
body.cms-edit-active [data-bf] { outline: 2px dashed #3b82f6; outline-offset: 3px; border-radius: 4px; cursor: text; min-height: 1.4em; }
body.cms-edit-active [data-bf]:empty::before { content: attr(data-ph); opacity: .45; font-weight: 400; }
.cms-empty { padding: 48px 20px; border: 2px dashed #94a3b8; border-radius: 12px; color: #64748b; text-align: center; font-size: 14px; }
#cmsPageBgBtn { background: #7c3aed; color: #fff; }

/* 설정 창 */
.cms-dlg-wrap {
  position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  font-family: 'Noto Sans KR', sans-serif;
}
.cms-dlg { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 14px; padding: 26px; color: #222; text-align: left; }
.cms-dlg h3 { font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.cms-dlg-row { margin-bottom: 14px; }
.cms-dlg-label { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.cms-dlg-line { display: flex; gap: 8px; align-items: center; }
.cms-dlg input[type="text"], .cms-dlg select {
  flex: 1; width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px;
}
.cms-dlg input[type="range"] { flex: 1; }
.cms-dlg-out { width: 44px; text-align: right; font-size: 13px; color: var(--text-muted); }
.cms-dlg-check { font-size: 14px; cursor: pointer; }
.cms-dlg small { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.cms-dlg button {
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font: 700 13px 'Noto Sans KR', sans-serif; cursor: pointer; white-space: nowrap;
}
.cms-dlg button:disabled { opacity: .6; cursor: wait; }
.cms-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.cms-dlg-foot .cms-dlg-ok { background: var(--primary); border-color: var(--primary); color: #fff; }
.cms-dlg-foot .cms-dlg-danger { margin-right: auto; color: #dc2626; border-color: #fecaca; }
.cms-type-list { display: grid; gap: 10px; }
.cms-dlg .cms-type-card { display: block; width: 100%; text-align: left; padding: 14px 16px; white-space: normal; }
.cms-type-card:hover { border-color: var(--primary); background: #f5f8ff; }
.cms-type-card strong { display: block; font-size: 15px; margin-bottom: 3px; }
.cms-type-card span { font-size: 13px; font-weight: 400; color: var(--text-muted); }

/* ===== 이미지 확대 표시 ===== */
img.cms-zoom { cursor: zoom-in; }
body.cms-edit-active img.cms-zoom { cursor: pointer; }
.cms-zoom-wrap {
  position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .88);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.cms-zoom-wrap img {
  width: min(96vw, 1600px); max-width: none; max-height: 92vh; height: auto;
  object-fit: contain; background: #fff; border-radius: 6px;
}
.cms-zoom-wrap button {
  position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 18px; cursor: pointer;
}

/* 이미지 편집 메뉴 */
.cms-img-menu .cms-type-card { margin-bottom: 10px; }
.cms-img-menu .cms-type-card:disabled { opacity: .45; cursor: not-allowed; background: #f8fafc; }
.cms-img-zoom-opt { display: block; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

@media (max-width: 600px) {
  .cms-block { padding: 48px 16px; }
  .cms-block.bk-hero.h-m { min-height: 380px; }
  .cms-block.bk-hero.h-l { min-height: 480px; }
}
