/* 주원테크 홈페이지 */
:root {
  --green: #2f45c8;
  --green-dark: #22349b;
  --text: #333;
  --muted: #777;
  --line: #e2e2e2;
  --bg-soft: #f9f9f9;
  --footer: #434343;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; font-size: 15px; line-height: 1.6; color: var(--text); background: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; vertical-align: top; border: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* 상단 언어 바 */
.topbar { border-bottom: 1px solid #eee; font-size: 12px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; height: 38px; align-items: center; }
.tb-info { display: flex; gap: 16px; color: #777; }
.tb-info a { padding: 0; }
.tb-info a + a::before, .tb-info a::before { display: none; }
.topbar a { color: #666; padding: 0 10px; position: relative; letter-spacing: .02em; }
.topbar a + a::before { content: ""; position: absolute; left: 0; top: 50%; height: 10px; margin-top: -5px; border-left: 1px solid #ccc; }
.topbar a:hover, .topbar a.on { color: var(--green); }

/* 헤더 */
.header { position: relative; z-index: 50; background: #fff; box-shadow: 0 1px 0 #eee; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo img { width: 182px; height: auto; }
.header .badge { width: 160px; height: auto; margin-left: 10px; }
.gnb > ul { display: flex; height: 84px; }
.gnb > ul > li { position: relative; }
.gnb { margin-left: auto; }
.gnb > ul > li > a { display: flex; align-items: center; height: 84px; padding: 0 30px; font-size: 15px; font-weight: 500; letter-spacing: .03em; color: #444; }
.gnb > ul > li:hover > a, .gnb > ul > li.on > a { color: var(--green); }
.gnb > ul > li > ul { display: none; position: absolute; left: 50%; top: 84px; transform: translateX(-50%); min-width: 220px; background: #fff; border-top: 2px solid var(--green); box-shadow: 0 6px 16px rgba(0,0,0,.1); padding: 8px 0; }
.gnb > ul > li:hover > ul, .gnb > ul > li:focus-within > ul { display: block; }
.gnb li li a { display: block; padding: 7px 20px; font-size: 13px; color: #555; white-space: nowrap; }
.gnb li li.sub a { padding-left: 34px; color: #777; }
.gnb li li.grp a { font-weight: 500; }
.gnb li li a:hover { background: #f4f9f4; color: var(--green); }
.nav-toggle { display: none; }

/* 메인 슬라이드 */
.slider { position: relative; height: clamp(220px, 36.5vw, 700px); overflow: hidden; background: #eee; }
.slide { position: absolute; inset: 0; background: var(--bg) center / cover no-repeat; opacity: 0; transition: opacity 1s ease; }
.slide.active { opacity: 1; }
.sl-prev, .sl-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 60px; border: 0; background: rgba(0,0,0,.25); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .3s; }
.slider:hover .sl-prev, .slider:hover .sl-next { opacity: 1; }
.sl-prev { left: 0; } .sl-next { right: 0; }
.sl-dots { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; }
.sl-dots button { width: 11px; height: 11px; margin: 0 5px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.sl-dots button.active { background: #fff; }

/* 메인 소개 */
.home-intro { background: var(--bg-soft); padding: 40px 0 56px; text-align: center; }
.main-title { display: inline-block; font-size: 36px; font-weight: 700; color: #555; letter-spacing: -.01em; padding-bottom: 10px; border-bottom: 2px solid #4a9fd8; margin-bottom: 36px; }
.banners { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.banners li { min-width: 0; }
.banners a { border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.banners a { display: block; overflow: hidden; }
.banners img { transition: transform .4s; }
.banners a:hover img { transform: scale(1.04); }

/* 서브 상단 */
.page-top { height: 200px; background: center / cover no-repeat; display: flex; align-items: center; }
.page-top { height: 180px; }
.page-top h2 { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: .02em; text-shadow: 0 2px 8px rgba(0,0,0,.45); }

/* 서브 레이아웃 */
.sub-layout { display: flex; gap: 50px; padding-top: 50px; padding-bottom: 80px; }
.side { flex: 0 0 240px; }
.side-title { padding: 26px 22px; background: var(--green); color: #fff; }
.side-title .en { display: block; font-size: 22px; font-weight: 700; letter-spacing: .03em; line-height: 1.2; }
.side-title .kr { display: block; font-size: 13px; opacity: .85; margin-top: 4px; }
.side-menu { border: 1px solid var(--line); border-top: 0; }
.side-menu > li { border-top: 1px solid var(--line); }
.side-menu > li:first-child { border-top: 0; }
.side-menu > li > a { display: block; padding: 13px 20px; font-size: 14px; color: #555; }
.side-menu > li.on > a { color: var(--green); font-weight: 700; background: #f6faf6; }
.side-menu > li > a:hover { color: var(--green); }
.side-menu ul { padding: 4px 0 10px; background: #fbfbfb; }
.side-menu ul a { display: block; padding: 6px 20px 6px 32px; font-size: 13px; color: #777; position: relative; }
.side-menu ul a::before { content: ""; position: absolute; left: 20px; top: 50%; width: 4px; height: 4px; background: #bbb; }
.side-menu ul li.on a { color: var(--green); font-weight: 700; }
.side-menu ul li.on a::before { background: var(--green); }
.side-menu ul a:hover { color: var(--green); }
.content { flex: 1; min-width: 0; }
.location { font-size: 12px; color: var(--muted); text-align: right; }
.location strong { color: #555; font-weight: 500; }
.content-title { font-size: 24px; font-weight: 700; color: #333; padding-bottom: 14px; border-bottom: 2px solid #333; margin: 6px 0 36px; }
.content-img { text-align: center; }
.content-img img { width: 640px; max-width: 100%; }

.notfound { padding: 100px 20px; text-align: center; }
.notfound h2 { font-size: 48px; color: #ccc; }
.notfound a { color: var(--green); }

/* 푸터 */
.footer { background: var(--footer); color: #bdbdbd; font-size: 13px; text-align: center; }
.footer .wrap { padding-top: 22px; padding-bottom: 18px; }
.f-name { color: #fff; font-weight: 500; margin-bottom: 4px; }
.f-info span { display: inline-block; margin: 0 6px; }
.f-copy { background: #3a3a3a; font-size: 12px; }
.f-copy .wrap { padding-top: 8px; padding-bottom: 8px; }
.f-copy a { color: #ddd; }

/* 태블릿 이하 */
@media (max-width: 1100px) {
  .header .badge { display: none; }
}
@media (max-width: 1024px) {
  .gnb > ul > li > a { padding: 0 18px; }
}
@media (max-width: 860px) {
  .header .wrap { height: 64px; }
  .logo img { width: 150px; }
  .tb-info span { display: none; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
  .nav-toggle span { display: block; height: 2px; background: #444; transition: .3s; }
  .nav-toggle em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .gnb { display: none; position: absolute; left: 0; right: 0; top: 64px; background: #fff; border-top: 1px solid #eee; box-shadow: 0 8px 20px rgba(0,0,0,.12); max-height: calc(100vh - 104px); overflow-y: auto; }
  .nav-open .gnb { display: block; }
  .gnb > ul { display: block; height: auto; }
  .gnb > ul > li > a { height: auto; padding: 14px 20px; border-bottom: 1px solid #f0f0f0; }
  .gnb > ul > li > ul { display: block; position: static; transform: none; box-shadow: none; border-top: 0; padding: 4px 0 10px; background: #fafafa; min-width: 0; }
  .gnb li li a { white-space: normal; padding: 7px 32px; }
  .gnb li li.sub a { padding-left: 46px; }
  .sub-layout { flex-direction: column; gap: 24px; padding-top: 24px; padding-bottom: 50px; }
  .side { flex: none; }
  .side-title { padding: 14px 18px; }
  .side-title .en { font-size: 18px; display: inline; }
  .side-title .kr { display: inline; margin: 0 0 0 8px; }
  .side-menu { display: flex; flex-wrap: wrap; border: 0; gap: 6px; padding-top: 10px; }
  .side-menu > li { border: 1px solid var(--line) !important; }
  .side-menu > li > a { padding: 7px 12px; font-size: 13px; }
  .side-menu ul { display: none; }
  .side-menu > li.on ul { display: flex; flex-wrap: wrap; width: 100%; padding: 4px 6px 8px; }
  .side-menu > li.on { flex-basis: 100%; }
  .side-menu ul a { padding: 5px 10px 5px 18px; }
  .side-menu ul a::before { left: 8px; }
  .location { display: none; }
  .content-title { font-size: 20px; margin: 0 0 20px; }
  .page-top { height: 120px; }
  .page-top { height: 180px; }
.page-top h2 { font-size: 22px; }
  .main-title { font-size: 22px; margin-bottom: 24px; }
  .home-intro { padding: 32px 0 40px; }
  .banners { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .slider { height: 94.6vw; }
  .slide { background-image: var(--bgm); }
}
@media (max-width: 560px) {
  .topbar .wrap { justify-content: center; }
  .banners { grid-template-columns: repeat(2, 1fr); }
  .f-info span { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .banners img { transition: none; }
}

/* 편집기로 쓴 본문 */
.content-img + .content-body { margin-top: 40px; }
.content-body { font-size: 15px; line-height: 1.8; color: #444; word-break: keep-all; overflow-wrap: anywhere; }
.content-body::after { content: ""; display: block; clear: both; }
.content-body > * + * { margin-top: 1em; }
.content-body h2 { font-size: 22px; color: #333; margin-top: 1.6em; padding-left: 12px; border-left: 4px solid var(--green); line-height: 1.3; }
.content-body h3 { font-size: 18px; color: var(--green-dark); margin-top: 1.4em; }
.content-body h4 { font-size: 16px; margin-top: 1.2em; }
.content-body ul { list-style: disc; padding-left: 1.4em; }
.content-body ol { list-style: decimal; padding-left: 1.4em; }
.content-body li + li { margin-top: .3em; }
.content-body a { color: var(--green-dark); text-decoration: underline; }
.content-body img { max-width: 100%; height: auto; }
.content-body blockquote { margin-left: 0; margin-right: 0; padding: 14px 18px; background: var(--bg-soft); border-left: 3px solid #ccc; color: #555; }
.content-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.content-body table { width: 100%; border-collapse: collapse; border-top: 2px solid #555; font-size: 14px; }
.content-body th, .content-body td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.content-body th { background: #f4f7f4; font-weight: 500; color: #333; }
@media (max-width: 640px) {
  .content-body table { display: block; overflow-x: auto; }
  .content-body img[style*="float"] { float: none !important; display: block; margin: 0 auto; }
}

/* 제품 갤러리 */
.content-body + .item-grid, .content-img + .item-grid { margin-top: 40px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 18px; }
.item-grid a { display: block; text-align: center; }
.ig-img { display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); background: #fafafa; }
.ig-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.item-grid a:hover .ig-img img { transform: scale(1.05); }
.ig-name { display: block; margin-top: 10px; font-weight: 700; font-size: 14px; color: #333; }
.ig-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.item-grid a:hover .ig-name { color: var(--green); }

.item-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.iv-main { border: 1px solid var(--line); background: #fafafa; }
.iv-main img { width: 100%; }
.iv-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.iv-thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.iv-thumbs button.on { border-color: var(--green); }
.iv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.iv-info h4 { font-size: 24px; color: #222; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.iv-sub { font-size: 16px; color: #444; padding: 14px 0; border-bottom: 1px solid var(--line); }
.iv-desc { font-size: 14px; color: #666; padding: 14px 0; border-bottom: 1px solid var(--line); }
.iv-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.btn-line { display: inline-block; padding: 10px 20px; border: 1px solid var(--green); color: var(--green); font-weight: 500; font-size: 14px; }
.btn-line:hover { background: var(--green); color: #fff; }
.btn-line.gray { border-color: #bbb; color: #666; }
.btn-line.gray:hover { background: #666; border-color: #666; color: #fff; }
.iv-detail-title { margin: 44px 0 18px; font-size: 17px; color: #333; padding-bottom: 10px; border-bottom: 2px solid #333; }
.iv-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: #666; }
.iv-nav a:hover { color: var(--green); }
@media (max-width: 860px) {
  .item-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .item-view { grid-template-columns: 1fr; gap: 20px; }
  .iv-nav { font-size: 12px; }
}
