/*
  EXAMPLES (성공사례) PAGE
  biz-place.kr/examples 의 마크업 구조·박스 모델·rem 단위 체계를 그대로 재현.
  실제 사진 에셋이 없는 카드 썸네일은 프로젝트 브랜드 그라디언트로 대체.
*/

.examples-main {
  position: relative;
  margin: 0 auto;
  width: 127.2rem;
  max-width: 100%;
}

.examples-main::before {
  content: "";
  display: block;
  width: 100%;
  height: 15rem;
  background-color: transparent;
}

.examples-main article {
  position: relative;
  display: flex;
  width: 100%;
}

/* ---------- BANNER ---------- */
article.examples-banner {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: center;
  padding: 0 0 0 10.8rem;
  height: 28.8rem;
  background-image: url('../img/examples-hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

article.examples-banner h1 {
  width: 100%;
  font-size: 2.9rem;
  font-weight: 500;
  color: #fff;
  line-height: 2.9rem;
}

article.examples-banner h2 {
  margin: 3rem 0 0 0;
  max-width: 60rem;
  font-size: 1.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 2.6rem;
}

/* ---------- TITLE ---------- */
article.examples-title {
  justify-content: center;
  align-items: center;
  margin: 13rem 0 0 0;
  height: 15rem;
  font-size: 5rem;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

/* ---------- LISTS (grid) ----------
   3열(40.8rem 기준)로 시작해서, 창 너비가 줄면 카드가 비율대로 함께 줄어들다가
   카드 2개가 들어갈 최소 폭(34rem) 아래로 내려가는 순간 자연스럽게 2열로,
   더 줄면 1열로 재배치된다 (675px 미만은 아래 모바일 미디어쿼리가 강제 1열 처리). */
article.examples-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34rem, 1fr));
  grid-template-rows: repeat(auto-fill, 1fr);
  row-gap: 2rem;
  column-gap: 2rem;
  padding: 9rem 3rem;
}

article.examples-lists section {
  position: relative;
  padding: 35rem 0 0 0;
  width: 100%;
  height: 50.8rem;
  border-radius: 2rem;
  box-shadow: 0.5rem 0.5rem 2rem rgba(0, 0, 0, 0.12);
  overflow: hidden;
  cursor: pointer;
  background-color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

article.examples-lists section:hover {
  transform: translateY(-0.4rem);
  box-shadow: 0.5rem 1rem 2.4rem rgba(0, 0, 0, 0.18);
}

article.examples-lists section .thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 32rem;
}

article.examples-lists section .thumb.reels { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
article.examples-lists section .thumb.shorts { background: linear-gradient(135deg, #ff0000, #ff5e3a); }
article.examples-lists section .thumb.tiktok { background: linear-gradient(135deg, #010101, #25f4ee, #fe2c55); }

article.examples-lists section .thumb::after {
  position: absolute;
  right: 1.6rem;
  bottom: 1.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}

article.examples-lists section .thumb.reels::after { content: "REELS"; }
article.examples-lists section .thumb.shorts::after { content: "SHORTS"; }
article.examples-lists section .thumb.tiktok::after { content: "TIKTOK"; }

article.examples-lists section h2 {
  padding: 0 2.4rem;
  width: 100%;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

article.examples-lists section h1 {
  margin: 1rem 0 0 0;
  padding: 0 2.4rem;
  width: 100%;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 2.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

article.examples-lists section h3 {
  position: absolute;
  left: 0;
  bottom: 2.4rem;
  width: 100%;
  padding: 0 2.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-sub);
  line-height: 1.6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- PAGE (pagination) ---------- */
article.examples-page {
  justify-content: center;
  align-items: center;
  padding: 0 0 20rem 0;
  width: 100%;
}

article.examples-page a,
article.examples-page span {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.6rem;
  width: 4rem;
  height: 4rem;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-sub);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

article.examples-page a:hover {
  color: var(--color-text);
  background-color: var(--color-bg-soft);
}

article.examples-page a.current {
  color: #fff;
  background: var(--gradient);
  font-weight: 700;
}

article.examples-page a.disabled {
  color: rgba(200, 200, 200, 1);
  cursor: default;
  pointer-events: none;
}

/* ---------- EMPTY STATE ---------- */
article.examples-lists .empty {
  grid-column: 1 / -1;
  justify-content: center;
  padding: 8rem 0;
  width: 100%;
  font-size: 1.6rem;
  color: var(--color-sub);
  text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 675px) {
  .examples-main {
    margin: 0 auto;
    width: 100%;
  }

  .examples-main::before {
    height: 6rem;
  }

  /* BANNER */
  article.examples-banner {
    margin: 0 auto;
    padding: 0 0 0 2rem;
    width: calc(100% - 3rem);
    height: 15rem;
    border-radius: 1.4rem;
  }

  article.examples-banner h1 {
    font-size: 2rem;
    line-height: 2.4rem;
  }

  article.examples-banner h2 {
    margin: 1.2rem 0 0 0;
    padding: 0 2rem 0 0;
    font-size: 1.1rem;
    line-height: 1.8rem;
  }

  /* TITLE
     주의: html/body에 overflow-x:hidden 만 지정되고 overflow-y는 지정되지 않으면
     브라우저가 overflow-y를 auto로 강제 계산하면서 position:sticky가
     일부 렌더링 엔진에서 정상 동작하지 않는 경우가 있어(이 프로젝트의 기존
     style.css가 html,body에 overflow-x:hidden을 적용 중), 이 페이지에서는
     JS로 fixed 전환하는 방식으로 동일한 sticky 룩앤필을 재현한다. */
  .title-slot {
    position: relative;
    width: 100%;
    height: 12rem;
  }

  article.examples-title {
    position: absolute;
    left: 0;
    top: 6rem;
    margin: 0;
    width: 100%;
    height: 6rem;
    font-size: 2rem;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 5;
  }

  article.examples-title.is-stuck {
    position: fixed;
    top: 5rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.06);
  }

  /* LISTS */
  article.examples-lists {
    grid-template-columns: 100%;
    row-gap: 2rem;
    justify-content: center;
    margin: 0 auto;
    padding: 4rem 0;
    width: calc(100% - 3rem);
  }

  article.examples-lists section {
    padding: 28rem 0 0 0;
    width: 100%;
    height: 39.8rem;
    border-radius: 2rem;
  }

  article.examples-lists section .thumb {
    height: 26rem;
  }

  article.examples-lists section h2 {
    padding: 0 1.5rem;
    font-size: 1.2rem;
    line-height: 1.2rem;
  }

  article.examples-lists section h1 {
    margin: 1rem 0 0 0;
    padding: 0 1.5rem;
    font-size: 1.5rem;
    line-height: 2.4rem;
  }

  article.examples-lists section h3 {
    bottom: 1.5rem;
    padding: 0 1.5rem;
    font-size: 1.2rem;
    line-height: 1.2rem;
  }

  /* PAGE */
  article.examples-page {
    padding: 0 0 6rem 0;
  }
}
