@import url('https://cdn.jsdelivr.net/gh/sun-typeface/SUIT@2/fonts/variable/woff2/SUIT-Variable.css');

:root {
  --blue-dark: #00497e;
  --blue: #2378bb;
  --blue-soft: rgba(35, 120, 187, 0.12);
  --white: #ffffff;
  --text: #00497e;
  --text-muted: #5a7a9a;
  --border: rgba(0, 73, 126, 0.12);
  --header-h: 80px;
  --header-bg: #e3f2fb;
  --content-w: 1200px;
  --max-w: 1920px;
  --side-pad: clamp(20px, 4vw, 48px);
  --font: 'SUIT', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius: 16px;
  --radius-pill: 999px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  background: var(--blue-dark);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ===== Header ===== */
.site-header {
  position: relative;
  z-index: 100;
  width: min(var(--max-w), 100%);
  margin: 0 auto;
  padding: clamp(12px, 2vh, 20px) var(--side-pad) clamp(8px, 1.5vh, 12px);
  min-height: var(--header-h);
  background: transparent;
  box-sizing: border-box;
}

.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}

@media (min-width: 961px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: clamp(12px, 2vw, 24px);
  }

  .header-inner {
    display: contents;
  }

  .header-left {
    grid-column: 1;
    justify-self: start;
  }

  .header-nav-wrap {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .header-aside {
    grid-column: 3;
    justify-self: end;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-brand img {
  height: clamp(56px, 6vw, 84px);
  width: auto;
  object-fit: contain;
}

.header-nav-wrap {
  justify-self: center;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.gnb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.2vw, 12px);
}

.gnb-item {
  position: relative;
}

.gnb-link {
  display: block;
  padding: 10px clamp(10px, 1.2vw, 18px);
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 700;
  color: var(--blue-dark);
  white-space: nowrap;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.gnb-item.is-active > .gnb-link,
.gnb-item:hover > .gnb-link {
  color: var(--blue);
}

.gnb-sub a {
  display: block;
  padding: 10px 14px;
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 500;
  color: #334;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.gnb-sub a:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 600;
}

/* Desktop only: centered flyout (never apply translateX on mobile) */
@media (min-width: 961px) {
  .gnb-sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 168px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 73, 126, 0.12);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 50;
  }

  .gnb-item:hover .gnb-sub,
  .gnb-item:focus-within .gnb-sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

.header-aside {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 20px);
  flex-shrink: 0;
  justify-self: end;
  overflow: visible;
}

.lang-dropdown {
  position: relative;
  flex-shrink: 0;
  z-index: 200;
}

.lang-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 7.25rem;
  height: 36px;
  padding: 0 0.65rem 0 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 73, 126, 0.15);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lang-dropdown__trigger:hover,
.lang-dropdown__trigger:focus-visible {
  border-color: rgba(0, 73, 126, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 73, 126, 0.12);
  outline: none;
}

.lang-dropdown__chevron {
  flex-shrink: 0;
  width: 12px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300497e' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E")
    no-repeat center / contain;
  transition: transform 0.2s ease;
}

.lang-dropdown.is-open .lang-dropdown__chevron {
  transform: rotate(180deg);
}

.lang-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 300;
  min-width: 100%;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(0, 73, 126, 0.12);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(0, 73, 126, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
}

.lang-dropdown.is-open .lang-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-dropdown__item + .lang-dropdown__item {
  border-top: 1px solid rgba(0, 73, 126, 0.08);
}

.lang-dropdown__option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-dropdown__option:hover,
.lang-dropdown__option:focus-visible {
  background: rgba(197, 228, 247, 0.45);
  outline: none;
}

.lang-dropdown__option.is-selected {
  font-weight: 800;
  color: var(--blue);
}

.header-partner--seoul {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
}

.header-partner__seoul {
  height: clamp(34px, 3vw, 44px);
  width: auto;
  object-fit: contain;
}

.header-partner__mysoul {
  height: clamp(28px, 2.4vw, 38px);
  width: auto;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  position: relative;
  z-index: 131;
  flex-shrink: 0;
}

.menu-toggle__bar {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  background: var(--blue-dark);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
  transform-origin: center;
}

.menu-toggle__bar:nth-child(1) {
  top: 14px;
}

.menu-toggle__bar:nth-child(2) {
  top: 21px;
}

.menu-toggle__bar:nth-child(3) {
  top: 28px;
}

.menu-toggle[aria-expanded='true'] .menu-toggle__bar:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded='true'] .menu-toggle__bar:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--blue);
  color: var(--white);
  flex-shrink: 0;
}

.footer-top {
  padding: 40px var(--side-pad);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-top-inner {
  width: min(var(--max-w), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 3vw, 40px);
}

.footer-top-left {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  flex-wrap: wrap;
  min-width: 0;
}

.footer-partner img {
  height: clamp(32px, 3vw, 44px);
  width: auto;
  object-fit: contain;
}

.footer-logo img {
  height: clamp(52px, 5vw, 76px);
  width: auto;
  object-fit: contain;
}

.footer-info {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.9;
  opacity: 0.95;
}

.footer-info p + p {
  margin-top: 2px;
}

.footer-bottom {
  padding: 18px var(--side-pad) 22px;
}

.footer-bottom-inner {
  width: min(var(--max-w), 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-dot {
  opacity: 0.5;
}

.footer-copy {
  margin: 0;
  opacity: 0.85;
  font-size: 13px;
  line-height: 1.5;
}

.footer-partner {
  flex-shrink: 0;
}

/* Footer — responsive */
@media (max-width: 960px) {
  .footer-top {
    padding: clamp(28px, 5vw, 40px) var(--side-pad);
  }

  .footer-top-inner {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(20px, 4vw, 28px);
  }

  .footer-top-left {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(14px, 3vw, 20px);
  }

  .footer-partner {
    align-self: stretch;
    padding-top: clamp(16px, 3vw, 20px);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-copy {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .footer-top {
    padding: 24px var(--side-pad) 28px;
  }

  .footer-logo img {
    height: clamp(44px, 11vw, 56px);
  }

  .footer-info {
    font-size: 13px;
    line-height: 1.7;
  }

  .footer-partner img {
    height: clamp(28px, 7vw, 36px);
  }

  .footer-bottom {
    padding: 14px var(--side-pad) 18px;
  }

  .footer-bottom-inner {
    font-size: 13px;
    gap: 10px;
  }

  .footer-links {
    gap: 8px 10px;
    row-gap: 6px;
  }

  .footer-copy {
    font-size: 12px;
    letter-spacing: -0.02em;
  }
}

/* ===== Sub page content shell ===== */
.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-inner {
  width: min(var(--content-w), calc(100% - var(--side-pad) * 2));
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 100px);
}

.content-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 4px 24px rgba(0, 73, 126, 0.06);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .header-partner__seoul {
    display: none;
  }
}

@media (max-width: 960px) {
  .header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-nav-wrap {
    display: none;
  }

  .header-nav-wrap.is-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    z-index: 110;
    margin: 0;
    padding: calc(var(--header-h) + 8px) 0 max(20px, env(safe-area-inset-bottom));
    background: var(--white);
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .header-nav-wrap.is-open .header-nav,
  .header-nav-wrap.is-open .gnb {
    width: 100%;
    max-width: none;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 130;
  }

  body.mobile-nav-open .header-inner {
    background: var(--header-bg);
  }

  .gnb {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .gnb-link {
    padding: 14px var(--side-pad);
  }

  .gnb-sub {
    position: static;
    left: auto;
    top: auto;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f4f9fd;
    display: none;
    min-width: 0;
    padding: 4px 0 8px;
    transition: none;
  }

  /* Mobile: accordion only (.is-open). No hover flyout / no translateX. */
  .gnb-item:hover .gnb-sub,
  .gnb-item:focus-within .gnb-sub {
    transform: none !important;
  }

  .gnb-item.is-open .gnb-sub {
    display: block;
  }

  .gnb-sub a {
    padding: 10px calc(var(--side-pad) + 12px);
    border-radius: 0;
  }

  .menu-toggle {
    display: block;
  }

  .header-aside {
    margin-left: auto;
    gap: 10px;
  }

  .header-aside .lang-dropdown {
    flex-shrink: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 64px;
  }

  .header-partner {
    display: none;
  }
}
