﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: #222;
  background: #f5f5f3;
}

body.menu-open {
  overflow: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

:root {
  --navy:      #1a3a5c;
  --navy-dark: #122840;
  --navy-soft: #5b74a8;
  --red:       #c0392b;
  --white:     #ffffff;
  --gray-100:  #f8f8f6;
  --gray-200:  #eceae4;
  --gray-300:  #ddd8d0;
  --gray-500:  #888880;
  --gray-700:  #444441;
  --inner:     1280px;
}

/* topbar */
.topbar {
  background: var(--navy-dark);
  height: 34px;
}
.topbar-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.topbar-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

/* header */
.header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--gray-300);
}
.header-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 40px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.logo-ko {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  position: relative;
}
.hamburger span {
  position: absolute;
  left: 8px;
  width: 26px;
  height: 2px;
  background: var(--navy);
  transition: .25s;
}
.hamburger span:nth-child(1) { top: 12px; }
.hamburger span:nth-child(2) { top: 20px; }
.hamburger span:nth-child(3) { top: 28px; }

.hamburger.active span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.gnb {
  flex: 1;
  padding-left: 60px;
}
.gnb > ul {
  display: flex;
  justify-content: space-around;
  width: 100%;
}
.gnb > ul > li {
  position: relative;
  flex: 1;
  text-align: center;
}
.gnb > ul > li > a {
  display: block;
  line-height: 82px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}
.sub-menu {
  position: absolute;
  top: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border-top: 2px solid var(--navy);
  min-width: 210px;
  padding: 10px 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}
.sub-menu-group {
  padding: 4px 0 10px;
  border-bottom: 1px dashed #d7deea;
  margin-bottom: 8px;
}
.sub-menu-title {
  display: block;
  padding: 5px 18px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-soft);
}
.gnb > ul > li:hover .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  color: #555;
}
.sub-menu a.active,
.sub-menu a:hover {
  background: #f6f7fb;
  color: var(--navy);
}
.sub-menu-major {
  font-weight: 600;
}

.gnb-underline {
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 60%, var(--red) 100%);
}

/* ── 게시판 공통 레이아웃 ─────────────────────── */
.board-wrap  { display:flex; gap:28px; max-width:1200px; margin:0 auto; padding:40px 24px 80px; }
.board-main  { flex:1; min-width:0; }

/* ── 좌측 사이드바 (협회소개 스타일) ─────────── */
.board-sidebar { width:220px; flex-shrink:0; }

.side-header {
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 18px 22px;
  letter-spacing: -.3px;
}

.side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border: 1px solid #dde3ec;
  border-top: none;
}
.side-list li {
  border-bottom: 1px solid #e8edf5;
}
.side-list li:last-child { border-bottom: none; }
.side-list li a {
  display: block;
  padding: 14px 22px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  background: #ffffff;
  transition: background .15s, color .15s;
}
.side-list li a:hover {
  background: #f0f4fb;
  color: var(--navy);
}
.side-list li.active a {
  background: #e8f0fb;
  color: var(--navy);
  font-weight: 700;
  border-left: 4px solid var(--navy);
  padding-left: 18px;
}

/* sub visual */
.sub-visual {
  position: relative;
  height: 132px;
  background: #2a5b87;
  border-top: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}
.sub-visual-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.visual-icon {
  position: absolute;
  fill: none;
  stroke: rgba(255,255,255,0.22);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.visual-icon-leg {
  width: 88px;
  height: 88px;
  left: 7%;
  top: 24px;
  animation: iconFloat 5.6s ease-in-out infinite;
}
.visual-icon-brace {
  width: 74px;
  height: 74px;
  right: 18%;
  top: 28px;
  animation: iconFloat 6.2s ease-in-out infinite 0.6s;
}
.visual-icon-arm {
  width: 78px;
  height: 78px;
  right: 7%;
  top: 18px;
  animation: iconFloat 5s ease-in-out infinite 0.2s;
}
.sub-visual-inner {
  max-width: var(--inner);
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.sub-visual-text {
  font-family: 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,.16);
}
.flow-text {
  display: inline-block;
  background: linear-gradient(
    100deg,
    #ffffff 0%,
    #8dd3ff 18%,
    #ffe39a 34%,
    #ffffff 48%,
    #86ffd8 64%,
    #7fb6ff 82%,
    #ffffff 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textFlow 7.2s linear infinite;
}

@keyframes textFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 280% 50%; }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .flow-text {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
    animation: none;
  }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* layout */
.sub-container {
  padding: 42px 0 60px;
  background: #fff;
}
.sub-layout {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 46px;
}

/* sidebar */
.sub-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 41, 68, 0.08);
}
.side-title {
  background: #1f4f79;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 17px 20px;
  letter-spacing: -0.2px;
}
.side-menu li {
  border-bottom: 1px solid #edf1f6;
}
.side-menu a {
  display: block;
  padding: 14px 18px;
  font-size: 15px;
  color: #30465f;
  font-weight: 500;
  transition: background .2s, color .2s, padding-left .2s;
}
.side-menu > li:not(.menu-group) > a:hover {
  background: #f7fafe;
  color: #1f4f79;
  padding-left: 22px;
}
.side-menu > li.active > a {
  background: #edf5ff;
  color: #0f4b80;
  font-weight: 700;
}
.menu-group .side-group-btn {
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #1f4f79;
  background: #f4f8fd;
  position: relative;
  transition: background .2s, color .2s;
}
.menu-group .side-group-btn::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid #49729a;
  border-bottom: 2px solid #49729a;
  position: absolute;
  right: 20px;
  top: 48%;
  transform: translateY(-50%) rotate(45deg);
}
.menu-group .side-group-btn:hover {
  background: #eaf2fb;
}
.side-submenu {
  display: none;
  padding: 10px 10px 12px;
  background: #ffffff;
}
.menu-group.open .side-submenu {
  display: block;
}
.menu-group.open .side-group-btn::after {
  transform: translateY(-50%) rotate(225deg);
}
.side-submenu li {
  border: none;
}
.side-submenu a {
  padding: 9px 12px 9px 30px;
  margin: 1px 0;
  border-radius: 12px;
  font-size: 14px;
  position: relative;
}
.side-submenu a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8ea0b5;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.side-submenu li.active a {
  background: #e9f3ff;
  color: #0f4b80;
  font-weight: 700;
}
.side-submenu li.active a::before {
  background: #2e6fa7;
}
.side-submenu a:hover {
  background: #f4f8fd;
}

/* content */
.sub-content {
  min-width: 0;
}
.content-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--gray-300);
  margin-bottom: 28px;
}
.content-head h1 {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.5px;
}
.breadcrumb {
  font-size: 12px;
  color: #888;
}

.about-visual-wrap {
  max-width: 780px;
}
.about-visual-card {
  border: 1px solid #d9e3f0;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(17, 47, 77, 0.08);
}
.about-image {
  display: block;
  width: 100%;
  max-width: 780px;
  height: auto;
}
.image-notice {
  margin-top: 10px;
  font-size: 13px;
  color: #9a2f2f;
}
.map-actions {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #f5f9ff;
  border: 1px solid #d8e5f7;
}
.map-address {
  font-size: 15px;
  font-weight: 600;
  color: #234f78;
  margin-bottom: 12px;
}
.map-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: #2e6fa7;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.map-btn.alt {
  background: #495867;
}
.map-btn:hover {
  filter: brightness(1.05);
}

/* footer */
.footer {
  background: #2c2c2a;
  padding: 34px 0;
  border-top: 3px solid var(--navy);
}
.footer-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.footer-logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding-right: 40px;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.footer-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
}
.f-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.footer-info p {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  line-height: 2;
}

/* mobile overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  transition: .25s;
  z-index: 89;
}
.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* responsive */
/* ── 사이드바 토글 화살표 ── */
.side-header-arrow {
  display: none;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transition: transform .22s;
  flex-shrink: 0;
}
.board-sidebar.sb-closed .side-header-arrow { transform: rotate(-90deg); }
.board-sidebar.sb-closed .side-list,
.board-sidebar.sb-closed .sidebar-ql      { display: none !important; }

@media (max-width: 1024px) {
  .topbar { display: none; }

  .header-inner {
    height: 74px;
    padding: 0 18px;
  }

  .logo-img {
    width: 52px;
    height: 52px;
  }

  .logo-ko {
    font-size: 18px;
    white-space: normal;
    line-height: 1.2;
  }

  .hamburger {
    display: block;
  }

  .gnb {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,.15);
    z-index: 90;
    padding: 86px 0 24px;
    overflow-y: auto;
    transition: .28s;
  }

  .gnb.mobile-open {
    right: 0;
  }

  .gnb > ul {
    display: block;
  }

  .gnb > ul > li {
    border-bottom: 1px solid #ececec;
  }

  .gnb > ul > li > a {
    line-height: 1.2;
    padding: 14px 20px;
    font-size: 14px;
  }

  /* ── 모바일 GNB 서브메뉴: 절대위치 완전 해제 ── */
  .gnb > ul > li {
    overflow: hidden !important;
    text-align: left !important;
  }
  .sub-menu {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    min-width: unset !important;
    border-top: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1 !important;
    pointer-events: auto;
    display: none;
    padding: 0 0 10px;
    background: #f0f4fb;
  }
  .sub-menu-group {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 4px;
  }

  .gnb > ul > li.open .sub-menu {
    display: block !important;
  }

  .sub-menu a {
    padding: 9px 24px;
    font-size: 12.5px;
    color: #0a2155;
    border-bottom: 1px solid #e0e8f5;
    display: block;
  }
  .sub-menu a:last-child { border-bottom: none; }

  .sub-visual {
    height: 116px;
    background-position: center;
  }
  .visual-icon-leg {
    width: 70px;
    height: 70px;
    left: 1.5%;
    top: 26px;
  }
  .visual-icon-brace {
    width: 58px;
    height: 58px;
    right: 16%;
    top: 34px;
  }
  .visual-icon-arm {
    width: 60px;
    height: 60px;
    right: 3%;
    top: 24px;
  }

  .sub-visual-inner {
    padding: 0 18px;
  }

  .sub-visual-text {
    font-size: 20px;
    line-height: 1.4;
  }

  .sub-layout {
    padding: 0 18px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sub-sidebar {
    order: 2;
    border-radius: 16px;
  }

  .sub-content {
    order: 1;
  }

  .content-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .content-head h1 {
    font-size: 26px;
  }

  .about-visual-wrap {
    max-width: 100%;
  }

  .about-visual-card {
    border-radius: 14px;
  }

  .map-actions {
    padding: 14px;
    border-radius: 12px;
  }

  .map-address {
    font-size: 14px;
  }

  .footer-inner {
    padding: 0 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-logo-area {
    padding-right: 0;
    border-right: none;
  }

  /* ── 게시판 레이아웃 모바일 ── */
  .board-wrap {
    flex-direction: column;
    padding: 16px 14px 48px;
    gap: 0;
  }
  .board-sidebar {
    width: 100%;
    margin-bottom: 18px;
    border-radius: 8px;
    overflow: hidden;
  }
  .board-main { width: 100%; }

  /* 사이드바 헤더 토글 */
  .side-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
  }
  .side-header-arrow { display: block; }

  /* 테이블 가로 스크롤 */
  .list-card,
  .elist-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .list-table, .elist-table { min-width: 560px; }

  /* 헤더 영역 */
  .board-title-h    { font-size: 18px; margin-bottom: 10px; }
  .board-breadcrumb { font-size: 11px; }
  .list-head        { margin-bottom: 10px; }

  /* 검색박스 */
  .board-search input { width: 110px; font-size: 12px; }
  .write-btn          { font-size: 12.5px; padding: 8px 14px; }

  /* 갤러리 */
  .gallery-grid-board { grid-template-columns: repeat(2, 1fr) !important; }

  /* 이수확인 lookup */
  .clookup-box { padding: 22px 16px 28px; }

  /* 관계법령 카드 */
  .rl-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  .sub-visual-text {
    font-size: 18px;
  }
  .visual-icon-leg,
  .visual-icon-arm,
  .visual-icon-brace {
    opacity: .65;
  }

  .content-head h1 {
    font-size: 22px;
  }

  .map-btn {
    width: 100%;
  }

  .side-title {
    font-size: 18px;
    padding: 18px 18px;
  }

  .side-menu > li:not(.menu-group) > a {
    padding: 14px 16px;
    font-size: 14px;
  }
  .menu-group .side-group-btn {
    padding: 14px 16px;
    font-size: 15px;
  }
  .side-submenu {
    padding: 8px 8px 12px;
  }
  .side-submenu a {
    padding: 9px 12px 9px 28px;
    font-size: 13px;
  }
}

