#site-header,
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header {
  height: var(--header-h);
  background: rgba(247, 245, 241, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#site-header.scrolled .site-header,
.site-header.scrolled {
  background: rgba(247, 245, 241, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(7, 17, 31, 0.06);
}

.inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: normal;
  letter-spacing: normal;
  color: inherit;
}

/* 이 파일은 헤더/푸터 스타일을 함께 담고 있어 .brandLogo가 겹칩니다. */
.site-header .brandLogo {
  display: block;
  width: auto;
  height: 3.5rem;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem clamp(1.15rem, 2.4vw, 2.35rem);
  flex: 1;
  min-width: 0;
  /* Prevent nav labels from painting under account/logout and stealing/wrong-hit clicks */
  overflow: visible;
  position: relative;
  z-index: 1;
}

.navLink {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-700);
  padding: 0.35rem 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

/* bold ?덈퉬瑜?誘몃━ ?뺣낫??hover ??硫붾돱媛 諛由ъ? ?딅룄濡???*/
.navLink::before {
  content: attr(data-text);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}

.navLink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.navLink:hover,
.active {
  color: var(--navy-900);
  font-weight: 700;
}

.navLink:hover::after,
.active::after {
  transform: scaleX(1);
}

.site-header .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  max-width: 100%;
}

.accountSlot {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.account {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  color: var(--ink-700);
  font-size: 0.86rem;
  white-space: nowrap;
}

.accountUser {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--navy-900);
  transition: color 0.2s ease;
}

a.accountUser:hover {
  color: var(--gold-600);
}

.userIcon {
  flex-shrink: 0;
  color: currentColor;
}

.userAvatar {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-sizing: border-box;
  background: var(--navy-100, #e8eef5);
  border: 1.6px solid var(--navy-900);
}

.userAvatarFallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.6px solid currentColor;
  color: currentColor;
  background: transparent;
}

.userAvatarFallback .userIcon {
  width: 14px;
  height: 14px;
}

.iconAction:hover .userAvatar,
.iconAction:focus-visible .userAvatar {
  border-color: rgba(255, 255, 255, 0.92);
}

.iconAction:hover .userAvatarFallback,
.iconAction:focus-visible .userAvatarFallback {
  border-color: currentColor;
  color: #fff;
}

.accountSep {
  color: var(--ink-500);
  font-weight: 400;
  flex-shrink: 0;
}

.guestLink {
  padding: 0.2rem 0;
  color: var(--ink-700);
  font: inherit;
  font-size: inherit;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.guestLink:hover {
  color: var(--gold-600);
}

.loginLink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--navy-900);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.loginLink:hover {
  color: var(--ink-700);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: var(--navy-900);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ctaIcon {
  flex-shrink: 0;
  color: var(--gold-400);
}

.cta:hover,
.ctaActive {
  background: var(--navy-800);
}

.cta:hover {
  color: var(--gold-400);
  transform: translateY(-1px);
}

.ctaDesktop {
  display: inline-flex;
}

.ctaMobile {
  display: none;
}

.iconActionSlot {
  position: relative;
  width: 2.55rem;
  height: 2.55rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iconAction {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 2.55rem;
  min-height: 2.55rem;
  padding: 0.45rem 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--navy-900);
  font: inherit;
  overflow: visible;
  cursor: pointer;
  text-decoration: none;
  z-index: 1;
  transition:
    width 0.22s ease,
    min-height 0.22s ease,
    padding 0.22s ease,
    gap 0.22s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.iconAction:hover,
.iconAction:focus-visible {
  width: 5rem;
  min-height: 3.55rem;
  padding: 0.4rem 0.55rem 0.45rem;
  gap: 0.2rem;
  color: #fff;
  border-color: var(--gold-600);
  background: var(--gold-600);
  z-index: 20;
}

.iconActionWrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.iconActionSvg {
  flex-shrink: 0;
  color: currentColor;
}

.iconActionLabel {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  color: currentColor;
  transform: translateY(2px);
  transition:
    max-height 0.22s ease,
    opacity 0.18s ease,
    transform 0.22s ease;
}

.iconAction:hover .iconActionLabel,
.iconAction:focus-visible .iconActionLabel {
  max-height: 1.2rem;
  opacity: 1;
  transform: translateY(0);
}

.cartBadge {
  position: absolute;
  top: -0.45rem;
  right: -0.55rem;
  z-index: 2;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  border: 1.5px solid #fff;
  background: var(--navy-900);
  color: var(--gold-400);
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.iconAction:hover .cartBadge,
.iconAction:focus-visible .cartBadge {
  border-color: var(--gold-600);
  background: var(--navy-900);
  color: var(--gold-400);
}

.cartDesktop,
.notifDesktop,
.logoutDesktop,
.accountDesktop {
  display: inline-flex;
}

.cartMobile,
.notifMobile,
.logoutMobile,
.accountMobile {
  display: none;
}

.menuBtn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}

.menuBtn span:not(.srOnly) {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: var(--navy-900);
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Mid widths: keep account/logout from crowding the nav hit targets */
@media (max-width: 1200px) and (min-width: 981px) {
  .nav {
    gap: 0.2rem 1.15rem;
  }

  .site-header .actions {
    gap: 0.5rem;
  }

  .accountSlot {
    max-width: none;
  }

  .cta {
    padding: 0.55rem 0.8rem;
  }
}

@media (max-width: 980px) {
  .menuBtn {
    display: inline-flex;
  }

  .ctaDesktop,
  .accountDesktop,
  .cartDesktop,
  .notifDesktop,
  .logoutDesktop {
    display: none;
  }

  .accountSlot {
    display: none;
  }

  .ctaMobile,
  .cartMobile,
  .notifMobile,
  .logoutMobile,
  .accountMobile {
    display: inline-flex;
    margin-top: 0.85rem;
    width: 100%;
  }

  .cartMobile,
  .notifMobile,
  .logoutMobile,
  .accountMobile.iconActionSlot {
    width: 100%;
    height: auto;
    min-height: 2.75rem;
  }

  .cartMobile .iconAction,
  .notifMobile .iconAction,
  .logoutMobile .iconAction,
  .accountMobile .iconAction {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    color: #fff;
    border-color: var(--gold-600);
    background: var(--gold-600);
  }

  .cartMobile .iconActionLabel,
  .notifMobile .iconActionLabel,
  .logoutMobile .iconActionLabel,
  .accountMobile .iconActionLabel {
    max-height: none;
    opacity: 1;
    transform: none;
    font-size: 0.92rem;
  }

  .nav {
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(247, 245, 241, 0.98);
    border-bottom: 1px solid var(--line);
    flex: none;
    overflow: hidden;
  }

  .navOpen {
    display: flex;
    animation: fade-in 0.2s ease;
  }

  .navLink {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }
}


.site-footer {
  margin-top: 4rem;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.78);
  padding: 2.5rem 0 1.75rem;
}

.site-footer .layout {
  display: grid;
  grid-template-columns: minmax(10rem, 13.5rem) minmax(0, 1fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.brandLink {
  display: inline-flex;
  align-items: center;
}

.site-footer .brandLogo {
  display: block;
  width: auto;
  height: 2.75rem;
  object-fit: contain;
}

.desc {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}

.mainCol {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.topRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.policyNav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  font-size: 0.88rem;
}

.policyNav a {
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.policyBtn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.policyNav a:hover,
.policyBtn:hover {
  color: var(--gold-400);
}

.inlineBtn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.2s ease;
}

.inlineBtn:hover {
  color: var(--gold-400);
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.socialLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.socialLink:hover {
  color: var(--gold-400);
  border-color: rgba(214, 179, 92, 0.45);
  background: rgba(214, 179, 92, 0.08);
}

.socialIconImg {
  display: block;
  width: 1.05rem;
  height: 1.125rem;
  object-fit: contain;
  opacity: 0.92;
}

.socialLink:hover .socialIconImg {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(79%) sepia(28%) saturate(742%) hue-rotate(6deg) brightness(95%) contrast(88%);
}

.sep {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 400;
}

.company {
  padding: 1.15rem 0 1rem;
}

.companyGrid {
  display: grid;
  grid-template-columns: minmax(13rem, 0.95fr) minmax(16rem, 1.35fr) auto;
  column-gap: 1.75rem;
  row-gap: 0.28rem;
  align-items: baseline;
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
}

.companyInquiry {
  grid-column: 1;
  justify-self: start;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.companyInquiry:hover {
  color: var(--gold-400);
}

.companyCell {
  margin: 0;
  min-width: 0;
}

.companyCellContact {
  margin-bottom: 0.95rem;
}

.companyInline {
  margin-left: 1.1rem;
}

.companySpacer {
  display: block;
  min-height: 0;
}

.companyLabel {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 400;
}

.company a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.company a:hover {
  color: var(--gold-400);
}

.inquiryLink {
  white-space: nowrap;
}

.bottom {
  padding-top: 0.15rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
}

@media (max-width: 1100px) {
  .companyGrid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .companySpacer {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-footer .layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .topRow {
    justify-content: flex-start;
  }

  .social {
    margin-left: 0;
  }
}


/* Course / material cards */
.course-card, .material-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.course-card:hover, .material-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.course-card:hover,
.material-card:hover {
  border-color: var(--gold-500);
}
.course-card.is-featured {
  border-color: rgba(196, 154, 60, 0.45);
}
.course-card__media, .material-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--navy-900);
}
.course-card__media img, .material-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.material-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
}
.course-card__cat {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.25rem 0.55rem;
  background: rgba(7,17,31,0.82);
  color: var(--gold-400);
  font-size: 0.75rem;
  font-weight: 700;
}
.course-card__body, .material-card__body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.course-card__meta {
  font-size: 0.82rem;
  color: var(--ink-500);
}
.course-card__title, .material-card__body h3 {
  font-size: 1.1rem;
}
.course-card__summary {
  color: var(--ink-700);
  font-size: 0.92rem;
  flex: 1;
}
.course-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.course-card__price, .material-card__price {
  font-weight: 700;
  color: var(--gold-600);
}
.card-price-original {
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--ink-500);
  font-weight: 500;
  text-decoration: line-through;
  font-size: 0.85em;
}
.course-card__link {
  font-weight: 600;
  color: var(--navy-800);
  border-bottom: 1px solid var(--gold-500);
  font-size: 0.88rem;
}
.material-card__author {
  font-size: 0.85rem;
  color: var(--ink-500);
}

.card-skeleton {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  height: 100%;
}
.card-skeleton__media {
  aspect-ratio: 16/10;
}
.card-skeleton__body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card-skeleton__line {
  height: 0.75rem;
  border-radius: 2px;
}
.card-skeleton__line.is-title {
  height: 1.1rem;
  width: 80%;
}
.card-skeleton__line.is-short {
  width: 45%;
}
.card-skeleton__media,
.card-skeleton__line {
  background: linear-gradient(90deg, #eceff3 25%, #f6f8fa 50%, #eceff3 75%);
  background-size: 200% 100%;
  animation: gwc-skeleton 1.2s ease-in-out infinite;
}
@keyframes gwc-skeleton {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card-skeleton__media,
  .card-skeleton__line {
    animation: none;
  }
}

/* Shared page chrome */
.page-hero {
  padding: 3.5rem 0 2rem;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  margin-bottom: 0.65rem;
}
.page-hero p {
  color: var(--ink-700);
  max-width: 48rem;
}
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--gold-500);
  color: var(--navy-950);
}
.btn-primary:hover { background: var(--gold-400); transform: translateY(-1px); }
.btn-secondary {
  background: var(--navy-900);
  color: var(--white);
}
.btn-secondary:hover { background: var(--navy-800); color: var(--gold-400); }
.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--navy-900);
}
.btn-ghost:hover { border-color: var(--gold-500); color: var(--gold-600); }
.form-stack { display: grid; gap: 1rem; max-width: 28rem; }
.form-field { display: grid; gap: 0.35rem; }
.form-field label { font-weight: 600; font-size: 0.92rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.form-error { color: #b42318; font-size: 0.9rem; }
.form-ok { color: #027a48; font-size: 0.9rem; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem;
}
.empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--ink-500);
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.5);
}

.gwc-back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  width: 3.15rem;
  height: 3.15rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  border: none;
  border-radius: 0.35rem;
  background: #4a4a4a;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.4rem);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.2s ease;
}

.gwc-back-to-top:hover {
  background: #3a3a3a;
}

.gwc-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.gwc-back-to-top svg {
  display: block;
  margin-top: 0.1rem;
}

.gwc-back-to-top span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

@media (max-width: 640px) {
  .gwc-back-to-top {
    right: 1rem;
    bottom: 1rem;
  }
}
