/* 메타키움 공개 사이트 디자인 레이어 — 기준: DESIGN.md (방문 교사 페르소나).
   기존 CSS 위에 덮어쓰기만 한다. 요소를 지우거나 숨기지 않는다. */
:root {
  --mk-ink: #111111;
  --mk-ink-2: #3d3d3d;
  --mk-muted: #6b6b6b;
  --mk-line: #e4e4e4;
  --mk-surface: #f5f5f3;
  --mk-accent: #ed6d08;
  --mk-accent-hover: #d85f00;
  --mk-accent-strong: #c45500;
  --mk-radius: 10px;
  --mk-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --mk-bar-h: 64px;
}

body {
  color: var(--mk-ink);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ---------- 읽기 쉬운 본문 ---------- */
:where(main) :where(p, li) {
  line-height: 1.65;
}

/* ---------- 키보드 포커스 ---------- */
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 3px solid var(--mk-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 헤더: 항상 위에 붙고, 문의 버튼이 보인다 ---------- */
header#header {
  position: sticky;
  top: 0;
  z-index: 1001;
  box-shadow: 0 1px 0 var(--mk-line);
}
header#header .inner .header_gnb .gnb > ul > li > a {
  position: relative;
  transition: color 0.2s;
}
header#header .inner .header_gnb .gnb > ul > li > a:hover,
header#header.on .inner .header_gnb .gnb > ul > li > a:hover {
  color: var(--mk-accent);
}
header#header .inner .header_gnb .gnb > ul > li .depth2 li a {
  font-size: 17px;
  padding: 16px 0;
}
header#header .inner .header_gnb .gnb > ul > li .depth2 li a:hover {
  color: var(--mk-ink);
  background: #fff;
}
.mk-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--mk-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.mk-cta:hover {
  background: var(--mk-accent-hover);
}
header#header.on .mk-cta {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
@media screen and (max-width: 1200px) {
  header#header .inner .header_gnb .gnb > ul > li > a {
    padding-left: 28px;
    padding-right: 28px;
  }
}
@media screen and (max-width: 1024px) {
  header#header .inner .header_gnb .gnb > ul > li > a {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 16px;
  }
  .mk-cta {
    padding: 0 14px;
    font-size: 14px;
  }
}

/* ---------- 모바일 햄버거 메뉴 ---------- */
@media screen and (max-width: 820px) {
  .ham {
    position: sticky;
    top: 0;
    z-index: 1002;
    height: 0;
  }
  .ham .ham_btn {
    top: 14px;
    left: 8px;
    width: 44px;
    height: 44px;
    padding: 12px 8px;
    border-radius: 8px;
  }
  .ham .ham_btn span {
    margin-bottom: 6px;
  }
  .ham .ham_box {
    position: fixed;
    top: 70px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 70px - var(--mk-bar-h) - 24px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  }
  .ham .ham_box > ul > li > a {
    padding: 14px 0;
    font-size: 17px;
    font-weight: 600;
    border-bottom-color: rgba(255, 255, 255, 0.25);
  }
  .ham .ham_box > ul > li .depth2 {
    padding-top: 6px;
    padding-bottom: 10px;
  }
  .ham .ham_box > ul > li .depth2 li a {
    font-size: 15px;
    padding: 12px 10px;
    border-radius: 8px;
  }
}

/* ---------- 오른쪽 퀵메뉴 ---------- */
.side_menu {
  top: 24%;
  border: 0;
  box-shadow: var(--mk-shadow), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.side_menu:focus-within {
  transform: translateX(0);
}
.side_menu .menu a {
  min-height: 48px;
  border-bottom-color: var(--mk-line);
  font-weight: 600;
}
.side_menu .menu a:hover {
  background: var(--mk-ink);
}
.side_menu .menu:nth-of-type(2) a:not(:hover) {
  color: var(--mk-accent-strong);
}

/* 휴대폰: 본문을 가리던 퀵메뉴를 하단 고정 바로 바꾼다 */
@media screen and (max-width: 820px) {
  body {
    padding-bottom: calc(var(--mk-bar-h) + env(safe-area-inset-bottom));
  }
  .side_menu,
  .side_menu:hover,
  .side_menu:focus-within {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    display: flex;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -1px 0 var(--mk-line), 0 -8px 24px rgba(0, 0, 0, 0.06);
  }
  .mk-cta {
    display: none;
  }
  .side_menu .menu {
    flex: 1 1 0;
    min-width: 0;
  }
  .side_menu .menu:first-of-type {
    flex-grow: 1.35;
  }
  .side_menu .menu a {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    height: var(--mk-bar-h);
    min-height: 0;
    padding: 6px 2px;
    border-bottom: 0;
    text-align: center;
  }
  .side_menu .menu + .menu a {
    border-left: 1px solid var(--mk-line);
  }
  .side_menu .menu_img img {
    width: 22px;
    display: block;
  }
  .side_menu .menu_txt p {
    font-size: 11.5px;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: -0.02em;
  }
}

/* ---------- 이동경로(브레드크럼) ---------- */
.small_menu {
  font-size: 14px;
  color: var(--mk-muted);
  padding: 18px 0 14px;
  border-bottom-color: var(--mk-line);
}
.small_menu a:hover {
  color: var(--mk-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 홈: 솔루션 카드 ---------- */
main .solution .solution_wrap .solution_box {
  border-radius: 14px;
}
@media (max-width: 650px) {
  #main .solution .solution_wrap {
    flex-wrap: wrap;
    height: auto;
    gap: 10px;
  }
  #main .solution .solution_wrap .solution_box,
  #main .solution .solution_wrap .solution_box:hover {
    flex: 0 0 calc(50% - 5px);
    height: 210px;
  }
  #main .solution .solution_wrap .solution_box .txt {
    top: 14px;
    left: 14px;
    transform: none;
    width: calc(100% - 28px);
  }
  #main .solution .solution_wrap .solution_box .txt p:nth-of-type(1) {
    font-size: 17px;
    margin-bottom: 4px;
  }
  #main .solution .solution_wrap .solution_box .txt p:nth-of-type(2) {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
  }
  #main .solution .solution_wrap .solution_box .btn {
    left: 14px;
    bottom: 14px;
  }
}

/* ---------- 카드형 목록(홈 PR, 소식) ---------- */
main .pr_center .pr_swiper_wrap .pr_slide .swiper-slide .pr_txt {
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 600;
  align-items: center;
  gap: 12px;
}
.news .inner .news_wrap {
  row-gap: 40px;
}
.news .inner .news_wrap .news_box .new_img {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.news .inner .news_wrap .news_box .new_img img {
  transition: transform 0.4s ease;
}
.news .inner .news_wrap .news_box:hover .new_img img {
  transform: scale(1.03);
}
.news .inner .news_wrap .news_box .new_txt {
  padding: 14px 4px 0;
}
.news .inner .news_wrap .news_box .new_txt .new_title p {
  font-size: 18px;
  font-weight: 700;
}
.news .inner .news_wrap .news_box .new_txt .new_date {
  font-size: 14px;
  color: var(--mk-muted);
}
.news .inner .news_wrap .news_box .new_txt .new_date .txt {
  font-weight: 500;
}
.news .inner .news_wrap .news_box .new_txt .new_date .btn a {
  width: auto;
  min-width: 84px;
  padding: 8px 14px;
  border-radius: 999px;
  border-color: var(--mk-ink);
  color: var(--mk-ink);
  transition: background-color 0.2s, color 0.2s;
}
.news .inner .news_wrap .news_box .new_txt .new_date .btn a:hover {
  background: var(--mk-ink);
  color: #fff;
}

.detail_contents {
  font-size: 16px;
  line-height: 1.75;
}
.detail_contents :where(p, span, div, li) {
  font-size: inherit;
  line-height: inherit;
}
.detail_contents img {
  border-radius: 12px;
}

/* ---------- 문의 폼(홈, 문의 페이지 공통) ---------- */
main .contact .inner .contact_wrap .contact_left p {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}
main .contact .inner .contact_wrap .contact_right .input_box .box_1 {
  gap: 10px;
  margin-bottom: 10px;
}
main .contact .inner .contact_wrap .contact_right .input_box input,
main .contact .inner .contact_wrap .contact_right .input_box textarea {
  height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--mk-radius);
  background: #fff;
  color: var(--mk-ink);
  font-size: 16px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
main .contact .inner .contact_wrap .contact_right .input_box textarea {
  height: 180px;
  padding: 14px 16px;
  line-height: 1.6;
  resize: vertical;
}
main .contact .inner .contact_wrap .contact_right .input_box input::placeholder,
main .contact .inner .contact_wrap .contact_right .input_box textarea::placeholder {
  color: var(--mk-muted);
}
main .contact .inner .contact_wrap .contact_right .input_box input:focus,
main .contact .inner .contact_wrap .contact_right .input_box textarea:focus {
  border-color: var(--mk-accent);
  box-shadow: 0 0 0 3px rgba(237, 109, 8, 0.45);
}
main .contact .inner .contact_wrap .contact_right .input_bottom {
  margin-top: 8px;
  gap: 16px;
}
main .contact .inner .contact_wrap .contact_right .check_wrap {
  padding: 6px 0;
}
main .contact .inner .contact_wrap .contact_right .check_wrap .check_box {
  gap: 10px;
  margin-bottom: 12px;
}
main .contact .inner .contact_wrap .contact_right .check_wrap .check_box input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: var(--mk-accent);
  cursor: pointer;
}
main .contact .inner .contact_wrap .contact_right .check_wrap .check_box label {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}
main .contact .inner .contact_wrap .contact_right .check_wrap .check_box label span {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
main .contact .inner .contact_wrap .contact_right .input_bottom .submit_btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  min-width: 160px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--mk-radius);
  font-size: 17px;
  font-weight: 700;
  transition: background-color 0.2s;
}
main .contact .inner .contact_wrap .contact_right .input_bottom .submit_btn:hover {
  background: var(--mk-accent-hover);
}
main .contact .inner .contact_wrap .contact_right .input_bottom .submit_btn:focus-visible {
  outline-color: #fff;
}
@media (max-width: 650px) {
  #main .contact .inner .contact_wrap .contact_right .input_box .box_1 {
    flex-direction: column;
  }
}
@media (max-width: 500px) {
  #main .contact .inner .contact_wrap .contact_right .input_bottom {
    align-items: stretch;
  }
  #main .contact .inner .contact_wrap .contact_right .input_bottom .submit_btn {
    width: 100%;
  }
}

/* ---------- 푸터 ---------- */
footer {
  background: var(--mk-surface);
  color: var(--mk-ink-2);
}
footer .inner .footer_left {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}
footer .inner .footer_left .txt_box {
  line-height: 1.4;
}
footer .inner .footer_left .txt_box a {
  display: inline-block;
  padding: 6px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--mk-ink);
}
footer .inner .footer_left .txt_box a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer .inner .copyright p,
footer .inner .copyright span {
  font-size: 13px;
  color: var(--mk-muted);
}
footer .inner .footer_right .sns {
  gap: 8px;
}
footer .inner .footer_right .sns a {
  width: 36px;
  border-radius: 50%;
  transition: transform 0.2s;
}
footer .inner .footer_right .sns a:hover {
  transform: translateY(-2px);
}
footer .inner .footer_right select {
  height: 44px;
  border-color: #c9c9c9;
  border-radius: 8px;
  background-color: #fff;
  color: var(--mk-ink-2);
  font-size: 14px;
  cursor: pointer;
}

/* 약관 팝업: 휴대폰 화면 안에 들어오게 */
@media (max-width: 768px) {
  .info_wrap01,
  .info_wrap02,
  .info_wrap03,
  .info_wrap04,
  .info_wrap05 {
    width: calc(100vw - 32px);
    max-width: 420px;
    height: auto;
    max-height: calc(100vh - 120px);
    overflow: hidden;
  }
  .info_wrap01 .view-detail,
  .info_wrap02 .view-detail,
  .info_wrap03 .view-detail,
  .info_wrap04 .view-detail,
  .info_wrap05 .view-detail {
    max-height: calc(100vh - 230px) !important;
  }
}

/* ---------- 이벤트 팝업 (관리자 > 팝업 관리) ---------- */
.mk_popups {
  --pad: 24px;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: block;
  background-color: rgba(0, 0, 0, 0.6);
  animation: mk-popup-dim 0.25s ease-out;
}
.mk_popup {
  position: absolute;
  left: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--x, 50) / 100);
  top: calc(var(--pad) + (100% - 2 * var(--pad)) * var(--y, 50) / 100);
  transform: translate(calc(var(--x, 50) * -1%), calc(var(--y, 50) * -1%));
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100% - 2 * var(--pad)));
  background-color: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  animation: mk-popup-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mk_popup img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}
.mk_popup_bar {
  display: flex;
  background-color: #1a1a1a;
}
.mk_popup_bar button {
  flex: 1;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.mk_popup_bar button + button {
  flex: 0 0 34%;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}
.mk_popup_bar button:hover {
  background-color: rgba(255, 255, 255, 0.12);
}
.mk_popup_bar button:focus-visible {
  outline-offset: -3px;
  border-radius: 0;
}
@keyframes mk-popup-dim {
  from {
    background-color: rgba(0, 0, 0, 0);
  }
}
@keyframes mk-popup-in {
  from {
    opacity: 0;
    scale: 0.94;
  }
}
@media (max-width: 768px) {
  .mk_popups {
    --pad: 16px;
  }
  .mk_popup {
    --x: 50 !important;
    --y: 50 !important;
    width: min(420px, calc(100% - 2 * var(--pad)));
  }
  .mk_popup img {
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
  }
}

/* ---------- 동작 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
