@font-face {
  font-family: 'Noto Sans KR';
  src: url('/assets/font/NotoSansKR-Black.ttf') format('truetype');
  font-weight: 900; /* Black 굵기는 보통 900 */
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.header {
  text-align: center;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500; /* 얇은 굵기 */
}

.header-divider {
  width: 1px;
  height: 16px;
  background-color: rgba(26, 22, 30);
  display: inline-block;
}

.container {
  width: 100%;
  max-width: 1144px;
  margin: 0 auto;
  padding: 0 20px; /* 모바일 대응 시 여백 */
  box-sizing: border-box;
}

.main {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 좌, 중간, 우 */
  width: 100%;
}

.header-top,
.nav,
.main {
  overflow: visible; /* 반드시 필요 */
  position: relative; /* submenu가 absolute로 뜰 수 있도록 */
  z-index: 1;
}

/* header-top 구조: CI와 언어를 양쪽에 정렬 */
.header-top {
  display: flex;
  justify-content: left;
  align-items: center;
  padding: 10px 20px; /* ← 양쪽 여백 */
  gap: 10px;
  margin-top: 20px;
  margin-left: 0px;
}

.logo-ci {
  cursor: pointer;
  /* margin-left: 17%; */
  height: 30px;
}

.logo-ci-text {
  cursor: pointer;
  margin-right: 40px;
  height: 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* inline-block의 여백 방지 */
  image-rendering: auto;
}

/* 언어 선택 여백 */
.language_switch {
  display: flex;
  gap: 10px;
  margin-left: 25%;
  font-size: 20px;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
}

.main_contents {
  flex: 1; /* 남는 공간을 채워 푸터를 아래로 밀어냄 */
}

.menu_bar {
  display: flex;
  gap: 60px; /* 각 메뉴 아이템 간의 간격 조절 */
  justify-content: center;
  align-items: center;
  color: #686666;
}

.menu-item-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 초기 submenu는 숨김 */
.submenu {
  position: absolute;
  top: 100%;
  cursor: pointer;
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1000;
}

/* .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  list-style: none;
  min-width: 120px;
  z-index: 1000;
  padding: 0;
  margin:  0;
} */

/* 마우스 오버 시 submenu 보이게 */
.menu-item-wrapper:hover .submenu {
  display: block;
}

/* 배경 이미지 스크롤 (25-08-13) */
/* 클릭 시에만 열림 */

html { scroll-behavior: smooth; }
.scroll-anchor { scroll-margin-top: 90px; } /* 헤더 높이만큼 조정 */

.menu-item-wrapper.open > .submenu { display:block; }

/* 메가메뉴 레이아웃 */
.submenu-mega{
  width:min(90vw,1100px);
  max-height:72vh;
  overflow:auto;
  list-style:none;
  display:grid;
  grid-template-columns:repeat(2,minmax(320px,1fr));
  gap:16px;
}
.submenu-panel{
  background:#fafafa;border:1px solid #eee;border-radius:12px;
  padding:12px;cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.submenu-panel:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.08); }
.panel-title{ font-weight:800;font-size:15px;color:#333;margin-bottom:10px; }
.panel-gallery{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.panel-img{
  width:100%; height:140px; object-fit:cover; display:block; border-radius:8px;
}
/* */

.submenu li {
  padding: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.menu-item {
  cursor: pointer;
  /* font-weight: bold; */
  padding: 5px 10px;
  white-space: nowrap;
} 

/* 이미지 기본 설정 */
.main_contents {
  max-width: 100%;
  height: auto;
  line-height: 0;
}

/* 마지막 웹 이미지의 맨 아래 2px을 잘라 숨기기 */
/* .main_contents .web-main { */
  /* margin-bottom도 0으로 */
  /*margin-bottom: 0;
  clip-path: inset(0 0 2px 0); */ /* 필요시 3~4px로 조절 */
/* } */

.web-images-02 img,
.web-images-04 img,
.web-images-sub-careers img {
  clip-path: inset(0px 2px 2px 2px); /* 또는 margin-bottom:-2px */ 
}

.web-images-01, 
.web-images-02,
.web-images-04, 
.web-images-sub-game, 
.web-images-sub-careers {
  display: flex;
  align-items: flex-start; /* 위쪽 기준 정렬 */
  line-height: 0;
  background-size: contain;
}

/* 언어 선택 */
.language_switch {
  display: flex;
  gap: 10px;
}

.language {
  cursor: pointer;
  font-weight: bold;
}

.games-section {
  position: relative;
  width: fit-content;
  margin: 0 auto; /* 가운데 정렬 */
}

.games-section img {
  display: block;
  width: 100%;
  height: auto;
}

.games-link {
  position: absolute;
  bottom: 320px;          /* 이미지 아래쪽 기준 위치 조절 */
  left: 25%;             /* 가운데 정렬 */
  transform: translateX(-50%);
  padding: 12px 30px;
  border: 1px solid #666;
  border-radius: 999px;
  font-weight: bold;
  font-size: 16px;
  background-color: white;
  color: #333;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.games-link:hover {
  background-color: #f5f5f5;
  color: #b29be2;
  border-color: #b29be2;
}

.btn-business-email {
  position: relative;   /* 또는 absolute */
  top: -435px;            /* 위/아래 이동 */
}

.btn-homepage {
  position: relative;   /* 또는 absolute */
  top: -170px;            /* 위/아래 이동 */
}

.btn-with {
  position: relative;   /* 또는 absolute */
  top: -130px;            /* 위/아래 이동 */
}

.email {
  position: relative;
  width: fit-content;
  margin: 0 auto; /* 가운데 정렬 */
}

.email img {
  display: block;
  width: 100%;
  height: auto;
}

.email-link {
  position: absolute;
  bottom: 50px;          /* 이미지 아래쪽 기준 위치 조절 */
  left: 50%;             /* 가운데 정렬 */
  transform: translateX(-50%);
  padding: 12px 30px;
  border: 1px solid #666;
  border-radius: 999px;
  font-weight: bold;
  font-size: 16px;
  background-color: white;
  color: #333;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.email-link:hover {
  background-color: #f5f5f5;
  color: #b29be2;
  border-color: #b29be2;
}

.happy .web-main {
  height: 700px;
  margin-top: 100px;
}

.footer {
  background-color: rgb(26, 22, 30);
  padding: 40px 60px;
  display: flex;
  align-items: flex-start; /* 위쪽 정렬 */
  justify-content: center;
  color: white;
  gap: 40px;
  line-height: 0; /* 하위 이미지 주변 여백 제거 */
}

.footer .ci_logo_container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 15px;
}

.footer .ci_logo_container .ci_logo {
  background-size: contain;
  background-repeat: no-repeat;
  /* background-image: url(/assets/images/web/btm/btm_ci.png); */ 
  margin-right: 130px;
  margin-left: 30px;
}

/* 데스크톱 푸터 레이아웃 */
.footer .info{
  display:flex;
  flex-direction:column;
  gap:10px;
  line-height:1.6;
}
.footer .info .top{ display:block; }
.footer .info .address{ color:#d8d8d8; font-size:14px; margin:0 0 6px 0; }
.footer .info .info_detail{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  color:#d8d8d8;
  font-size:13px;
}
.footer .info .info_detail .divider{
  width:1px;
  height:12px;
  background:#6b6b6b;
  margin:0 6px;
}
.footer .bottom{ margin-top:12px; }
.footer .bottom .buttons{ display:flex; align-items:center; flex-wrap:wrap; gap:0 14px; }
.footer .bottom .buttons a{
  color:#bdbdbd; font-size:12px; text-decoration:none; position:relative;
}
.footer .bottom .buttons a:hover{ color:#ffffff; }
.footer .bottom .buttons a + a::before{
  content:""; position:relative; display:inline-block; width:1px; height:10px; background:#6b6b6b; margin:0 14px 0 2px; top:1px;
}
.footer p.copyright{ margin:6px 0 0 0; font-size:12px; color:#b0b0b0; }
.footer img.web-bottom{ width:210px; height:auto; display:block; }

/* 컨테이너 레벨에서 로고와 정보 블록을 가로 배열 (menu.php 구조 대응) */
.footer > .container{
  display:flex;
  align-items:flex-start;
  gap:40px;
}

/* 초기값: PC용 이미지만 보이게 */
.ci_logo_container { display: block; }
.footer-mobile-bg { display: none; }

/* PC에서는 menu-only 숨김 */
.menu-only {
  display: none;
}

.web-main {
  display: block;
  margin: 20px auto;  /* 위아래 20px, 좌우 자동 가운데 정렬 */
  max-width: 100%;
  height: auto;
}

/* 기본적으로 모바일용 이미지 숨김 */
.mobile-main {
  display: none;
}

.games-section .mobile-main {
  display: none;
}

.email .mobile-main {
  display: none;
}

/* 모바일 오버레이 메뉴 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mobile-menu .mobile-menu-close {
  display: none;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
}

.mobile-menu ul li {
  display: none;
  font-size: 22px;
  padding: 15px 0;
  font-weight: bold;
  cursor: pointer;
}

.mobile-menu .close-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 30px;
  cursor: pointer;
}

/* 모바일에서는 모든 이미지 보임 */
@media (max-width: 768px) {

  /* (A) PC 전용 섹션/사이드 이미지 완전 숨김 */
  .web-images-01,
  .web-images-02,
  .web-images-03,
  .web-images-04,
  .web-main,
  .web-side { 
    display:none !important; 
  }

  .header-top {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .logo {
    width: 90px;
    height: auto;
    flex-shrink: 0;
  }

  .logo-ci source,
  .logo-ci-text source {
    margin: 0 0 10px 0;           /* 로고 아래 여백 */
  }

  .menu_bar {
    display: flex !important;
    margin-right: 30px;
    flex-direction: row;           /* 가로 정렬 유지 */
    flex-wrap: nowrap;             /* ✅ 줄바꿈 방지 */
    justify-content: center;       /* ✅ 중앙 정렬 */
    align-items: center;           /* ✅ 세로 정렬 정중앙 */
    gap: 3px;                     /* ✅ 메뉴 간격 여유 */
    padding: 0;
    position: static;
    width: 100%;
    overflow-x: auto;              /* ✅ 필요시 가로 스크롤 허용 (모바일 대비) */

    -webkit-overflow-scrolling:touch;
    white-space:nowrap;

    padding-inline: max(16px, env(safe-area-inset-left)) 
                    max(16px, env(safe-area-inset-right));     /* 좌우 여백 */
    scroll-padding-inline: 16px;                                /* 스크롤 기준 여백 */
  }

  /* 첫/마지막 아이템이 모서리에 붙지 않도록 가짜 여백 추가(모든 브라우저 안전) */
  .menu_bar::before,
  .menu_bar::after{
    content:"";
    flex:0 0 12px;        /* 좌우 12px 버퍼 */
  }

  .menu_bar.active {
    display: flex;
  }

  .menu_bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .menu-item-wrapper {
    flex-shrink: 0;
    white-space: normal;
    padding: 10px 15px;
  }

  .menu-item {
    font-size: 13px;
    padding: 4px 6px;
  }

  .header-divider {
    display: none; /* 모바일에서는 구분선 생략 */
  }

  .submenu {
    top: 100%;
    z-index: 999;
  }

  /* 버튼 주변 여백이 과도하면 섹션을 가운데 정렬 */
  #games-world-02,
  #business-alliance,
  #careers-info {
    text-align: center;                 /* 인라인 요소일 때도 안전하게 중앙 */
  }

  /* 본문 이미지와 푸터가 맞닿도록 */
  .web-main { display:none; } 
  .mobile-main { display:block; margin:0; }

  /* 데스크톱용(웹) 푸터는 강제로 숨김 */
  .footer .ci_logo_container,
  .footer img.web-bottom {
    display:none !important;
  }

  /* (B) 본문/이미지 하단 여백/베이스라인 제거 */
  .main_contents,
  .main_contents .container { 
    margin:0 !important; 
    padding:0 !important; 
    background:transparent !important; 
  }
  img, .mobile-main, .mobile-bottom {
    display:block !important;
    margin:0 !important;
    padding:0 !important;
    vertical-align:bottom !important;
    line-height:0 !important;
    border:0 !important;
  }

  /* (C) 푸터 표시 + 여백/테두리 0 */
  .footer,
  .footer > .container,
  .footer-mobile-bg {
    display:block !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    line-height:0 !important;
    background:#1a161e;
    position:relative;
  }

  /* (D) 웹 푸터 숨기고 모바일 푸터만 표시 */
  .footer .ci_logo_container,
  .footer img.web-bottom { display:none !important; }
  .footer .footer-mobile-bg { display:block !important; }
  .footer .footer-mobile-bg .mobile-bottom {
    display:block !important;
    width:100%;
    height:auto;
  }

  /* (E) 경계 1px 헤어라인 보정 – 단일 방식만 사용(top:0) */
  .footer::before{
    content:"";
    position:absolute;
    left:0; right:0; top:0;      /* ← -1px 아님 */
    height:1px;
    background:#1a161e;
    pointer-events:none;
  }

  /* 모바일 버튼을 중앙 정렬 + 크기 통일 */
  .mobile-main.btn-homepage
  /* .mobile-main.btn-business-email, */
  /* .mobile-main.btn-with */ {
    position: static !important;
  /*  transform: none !important; */
    float: none !important;

    display: block;
    width: clamp(220px, 86vw, 360px);
    max-width: calc(100% - 40px);   /* .container 좌우 20px 패딩 고려 */
    height: auto;
    margin: 16px auto 0 !important; /* ← auto가 꼭 적용되도록 */
    box-sizing: border-box;
    object-fit: contain;
  }

  /* 1) 섹션을 기준점으로 + 변수로 반응형 제어 */
  #business-alliance{
    position: relative;

    /* 버튼 폭/오프셋을 반응형으로 제어 (더 작고 더 아래) */
    --btn-w: clamp(170px, 56vw, 280px);     /* 이전 64vw → 56vw로 축소 */
    --btn-offset: clamp(22px, 6vw, 40px);   /* 중앙보다 더 아래로 내림 */

    /* 3) 절대배치 버튼이 텍스트를 덮지 않도록 섹션 하단에 여유 공간 확보 */
    padding-bottom: calc(var(--btn-w) * 0.35);
  }

  /* 2) 버튼: 중앙 겹치기 + 축소 + 더 아래 배치 */
  #business-alliance .mobile-main.btn-business-email{
    position: absolute !important;
    left: 50%;
    top: calc(50% + var(--btn-offset));   /* 중앙 + 오프셋(더 아래) */
    transform: translate(-50%, -50%);
    width: var(--btn-w);
    height: auto;
    margin: 0 !important;
    z-index: 1;                            /* 텍스트보다 한 단계 낮게 */
    background: #fff;                      /* 투명 PNG 보정 */
    border-radius: 9999px;
    box-shadow: inset 0 0 0 1px #ddd, 0 2px 8px rgba(0,0,0,.06);
  }

  /* 4) 텍스트가 버튼 위에 보이도록 레이어 올리기(선택) */
  #business-alliance .hero-title,
  #business-alliance .hero-desc{
    position: relative;
    z-index: 2;
    margin-bottom: 8px;                    /* 필요 시 여백 */
    text-align: center;                    /* 가운데 정렬 */
  }

  /* 세로가 아주 짧은 기기에서 추가 보정(선택) */
  @media (max-height: 640px) {
    #business-alliance{
      --btn-w: clamp(160px, 52vw, 260px);
      --btn-offset: clamp(14px, 4.5vw, 28px);
    }
  }

  /* 부모: 겹치기가 되도록 gap을 없애고, 겹침 허용 */
#careers-info{
  display:grid;
  place-items:center;
  gap: 0;                 /* ✅ gap 제거: 이게 핵심 */
  padding: clamp(6px,1.6vw,12px) 16px clamp(12px,3vw,24px);
  position: relative;
  overflow: visible;
}

/* 이미지의 하단 여백 제거(베이스라인 여백) */
#careers-info .mobile-main:not(.btn-with){
  display:block; margin:0 !important; padding:0 !important; line-height:0;
}

/* 버튼: 가운데 + 위로 끌어올리기(겹치기) */
#careers-info img.mobile-main.btn-with{
  display:block;
  width: clamp(200px, 64vw, 320px);
  max-width: calc(100% - 40px);
  height:auto;
  margin: 0 auto !important;

  /* ▼ 숫자 키울수록 더 위로 붙습니다 */
  --pullup: clamp(40px, 10vw, 90px);
  transform: translateY(calc(-1 * var(--pullup))) !important;

  /* 다른 규칙이 덮지 않도록 보조 */
  justify-self:center !important;
  z-index: 2;
}

  /* 섹션: 가운데 정렬 + 간격 0 (이미지 ↔ 버튼 사이 여백 제거) */
#games-world-02{
  --pullup: clamp(48px, 14vw, 140px); /* ↑ 값 ↑ = 더 위로 */
  --btnw:   clamp(200px, 64vw, 320px);

  display:grid;
  place-items:center;
  gap:0;
  padding: clamp(6px,1.6vw,12px) 16px clamp(12px,3vw,20px);
  position:relative;
  overflow:visible;
}

/* 배경(휴대폰) 이미지의 기본 하단 여백 제거 */
#games-world-02 img.mobile-main.hero-img{
  display:block; margin:0 !important; padding:0 !important; line-height:0;
}

/* ▶ 공통(.mobile-main.btn-homepage)의 margin/transform을 '강하게' 덮어쓰기 */
#games-world-02 img.mobile-main.btn-homepage{
  display:block;
  width:var(--btnw);
  max-width:calc(100% - 40px);
  height:auto;
  margin:0 auto !important;               /* 좌우 중앙 + 공통 margin 제거 */
  transform:none !important;              /* 혹시 남아있는 transform 초기화 */

  /* 핵심: 음수 마진으로 위로 당김 (우선순위 충돌에도 확실함) */
  margin-top: calc(-1 * var(--pullup)) !important;

  justify-self:center !important;
}
}
 


/* Mobile footer layout (scoped) */
@media (max-width: 768px){
  .footer .footer-mobile-bg .m-footer{ 
    padding: 26px 20px 30px; 
    line-height: 1.7 !important; 
    color:#dcdcdc; 
    background:#1a161e; 
  }
  .footer .footer-mobile-bg .m-brand{ margin: 6px 0 30px; }
  .footer .footer-mobile-bg .m-logo{ width: 200px; height:auto; display:block; }

  .footer .footer-mobile-bg .m-info p{ 
    margin: 4px 0;
    font-size: 14px; 
    color:#cfcfcf; 
  }
  .footer .footer-mobile-bg .m-info .address{ color:#e7e7e7; font-weight:700; }
  .footer .footer-mobile-bg .m-info .email a{ color:#c7d2ff; text-decoration:none; }

  .footer .footer-mobile-bg .m-links{ 
    display:flex; 
    align-items:center; 
    flex-wrap:wrap; 
    gap:0 12px; 
    margin-top: 12px; 
  }
  .footer .footer-mobile-bg .m-links a{ color:#9a9a9a; font-size:13px; text-decoration:none; }
  .footer .footer-mobile-bg .m-links a:hover{ color:#ffffff; }
  .footer .footer-mobile-bg .m-links a + a::before{ 
    content:""; display:inline-block; width:1px; height:10px; background:#565656; margin:0 12px 0 2px; vertical-align:middle; 
  }

  .footer .footer-mobile-bg .m-copy{ margin-top: 30px; font-size:12px; color:#7d7d7d; }
}
