﻿/* ----- Sub Page (학과A) ----- */
.page-sub {
  --sub-hero-height: 360px;
  --sub-util-height: 56px;
  --sub-content-max: 1440px;
  --sub-side-padding: 80px;
  --sub-navy: #244261;
  --sub-navy-dark: #1a3349;
  --sub-navy-hover-bg: #e9eef3;
}

.site-header.site-header--sub {
  position: relative;
  height: var(--sub-hero-height) !important;
  min-height: var(--sub-hero-height) !important;
  overflow: hidden;
}

@media (min-width: 1241px) {
  .site-header.site-header--sub:has(.gnb:hover),
  .site-header.site-header--sub:has(.gnb:focus-within) {
    overflow: visible;
    z-index: var(--z-header-nav);
  }

  .site-header.site-header--sub:has(.gnb:hover) .sub-hero,
  .site-header.site-header--sub:has(.gnb:focus-within) .sub-hero {
    overflow: visible;
  }

  .site-header.site-header--sub:has(.gnb:hover) .site-header__front,
  .site-header.site-header--sub:has(.gnb:focus-within) .site-header__front {
    overflow: visible;
  }
}

/* sub-hero = 메인 .hero 와 동일 역할 */
.site-header--sub .sub-hero {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.site-header--sub .sub-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.site-header--sub .sub-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--color-overlay);
  pointer-events: none;
}

/* site-header__front — main.css 그대로 사용 (오버라이드 없음) */

.site-header--sub .sub-hero__content {
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding-bottom: 32px;
  pointer-events: none;
}

.site-header--sub .sub-hero__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--sub-content-max);
  margin: 0 auto;
  padding: 0 30px;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-header--sub .sub-hero__title {
  margin: 0 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.site-header--sub .sub-hero__desc {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.02em;
}

/* ----- Sub Util Bar (hero 하단, 독립 블록) ----- */
.sub-util-bar {
  position: relative;
  z-index: 3;
  width: 100%;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0 30px;
}

.sub-util-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  max-width: var(--sub-content-max);
  margin: 0 auto;
  min-height: 56px;
  border-right: 1px solid #e6e6e6;
}

.sub-util-bar__left {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  border-left: 1px solid #e6e6e6;
}

.sub-util-bar__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  color: #333;
  font-size: 18px;
  border-right: 1px solid #e6e6e6;
}

.sub-util-bar__home:hover {
  color: var(--primary);
}

.sub-util-bar__dropdown {
  position: relative;
  flex: 1;
  min-width: 0;
  border-right: 1px solid #e6e6e6;
}

.sub-util-bar__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--sub-navy);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sub-util-bar__trigger:hover,
.sub-util-bar__dropdown.is-open .sub-util-bar__trigger {
  color: var(--sub-navy-dark);
  background: #f8f8f8;
}

.sub-util-bar__arrow {
  font-size: 24px;
  color: var(--sub-navy);
  opacity: 0.65;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sub-util-bar__trigger:hover .sub-util-bar__arrow,
.sub-util-bar__dropdown.is-open .sub-util-bar__arrow {
  opacity: 1;
}

.sub-util-bar__dropdown.is-open .sub-util-bar__arrow {
  transform: rotate(180deg);
}

.sub-util-bar__menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  margin: 0;
  padding:0;
  list-style: none;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  margin-top: 5px;
  border-radius: 8px;
  border:1px solid #1a3349;
  overflow: hidden;
}

.sub-util-bar__dropdown.is-open .sub-util-bar__menu {
  display: block;
}

.sub-util-bar__menu a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--sub-navy);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sub-util-bar__menu a:hover,
.sub-util-bar__menu a.is-active {
  color: var(--sub-navy-dark);
  background: var(--sub-navy-hover-bg);
}

.sub-util-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0px 10px;
}

.sub-util-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: #555;
  font-size: 16px;
}

.sub-util-bar__btn:hover {
  color: var(--primary);
  background: #e9eef3;
}

.sub-main {
  padding: 48px 0 96px;
  background: #fff;
}

.sub-main__inner {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 48px;
  width: 100%;
  max-width: var(--sub-content-max);
  margin: 0 auto;
}

.sub-content {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.lnb {
  flex: 0 0 260px;
  width: 260px;
}

.lnb__head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 20px 16px;
  background: #244261 url("../images/main/quick_bg.png") center / cover no-repeat;
  text-align: center;
}

.lnb__head-text {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
  letter-spacing: -0.02em;
}

.lnb__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 0;
}

.lnb__item {
  border-bottom: 1px solid #e6e6e6;
}

.lnb__item:last-child {
  border-bottom: 0;
}

.lnb__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.lnb__item.is-active .lnb__link {
  background: #325966;
  color: #fff;
  font-weight: 700;
}

.lnb__item:not(.is-active) .lnb__link:hover {
  color: #325966;
  background: #f4f9ff;
}

.sub-breadcrumb {
  margin-bottom: 24px;
}

.sub-breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sub-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #555;
}

.sub-breadcrumb__item + .sub-breadcrumb__item::before {
  content: ">";
  margin-right: 8px;
  color: #999;
}

.sub-breadcrumb__item.is-current {
  color: #222;
  font-weight: 600;
}

.sub-breadcrumb__home {
  display: inline-flex;
  color: #555;
}

.sub-breadcrumb__home:hover {
  color: var(--primary);
}

.sub-page-title {
  margin: 0 0 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e6e6;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #111;
}

/* sub_tabs — 데스크톱은 기존 탭, 트리거 숨김 */
.sub-tabs-dropdown__trigger {
  display: none;
}

.sub-section__title {
  position: relative;
  margin: 0 0 20px;
  padding-bottom: 14px;
  font-size: 24px;
  font-weight: 600;
  color: #111;
  letter-spacing: -0.02em;
}

.sub-section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  background: var(--primary);
}

.sub-text {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.75;
  color: #444;
  word-break: keep-all;
}

.sub-list {
  margin: 0 0 24px;
  padding-left: 1.1em;
  color: #444;
  line-height: 1.75;
}

.sub-table-wrap {
  overflow-x: auto;
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #333;
}

.sub-table th,
.sub-table td {
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  font-size: 15px;
  text-align: center;
  vertical-align: middle;
  word-break: keep-all;
}

.sub-table thead th {
  background: #f3f5f8;
  font-weight: 600;
}

.sub-table tbody th {
  background: #f8f8f8;
  font-weight: 500;
}

@media (max-width: 1440px) {
  .sub-main__inner {
    padding-left:30px;
    padding-right:30px;
  }
}

@media (max-width: 1240px) {
  .page-sub {
    --sub-side-padding: 32px;
  }

  .site-header.site-header--sub.is-nav-open,
  .site-header.site-header--sub.is-nav-open .sub-hero,
  .site-header.site-header--sub.is-nav-open .site-header__front {
    overflow: visible;
  }

  .sub-util-bar__right {
    display: none;
  }

  .sub-util-bar__inner {
    border-right: none;
  }

  .sub-util-bar {padding: 0 0;}

  .site-header.site-header--sub {
    height: var(--sub-hero-height) !important;
    min-height: var(--sub-hero-height) !important;
  }
}

@media (max-width: 1024px) {
  .sub-main__inner {
    flex-direction: column;
    gap: 32px;
  }

  .lnb {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-sub {
    --sub-hero-height: 300px;
    --sub-side-padding: 24px;
  }

  .site-header.site-header--sub {
    height: var(--sub-hero-height) !important;
    min-height: var(--sub-hero-height) !important;
  }

  .sub-util-bar__inner {
    min-height: 48px;
    padding: 0 0px;
  }

  .sub-util-bar__home {
    width: 48px;
  }

  .sub-util-bar__trigger {
    min-height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }

  .sub-main {
    padding: 32px 0 72px;
  }

  .sub-page-title {
    margin-bottom: 24px;
    font-size: 28px;
  }
}

/* sub_tabs → sub-util-bar__dropdown 과 유사한 드롭다운 */
@media (max-width: 600px) {
  .sub-tabs-dropdown {
    position: relative;
    margin: 0 0 24px;
  }

  .sub-tabs-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #1a3349;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: var(--sub-navy);
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .sub-tabs-dropdown__trigger:hover,
  .sub-tabs-dropdown.is-open .sub-tabs-dropdown__trigger {
    color: var(--sub-navy-dark);
    background: #f8f8f8;
  }

  .sub-tabs-dropdown__arrow {
    font-size: 22px;
    color: var(--sub-navy);
    opacity: 0.65;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .sub-tabs-dropdown__trigger:hover .sub-tabs-dropdown__arrow,
  .sub-tabs-dropdown.is-open .sub-tabs-dropdown__arrow {
    opacity: 1;
  }

  .sub-tabs-dropdown.is-open .sub-tabs-dropdown__arrow {
    transform: rotate(180deg);
  }

  .sub-tabs-dropdown .sub_tabs {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #1a3349;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }

  .sub-tabs-dropdown.is-open .sub_tabs {
    display: flex;
  }

  .sub-tabs-dropdown .sub_tabs li {
    flex: none;
    border: none;
    border-bottom: 1px solid #e6e6e6;
  }

  .sub-tabs-dropdown .sub_tabs li + li {
    margin-left: 0;
  }

  .sub-tabs-dropdown .sub_tabs li:last-child {
    border-bottom: none;
  }

  .sub-tabs-dropdown .sub_tabs li a {
    display: block;
    height: auto;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
    color: var(--sub-navy);
    justify-content: flex-start;
  }

  .sub-tabs-dropdown .sub_tabs li a:hover {
    background: var(--sub-navy-hover-bg);
  }

  .sub-tabs-dropdown .sub_tabs li.on,
  .sub-tabs-dropdown .sub_tabs li.subTab_sub_on,
  .sub-tabs-dropdown .sub_tabs li.active {
    z-index: auto;
    border-color: transparent;
    background: var(--sub-navy-hover-bg);
  }

  .sub-tabs-dropdown .sub_tabs li.on a,
  .sub-tabs-dropdown .sub_tabs li.subTab_sub_on a,
  .sub-tabs-dropdown .sub_tabs li.active a {
    font-weight: 600;
    color: var(--sub-navy-dark) !important;
    background: none;
  }
}