@charset "utf-8";

/**
 * ============================================================================
 * RESPONSIVE-COMMON.CSS - LMS 반응형 웹 공통 스타일
 * ============================================================================
 *
 * 목적:
 *   - 모든 페이지에 공통으로 적용되는 반응형 스타일
 *   - 변수, 기본 설정, 유틸리티, 공통 컴포넌트 (GNB, Footer 등)
 *
 * 구조:
 *   Section 1: 변수 정의
 *   Section 2: 기본 반응형 설정
 *   Section 3: 유틸리티 클래스
 *   Section 4: 태블릿 반응형
 *   Section 5: 모바일 반응형
 *   Section 6: 컴포넌트 반응형 (GNB, Footer, 햄버거 메뉴 등)
 *
 * 작성일: 2025-10-22
 * 수정일: 2025-01-06 (Viewport별 분리 리팩토링)
 * 버전: 2.0.0
 * ============================================================================
 */

/* ============================================================================
   1. CSS Variables (현대 브라우저 - IE11 지원 종료)
   ============================================================================
   분석 결과 기반으로 실제 사용 빈도가 높은 값들을 변수화
   ============================================================================ */

:root {
  /* Colors (색상) - 빈도수 기반 */
  --color-white: #ffffff;
  /* 14회 - 흰색 */
  --color-black: #000000;
  /* 검정 */
  --color-text: #333333;
  /* 12회 - 주 텍스트 */
  --color-text-secondary: #666666;
  /* 4회 - 보조 텍스트 */
  --color-primary: #336699;
  /* 11회 - 주 색상 */
  --color-border: #dddddd;
  /* 14회 - 테두리 */
  --color-border-light: #eeeeee;
  /* 8회 - 밝은 테두리 */
  --color-border-lighter: #cccccc;
  /* 5회 - 더 밝은 테두리 */
  --color-bg-light: #f5f5f5;
  /* 5회 - 밝은 배경 */
  --color-bg-lighter: #f9f9f9;
  /* 5회 - 더 밝은 배경 */
  --color-bg-lightest: #f8f8f8;
  /* 2회 - 가장 밝은 배경 */

  /* Spacing (간격) - 빈도수 기반 */
  --spacing-xxs: 4px;
  /* 15회 */
  --spacing-xs: 5px;
  /* 36회 */
  --spacing-sm: 10px;
  /* 71회 */
  --spacing-md: 15px;
  /* 98회 */
  --spacing-lg: 20px;
  /* 105회 - 가장 많이 사용 */
  --spacing-xl: 30px;
  /* 68회 */
  --spacing-2xl: 40px;
  /* 16회 */
  --spacing-3xl: 60px;
  /* 19회 */

  /* Font Sizes (폰트 크기) - 빈도수 기반 */
  --font-xs: 12px;
  /* 8회 */
  --font-sm: 14px;
  /* 43회 */
  --font-base: 16px;
  /* 45회 - 기본 */
  --font-lg: 18px;
  /* 24회 */
  --font-xl: 20px;
  /* 24회 */
  --font-2xl: 24px;
  /* 15회 */

  /* Line Heights (행간) - 빈도수 기반 */
  --lh-tight: 1;
  /* 1회 - 좁음 */
  --lh-base: 1.4;
  /* 20회 - 기본 */
  --lh-relaxed: 1.6;
  /* 17회 - 넓음 */
  --lh-loose: 2;
  /* 1회 - 아주 넓음 */

  /* Touch Targets (터치 타겟 - WCAG 2.5.5) */
  --touch-target: 44px;
  /* 79회 - WCAG 최소 크기 */
  --touch-button: 48px;
  /* 11회 - 버튼 최적 크기 */

  /* Breakpoints (브레이크포인트) */
  --bp-mobile: 767px;
  /* 모바일 최대 */
  --bp-tablet: 1024px;
  /* 태블릿 최대 */
}

/* ============================================================================
   2. 기본 반응형 설정 (Base Responsive Settings)
   ============================================================================ */

/* Box-sizing 전역 설정 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 이미지 반응형 기본 설정 */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 반응형 iframe (동영상 등) */
iframe {
  max-width: 100%;
}

/* ============================================================================
   3. 유틸리티 클래스 (Utility Classes)
   ============================================================================
   필수 유틸리티만 정의. 실제 사용하면서 점진적으로 추가합니다.
   ============================================================================ */

/* Display utilities */
.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-inline-block {
  display: inline-block !important;
}

.d-flex {
  display: flex !important;
}

/* Flexbox utilities */
.flex-row {
  flex-direction: row !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.justify-content-start {
  justify-content: flex-start !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-end {
  align-items: flex-end !important;
}

/* Width utilities */
.w-100 {
  width: 100% !important;
}

.w-50 {
  width: 50% !important;
}

.w-auto {
  width: auto !important;
}

.mw-100 {
  max-width: 100% !important;
}

/* Spacing utilities (필수만) */
.m-0 {
  margin: 0 !important;
}

.m-auto {
  margin: auto !important;
}

.mt-1 {
  margin-top: var(--spacing-xxs) !important;
}

.mt-2 {
  margin-top: 8px !important;
}

.mt-3 {
  margin-top: 12px !important;
}

.mt-4 {
  margin-top: 16px !important;
}

.mb-1 {
  margin-bottom: var(--spacing-xxs) !important;
}

.mb-2 {
  margin-bottom: 8px !important;
}

.mb-3 {
  margin-bottom: 12px !important;
}

.mb-4 {
  margin-bottom: 16px !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.p-0 {
  padding: 0 !important;
}

.pt-1 {
  padding-top: var(--spacing-xxs) !important;
}

.pt-2 {
  padding-top: 8px !important;
}

.pt-3 {
  padding-top: 12px !important;
}

.pt-4 {
  padding-top: 16px !important;
}

.pb-1 {
  padding-bottom: var(--spacing-xxs) !important;
}

.pb-2 {
  padding-bottom: 8px !important;
}

.pb-3 {
  padding-bottom: 12px !important;
}

.pb-4 {
  padding-bottom: 16px !important;
}

.px-2 {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.px-3 {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.px-4 {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* ----- Touch Target utilities (WCAG 2.5.5 Level AAA) ----- */
.touch-target {
  min-height: var(--touch-target) !important;
  display: inline-flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.touch-target-sm {
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
}

.touch-target-lg {
  min-height: var(--touch-button) !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* ----- Flexbox 조합 유틸리티 ----- */
.flex-col-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.flex-col-start {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.flex-col-end {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}

.flex-row-between {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
}

.flex-row-center {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

.flex-row-start {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
}

/* ----- 반응형 컨테이너 유틸리티 ----- */
.responsive-container {
  width: 100% !important;
  max-width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

.responsive-full {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

.responsive-padding {
  padding: 0 15px;
  box-sizing: border-box;
}

/* ============================================================================
   추가 유틸리티 클래스 (Additional Utility Classes)
   ============================================================================
   분석 결과 기반으로 자주 사용되는 패턴을 utility class로 추가
   반복 횟수 기준: 10회 이상
   ============================================================================ */

/* ----- Height utilities ----- */
.h-auto {
  height: auto !important;
}

.h-100 {
  height: 100% !important;
}

.mh-44 {
  min-height: var(--touch-target) !important;
}

/* WCAG 터치 타겟 */
.mh-100 {
  min-height: 100px !important;
}

/* ----- Position utilities ----- */
.pos-relative {
  position: relative !important;
}

.pos-absolute {
  position: absolute !important;
}

.pos-static {
  position: static !important;
}

.top-auto {
  top: auto !important;
}

.bottom-auto {
  bottom: auto !important;
}

.left-auto {
  left: auto !important;
}

.right-auto {
  right: auto !important;
}

.top-50 {
  top: 50% !important;
}

/* ----- Flex utilities (추가) ----- */
.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.flex-shrink-1 {
  flex-shrink: 1 !important;
}

.flex-grow-0 {
  flex-grow: 0 !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.gap-0 {
  gap: 0 !important;
}

.gap-5 {
  gap: var(--spacing-xs) !important;
}

.gap-10 {
  gap: var(--spacing-sm) !important;
}

.gap-15 {
  gap: var(--spacing-md) !important;
}

.gap-20 {
  gap: var(--spacing-lg) !important;
}

/* ----- Text utilities ----- */
.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.fs-12 {
  font-size: var(--font-xs) !important;
}

.fs-14 {
  font-size: var(--font-sm) !important;
}

.fs-16 {
  font-size: var(--font-base) !important;
}

.fs-18 {
  font-size: var(--font-lg) !important;
}

.fs-20 {
  font-size: var(--spacing-lg) !important;
}

.fs-24 {
  font-size: var(--font-2xl) !important;
}

.lh-1 {
  line-height: var(--lh-tight) !important;
}

.lh-14 {
  line-height: var(--lh-base) !important;
}

.lh-16 {
  line-height: var(--lh-relaxed) !important;
}

.lh-2 {
  line-height: var(--lh-loose) !important;
}

.ws-nowrap {
  white-space: nowrap !important;
}

.ws-normal {
  white-space: normal !important;
}

/* ----- Spacing utilities (추가 조합) ----- */
.m-5 {
  margin: var(--spacing-xs) !important;
}

.m-10 {
  margin: var(--spacing-sm) !important;
}

.m-15 {
  margin: var(--spacing-md) !important;
}

.m-20 {
  margin: var(--spacing-lg) !important;
}

.mt-5 {
  margin-top: var(--spacing-xs) !important;
}

.mt-10 {
  margin-top: var(--spacing-sm) !important;
}

.mt-15 {
  margin-top: var(--spacing-md) !important;
}

.mt-20 {
  margin-top: var(--spacing-lg) !important;
}

.mt-30 {
  margin-top: var(--spacing-xl) !important;
}

.mb-5 {
  margin-bottom: var(--spacing-xs) !important;
}

.mb-10 {
  margin-bottom: var(--spacing-sm) !important;
}

.mb-15 {
  margin-bottom: var(--spacing-md) !important;
}

.mb-20 {
  margin-bottom: var(--spacing-lg) !important;
}

.mb-30 {
  margin-bottom: var(--spacing-xl) !important;
}

.ml-auto {
  margin-left: auto !important;
}

.mr-auto {
  margin-right: auto !important;
}

.p-5 {
  padding: var(--spacing-xs) !important;
}

.p-10 {
  padding: var(--spacing-sm) !important;
}

.p-15 {
  padding: var(--spacing-md) !important;
}

.p-20 {
  padding: var(--spacing-lg) !important;
}

.pt-5 {
  padding-top: var(--spacing-xs) !important;
}

.pt-10 {
  padding-top: var(--spacing-sm) !important;
}

.pt-15 {
  padding-top: var(--spacing-md) !important;
}

.pt-20 {
  padding-top: var(--spacing-lg) !important;
}

.pt-30 {
  padding-top: var(--spacing-xl) !important;
}

.pb-5 {
  padding-bottom: var(--spacing-xs) !important;
}

.pb-10 {
  padding-bottom: var(--spacing-sm) !important;
}

.pb-15 {
  padding-bottom: var(--spacing-md) !important;
}

.pb-20 {
  padding-bottom: var(--spacing-lg) !important;
}

.pb-30 {
  padding-bottom: var(--spacing-xl) !important;
}

.px-5 {
  padding-left: var(--spacing-xs) !important;
  padding-right: var(--spacing-xs) !important;
}

.px-10 {
  padding-left: var(--spacing-sm) !important;
  padding-right: var(--spacing-sm) !important;
}

.px-15 {
  padding-left: var(--spacing-md) !important;
  padding-right: var(--spacing-md) !important;
}

.px-20 {
  padding-left: var(--spacing-lg) !important;
  padding-right: var(--spacing-lg) !important;
}

.py-5 {
  padding-top: var(--spacing-xs) !important;
  padding-bottom: var(--spacing-xs) !important;
}

.py-10 {
  padding-top: var(--spacing-sm) !important;
  padding-bottom: var(--spacing-sm) !important;
}

.py-15 {
  padding-top: var(--spacing-md) !important;
  padding-bottom: var(--spacing-md) !important;
}

.py-20 {
  padding-top: var(--spacing-lg) !important;
  padding-bottom: var(--spacing-lg) !important;
}

/* ----- Overflow utilities ----- */
.overflow-hidden {
  overflow: hidden !important;
}

.overflow-auto {
  overflow: auto !important;
}

.overflow-visible {
  overflow: visible !important;
}

.overflow-x-hidden {
  overflow-x: hidden !important;
}

.overflow-x-auto {
  overflow-x: auto !important;
}

.overflow-y-hidden {
  overflow-y: hidden !important;
}

.overflow-y-auto {
  overflow-y: auto !important;
}

/* ----- Border utilities ----- */
.border-none {
  border: none !important;
}

.border-radius-4 {
  border-radius: var(--spacing-xxs) !important;
}

.border-radius-50 {
  border-radius: 50% !important;
}

/* ----- Background utilities ----- */
.bg-white {
  background-color: var(--color-white) !important;
}

.bg-gray-light {
  background-color: var(--color-bg-light) !important;
}

.bg-transparent {
  background-color: transparent !important;
}

/* ----- Display utilities (추가) ----- */
.d-inline {
  display: inline !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-grid {
  display: grid !important;
}

/* ----- Visibility utilities ----- */
.visible {
  visibility: visible !important;
}

.invisible {
  visibility: hidden !important;
}

.opacity-0 {
  opacity: 0 !important;
}

.opacity-50 {
  opacity: 0.5 !important;
}

.opacity-100 {
  opacity: 1 !important;
}

/* ----- Box-sizing utility ----- */
.box-border {
  box-sizing: border-box !important;
}

/* ----- Cursor utilities ----- */
.cursor-pointer {
  cursor: pointer !important;
}

.cursor-default {
  cursor: default !important;
}

/* ----- Transform utilities ----- */
.translate-y-50 {
  transform: translateY(-50%) !important;
}

.translate-x-50 {
  transform: translateX(-50%) !important;
}

/* ============================================================================
   4. 태블릿 반응형 (Tablet - 768px ~ 1023px)
   ============================================================================ */
@media (max-width: 1023px) {
  /* 향후 태블릿 전용 스타일 추가 예정 */

  /* Responsive utilities for tablet */
  .d-md-none {
    display: none !important;
  }

  .d-md-block {
    display: block !important;
  }
}

/* ============================================================================
   5. 모바일 반응형 (Mobile - 최대 767px)
   ============================================================================ */
@media (max-width: 767px) {

  /* ----- 레이아웃 기본 설정 ----- */
  body {
    min-width: 320px;
    /* 최소 모바일 너비 */
  }

  /* 컨테이너 반응형 처리 (Phase 2에서 상세 구현 예정) */
  #m_container {
    width: 100% !important;
    padding: 0 16px;
  }

  /* ----- 폼 요소 반응형 ----- */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    max-width: 100%;
    font-size: var(--font-base);
    /* iOS zoom 방지 */
  }

  /* 터치 타겟 크기 (최소 44x44px) */
  button,
  a.btn,
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: var(--touch-target);
    padding: 12px 16px;
  }

  /* ----- 이미지 반응형 ----- */
  img {
    max-width: 100%;
    height: auto;
  }

  /* ----- Responsive utilities for mobile ----- */
  .d-sm-none {
    display: none !important;
  }

  .d-sm-block {
    display: block !important;
  }

  .d-sm-flex {
    display: flex !important;
  }

  /* 모바일에서 전체 너비로 표시 */
  .responsive-input {
    width: 100% !important;
  }
}

/* ============================================================================
   6. 컴포넌트 반응형 스타일 (Component Responsive Styles)
   ============================================================================
   Phase 2에서 구현: 레이아웃, 폼 요소, 테이블, 버튼, 이미지
   ============================================================================ */

/* -----------------------------------------------------------------------------
   6.1 레이아웃 컴포넌트 (Layout Components)
   ----------------------------------------------------------------------------- */

/* 태블릿 레이아웃 (768px ~ 1023px) */
@media (max-width: 1023px) {
  .pc-view {
    display: block;
  }

  .m-view {
    display: none;
  }

  .m-view.img-responsive {
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
  }

  /* 메인 컨테이너 */
  #container {
    width: 100% !important;
    max-width: 100%;
    padding: 0 20px;
  }

  /* 콘텐츠 영역 */
  #content {
    width: 65% !important;
  }

  /* 사이드바 */
  #snb {
    width: 30% !important;
  }

  .main-learncoures {
    display: none;
  }
}

/* 햄버거 메뉴 버튼 스타일 (모든 viewport에서 기본 스타일 적용) */
.hamburger-menu-btn {
  display: none;
  /* 데스크톱에서 숨김 */
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--touch-target);
  height: var(--touch-target);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 100;
  padding: 0;
}

.hamburger-menu-btn i {
  width: 24px;
  height: 24px;
  background: url("/asset/images/common/icon/btn_hamburger_menu.png") center center / cover no-repeat;
}

/* 모바일에서만 햄버거 메뉴 표시 (D29 BREAKPOINT: ≤767px, 768~1024는 PC GNB) */
@media (max-width: 767px) {
  .hamburger-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center;
  }

  /* PC 전용 요소 숨기기 */
  .pc-only {
    display: none !important;
  }
}

/* ========== Mobile Overlay Menu ========== */

/* 오버레이 기본 스타일 - 숨김 상태 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 오버레이 열림 상태 */
.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 메뉴 컨테이너 */
.mobile-menu-container {
  position: relative;
  width: 85%;
  max-width: 400px;
  height: 100%;
  background-color: var(--color-white);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu-container {
  transform: translateX(0);
}

/* 메뉴 헤더 */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mobile-menu-title {
  font-size: var(--spacing-lg);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.mobile-menu-close {
  width: var(--touch-target);
  height: var(--touch-target);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-menu-close i {
  font-size: var(--font-2xl);
  color: var(--color-text);
}

/* 메뉴 네비게이션 */
.mobile-menu-nav {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list>li {
  border-bottom: 1px solid var(--color-border-light);
}

.mobile-menu-list>li>a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 20px;
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mobile-menu-list>li>a:hover,
.mobile-menu-list>li>a:focus {
  background-color: var(--color-bg-light);
}

/* Depth2 서브메뉴 */
.mobile-menu-list .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: var(--color-bg-lighter);
}

.mobile-menu-list>li.open .submenu {
  max-height: 1000px;
}

.mobile-menu-list .submenu li a {
  display: block;
  padding: 12px 20px 12px 40px;
  font-size: var(--font-sm);
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mobile-menu-list .submenu li a:hover,
.mobile-menu-list .submenu li a:focus {
  background-color: var(--color-border-light);
  color: var(--color-text);
}

/* 확장/축소 아이콘 */
.mobile-menu-list>li>a::after {
  content: "\f078";
  /* fa-chevron-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: var(--font-xs);
  transition: transform 0.3s ease;
}

.mobile-menu-list>li.open>a::after {
  transform: rotate(180deg);
}

/* 메뉴 푸터 (CNB 링크) */
.mobile-menu-footer {
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-md) 20px;
  flex-shrink: 0;
  background-color: var(--color-bg-lighter);
}

.mobile-menu-footer-links {
  display: flex;
  justify-content: space-around;
  gap: var(--spacing-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-footer-links li a {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  flex-direction: column;
}

.mobile-menu-footer-links li a i {
  font-size: var(--font-base);
}

/* 모바일 메뉴 사용자 링크 (GNB 우측 링크) */
.mobile-menu-list li.user-link {
  border-bottom: 1px solid var(--color-border-light);
}

.mobile-menu-list li.user-link a {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) 20px !important;
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-primary);
  background-color: var(--color-bg-lighter);
  min-height: 44px;
  /* 터치 타겟 */
}

.mobile-menu-list li.user-link a i {
  font-size: var(--font-md);
  color: var(--color-primary);
}

.mobile-menu-list li.user-link a:hover,
.mobile-menu-list li.user-link a:focus {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.mobile-menu-list li.user-link a:hover i,
.mobile-menu-list li.user-link a:focus i {
  color: var(--color-white);
}

/* 메뉴 구분선 */
.mobile-menu-list li.menu-separator {
  width: 100%;
  height: 2px;
  background-color: var(--color-border);
  margin: var(--spacing-sm) 0;
  padding: 0 !important;
}

/* 태블릿·데스크톱(≥768px)에서 오버레이 숨김 (D29 BREAKPOINT) */
@media (min-width: 768px) {
  .mobile-menu-overlay {
    display: none !important;
  }

  .pc-view {
    display: block;
  }

  .m-view {
    display: none;
  }
}

/* 헤더·CNB·GNB 모바일화 (D29 BREAKPOINT: ≤767px — 768~1024px는 PC GNB 노출) */
@media (max-width: 767px) {
  .pc-view {
    display: block;
  }

  .m-view {
    display: none;
  }

  /* Header .cnb (Top Navigation) overflow 방지 */
  header .cnb {
    overflow-x: hidden;
  }

  header .cnb .logo{
  gap: 0px !important;
  }
  /* CNB (Center Navigation Bar) 모바일 최적화 */
  header .cnb .container {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 15px !important;
    position: relative;
  }

  /* 로고 크기 축소 (모바일: 120px, 태블릿: 150px) */
  header .cnb h1 {
    flex-shrink: 0;
  }

  header .cnb h1 a {
    display: block;
  }

  header .cnb h1 img {
    max-width: 150px;
    height: auto;
  }
  header .cnb h1 a.cb_logo img {
    max-width: 80px;
    height: auto;
  }


  /* CNB rgt (로그인/장바구니/회원가입) 모바일 최적화 */
  header .cnb .rgt {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-right: 50px;
    /* 햄버거 버튼 공간 확보 */
    max-width: calc(100% - 60px);
    /* 햄버거 버튼 영역 확보 (44px + 여유 16px) */
    overflow: hidden;
    /* overflow 방지 */
    flex-shrink: 1;
    /* 공간 부족 시 축소 */
    display: none;
  }

  header .cnb .rgt .loginNav {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
  }

  header .cnb .rgt .loginNav a.loginBtn,
  header .cnb .rgt .loginNav ul li a {
    font-size: 0;
    /* 텍스트 숨김 */
    width: var(--touch-target);
    height: var(--touch-target);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    position: relative;
  }

  /* Font Awesome 아이콘 표시 */
  header .cnb .rgt .loginNav a.loginBtn::before {
    content: "\f007";
    /* fa-user */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: var(--spacing-lg);
    color: var(--color-text);
  }

  /* 장바구니 아이콘 */
  header .cnb .rgt .loginNav ul li:first-child a::before {
    content: "\f07a";
    /* fa-shopping-cart */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: var(--spacing-lg);
    color: var(--color-text);
  }

  /* 장바구니 badge 위치 조정 */
  header .cnb .rgt .loginNav .cart-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: var(--spacing-sm) !important;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
  }

  /* 회원가입 아이콘 */
  header .cnb .rgt .loginNav ul li:last-child a::before {
    content: "\f234";
    /* fa-user-plus */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: var(--spacing-lg);
    color: var(--color-text);
  }

  /* 로그인 상태 - loginState, name 텍스트 숨김 */
  header .cnb .rgt .loginNav .loginState,
  header .cnb .rgt .loginNav .name {
    display: none !important;
  }

  /* 추가: 로그인 상태 첫 번째 li 숨김 ("홍길동님 환영합니다") */
  header .cnb .rgt .loginNav ul li:first-child {
    display: none !important;
  }

  /* 로그아웃 버튼 - 텍스트 숨기고 아이콘만 표시 */
  header .cnb .rgt .loginNav ul li:last-child a {
    font-size: 0;
  }

  header .cnb .rgt .loginNav ul li:last-child a img.ico {
    display: block;
    width: var(--spacing-lg);
    height: var(--spacing-lg);
  }

  /* GNB (Global Navigation Bar) 반응형 처리 */

  .gnb {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .gnb .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
  }

  .gnb nav {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
  }

  .gnb ul.depth1,
  .gnb ul.lft.depth1,
  .gnb ul.rgt.depth1 {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
  }

  .gnb ul.depth1>li {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Depth2 메뉴는 모바일/태블릿에서 숨김 (오버플로우 방지) */
  .gnb ul.depth2 {
    display: none !important;
  }

  /* GNB 스타일 개선 (Phase 4) */
  /* 배경색 강조 및 시각적 구분 */
  .gnb {
    background-color: var(--color-bg-lightest) !important;
    border-bottom: 1px solid var(--color-border) !important;
  }

  .gnb ul.depth1>li>a {
    padding: 12px 20px !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease;
  }

  /* Active 상태 스타일 */
  .gnb ul.depth1>li.on>a,
  .gnb ul.depth1>li>a:hover {
    border-bottom: 2px solid var(--color-primary) !important;
    font-weight: 700 !important;
    background-color: var(--color-white) !important;
  }

  /* 터치 타겟 확보 (WCAG 2.5.5 Level AAA - 44x44px) */
  .gnb ul.depth1>li>a {
    min-height: var(--touch-target) !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* F1(c6a90f21d T-P2-11 후속): 768~1023px 구간 PC GNB 가로 오버플로우 → 페이지 가로 스크롤 차단.
   원인: 이 구간은 .gnb overflow-x:visible 인데 ul.lft.depth1(≈879px)이 뷰포트보다 넓어 페이지로 누출.
   해결: GNB 내부 스크롤 컨테이너(nav)에 가둔다. .gnb nav 는 flex 인플로우이고, depth2 메가메뉴는
   .gnb(position:relative) 기준 absolute + nav 는 .gnb 의 하위이므로 nav overflow 가 depth2 를 자르지 않음
   (포함블록 .gnb 가 스크롤 컨테이너 nav 의 상위 → 절대위치 후손은 클리핑 제외). ≤767 은 .gnb 자체
   overflow-x:auto(위 블록)로 처리. (D29 BREAKPOINT)
   2026-07-11(민간자격증 GNB 대분류 추가): .lft.depth1 ≈879→≈1006px 로 증가. 게스트 기준
   컨테이너=0.95·vw 이므로 vw 1024~1032px 에서 메뉴가 넘쳐 페이지 가로 스크롤 ~8px 발생(1032px 초과는 해소).
   상한(max-width:1023) 제거 → GNB 가 실제로 컨테이너를 넘칠 때만 nav 내부 스크롤(auto=맞으면 no-op,
   ≥1032px 데스크톱은 스크롤바 미표시=시각변화 0). depth2 클리핑 없음은 위 포함블록 논리로 폭 무관 유지. */
@media (min-width: 768px) {
  #itbankHeader .gnb nav {
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* 푸터 패밀리사이트 중간폭 오버플로우 가드 (1025~1279): 고정 1280px .familySite(position:absolute)가 유동 body에서 좌우 넘침(1120px 뷰포트 실측 +72px) → 컨테이너 폭으로 캡. ≤1024는 display:none(하단 블록), ≥1280 데스크톱은 불변. #itbankFooter에 overflow 미부여(패밀리사이트 상향 팝업 세로 유령 스크롤바 방지) */
@media (min-width: 1025px) and (max-width: 1279px) {
  #itbankFooter .familySite {
    max-width: 100%;
  }
}

/* 좌측메뉴·푸터 반응형 (태블릿+모바일 ≤1024px — D29에서 768~1024는 PC GNB이나 본문/푸터는 태블릿 스택 유지) */
@media (max-width: 1024px) {
  /* Left Menu Area (MyPage, MyClassroom 등의 좌측 메뉴) - 모바일/태블릿에서 숨김 */
  .lftArea {
    display: none !important;
  }

  /* lftArea가 숨겨졌을 때 본문 영역이 전체 너비 사용 */
  #mypageSection .container,
  #myClassroomSection .container {
    display: block !important;
  }

  #mypageSection .content,
  #myClassroomSection .content {
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* Footer 반응형 처리 */
  #itbankFooter {
    width: 100% !important;
    overflow-x: hidden;
  }

  #itbankFooter .container {
    width: 100% !important;
    padding: var(--spacing-lg) 15px !important;
    box-sizing: border-box;
  }

  /* KG 에듀원 로고 숨김 (참고 URL과 일치, 모바일 공간 절약) */
  #itbankFooter .foot-logo {
    display: none !important;
  }

  #itbankFooter .midcont {
    width: 100% !important;
  }

  #itbankFooter .midcont dl,
  #itbankFooter .midcont dt,
  #itbankFooter .midcont dd {
    display: block;
    width: 100% !important;
    margin-left: 0 !important;
  }

  #itbankFooter .midcont dt {
    margin-bottom: var(--spacing-xs);
  }

  #itbankFooter .midcont dd {
    margin-bottom: var(--spacing-md);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  #itbankFooter .rgtcont {
    width: 100% !important;
    margin-top: var(--spacing-lg);
  }

  /* KG 가족사 섹션 숨김 (1280px 고정 너비로 인한 overflow 방지) */
  #itbankFooter .familySite,
  #itbankFooter .eduoneSite,
  #itbankFooter .KG_familySite {
    display: none !important;
  }

  /* Footer 세로 스택 최적화 (Phase 5) */

  /* FNB (Foot Navigation Bar) - 세로 스택, 중앙 정렬 */
  #itbankFooter .fnb ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: var(--spacing-lg);
	gap: 12px 24px;
	flex-wrap: wrap;
	justify-content: center;
  }

  #itbankFooter .fnb ul li {
    text-align: center;
  }

  #itbankFooter .fnb ul li a {
    display: block;
    font-size: var(--font-sm);
    line-height: var(--lh-base);
  }

  /* Company info (Infomation) - 작은 폰트, 가독성 개선 */
  #itbankFooter .infomation .foot-text {
    font-size: var(--font-xs) !important;
    line-height: var(--lh-relaxed) !important;
    text-align: center;
  }

  #itbankFooter .infomation .foot-text address p {
    margin-bottom: 8px;
    line-height: var(--lh-relaxed);
  }

  #itbankFooter .infomation .foot-text address p span {
    display: block;
    margin-bottom: var(--spacing-xxs);
  }

  /* ISMS 및 WA Mark 인증 마크 숨김 */
  #itbankFooter .rgt {
    display: none !important;
  }

  /* Footer flex 레이아웃 - 모바일에서 세로 스택 */
  #itbankFooter .infomation .flex.flex-tj {
    flex-direction: column;
    align-items: center;
  }

  /* Margin/Padding 최적화 */
  #itbankFooter .midcont {
    margin-bottom: var(--spacing-lg);
  }

  #itbankFooter .btn-famliy {
    display: block;
    margin: var(--spacing-sm) auto;
    text-align: center;
  }
}

/* 헤더·GNB 터치타겟 확대는 모바일 전용 (D29 BREAKPOINT: ≤767px — 768~1024 PC GNB는 원본 유지) */
@media (max-width: 767px) {

  /* 터치 타겟 크기 확보 (WCAG 2.5.5 Level AAA - 44x44px) */

  /* Header 모든 링크 및 버튼 */
  header a,
  header button {
    min-height: var(--touch-target) !important;
    padding: 12px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* GNB 링크 */
  .gnb a {
    min-height: var(--touch-target) !important;
    padding: 12px 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* Footer 모든 링크 */
  footer a,
  #itbankFooter a {
    display: inline-block !important;
    box-sizing: border-box !important;
  }
}

/* 모바일 레이아웃 (< 768px) */
@media (max-width: 767px) {
  .pc-view {
    display: none;
  }

  .m-view {
    display: block;
  }

  /* 메인 컨테이너 */
  #container {
    width: 100% !important;
    padding: 0 15px;
    overflow: visible;
  }

  /* 콘텐츠와 사이드바를 세로 스택으로 */
  #content,
  #snb {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 사이드바에 위쪽 여백 추가 */
  #snb {
    margin-top: var(--spacing-lg);
  }

  /* 서브 탑 콘텐츠 */
  #subtop_content {
    height: auto;
    min-height: 100px;
    background-size: cover;
    background-position: center;
  }

    header .cnb .logo{
	  gap: 8px !important;
	  }

}

/* -----------------------------------------------------------------------------
   6.2 폼 요소 (Form Elements)
   ----------------------------------------------------------------------------- */

@media (max-width: 767px) {

  /* 모든 텍스트 입력 필드 */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="search"],
  select,
  textarea,
  .input_s {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    font-size: var(--font-base) !important;
    /* iOS 자동 줌 방지 */
  }

  /* 터치 타겟 크기 확보 */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="url"],
  input[type="search"],
  select {
    min-height: var(--touch-target);
    padding: var(--spacing-sm) !important;
  }

  /* Textarea */
  textarea {
    min-height: 100px;
    padding: var(--spacing-sm) !important;
    width: 100% !important;
  }

  /* 라디오 버튼과 체크박스 터치 영역 확대 */
  input[type="radio"],
  input[type="checkbox"],
  input.radio,
  input.check {
    width: var(--spacing-lg);
    height: var(--spacing-lg);
    margin: 12px;
  }

  /* Fieldset */
  fieldset {}

  legend {
    padding: 6px 10px;
  }
}

/* -----------------------------------------------------------------------------
   6.3 테이블 (Tables)
   ----------------------------------------------------------------------------- */

@media (max-width: 767px) {

  /* ----- 데이터 목록 테이블 (Board, List Board) ----- */
  table#board,
  table#list_board {
    width: 100%;
    border: 0;
  }

  /* thead 숨기기 */
  table#board thead,
  table#list_board thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  /* tbody */
  table#board tbody,
  table#list_board tbody {
    display: block;
  }

  /* 각 행을 카드 형태로 */
  table#board tbody tr,
  table#list_board tbody tr {
    display: block;
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--color-border) !important;
    border-radius: var(--spacing-xxs);
    padding: var(--spacing-sm);
    background: var(--color-white);
  }

  /* 셀을 블록으로 */
  table#board tbody th,
  table#board tbody td,
  table#list_board tbody th,
  table#list_board tbody td {
    display: block;
    width: 100% !important;
    text-align: left !important;
    padding: 8px 10px !important;
    border: none !important;
    border-bottom: 1px solid var(--color-border-light) !important;
  }

  /* 마지막 셀은 border 제거 */
  table#board tbody tr td:last-child,
  table#list_board tbody tr td:last-child {
    border-bottom: none !important;
  }

  /* data-label 패턴 적용 (HTML에 data-label 속성 필요) */
  table#board tbody td:before,
  table#list_board tbody td:before {
    content: attr(data-label);
    font-weight: bold;
    display: inline-block;
    width: 100px;
    margin-right: var(--spacing-sm);
    color: var(--color-primary);
  }

  /* data-label이 없는 경우 대비 */
  table#board tbody td:not([data-label]),
  table#list_board tbody td:not([data-label]) {
    padding-left: 0 !important;
  }

  /* ----- 폼 테이블 (Board Form) ----- */
  table#board_form {
    width: 100%;
    border: 0;
  }

  table#board_form tbody tr {
    display: block;
    margin-bottom: var(--spacing-md);
  }

  table#board_form tbody th,
  table#board_form tbody td {
    display: block;
    width: 100% !important;
    text-align: left !important;
    padding: var(--spacing-sm) !important;
  }

  table#board_form tbody th {
    background: var(--color-bg-light);
    font-weight: bold;
    border-bottom: none !important;
    padding-bottom: var(--spacing-xs) !important;
  }

  table#board_form tbody td {
    padding-top: var(--spacing-xs) !important;
    border-top: none !important;
  }

  /* tfoot 버튼 영역 */
  table#board_form tfoot td {
    display: block;
    text-align: center;
    padding: var(--spacing-lg) 10px !important;
  }

  /* ----- 가로 스크롤 테이블 (필요 시 사용) ----- */
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive table {
    width: 100%;
    min-width: 600px;
    /* 최소 너비 보장 */
  }
}

/* -----------------------------------------------------------------------------
   6.4 버튼 및 인터랙션 요소 (Buttons & Interactive Elements)
   ----------------------------------------------------------------------------- */

@media (max-width: 767px) {

  /* 기본 버튼 터치 타겟 확보 */
  button,
  input[type="submit"],
  input[type="button"],
  input[type="reset"],
  a.btn {
    min-width: var(--touch-target);
    min-height: var(--touch-target);
    padding: 12px 10px !important;
    font-size: var(--font-sm);
	text-align: center;
  }

  /* 버튼 그룹 float 해제 */
  .btn_chk_ok,
  .btn_chk_no,
  .btn_q_prev,
  .btn_q_next {
    display: block;
    margin: var(--spacing-sm) auto;
    text-align: center;
  }

  .btn_chk_ok a,
  .btn_chk_no a,
  .btn_q_prev a,
  .btn_q_next a {
    display: inline-block;
  }

  /* 작은 아이콘 버튼 확대 (신중하게 사용) */
  .btn_up a,
  .btn_down a {
    transform: scale(1.5);
    transform-origin: center;
    display: inline-block;
    margin: var(--spacing-sm);
  }

  /* 버튼 컨테이너 중앙 정렬 */
  .button-group,
  tfoot td {
    text-align: center;
  }

  .button-group>* {
    margin: var(--spacing-xs);
  }
}

/* -----------------------------------------------------------------------------
   6.5 이미지 (Images)
   ----------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .sub-section {
    padding: 0px 0px 42px !important;
  }

  /* 고정 너비 이미지 컨테이너 반응형화 */
  .certifi_img,
  .smart_img {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    margin: var(--spacing-lg) 0 !important;
  }

  /* 이미지 내부 요소 */
  .certifi_img img,
  .smart_img img {
    width: 100%;
    height: auto;
  }

  /* 배경 이미지 조정 */
  #subtop_content,
  #sample_edu,
  #loginbox,
  #newguide {
    background-size: cover;
    background-position: center;
  }

  /* 프로필 이미지 */
  #prof_img {
    width: 100% !important;
    max-width: 300px;
    height: auto;
    margin: var(--spacing-md) auto !important;
  }
}

/* ============================================
   마이페이지 서브메뉴 - PC에서 항상 숨김
   모바일 햄버거 메뉴에서만 표시됨
   ============================================ */
.gnb ul.rgt.depth1 .mypage-submenu {
  display: none !important;
}