/**
 * layout.css — 사이트 골격 (Header + Banner + GNB + Drop-down + Mobile Panel + Anchor Nav + Footer + Agegate)
 * ────────────────────────────────────────────────────────────────────────────
 * 로드 순서: reset → base → font → layout → pc → tablet → mobile
 * 셀렉터별 모든 미디어 변형이 이 파일 한 곳 (PC + @media tablet/mobile).


/* ── Display utility ── */
.dis_pc, .dis_pc_tab { display: block; }
.dis_mo_tab, .dis_mo { display: none; }

/* ── Header — fixed wrapper. 자식 (banner + menu_container) 는 일반 흐름으로 stack ── */
#header_container { position: relative; top: 0; left: 0; width: 100%; z-index: 9999; }
body.is-scrolled #header_container { position: fixed; }
body.is-scrolled { padding-top: var(--header-h, 0px); }

/* ── Menu container (PC GNB) — header 안 일반 흐름 ── */
#menu_container { display: flex; justify-content: center; background: #014d39; /* border-bottom: 1px solid rgba(255, 255, 255, 0.50); */ }

/* Menu wrap — grid 3 col (logo 300 / menu_item 1fr / sns 150). 양옆 var(--page-gutter) */
.menu_wrap { width: 100%; height: var(--gnb-height); padding: 0 var(--page-gutter); display: grid; grid-template-columns: 300px 1fr 150px; align-items: center; }

/* Logo */
#menu_container .menu_logo { display: flex; align-items: center; width: 300px; height: 60px; cursor: pointer; }
#menu_container .menu_logo img { display: block; height: 100%; width: auto; max-width: 100%; }

/* 1depth */
#menu_container .menu_item { color: #fff; }
.menu-1depth { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; padding: 0; margin: 0; }
.menu-1depth li { font-size: 18px; font-weight: 500; text-align: left; }
.menu-1depth li a { display: block; color: #fff; cursor: pointer; }
.menu-1depth li a.active { font-weight: 600; text-decoration: underline; text-underline-offset: 7px; }

/* SNS */
.menu_comm { display: flex; justify-content: flex-end; }
.menu_comm a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 5px; font-size: 26px; color: #fff; opacity: 0.7; }
.menu_comm a:hover { opacity: 1; }

/* ── Drop-down (PC hover) — grid 로 1depth 와 동일 column 너비 매칭 ── */
.drop-wrap { position: fixed; top: calc(var(--banner-height, 0px) + var(--gnb-height)); left: 0; width: 100%; display: none; background: #84754ef2; border-bottom: 1px solid rgba(0, 61, 40, 0.15); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); z-index: 100; }
.drop-wrap.is-open { display: block; }
.drop-grid { width: 100%; padding: 3dvh var(--page-gutter); display: grid; grid-template-columns: 300px repeat(3, 1fr) 150px; align-items: start; }
.drop-grid > .drop-submenu:nth-of-type(1) { grid-column: 2; }
.drop-grid > .drop-submenu:nth-of-type(2) { grid-column: 3; }
.drop-grid > .drop-submenu:nth-of-type(3) { grid-column: 4; }
.drop-submenu { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 0; margin: 0; }
.drop-submenu a { display: flex; align-items: center; color: #fff; font-size: 16px; font-weight: 400; word-break: keep-all; }
.drop-submenu a:hover { text-decoration: underline; }
.drop-submenu a.active { font-weight: 600; text-decoration: underline; text-underline-offset: 7px; }
/* NEW 뱃지 — 메뉴 a.new_map_nav 의 ::after 로 골드 회전 광채
   absolute 로 빼서 부모 a 의 text-decoration: underline 영향 안 받게 */
.new_map_nav { position: relative; display: inline-block; padding-right: 48px; }
@property --new-badge-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.new_map_nav::after {
  content: "NEW";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  /* background: conic-gradient(from var(--new-badge-angle), #b88440, #d19f58, #f5e0a8, #d19f58, #b88440); */
  background:#004c39;
  border-radius: 4px;
  color: #fff;
  font-family: "Pretendard";
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  animation: newBadgeSpin 4s linear infinite;
}

@keyframes newBadgeSpin {
  to { --new-badge-angle: 360deg; }
}


/* ═════════════════════════════════════════════════════════════════
 *  Tablet + Mobile (max-width: 1024px)
 * ═════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Display utility override */
    .dis_pc { display: none; }
    .dis_mo_tab { display: block; }

    /* #menu_container (모바일 헤더) */
    #menu_container { border: 0; }
    #menu_container .menu_logo { width: auto; height: 38px; }
    #menu_container .menu_logo img { height: 100%; width: auto; }

    /* menu_wrap (모바일 헤더 53px, 자식 수직 가운데 + 좌우 여백) */
    .menu_wrap { width: 100%; max-width: 100%; height: 53px; padding: 0 var(--page-gutter); background: transparent; display: flex; align-items: center; }

    /* SNS — 모바일은 PC GNB .menu_comm 숨김, 모바일 패널 안 .menu_comm.in_pannel 만 */
    .menu_comm { display: none; }
    .menu_comm.in_pannel { display: flex; justify-content: flex-start; padding: 0 30px; margin: 40px 0 20px; }
    .menu_comm.in_pannel a { color: #fff; }

    /* 햄버거 (menu_wrap 안 자식. menu_logo 와 같은 가로 row. 인라인 SVG 두 개 — opacity+rotate 토글) */
    .menu_button { position: relative; z-index: 10000; background: transparent; border: 0; padding: 0; margin-left: auto; cursor: pointer; width: 33px; height: 33px; color: #fff; flex-shrink: 0; }
    .menu_button svg { position: absolute; top: 50%; left: 50%; display: block; transition: opacity 0.25s ease, transform 0.25s ease; }
    .menu_button .ic-open { opacity: 1; transform: translate(-50%, -50%) rotate(0); }
    .menu_button .ic-close { opacity: 0; transform: translate(-50%, -50%) rotate(-90deg); color:#fff; }
    .menu_button.is_active { color: var(--color-hm-dark-green); }
    .menu_button.is_active .ic-open { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }
    .menu_button.is_active .ic-close { opacity: 1; transform: translate(-50%, -50%) rotate(0); }

    /* NEW 뱃지 — 모바일은 N 하나만. sub_menu li a 의 display:block 덮어쓰기 */
    .menu_panel .sub_menu li a.new_map_nav { display: inline-block; padding-right: 28px; letter-spacing: -1.5px; }
    .new_map_nav::after { content: "N"; padding: 1px 5px; top: 11px; background: #d19f58; }

    /* 모바일 메뉴 패널 */
    .menu_panel { position: fixed; z-index: 9999; top: 0; right: -100%; width: 66%; height: 100%; padding-top: 53px; background: #00321f; transition: all 0.2s ease-in-out; }
    .menu_panel.is_active { right: 0; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.28), 0 2px 10px rgba(0,0,0,.18); }
    .menu_panel_overlay { position: fixed; top: 0; z-index: 9998; width: 100%; height: 100%; display: none; background: rgba(0,0,0,0.6); cursor: pointer; }

    /* menu_list (모바일 1depth) */
    .menu_panel > .menu_list { width: 100%; padding-left: 0; }
    .menu_panel > .menu_list > li { width: 100%; border-bottom: 1px solid #014d39; }
    .menu_panel > .menu_list > .menu_label > .menu_list_text { display: block; padding: 24px 0 8px 30px; font-size: 18px; font-weight: 600; color: #fff; }

    /* sub_menu */
    .menu_panel .sub_menu { display: flex; flex-wrap: wrap; width: 100%; padding: 0 30px 30px 30px; }
    .menu_panel .sub_menu li a { display: block; padding: 0 15px 10px 0; font-size: 15px; color: rgba(255, 255, 255, 0.5); }
    .menu_panel .sub_menu li a.active { font-weight: 600; text-decoration: underline; text-underline-offset: 7px; }
}

/* ── Mobile only (max-width: 512px) ── */
@media (max-width: 512px) {
    .dis_pc_tab { display: none; }
    .dis_mo { display: block; }
}


/* ═════════════════════════════════════════════════════════════════
 *  Age Gate Popup (19+ 연령 확인) — inc/popup-agegate.php
 *  pc.css 의 .agegate-popup 영역 통합 (2026-06-02)
 * ═════════════════════════════════════════════════════════════════ */
.agegate-popup { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px); z-index: 99999; }
.agegate-popup .agegate-wrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 460px; width: 90%; padding: 40px 36px 28px; box-sizing: border-box; background: var(--color-hm-cream); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); color: var(--color-hm-dark-green); text-align: center; }
.agegate-popup .agegate-wrap .tit { margin-bottom: 28px; font-size: 22px; font-weight: 500; line-height: 1.4; }
.agegate-popup .agegate-wrap .tit strong { display: block; margin-bottom: 6px; color: var(--color-hm-green); font-size: 30px; font-weight: 700; }
.agegate-popup .agegate-wrap .wrap-btn { position: relative; display: flex; justify-content: center; gap: 12px; z-index: 1; }
.agegate-popup .agegate-wrap .wrap-btn .btn { display: inline-flex; align-items: center; justify-content: center; flex: 1; max-width: 170px; height: 50px; background: var(--color-hm-green); color: #fff; border: none; border-radius: 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; cursor: pointer; transition:  background 0.2s ease; }
.agegate-popup .agegate-wrap .wrap-btn .btn:hover { background: var(--color-hm-dark-green); }
.agegate-popup .agegate-wrap .wrap-btn .btn + .btn { background: transparent; color: var(--color-hm-dark-green); border: 1.5px solid rgba(0, 61, 40, 0.3); }
.agegate-popup .agegate-wrap .wrap-btn .btn + .btn:hover { background: rgba(0, 61, 40, 0.06); box-shadow: none; }
.agegate-popup .agegate-wrap .warning { display: block; margin-top: 22px; color: rgba(0, 61, 40, 0.65); font-size: 11px; line-height: 1.55; text-align: center; }

@media (max-width: 1024px) {
    .agegate-popup .agegate-wrap { max-width: 360px; padding: 30px 24px 22px; }
    .agegate-popup .agegate-wrap .tit { margin-bottom: 22px; font-size: 18px; }
    .agegate-popup .agegate-wrap .tit strong { font-size: 24px; }
    .agegate-popup .agegate-wrap .wrap-btn .btn { height: 44px; font-size: 16px; }
    .agegate-popup .agegate-wrap .warning { margin-top: 16px; font-size: 10.5px; }
}


/* ═════════════════════════════════════════════════════════════════
 *  Banner (inc/banner.php) — header_container 안 자식, 일반 흐름
 *  pc.css 의 .bannerA + .hmb-toast 영역 통합 + dead 정리 (2026-06-02)
 * ═════════════════════════════════════════════════════════════════ */
.bannerA { position: relative; width: 100%; height: auto; }
.bannerA__close { position: absolute; top: 8px; right: 12px; padding: 4px; background: rgba(255,255,255,0.215); color: #fff; border: none; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bannerA__close svg { display: block; }

/* PC 토스트 */
.hmb-toast { position: absolute; z-index: 10000; border-radius: 12px; transition: transform 0.35s ease, opacity 0.35s ease; }
.hmb-toast--a .hmb-toast__img { display: block; width: 100%; border-radius: 12px; box-shadow: 0 -2px 21px rgba(0,0,0,0.73); }
.hmb-toast--b .hmb-toast__img { display: block; width: 100%; border-radius: 12px; box-shadow: 0 -2px 21px rgba(0,0,0,0.246); }
.hmb-toast-wrap { position: relative; }
.hmb-toast-btn-wrap { position: absolute; top: 5px; right: 14px; }
.hmb-toast__close, .hmb-toast__today { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: rgba(137,137,137,0.384); color: #fff; border: 0; border-radius: 2px; font-size: 11px; white-space: nowrap; cursor: pointer; }
.hmb-toast__close svg, .hmb-toast__today svg { display: block; }
.hmb-toast__today:hover { text-decoration: underline; }

/* Mobile 노출 분기 */
@media (max-width: 768px) {
    .hmb-toast--pc { display: none !important; }
    .hmb-toast { position: fixed; z-index: 10000; transition: opacity 0.3s ease, transform 0.3s ease; }
    .hmb-toast--a { position: static !important; top: auto !important; }
    .hmb-toast-wrap { display: flex; flex-direction: column; align-items: stretch; }
    .hmb-toast__img { display: block; width: 100%; border-radius: 20px 20px 0 0; box-shadow: 0 -5px 10px 3px rgba(0,0,0,0.44); }
    .hmb-toast-btn-wrap { display: flex; justify-content: space-between; padding: 8px 4px; }
    .hmb-toast__today, .hmb-toast__close { margin-right: 5px; padding: 6px 10px; border: none; border-radius: 4px; font-size: 14px; }
    .bannerB { z-index: 9999 !important; }
}


/* ═════════════════════════════════════════════════════════════════
 *  Anchor Nav (.quick_pos) — 본문 섹션 좌측 nav (PC 한정)
 *  사용: index.php / campaign/smoothsmooth2.php
 * ═════════════════════════════════════════════════════════════════ */
.quick_pos { position: relative; }
.quick_pos .quick { position: fixed; left: 2vw; top: 47vh; display: flex; flex-direction: column; z-index: 555; }
.quick_pos .quick li a { display: block; width: 24px; height: 35px; margin-bottom: 8px; background: url("/resources/images/main_seed.png") no-repeat; opacity: 0.5; transition: opacity 0.2s ease; }
.quick_pos .quick li a.on,
.quick_pos .quick li a:hover { opacity: 1; }
.quick_pos .quick li a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }


/* ═════════════════════════════════════════════════════════════════
 *  Footer
 *  pc.css / tablet.css / mobile.css 의 footer 영역 통합 (2026-06-01)
 * ═════════════════════════════════════════════════════════════════ */
footer { position: relative; width: 100%; background: var(--color-hm-cream); color: var(--color-hm-dark-green); }
footer div { font-size: 14px; }
footer span, footer p { letter-spacing: -1px; }
footer span { position: relative; display: inline-block; padding: 1px 6px; white-space: nowrap; }
footer span a { color: var(--color-hm-dark-green); }
footer span:after { content: ""; position: absolute; right: -2px; top: 6px; width: 1px; height: 11px; background: rgba(0, 61, 40, 0.3); }
footer span.hide_line:after { display: none; }
footer .footer_wrap { position: relative; display: flex; justify-content: space-evenly; align-items: flex-start; width: 85%; margin: 0 auto; padding: 40px 0; color: rgba(0, 61, 40, 0.7); font-size: 13px; }
footer .copy { position: relative; display: flex; flex: 1 1 auto; flex-wrap: wrap; padding: 0 20px; }
footer .copy span { white-space: nowrap; }
footer .copy span a { color: var(--color-hm-dark-green); }
footer .info { position: relative; display: flex; flex-wrap: wrap; flex-basis: 55%; padding: 0 0 0 20px; text-align: left; border-left: 1px solid rgba(0, 61, 40, 0.18); border-right: 1px solid rgba(0, 61, 40, 0.18); }
footer .warning { flex-basis: 36%; padding: 0 20px; }
footer .warning p { padding: 1px 6px; }

/* Footer floating menu — PC + 태블릿 숨김, 모바일만 표시 (아래 @media 에서) */
.footer_menu { display: none; }

@media (max-width: 1024px) {
    footer .footer_wrap { width: 94%; padding: 20px 0 30px; flex-wrap: wrap; justify-content: flex-start; }
    footer .copy { padding: 0 10px; }
    footer .info { flex-basis: auto; padding: 10px; border: 0; white-space: inherit; }
    footer .warning { flex-basis: auto; padding: 0 10px; }
    footer span.hide_line:after { content: ""; }
    footer br { display: none; }
}

@media (max-width: 512px) {
    footer .footer_wrap { width: 92%; padding: 20px 0 25px; }
    footer span, footer p { font-size: 0.85em; }
    footer .info { padding: 10px 0; }
    footer .copy { padding: 0; }
    footer .warning { padding: 0; }

    /* Footer floating menu (모바일 bottom nav) — iPhone home indicator safe-area 보정 */
    .footer_menu { display: flex; justify-content: space-around; align-items: center; width: 100%; position: sticky; left: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0); z-index: 9999; background: #fff; box-shadow: 0 0 10px rgba(4,52,44,0.1); }
    .footer_menu div { width: 33.3333%; }
    .footer_menu div a { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 11px 0; }
    .footer_menu div:not(:last-child) a::after { content: ""; position: absolute; right: 0; top: 50%; display: block; width: 1px; height: 60%; background: #e0e0e0; transform: translateY(-50%); }
    .footer_menu div span { display: flex; align-items: center; width: 22px; height: 26px; }
    .footer_menu div.menu02 span { width: 40px; }
    .footer_menu div.menu03 span { width: 24px; }
    .footer_menu div span.on { display: none; }
    .footer_menu div.on span.on { display: flex; }
    .footer_menu div.on span.static { display: none; }
    .footer_menu div.on p { color: #014d39; }
    .footer_menu div a p { padding-top: 5px; font-size: 12px; font-weight: 400; color: #888; }
}
