/* =========================================================
   SE Global Layout
   공통 변수 / 컨테이너 / 섹션 / 제목 / 버튼 / 반응형 레이아웃
========================================================= */

/* ---------------------------------------------------------
   Design Tokens
--------------------------------------------------------- */

:root {
  /* Brand */
  --se-primary: #023da5;
  --se-primary-dark: #012b75;
  --se-primary-light: #eef5ff;

  /* Text */
  --se-foreground: #1a1a1a;
  --se-text: #111827;
  --se-text-secondary: #4b5563;
  --se-muted: #666666;
  --se-muted-light: #9ca3af;

  /* Background */
  --se-white: #ffffff;
  --se-background: #ffffff;
  --se-background-soft: #f9fafb;
  --se-background-muted: #f3f4f6;

  /* Border */
  --se-border: #e5e7eb;
  --se-border-dark: #d1d5db;
  --se-border-primary: rgba(2, 61, 165, 0.2);

  /* State */
  --se-success: #16a34a;
  --se-danger: #dc2626;
  --se-warning: #d97706;

  /* Container */
  --se-container-width: 1280px;
  --se-container-narrow: 960px;
  --se-container-wide: 1440px;

  /* Horizontal padding */
  --se-container-padding: 24px;
  --se-container-padding-tablet: 20px;
  --se-container-padding-mobile: 16px;

  /* Header */
  --se-header-height: 64px;
  --se-header-height-mobile: 56px;

  /* Radius */
  --se-radius-sm: 6px;
  --se-radius-md: 12px;
  --se-radius-lg: 16px;
  --se-radius-xl: 24px;
  --se-radius-full: 9999px;

  /* Shadow */
  --se-shadow-sm:
    0 1px 2px rgba(15, 23, 42, 0.05);

  --se-shadow-md:
    0 4px 12px rgba(15, 23, 42, 0.08);

  --se-shadow-lg:
    0 12px 28px rgba(15, 23, 42, 0.1);

  --se-shadow-xl:
    0 24px 48px rgba(15, 23, 42, 0.14);

  /* Motion */
  --se-transition-fast: 150ms ease;
  --se-transition: 250ms ease;
  --se-transition-slow: 350ms ease;
}

/* =========================================================
   Document Layout
========================================================= */

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  color: var(--se-text);
  background: var(--se-background);
}

body.menu-open {
  overflow: hidden;
}

main {
  display: block;
  width: 100%;
}

.site-wrap,
.site-page,
.site-main {
  width: 100%;
}

.site-wrap {
  position: relative;
  min-height: 100vh;
  background: var(--se-background);
}

.site-main {
  min-width: 0;
}

/* =========================================================
   Gnuboard Layout Override
========================================================= */

/*
  그누보드 기본 테마의 고정 폭, 중앙 여백, 배경색이
  SE Global 레이아웃을 방해하지 않도록 초기화합니다.
*/

#wrapper,
#container_wr,
#container {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

#wrapper {
  background: transparent;
}

#container_wr {
  float: none;
}

#container {
  float: none;
  min-height: 0;
  background: transparent;
}

#container::after,
#container_wr::after,
#wrapper::after {
  content: "";
  display: block;
  clear: both;
}

/*
  그누보드 기본 레이아웃에 aside가 남아 있을 경우
  직접 사용하지 않는 페이지에서는 아래 클래스로 숨길 수 있습니다.

  body.se-full-layout #aside {
    display: none;
  }
*/

body.se-full-layout #container_wr {
  display: block;
}

body.se-full-layout #container {
  width: 100%;
}

/* =========================================================
   Common Containers
========================================================= */

.site-container,
.home-container,
.page-container,
.section-container {
  width: 100%;
  max-width: var(--se-container-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--se-container-padding);
  padding-left: var(--se-container-padding);
}

.site-container--narrow,
.page-container--narrow {
  max-width: var(--se-container-narrow);
}

.site-container--wide,
.page-container--wide {
  max-width: var(--se-container-wide);
}

.site-container--full,
.page-container--full {
  max-width: none;
}

.container-fluid {
  width: 100%;
  padding-right: var(--se-container-padding);
  padding-left: var(--se-container-padding);
}

/* 컨테이너 내부 요소가 grid/flex에서 넘치는 현상 방지 */
.site-container > *,
.home-container > *,
.page-container > *,
.section-container > * {
  min-width: 0;
}

/* =========================================================
   Sections
========================================================= */

.section {
  position: relative;
  width: 100%;
  padding-top: 80px;
  padding-bottom: 80px;
}

.section--small {
  padding-top: 48px;
  padding-bottom: 48px;
}

.section--large {
  padding-top: 112px;
  padding-bottom: 112px;
}

.section--white {
  background: var(--se-white);
}

.section--soft {
  background: var(--se-background-soft);
}

.section--muted {
  background: var(--se-background-muted);
}

.section--gradient {
  background:
    linear-gradient(
      180deg,
      var(--se-white) 0%,
      var(--se-background-soft) 100%
    );
}

.section__inner {
  width: 100%;
  max-width: var(--se-container-width);
  margin: 0 auto;
  padding-right: var(--se-container-padding);
  padding-left: var(--se-container-padding);
}

/* =========================================================
   Section Headings
========================================================= */

.section-heading {
  margin-bottom: 48px;
  text-align: center;
}

.section-heading--left {
  text-align: left;
}

.section-heading__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--se-primary);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-heading h1,
.section-heading h2,
.section-title {
  color: var(--se-foreground);
  font-size: 48px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.section-heading h3 {
  color: var(--se-foreground);
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

.section-heading p,
.section-description {
  margin-top: 16px;
  color: var(--se-muted);
  font-size: 20px;
  line-height: 1.6;
  font-weight: 400;
  word-break: keep-all;
}

.section-heading strong {
  color: var(--se-primary);
  font-weight: 700;
}

/* =========================================================
   Page Heading
========================================================= */

.page-heading {
  padding: 72px 0;
  background: var(--se-background-soft);
  text-align: center;
}

.page-heading__title {
  color: var(--se-foreground);
  font-size: 44px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.page-heading__description {
  margin-top: 14px;
  color: var(--se-muted);
  font-size: 18px;
  line-height: 1.6;
  word-break: keep-all;
}

/* =========================================================
   Common Typography
========================================================= */

.text-primary {
  color: var(--se-primary);
}

.text-foreground {
  color: var(--se-foreground);
}

.text-muted {
  color: var(--se-muted);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.keep-all {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.nowrap {
  white-space: nowrap;
}

/* =========================================================
   Common Flex Layout
========================================================= */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.items-end {
  align-items: flex-end;
}

.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.flex-1 {
  flex: 1 1 0%;
  min-width: 0;
}

.flex-none {
  flex: none;
}

/* =========================================================
   Common Grid Layout
========================================================= */

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =========================================================
   Common Gaps
========================================================= */

.gap-1 {
  gap: 4px;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.gap-5 {
  gap: 20px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

.gap-10 {
  gap: 40px;
}

.gap-12 {
  gap: 48px;
}

/* =========================================================
   Common Buttons
========================================================= */

.se-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 48px;
  padding: 0 24px;

  border: 1px solid transparent;
  border-radius: var(--se-radius-full);

  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;

  cursor: pointer;

  transition:
    color var(--se-transition),
    background-color var(--se-transition),
    border-color var(--se-transition),
    box-shadow var(--se-transition);
}

.se-button--primary {
  background: var(--se-primary);
  color: var(--se-white);
}

.se-button--primary:hover {
  background: var(--se-primary-dark);
  color: var(--se-white);
  box-shadow: var(--se-shadow-md);
}

.se-button--white {
  background: var(--se-white);
  color: var(--se-primary);
}

.se-button--white:hover {
  background: var(--se-primary);
  color: var(--se-white);
}

.se-button--outline {
  border-color: var(--se-primary);
  background: transparent;
  color: var(--se-primary);
}

.se-button--outline:hover {
  background: var(--se-primary);
  color: var(--se-white);
}

.se-button--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.se-button--large {
  min-height: 56px;
  padding: 0 32px;
  font-size: 18px;
}

.se-button--block {
  width: 100%;
}

/* =========================================================
   Common Cards
========================================================= */

.se-card {
  overflow: hidden;
  border: 1px solid var(--se-border);
  border-radius: var(--se-radius-lg);
  background: var(--se-white);
}

.se-card--shadow {
  box-shadow: var(--se-shadow-md);
}

.se-card__body {
  padding: 24px;
}

/* =========================================================
   Common Forms
========================================================= */

.form-group {
  display: grid;
  gap: 8px;
}

.form-label {
  color: var(--se-text);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

.form-control {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;

  border: 1px solid var(--se-border);
  border-radius: var(--se-radius-md);

  background: var(--se-white);
  color: var(--se-text);

  font-size: 16px;
  line-height: 1.5;

  transition:
    border-color var(--se-transition-fast),
    box-shadow var(--se-transition-fast);
}

textarea.form-control {
  min-height: 140px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.form-control:hover {
  border-color: var(--se-border-dark);
}

.form-control:focus {
  border-color: var(--se-primary);
  box-shadow: 0 0 0 3px rgba(2, 61, 165, 0.12);
  outline: none;
}

.form-control:disabled {
  background: var(--se-background-muted);
  color: var(--se-muted-light);
}

.form-help {
  color: var(--se-muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-error {
  color: var(--se-danger);
  font-size: 13px;
  line-height: 1.5;
}

/* =========================================================
   Common Divider
========================================================= */

.se-divider {
  width: 100%;
  height: 1px;
  background: var(--se-border);
}

.se-divider--vertical {
  width: 1px;
  height: 100%;
}

/* =========================================================
   Common Images
========================================================= */

.image-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

/* =========================================================
   Visibility Helpers
========================================================= */

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* =========================================================
   Spacing Helpers
========================================================= */

.mt-0 {
  margin-top: 0;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mt-8 {
  margin-top: 32px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mb-8 {
  margin-bottom: 32px;
}

/* =========================================================
   Tablet
========================================================= */

@media (max-width: 1024px) {
  :root {
    --se-container-padding: var(--se-container-padding-tablet);
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section--large {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .section-heading h1,
  .section-heading h2,
  .section-title {
    font-size: 40px;
  }

  .section-heading h3 {
    font-size: 28px;
  }

  .section-heading p,
  .section-description {
    font-size: 18px;
  }

  .page-heading {
    padding: 60px 0;
  }

  .page-heading__title {
    font-size: 38px;
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 767px) {
  :root {
    --se-container-padding: var(--se-container-padding-mobile);
  }

  .site-container,
  .home-container,
  .page-container,
  .section-container,
  .section__inner,
  .container-fluid {
    padding-right: var(--se-container-padding-mobile);
    padding-left: var(--se-container-padding-mobile);
  }

  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section--small {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .section--large {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-heading {
    margin-bottom: 36px;
  }

  .section-heading h1,
  .section-heading h2,
  .section-title {
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.035em;
  }

  .section-heading h3 {
    font-size: 24px;
  }

  .section-heading p,
  .section-description {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.6;
  }

  .page-heading {
    padding: 48px 0;
  }

  .page-heading__title {
    font-size: 32px;
  }

  .page-heading__description {
    margin-top: 10px;
    font-size: 15px;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .se-button {
    min-height: 46px;
    padding: 0 20px;
    font-size: 15px;
  }

  .se-button--large {
    min-height: 52px;
    padding: 0 24px;
    font-size: 16px;
  }

  .se-card__body {
    padding: 20px;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }
}

/* =========================================================
   Small Mobile
========================================================= */

@media (max-width: 479px) {
  .section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .section-heading h1,
  .section-heading h2,
  .section-title {
    font-size: 28px;
  }

  .page-heading__title {
    font-size: 28px;
  }

  .se-button {
    width: 100%;
  }
}