@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: #f4f4f2;
}

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-mid:  #2a5f8f;
  --red:       #c0392b;
  --red-light: #e74c3c;
  --green:     #0f6e56;
  --white:     #ffffff;
  --gray-100:  #f8f8f6;
  --gray-200:  #eeede9;
  --gray-300:  #dddbd4;
  --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);
}
.topbar-links a:hover { color: #fff; }

/* header */
.header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--gray-300);
}
.header.gnb-open { box-shadow: 0 4px 24px rgba(0,0,0,.12); }

.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;
  min-width: 0;
}
.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: transparent !important;
  border-radius: 50%;
}
.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;
  flex-shrink: 0;
}
.hamburger span {
  position: absolute;
  left: 8px;
  width: 26px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  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;
  padding: 0 8px;
  line-height: 82px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}
.gnb > ul > li > a:hover,
.gnb > ul > li.menu-edu > a {
  color: var(--red);
}

.sub-menu {
  position: absolute;
  top: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--white);
  border-top: 2px solid var(--navy);
  border-radius: 0 0 6px 6px;
  padding: 10px 0;
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
}
.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-mid);
}
.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: var(--gray-700);
  white-space: nowrap;
}
.sub-menu a:hover {
  background: var(--gray-100);
  color: var(--navy);
}
.sub-menu-major {
  font-weight: 600;
}

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

/* hero */
.hero {
  position: relative;
  height: 285px;
  overflow: hidden;
}
.hero-slider,
.hero-slide {
  width: 100%;
  height: 100%;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
}
.hero-slide.active {
  opacity: 1;
  z-index: 2;
}
.slide-bg {
  position: absolute;
  inset: 0;
}
.slide-bg-1 {
  background: linear-gradient(120deg, #122840 0%, #1a3a5c 55%, #275b88 100%);
}
.slide-bg-2 {
  background: linear-gradient(120deg, #10243b 0%, #1b4369 55%, #2d678f 100%);
}

.hero-bg-img {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  width: 100%;
  height: auto;
  opacity: 0.28;
  mix-blend-mode: screen;
  pointer-events: none;
}

.slide-center {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-content.centered {
  max-width: 760px;
  text-align: center;
  padding: 0 140px;
}
.slide-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 10px;
  letter-spacing: -0.6px;
}
.slide-title em {
  font-style: normal;
  color: #8ce0d4;
}
.slide-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  margin-bottom: 16px;
}
.slide-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mi-label {
  font-size: 11px;
  color: rgba(255,255,255,0.58);
}
.mi-val {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.slide-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  display: inline-block;
  padding: 11px 24px;
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
}
.btn-primary:hover { background: #e8f0f8; }

.slide-link {
  font-size: 14px;
  color: rgba(255,255,255,0.86);
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}
.slide-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.5);
}
.slide-link:hover { color: #fff; }

.slider-controls {
  position: absolute;
  bottom: 18px;
  right: 40px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sc-btn,
.sc-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-dots {
  display: flex;
  gap: 8px;
}
.sc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background .25s, width .25s;
}
.sc-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}
.sc-play {
  font-size: 8px;
  letter-spacing: 1px;
}

/* main */
.main-content { background: var(--white); }
.main-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 48px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.section-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--red);
  border-radius: 2px;
}
.more-link {
  font-size: 12px;
  color: var(--gray-500);
}

/* board */
.board-tabs {
  display: flex;
  border-bottom: 2px solid var(--navy);
}
.btab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  border-radius: 6px 6px 0 0;
}
.btab.active {
  background: var(--navy);
  color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.notice-list {
  border: 1px solid var(--gray-300);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.nl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--gray-200);
}
.nl-item:last-child { border-bottom: none; }
.nl-item:hover { background: var(--gray-100); }
.nl-title {
  flex: 1;
  font-size: 13.5px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nl-date {
  font-size: 11.5px;
  color: var(--gray-500);
  flex-shrink: 0;
}

.more-btn {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 12px 0;
}
.more-btn:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 110px 110px;
  gap: 14px;
}
.gallery-item {
  overflow: hidden;
  position: relative;
}
.gi-img {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease;
}
.gallery-item:hover .gi-img { transform: scale(1.03); }
.gi-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gi-placeholder svg {
  width: 62px;
  height: 48px;
  opacity: 0.42;
}
.gi-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  font-size: 13px;
  color: #fff;
  font-weight: 700;
}

/* quick links */
.quicklinks {
  background: var(--navy);
}
.quicklinks-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
}
.ql-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.ql-item:last-child { border-right: none; }
.ql-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.ql-highlight {
  background: var(--red);
  color: #fff !important;
}
.ql-highlight:hover {
  background: var(--red-light) !important;
}
.ql-icon {
  width: 32px;
  height: 32px;
}
.ql-icon svg {
  width: 100%;
  height: 100%;
}

/* 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;
  background: transparent !important;
  border-radius: 50%;
}
.f-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.footer-info {
  flex: 1;
}
.footer-info p {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  line-height: 2;
}

/* mobile menu 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 */
@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;
    overflow: hidden;           /* 서브메뉴 GNB 패널 밖 노출 차단 */
    text-align: left !important;
  }

  .gnb > ul > li > a {
    line-height: 1.2;
    padding: 14px 20px;
    font-size: 14px;            /* 대메뉴 크기 축소 */
  }

  .sub-menu {
    position: relative !important;   /* absolute 완전 해제 */
    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;
    display: block;
    border-bottom: 1px solid #e0e8f5;
  }
  .sub-menu a:last-child { border-bottom: none; }

  .hero {
    height: 260px;
  }

  .hero-icon {
    opacity: .55;
  }

  .hero-icon-1,
  .hero-icon-3 {
    width: 110px;
    height: 110px;
  }

  .hero-icon-2,
  .hero-icon-4 {
    width: 84px;
    height: 84px;
  }

  .hero-icon-1 { left: 4%; }
  .hero-icon-2 { left: 18%; }
  .hero-icon-3 { right: 4%; }
  .hero-icon-4 { right: 18%; }

  .slide-content.centered {
    padding: 0 32px;
    max-width: 100%;
  }

  .slide-title {
    font-size: 24px;
  }

  .slide-desc {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .slide-meta {
    gap: 14px;
  }

  .mi-val {
    font-size: 13px;
  }

  .slide-actions {
    flex-direction: column;
    gap: 10px;
  }

  .slider-controls {
    right: 18px;
    bottom: 14px;
  }

  .main-inner {
    padding: 30px 18px;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .board-tabs {
    overflow-x: auto;
  }

  .btab {
    flex: 0 0 auto;
    padding: 10px 18px;
  }

  .nl-item {
    padding: 12px 14px;
  }

  .nl-title {
    font-size: 13px;
    white-space: normal;
    line-height: 1.45;
  }

  .nl-date {
    font-size: 11px;
    align-self: flex-start;
  }

  .gallery-grid {
    grid-template-rows: 110px 110px;
    gap: 10px;
  }

  .quicklinks-inner {
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ql-item {
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 110px;
  }

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

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

@media (max-width: 640px) {
  .logo-ko {
    font-size: 16px;
  }

  /* ── 히어로 모바일 안정화 ── */
  .hero {
    height: 340px;   /* 내용이 들어갈 충분한 높이 */
  }

  .slide-content.centered {
    padding: 0 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
  }

  .slide-title {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 8px;
  }

  .slide-desc {
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.6;
  }

  /* 메타 항목: 세로 쌓기 대신 가로 wrap */
  .slide-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    margin-bottom: 12px;
  }

  .meta-item {
    align-items: center;
  }

  .mi-label { font-size: 10px; }
  .mi-val   { font-size: 12px; }

  .slide-actions {
    gap: 8px;
  }

  .btn-primary {
    padding: 9px 20px;
    font-size: 13px;
  }

  .slider-controls {
    right: 12px;
    bottom: 10px;
    gap: 6px;
  }

  .sc-btn, .sc-play { width: 26px; height: 26px; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 95px 95px;
  }

  .gi-caption {
    padding: 10px 10px 8px;
    font-size: 12px;
  }

  .footer-info p {
    line-height: 1.8;
    font-size: 11.5px;
  }
}
