@import url("../../css/epic/theme_tokens.css");

body {
  margin: 0;
  padding: 0;
}
.hero-bg {
  width: 100%;
  background-image: url("/resources/assets/background.svg");
  background-size: cover;
  background-color: #ffffff;

  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  padding-top: calc(92px + 120px);
  padding-bottom: 120px;
  /* Ensure consistent gap between hero text and detail button */
}

.detail-btn {
  margin-top: 8px;
}
/* .header-include 대신 .header-wrapper로 변경하여 이벤트를 활성화 */
.header-wrapper {
  pointer-events: auto;
}

/* 기존 header-include 관련 스타일은 삭제하거나 아래와 같이 수정 */
.header-overlay .header-wrapper {
  width: 100%;
  display: block;
  height: 88px;
}

.header-overlay {
  position: fixed;
  width: 100%;
  z-index: 9999;
  padding: 0;
  pointer-events: none;
  height: 88px;
}

/* Mega menu open/close에 따른 헤더 높이 조정 */
body.mega-open .header-overlay,
body.mega-open .header-include {
  height: 100%;
}

body.mega-closed .header-overlay,
body.mega-closed .header-include {
  height: 88px;
}

/* Hero Title */
.hero-title {
  font-family: "SUITE", sans-serif;
  font-weight: 800; /* ExtraBold */
  font-size: 56px;
  line-height: 1.2;
  color: #ffffff;
}

/* Hero Subtitle */
.hero-subtitle {
  font-family: "Pretendard", sans-serif;
  font-weight: 300; /* Light */
  font-size: 32px;
  line-height: 1.3;
  color: #ffffff;
}

/* Hero Caption */
.hero-caption {
  font-family: "Pretendard", sans-serif;
  font-weight: 300; /* Light */
  font-size: 18px;
  line-height: 26px;
  color: #ffffff;
}

/* Detail Button */
.detail-btn {
  border-radius: var(--button-input-2XL-button-2XL, 12px);
  border: var(--button-input-2XL-button-2XL, 1.5px) solid var(---, #fff);
  background: var(---, rgba(255, 255, 255, 0.05));
  width: 195px;
  box-shadow: 0 0 15px 0 var(--white-15, rgba(255, 255, 255, 0.15)) inset,
    0 2px 2px 0 var(---LV-1, rgba(14, 15, 17, 0.03)),
    0 4px 6px 0 var(---LV-2, rgba(14, 15, 17, 0.05));
  backdrop-filter: blur(50px);

  display: flex;
  height: var(--button-input-2XL-button-2XL-height, 56px);
  padding: 0 var(--button-input-2XL-button-2XL, 20px);
  justify-content: center;
  align-items: center;
  gap: var(--button-input-2XL-button-2XL, 8px);

  color: #fff;
  font-family: "Pretendard", sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.detail-btn:hover {
  background: var(---, rgba(255, 255, 255, 0.15));
}

.br-desktop {
  display: inline;
}

.br-mobile {
  display: none;
}

.info-section {
  padding-top: 72px;
  padding-bottom: 72px;
  overflow: visible;
}

/* 4개 카드 그리드 */
.info-grid {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  overflow: visible;
}

/* 카드 */
.info-card {
  width: 216px;
  height: 272px;
  border-radius: 16px;
  border: 1px solid #c2c8cc;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.75) 100%
  );
  box-shadow: 0 1px 3px rgba(14, 15, 17, 0.03), 0 2px 6px rgba(14, 15, 17, 0.05);
  backdrop-filter: blur(50px);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: 4px 4px 8px 0 var(---LV-1, rgba(14, 15, 17, 0.03)),
    8px 8px 16px 0 var(---LV-2, rgba(14, 15, 17, 0.05)),
    16px 16px 24px 0 var(---LV-2, rgba(14, 15, 17, 0.05));
}

.info-icon {
  margin-bottom: 24px;
}

.info-title {
  margin-bottom: 16px;
}

.info-desc {
  margin-bottom: auto;
}

/* 아이콘 */
.info-icon {
  width: 64px;
  height: 64px;
}

/* 카드 타이틀 */
.info-title {
  font-family: "SUITE", sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 28px;
  color: #1e2224;
}

/* 설명 */
.info-desc {
  font-family: "Pretendard", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #1e2224;
}

.btn-indigo-s {
  display: flex;
  width: 172px;
  height: 44px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 10px;

  background: #5856d6;
  color: white;
  font-family: "Pretendard", sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

/* 인디고 미디움 버튼 */
.btn-indigo-md {
  display: flex;
  width: 184px;
  height: 44px;
  padding: 0 16px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 10px;

  background: #5856d6;
  color: white;
  font-family: "Pretendard", sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.btn-indigo-md:hover {
  background: var(---, #3d3bc9);
}

.btn-indigo-s:hover {
  background: var(---, #3d3bc9);
}

/* 아이콘 */
.btn-indigo-md .icon {
  font-size: 20px;
}

/* Graphic Line Section */
.line-section {
  width: 100%;
  height: 626px;
  padding-left: 112px;
  padding-right: 112px;
  padding-top: 72px;
  background-color: #ffffff;
  background-image: url("../../assets/images/Main/graphic_line.svg");
  background-repeat: no-repeat;
  background-position: calc(50% - 300px) center;
  background-size: auto;
  box-sizing: border-box;
  display: flex; /* 추가 */
  justify-content: center; /* 가로 중앙 */
  align-items: center; /* 세로 중앙 */
  overflow: visible;
}

.line-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 112px; /* 글로브와 텍스트 사이 간격 */
}

/* 왼쪽 글로브 이미지 */
.globe-img {
  width: 507px;
  height: 507px;
  flex-shrink: 0;
}

/* 오른쪽 텍스트 블록 */
.line-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 32px;
}

.line-title {
  font-family: "SUITE", sans-serif;
  font-weight: 800; /* ExtraBold */
  font-size: 40px;
  line-height: 1.3;
  color: #1e2224;
}

.line-desc {
  font-family: "Pretendard", sans-serif;
  font-weight: 300; /* Light */
  font-size: 20px;
  line-height: 29px;
  color: #1e2224;
}

.list-section {
  width: 100%;
  padding: 40px 112px;
  padding-bottom: 80px;
  background: #fff;
  box-sizing: border-box;
  /* 시스템그림자/하단/레벨3 */
  box-shadow: 0 18px 20px 0 var(---LV-1, rgba(14, 15, 17, 0.03)),
    0 22px 28px 0 var(---LV-2, rgba(14, 15, 17, 0.05)),
    0 34px 44px 0 var(---LV-2, rgba(14, 15, 17, 0.05));
  backdrop-filter: blur(50px);
}

/* 2단 레이아웃 */
.list-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

/* 각 블록 */
.list-block {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0; /* keep columns equal width even with long text */
  box-sizing: border-box;
}

.notice-block {
  background: #f5f6f8;
  border-radius: 16px;
  padding: 24px;
  min-height: 320px;
}
.list-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 타이틀: 32px, Bold */
.list-title {
  font-family: "SUITE", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #1e2224;
  margin-bottom: 12px;
}

/* 서브타이틀 */
.list-subtitle {
  font-family: "Pretendard", sans-serif;
  font-size: 18px;
  font-weight: 300;
  color: #1e2224;
}

/* 더보기 버튼 */
.list-more-btn {
  display: flex;
  margin-left: auto;
  height: var(---M-M, 32px);
  padding: 0 var(---M-M, 14px);
  justify-content: center;
  align-items: center;
  gap: var(--button-input-mm-button-m, 6px);

  border-radius: var(---M-M, 8px);
  background: var(---, rgba(0, 0, 0, 0.1));

  font-size: 15px;
  font-weight: 700;
  font-family: "Pretendard";
  color: #0e0f11;
  text-decoration: none;
}

/* 구분선 */
.list-divider {
  width: 100%;
  height: 1px;
  background: #1e2224;
  margin: 24px 0 32px 0;
}

/* 목록 영역 */
.list-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 한 줄 */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-family: "Pretendard";
  font-size: 18px;
  color: #1e2224;
}

.list-row:hover {
  color: var(---, #5856d6);
  cursor: pointer;
}

.list-row:hover .list-text,
.list-row:hover .list-date,
.list-row:hover .icon {
  color: var(---, #5856d6);
}

/* 텍스트 */
.list-text {
  overflow: hidden;
  color: var(---, #1e2224);
  text-overflow: ellipsis;

  font-family: var(---, Pretendard);
  font-size: var(---6-6, 18px);
  font-style: normal;
  font-weight: 400;
  line-height: var(---6-6, 18px);
  -webkit-line-clamp: 1;
  line-clamp: 1;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  flex: 1 0 0;
  margin-right: 24px;
}

/* 날짜 */
.list-date {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;

  color: var(---, #1e2224);

  font-family: var(---, Pretendard);
  font-size: var(---, 16px);
  font-style: normal;
  font-weight: 400;
  line-height: var(---, 16px);
}

.logo-section {
  display: flex;
  padding: 56px 0;
  align-items: center;
  justify-content: center;
  background: #ebf0f5;
  box-sizing: border-box;
}

.logo-row {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  padding-left: max(0px, calc((100vw - 1216px) / 2 - 8px));
  padding-right: max(0px, calc((100vw - 1216px) / 2 + 16px));
  align-items: center;
  gap: 56px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.logo-row.desktop-fixed {
  width: 100%;
  max-width: none;
  margin: 0;
}

.logo-row::-webkit-scrollbar {
  display: none;
}

.logo-item {
  display: flex;
  width: 182px;
  height: 56px;
  padding: 8px 32px;
  justify-content: center;
  align-items: center;
  gap: 19px;
  aspect-ratio: 13/4;

  border-radius: 8px;
  border: 1px solid #c2c8cc;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.75) 100%
  );
  box-sizing: border-box;
}

.logo-item img {
  height: 100%;
  width: 136px;
  object-fit: contain;
}
.footer-include {
  width: 100%;
  height: 204px;
  margin: 0;
  padding: 0;
  display: block;
  box-sizing: border-box;
  border: none;
}
.footer-include object {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  pointer-events: auto;
}

@media (min-width: 1300px) {
  .desktop-fixed {
    width: 1216px;
    max-width: 1216px;
    margin: 0 auto;
  }

  .line-section {
    padding-left: 0;
    padding-right: 0;
  }

  .list-section {
    padding: 40px 0;
    padding-bottom: 80px;
  }

  .logo-section {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ===========================================
   Mobile Hero Typography (≤1300px)
   =========================================== */
@media (max-width: 1300px) {
  .detail-btn {
    font-size: 16px;
    gap: 6px;
    width: fit-content;
    padding: 0 16px;
    height: 44px;
  }

  .detail-btn .icon {
    font-size: 20px;
  }

  .hero-title {
    font-size: 40px;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 24px;
    line-height: 1.3;
  }

  .hero-caption {
    font-size: 15px;
    line-height: 22px;
  }

  .hero-content {
    padding-left: 24px;
    padding-right: 24px;
    padding-top: calc(92px + 64px);
    padding-bottom: 0;
  }

  /* Info 카드 섹션: 모바일에서 가로 스크롤 지원 */
  .info-section {
    width: 100%; /* 그냥 화면 꽉 차게 */
    box-sizing: border-box; /* 패딩을 너비 안에 포함 */
    padding-left: 24px;
    padding-right: 24px;

    z-index: 5;
    overflow-y: visible;
  }

  .info-grid {
    display: flex;
    gap: 24px;

    /* 음수 마진으로 부모의 padding(24px)을 뚫고 나감 */
    margin-left: -24px;
    margin-right: -24px;

    /* ★ 핵심 수정: width를 강제 지정하지 않고 auto로 두면, 
       음수 마진만큼 알아서 늘어나 딱 100%가 됩니다. */
    width: auto;

    /* 시각적으로 첫 번째 카드가 24px 들어가서 시작하게 함 */
    padding-left: 24px;

    /* 스크롤 설정 */
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;

    /* 그림자 잘림 방지용 상하 패딩 */
    padding-top: 40px;
    padding-bottom: 40px;
    margin-top: -40px;
    margin-bottom: -40px;
  }

  .info-grid::-webkit-scrollbar {
    display: none;
  }

  .info-card {
    flex: 0 0 auto; /* 카드 고정 크기 유지 + 가로 스크롤용 shrink 방지 */
  }

  .info-grid {
    cursor: grab;
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
  }

  .info-grid:active {
    cursor: grabbing;
  }

  .info-grid.is-grabbing {
    cursor: grabbing;
  }

  .info-card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(14, 15, 17, 0.03),
      0 2px 6px rgba(14, 15, 17, 0.05);
  }

  /* 마지막 카드 오른쪽 여백 24px 확보 (스크롤 끝 여유 공간) */
  .info-grid::after {
    content: "";
    display: block;
    width: 24px; /* 마지막 카드 뒤의 공백 크기 */
    flex-shrink: 0; /* 찌그러짐 방지 */
    height: 1px; /* 높이값 최소화 */
  }
  /* Info 카드 내부 타이포 모바일 사이즈 */
  .info-title {
    font-size: 24px;
  }

  .info-desc {
    font-size: 15px;
  }

  .btn-indigo-md {
    font-size: 16px;
    gap: 6px;
  }

  /* Line Section: 모바일 레이아웃 */
  .line-section {
    z-index: 7;
    overflow: visible; /* 자식 요소가 튀어나와도 보이게 설정 */
    height: auto;
    align-items: center; /* top 대신 center 권장 (flex direction column일 때) */
    padding-top: 24px;
    padding-bottom: 56px;

    /* [수정 1] 부모의 배경 이미지는 제거합니다 (가상 요소로 옮김) */
    background-image: none;
    position: relative; /* 가상 요소 위치 기준점 */
  }
  .line-section::before {
    content: "";
    position: absolute;
    display: block;
    width: 100%;
    height: 100%; /* 혹은 이미지가 잘린다면 120% 등으로 키워주세요 */

    /* ★ 핵심: 마이너스 값으로 위로 끄집어 올림 */
    top: -160px;
    left: 0;

    background-image: url("../../assets/images/Main/graphic_line.svg");
    background-repeat: no-repeat;
    background-position: top center; /* 이미지 위치 조정 */
    background-size: auto;

    /* 텍스트보다 뒤에, 하지만 섹션 배경색보다는 위에 오도록 배치됨 */
    pointer-events: none; /* 이미지가 클릭 등을 방해하지 않도록 설정 */
  }

  .line-content {
    flex-direction: column; /* 이미지-텍스트 수직 배열 */
    align-items: center;
    gap: 24px; /* 이미지와 텍스트 사이 간격 */
    text-align: center;
  }

  .globe-img {
    width: 345px;
    height: 345px;
  }

  .line-text {
    align-items: center;
    gap: 24px; /* 타이틀 - 본문 - 버튼 사이 24 */
  }

  .line-title {
    font-size: 32px;
  }

  .line-desc {
    font-size: 15px;
    line-height: 22px;
  }

  /* Line section 내 버튼도 모바일 사이즈 규칙 사용 (폰트 16, gap 6은 위 btn-indigo-md 에서 이미 설정) */
  .line-text .btn-indigo-md {
    align-self: center;
    width: auto; /* 텍스트 길이에 맞게 버튼 너비 */
    padding: 0 16px; /* 좌우 패딩 16px 유지 */
  }
  /* 모바일에서는 br-desktop 숨기고, br-mobile 보이기 */
  .br-desktop {
    display: none;
  }

  .br-mobile {
    display: inline;
  }
  /* 리스트 섹션 모바일 패딩 (양 옆 24px) */
  .list-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* 리스트 레이아웃: 모바일에서는 수직 배치 */
  .list-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .list-block {
    flex: none;
    width: 100%;
  }
  /* =====================
     리스트 섹션 모바일 타이포
     ===================== */
  .list-title {
    font-size: 24px; /* 타이틀 24 */
  }

  .list-subtitle {
    font-size: 15px; /* 서브 타이틀 15 */
  }

  .list-more-btn {
    font-size: 12px; /* 더 보기 버튼 12 */
    height: 24px; /* 모바일 높이 24px */
    padding: 0 12px; /* 모바일 좌우 패딩 12px */
  }

  .list-row {
    font-size: 15px; /* 본문 리스트 기본 15 */
  }

  .list-text {
    font-size: 15px; /* 리스트 텍스트 15 */
  }

  .list-date {
    font-size: 13px; /* 시간 표시 13 */
  }

  .list-divider {
    margin: 16px 0 24px 0;
  }

  .logo-section {
    padding: 32px 0;
  }

  .logo-row {
    padding: 0 24px;
    gap: 16px;
  }
  .footer-include {
    width: 100%;
    height: 317px;
    margin: 0;
    padding: 0;
    display: block;
    box-sizing: border-box;
    border: none;
  }
}

.logo-swiper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 13, 34, 0.8);
  padding: 10px 0;
}

.logo-swiper .swiper-wrapper {
  transition-timing-function: linear !important;
  position: relative;
  will-change: transform;
  align-items: center;
}

.logo-swiper .swiper-slide {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: auto;
  padding-left: 14px;
  padding-right: 14px;
}

.logo-swiper .swiper-slide.to-center {
  width: auto;
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: 7px;
}

.logo-swiper .swiper-slide img {
  width: auto;
  height: auto;
}