/*
 * 서브페이지 공통 상단 (information, exhibition 등)
 * HTML: .info-page-top > .header-bg + .info-hero + .info-subnav
 * CSS: information.css + style.css (페이지 전용 css는 @import information.css)
 * JS: app.js + 페이지별 js (맨 위로: [data-scroll-top])
 */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  color: #111;
}

:root {
  --content-max-width: 1440px;
  --header-height: 68px;
  /* 데스크톱: 헤더 하단 ↔ 히어로 h1 상단 */
  --hero-title-offset: 64px;
  /* 데스크톱: 히어로 본문(설명) 하단 ↔ 서브메뉴 바 상단 */
  --hero-subnav-offset: 68px;
  --subnav-height: 72px;
  --subnav-font-size: 18px;
  --subnav-item-width: 220px;
  --subnav-item-gap: 24px;
}

/* 서브페이지 본문 컨테이너 (max-width 1440px) */
.exh-content-inner,
.loc-content-inner,
.layout-content-inner,
.guide-content-inner,
.app-content-inner,
.visitor-content-inner,
.conf-content-inner,
.schedule-content-inner,
.contact-content-inner,
.reg-content-inner,
.notice-content-inner,
.faq-content-inner,
.promo-content-inner,
.report-content-inner {
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
}

.info-page-top {
  display: flex;
  flex-direction: column;
  background: none;
}

.info-page-top .header-bg {
  flex-shrink: 0;
}

/* 데스크톱: 헤더·히어로·서브내비 세로 배치 */
@media (min-width: 1025px) {
  /*
   * exh-hero 패턴: 헤더 → 히어로 → 서브내비 (겹침 없음, 헤더 높이만큼 히어로가 아래로)
   */
  .info-page-top--exh {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    background: none !important;
  }

  .info-page-top--exh .header-bg {
    grid-column: 1;
    grid-row: 1;
    z-index: 2;
    align-self: start;
    background: #011D20 !important;
    background-color: #011D20 !important;
    box-shadow: none !important;
  }

  .info-page-top--exh .exh-hero {
    grid-column: 1;
    grid-row: 2;
    z-index: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    align-items: flex-start;
    justify-content: center;
    padding: var(--hero-title-offset) 24px var(--hero-subnav-offset);
  }

  .info-page-top--exh .header-inner {
    background: transparent !important;
  }

  .info-page-top--exh .info-subnav {
    grid-row: 3;
    grid-column: 1;
    z-index: 2;
    margin-top: 0 !important;
  }
}

.info-page-top .header-inner > a.header-brand,
.info-page-top .header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.02em;
  text-decoration: none;
  color: #ffffff;
}

/* ----- 히어로 (데스크톱: 좌 텍스트 / 우 이미지) ----- */
.info-hero {
  flex: 0 0 auto;
  padding-top: 80px;
}

.info-hero-text {
  order: 1;
}

.info-hero-image-wrap {
  order: 2;
}

/* 데스크톱: 텍스트 높이에 맞춰 사진 높이 동기화 */
@media (min-width: 1025px) {
  .info-hero {
    align-items: stretch !important;
  }

  .info-hero-image-wrap {
    display: flex;
    align-self: stretch;
  }

  .info-hero-image-wrap > div {
    position: relative !important;
    flex: 1;
    width: 100%;
    min-height: 100%;
    align-self: stretch;
  }

  .info-hero-image-wrap img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

/* ----- 서브 네비 (데스크톱·태블릿: #228380 바) ----- */
.info-page-top .info-subnav {
  flex: 0 0 auto;
  margin-top: 120px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background-color: #228380 !important;
}

.info-subnav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--subnav-item-gap);
}

.info-subnav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--subnav-item-width);
  padding: 0;
  font-size: var(--subnav-font-size);
  font-weight: 500;
  color: #fff;
  opacity: 0.8;
  text-decoration: none;
  border: none;
  border-bottom: none;
  box-sizing: border-box;
  white-space: nowrap;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.info-subnav__link.is-active {
  font-weight: 800;
  color: #fff;
  opacity: 1;
  border-bottom: none;
}

.info-subnav__link:hover {
  opacity: 1;
  color: #fff;
}

.info-subnav__link.is-active:hover {
  color: #fff;
  opacity: 1;
}

/* 2개 메뉴(참관안내): 한 줄 가운데 묶음 — 양끝 1:1 그리드 방지 */
.info-subnav--visitor .info-subnav-inner,
.info-subnav-inner:has(> .info-subnav__link:nth-child(2):last-child) {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--subnav-item-gap);
}

.info-subnav--visitor .info-subnav__link,
.info-subnav-inner:has(> .info-subnav__link:nth-child(2):last-child) > .info-subnav__link {
  width: var(--subnav-item-width);
  max-width: none;
  flex: 0 0 var(--subnav-item-width);
  grid-column: unset;
  grid-row: unset;
}

/* 데스크톱: 서브메뉴 바 높이 100px, 타이포 24px */
@media (min-width: 1025px) {
  .info-page-top .info-subnav {
    min-height: var(--subnav-height);
    height: var(--subnav-height);
  }

  .info-page-top .info-subnav-inner {
    min-height: var(--subnav-height);
    height: 100%;
    padding: 0 24px;
    gap: var(--subnav-item-gap);
  }

  .info-page-top .info-subnav__link {
    height: 100%;
    min-height: var(--subnav-height);
    width: var(--subnav-item-width);
    padding: 0;
    font-size: var(--subnav-font-size);
    font-weight: 500;
    color: #fff;
    opacity: 0.8;
    border-bottom: none;
  }

  .info-page-top .info-subnav__link.is-active {
    font-weight: 800;
    color: #fff;
    opacity: 1;
    border-bottom: none;
  }

  .info-page-top .info-subnav__link:hover:not(.is-active) {
    color: #fff;
    opacity: 1;
  }

  .info-page-top .info-subnav__link.is-active:hover {
    color: #fff;
    opacity: 1;
  }
}

/* ----- 태블릿 (768px ~ 1024px): 텍스트 → 이미지, 가로 메뉴 ----- */
@media (min-width: 768px) and (max-width: 1024px) {
  .info-hero {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 40px 24px 0 !important;
    gap: 28px !important;
  }

  .info-hero-text {
    order: 1;
    padding-top: 0 !important;
  }

  .info-hero-image-wrap {
    order: 2;
    width: 100% !important;
    max-width: 100% !important;
  }

  .info-hero h1 {
    font-size: clamp(28px, 4vw, 36px) !important;
    margin-bottom: 20px !important;
  }

  .info-hero-text > div {
    font-size: 16px !important;
    gap: 16px !important;
  }

  /* exh-hero 패턴: 히어로 바로 아래 서브메뉴 (120px 여백 제거) */
  .info-page-top--exh .info-subnav {
    margin-top: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background-color: #228380 !important;
    padding: 0;
  }

  .info-page-top:not(.info-page-top--exh) .info-subnav {
    margin-top: 120px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background-color: #228380 !important;
    padding: 0;
  }

  /* exh-hero: 태블릿에서 타이틀·부제 세로·가로 중앙 */
  .exh-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px;
    padding: 48px 24px !important;
    box-sizing: border-box;
  }

  .exh-hero__inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
  }

  .exh-hero__inner h1 {
  color: #000 !important;
    font-size: clamp(28px, 4vw, 36px);
    margin-bottom: 16px;
  }

  .exh-hero__inner p {
    font-size: 16px;
    line-height: 1.68;
  }

  /* 태블릿: 서브메뉴 공통 — 구역별 중앙정렬, 가로 gap 24px / 세로 gap 40px */
  .info-page-top .info-subnav {
    height: auto !important;
    min-height: 0 !important;
  }

  .info-subnav-inner {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    column-gap: 24px;
    row-gap: 40px;
    align-items: stretch;
    align-content: start;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 28px 20px !important;
    box-sizing: border-box;
  }

  .info-subnav__link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch;
    justify-self: stretch;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #fff !important;
    opacity: 0.8;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    text-align: center;
    line-height: 1.35;
    white-space: normal;
    box-sizing: border-box;
  }

  .info-subnav__link:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .info-subnav__link:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .info-subnav__link:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .info-subnav__link:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
  }

  .info-subnav__link:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
  }

  .info-subnav__link.is-active {
    color: #fff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
    border-bottom: none !important;
  }

  .info-subnav__link:hover:not(.is-active) {
    color: #fff !important;
    opacity: 1 !important;
  }

  .info-subnav__link.is-active:hover {
    color: #fff !important;
  }

  /* 2개 메뉴: 1행 가운데, 세로 여백 축소 */
  .info-subnav--visitor .info-subnav-inner,
  .info-subnav-inner:has(> .info-subnav__link:nth-child(2):last-child) {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: var(--subnav-item-gap);
    row-gap: 0;
    padding: 20px 24px !important;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  .info-subnav--visitor .info-subnav__link,
  .info-subnav-inner:has(> .info-subnav__link:nth-child(2):last-child) > .info-subnav__link {
    width: var(--subnav-item-width) !important;
    max-width: none;
    flex: 0 0 var(--subnav-item-width);
    align-self: center;
    grid-column: unset !important;
    grid-row: unset !important;
  }
}

/* ----- 모바일 (≤767px): 이미지 → 텍스트, 2×2 메뉴 그리드 ----- */
@media (max-width: 767px) {
  .info-hero {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
    gap: 0 !important;
    max-width: 100% !important;
  }

  .info-hero-image-wrap {
    order: 1;
    width: 100% !important;
    max-width: 100% !important;
  }

  .info-hero-image-wrap > div {
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .info-hero-text {
    order: 2;
    padding: 28px 16px 0 !important;
  }

  .info-hero h1 {
    font-size: 26px !important;
    line-height: 130% !important;
    margin-bottom: 16px !important;
  }

  .info-hero-text > div {
    font-size: 14px !important;
    line-height: 168% !important;
    gap: 14px !important;
  }

  /* exh-hero: 모바일 타이틀·부제 세로·가로 중앙, 높이 284px 통일 */
  .exh-hero {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 284px !important;
    min-height: 284px !important;
    max-height: 284px !important;
    flex: 0 0 284px !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
  }

  .exh-hero__inner {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    text-align: center;
  }

  .info-page-top {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: clip;
  }

  .info-page-top .info-subnav {
    margin: 0 !important;
    border-top: none;
    background: transparent !important;
    padding: 0 !important;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    box-sizing: border-box;
  }

  .info-subnav-inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    border: 1px solid #fff;
  }

  .info-subnav__link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 18px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 140% !important;
    text-align: center;
    white-space: normal !important;
    color: #fff !important;
    border: none !important;
    border-right: 1px solid #fff !important;
    border-bottom: 1px solid #fff !important;
    border-radius: 0 !important;
    background: #228380 !important;
    box-sizing: border-box;
  }

  .info-subnav__link:nth-child(2n) {
    border-right: none !important;
  }

  .info-subnav__link:nth-child(n + 3) {
    border-bottom: none !important;
  }

  .info-subnav__link.is-active {
    background: #011D20 !important;
    color: #fff !important;
    font-weight: 800 !important;
  }
}

/* 전시회 개요 상세 */
.info-details-section {
  display: block;
}

/* 주관·주최 로고 동일 사이즈 */
.info-partner-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 32px;
}

.info-partner-logo,
.info-partner-logos img,
.info-partner-logos a img {
  height: 20px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
  display: block;
}

.info-sponsor-grid img {
  display: block;
}

/* Why ENVEX 카드 이미지 */
.info-why-grid article > div:has(> img) {
  border-radius: 16px;
}

.info-why-grid article > div:has(> img) img {
  border-radius: 16px;
}

/* 전시회 개요 상세 — 태블릿 (라벨|내용 2열, 주최 2열, 후원 3열) */
@media (min-width: 768px) and (max-width: 1024px) {
  .info-details-section {
    padding: 160px 24px 64px !important;
  }

  .info-details-box {
    padding: 40px 32px !important;
  }

  .info-details-row {
    grid-template-columns: 72px 1fr !important;
    column-gap: 28px !important;
    padding: 24px 0 !important;
    align-items: start !important;
  }

  .info-details-row > div:first-child {
    font-size: 14px !important;
    padding-top: 2px !important;
  }

  .info-host-grid {
    /* flex 유지 — 주관과 동일 레이아웃 */
    display: flex !important;
    grid-template-columns: unset !important;
    gap: 20px 28px !important;
    max-width: 100% !important;
  }

  .info-sponsor-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px 24px !important;
  }

  .info-why-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 40px 28px !important;
  }
}

/* 전시회 개요 상세 — 모바일 (라벨 위·내용 아래, 로고 2열) */
@media (max-width: 767px) {
  .info-details-section {
    padding: 32px 16px 48px !important;
  }

  .info-details-box {
    padding: 8px 0 !important;
    max-width: 100% !important;
  }

  .info-details-row {
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
    row-gap: 8px !important;
    padding: 20px 0 !important;
    align-items: start !important;
  }

  .info-details-row > div:first-child {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #888 !important;
    padding-top: 0 !important;
  }

  .info-details-row > div:last-child {
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 150% !important;
    color: #111 !important;
  }

  .info-details-row:first-of-type > div:last-child {
    font-size: 18px !important;
    line-height: 140% !important;
  }

  .info-details-row > div:last-child > div:first-child {
    font-size: inherit !important;
    font-weight: 800 !important;
    color: #111 !important;
  }

  .info-details-row > div:last-child p {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0F6055 !important;
    margin-top: 8px !important;
  }

  .info-details-row--host > div:first-child,
  .info-details-row--sponsor > div:first-child {
    margin-bottom: 4px;
  }

  .info-host-grid,
  .info-sponsor-grid {
    gap: 16px 20px !important;
    max-width: 100% !important;
  }

  .info-host-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: unset !important;
  }

  .info-sponsor-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .info-partner-logo,
  .info-partner-logos img,
  .info-partner-logos a img,
  .info-host-grid img,
  .info-organizer-logos img {
    height: 16px !important;
    width: auto !important;
    max-width: none !important;
  }

  .info-sponsor-grid img {
    height: 20px !important;
    justify-self: start !important;
  }
}

button[data-scroll-top]:hover {
  filter: brightness(1.12);
}

button[data-scroll-top]:focus-visible {
  outline: 2px solid #228380;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .info-why-section {
    padding: 56px 16px 72px !important;
  }

  .info-why-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }

}
