﻿@import url('//fonts.googleapis.com/earlyaccess/nanumpenscript.css');

@font-face {
  font-family: "MapoFlowerIsland";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/MapoFlowerIslandA.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-base: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-display: "MapoFlowerIsland", "Pretendard", sans-serif;
  --thumb-white:  #ffffff;
  --thumb-pink:   #fac6c4;
  --thumb-yellow: #f3eca2;
  --thumb-blue:   #cee5f7;
  --card-shadow:  0 8px 14px 4px rgba(0, 0, 0, 0.08);
  --card-size:    272px;
  --section-pad-v: 120px;
  --section-pad-h: 200px;
  --section-gap:   80px;
  ---font_heading_m: 36px;
  ---font_title_l: 28px;
}

html {
  font-family: var(--font-base);
  color: #1e2124;
  word-break: keep-all;
  overflow-x: hidden;
}

body {
  background: #fff;
}

ul { list-style: none; }
a  { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

#main-content {margin-top: 37px;}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  font-size: 14px;
}
.skip-link:focus { top: 0; }

/* HEADER */
.site-header { width: 100%; line-height: 0; }
.header-img  { width: 100%; height: auto; }

/* HERO */
.hero-section {
  width: 100%;
  min-height: 700px;
  background: url("/gonggamWeb/publication/image/top-bg.png") center center / cover no-repeat;
  background-color: #fff9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
}

.hero-deco {
  position: absolute;
  left: clamp(16px, 7vw, 200px);
  top: 30px;
  width: 32px;
  height: 32px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 898px;
  width: 100%;
  text-align: center;
}

.hero-eyebrow {
  display: block;
  width: auto;
  max-width: 360px;
  height: auto;
}

.hero-title-img {
  width: 100%;
  height: auto;
}

.hero-desc {
  margin-top: 40px;
  font-size: 28px;
  font-family: var(--font-base);
  font-weight: 500;
  color: #1e2124;
  text-align: center;
  line-height: 1.6;
  word-break: keep-all;
}

/* MEDIA SECTION */
.media-section {
  width: 100%;
  min-height: 950px;
  background: url("/gonggamWeb/publication/image/youtube-bg.png") center center / cover no-repeat;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
}

.media-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: 1382px;
  width: 100%;
}

.media-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.media-item--youtube {flex: 1; min-width: 300px;}
.media-item--book {flex-shrink: 1; width: 100%; max-width: 386px;}
.media-book-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.media-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border: 1.5px solid #1e2124;
  border-radius: 50px;
  background: #fff;
  color: #1e2124;
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.media-btn:hover,
.media-btn:focus-visible {
  background: #1e2124;
  color: #fff;
}

.media-btn:hover .btn-icon,
.media-btn:focus-visible .btn-icon {
  filter: invert(1);
}

.btn-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex-shrink: 0;
}

.media-video-title {
  font-family: "Pretendard", var(--font-base);
  font-size: var(---font_heading_m, 36px);
  font-style: normal;
  font-weight: 700;
  line-height: 160%;
  letter-spacing: -1px;
  color: #1e2124;
  margin-bottom: 12px;
  text-align: center;
  width: 100%;
}
.youtube-area {width: 100%; max-width: 910px; border-radius: 12px; overflow: hidden;}
.youtube-area iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
}

.media-item--book .book_wrap {
  max-width: 386px;
  max-height: 512px;
  border-radius: 20px;
  border: 1px solid #e6e6e6;
  box-shadow: var(--card-shadow);
  margin: 80px auto 0;
}
.media-item--book img {max-width: 100%;}

.media-img--youtube {
  width: auto;
  max-width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: 12px;
}

.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  align-self: flex-start;
}

.media-tag {
  display: flex;
  padding: 0;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: none;
  color: #000;
  text-align: center;
  font-family: "Nanum Pen", "Nanum Pen Script", var(--font-base);
  font-size: var(---font_title_l, 28px);
  font-style: normal;
  font-weight: 400;
  line-height: 145%;
  letter-spacing: -1px;
  border-radius: 0;
  white-space: nowrap;
}

.media-tag > span {
  position: relative;
  top: 2px;
}

/* POLICY SECTION */
.policy-section {
  width: 100%;
  padding: var(--section-pad-v) var(--section-pad-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--section-gap);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.section-pink {
  background-image: url("/gonggamWeb/publication/image/pink-bg.png");
  background-color: #ffdfe0;
}

.section-yellow {
  background-image: url("/gonggamWeb/publication/image/yellow-bg.png");
  background-color: #fffac3;
}

.section-blue {
  background-image: url("/gonggamWeb/publication/image/blue-bg.png");
  background-color: #e6f4ff;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1042px, 100%);
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-bottom: calc(var(--section-gap) / 4);
}

.section-title-img {
  width: 272px;
  height: 272px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.card-hover {
  position: relative;
  display: block;
  border-radius: 50%;
  overflow: hidden;
}

.card-hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0);
  background-image: url("/gonggamWeb/publication/image/arrow-narrow-up-right.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
  opacity: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.card-hover:hover::after,
.card-hover:focus-visible::after {
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 1;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: #000;
}

.section-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: normal;
  line-height: 1.6;
  letter-spacing: -0.3px;
  color: #000;
  white-space: nowrap;
  text-align: center;
  -webkit-text-stroke: 0.5px currentColor;
}

/* CARD GRID */
.card-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 40px;
  width: 100%;
}

/* POLICY CARD */
.policy-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: var(--card-size);
}

.policy-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.policy-card a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 4px;
  border-radius: 4px;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: relative;
}

.card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* hover overlay */
.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0);
  background-image: url("/gonggamWeb/publication/image/arrow-narrow-up-right.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
  opacity: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.policy-card a:hover .card-thumb::after,
.policy-card a:focus-visible .card-thumb::after {
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 1;
}

.card-thumb--white  { background-color: var(--thumb-white); }
.card-thumb--pink   { background-color: var(--thumb-pink); }
.card-thumb--yellow { background-color: var(--thumb-yellow); }
.card-thumb--blue   { background-color: var(--thumb-blue); }

.card-label {
  display: block;
  font-family: var(--font-base);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -1px;
  color: #1e2124;
  text-align: center;
  width: 100%;
}

/* FOOTER */
.site-footer { width: 100%; line-height: 0; }
.footer-img  { width: 100%; height: auto; }

/* ---- RESPONSIVE ---- */

/* 1440px 이하: 카드 약간 줄임 */
@media (max-width: 1440px) {
  :root {
    --section-pad-h: 100px;
    --card-size: 220px;
  }
  .media-inner { gap: 80px; }
  .media-item--youtube { margin-top: 0; min-width: 0; }
}

/* 1200px 이하: 패딩/카드 줄임 */
@media (max-width: 1200px) {
  :root {
    --section-pad-v: 80px;
    --section-pad-h: 60px;
    --section-gap:   48px;
    --card-size:     180px;
  }

  .hero-section { min-height: 500px; }
  .hero-eyebrow { max-width: 300px; }
  .media-section { min-height: 700px; padding: 20px 40px 80px;}
  /* .media-item { width: 100%; max-width: 560px; min-width: 0; } */
  .media-video-title { font-size: 28px; letter-spacing: -0.8px; }
  .media-tags { gap: 20px; }
  .media-tag { font-size: 24px; padding: 0; }
  .media-btn { font-size: 15px; padding: 10px 18px; }
  .section-title { font-size: 32px; }
  .section-title-img { width: 200px; height: 200px; }
  .card-label { font-size: 20px; }
}

@media (max-width: 1024px) {
  .media-section {padding: 80px 20px;}
  .media-inner {flex-direction: column;}
  .media-item--book .book_wrap {margin-top: 0;}
}

/* 900px 이하 */
@media (max-width: 900px) {
  :root {
    --section-pad-v: 60px;
    --section-pad-h: 40px;
    --section-gap:   40px;
    --card-size:     140px;
  }

  .hero-section { min-height: 360px; }
  .hero-eyebrow { max-width: 260px; }
  .hero-deco { width: 70px; }
  .media-item--youtube { margin-top: 0; min-width: 0; }
  .media-video-title { font-size: 24px; letter-spacing: -0.6px; }
  .media-tags { gap: 20px; }
  .media-tag { font-size: 22px; padding: 0; }
  .media-btn { font-size: 14px; padding: 10px 16px; }
  .section-title { font-size: 28px; }
  .section-title-img { width: 160px; height: 160px; }
  .card-label { font-size: 18px; }
}

/* 768px 이하: 태블릿/모바일 */
@media (max-width: 768px) {
  :root {
    --section-pad-v: 48px;
    --section-pad-h: 20px;
    --section-gap:   32px;
    --card-size:     120px;
  }
  .hero-section { min-height: 300px; padding: 40px 16px; background-image: url("/gonggamWeb/publication/image/top-bg-mobile.png"); }
  .hero-eyebrow { max-width: 130px; }
  .hero-deco { left: 16px; top: 16px; width: 26px; }
  .hero-desc { font-size: 16px; margin-top: 24px; }
  .media-section { padding: 40px 16px; }
  .media-inner { gap: 60px; }
  .media-item { width: 100%; max-width: 100%; min-width: 0; }
  .media-item--youtube { margin-top: 0; min-width: 0; }
  .media-img--book, .media-img--youtube { width: 100%; height: auto; }
  .media-video-title { font-size: 20px; letter-spacing: -0.5px; text-align: left; align-self: flex-start; }
  .media-book-btns { gap: 8px; }
  .media-btn { font-size: 13px; padding: 9px 14px; }
  .media-tags { align-self: flex-start; }
  .media-tag { font-size: 20px; padding: 0; }

  .section-title { font-size: 22px; white-space: normal; }
  .section-title-img { width: 140px; height: 140px; }
  .card-grid { flex-wrap: wrap; gap: 16px; }
  /* 전체 섹션 3열 고정 */
  .policy-card { flex: 0 0 calc(33.33% - 11px); max-width: calc(33.33% - 11px); min-width: 0; }
  /* yellow 섹션: 동일 카드 크기로 2×2 배열 */
  .section-yellow .card-grid { display: grid; grid-template-columns: repeat(2, calc(33.33% - 11px)); justify-content: center; }
  .section-yellow .policy-card { flex: unset; max-width: unset; width: 100%; }
  .card-label { font-size: 14px; letter-spacing: -0.3px; }
}

/* 480px 이하 */
@media (max-width: 480px) {
  :root { --section-gap: 24px; }
  .hero-eyebrow { max-width: 100px; }
  .hero-deco { width: 20px; }
  .hero-desc { font-size: 14px; margin-top: 20px; }
  .media-tags { gap: 20px; }
  .media-tag { font-size: 18px; padding: 0; }
  .section-title { font-size: 18px; }
  .section-title-img { width: 110px; height: 110px; }
  .card-grid { gap: 12px; }
  .policy-card { flex: 0 0 calc(33.33% - 8px); max-width: calc(33.33% - 8px); min-width: 0; }
  .section-yellow .card-grid { grid-template-columns: repeat(2, calc(33.33% - 8px)); }
  .card-label { font-size: 13px; }
}

/* TOP 버튼 */
.btn-top {
  position: fixed;
  right: 40px;
  bottom: 40px;
  width: 80px;
  height: 80px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-top img {
  width: 100%;
  height: 100%;
}

.btn-top:hover {
  opacity: 0.75;
}

@media (max-width: 768px) {
  .btn-top { right: 16px; bottom: 24px; width: 44px; height: 44px; }
}