/* ===========================
   RESET
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: Pretendard, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111;
}

/* 티스토리 에디터 툴바 숨기기 */
.menu_toolbar {
  display: none !important;
}

/* ===========================
   HEADER
=========================== */
#header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  /*border-bottom: 1px solid #eee;*/
}

#header .inner {
  max-width: 1280px;
  height: 80px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* 로고 왼쪽 / 메뉴 오른쪽 */
}

/* Logo */
#header .logo img {
  height: 44px;
}

/* Desktop 메뉴 */
.top-menu {
  display: flex;
  gap: 48px;
  margin-left: auto;
}

.top-menu a {
  font-size: 17px;
  font-weight: 500;
  color: rgb(255, 255, 255);
}

/* 햄버거 버튼 (기본: PC에서는 숨김) */
.btn-area .drawer-opener {
  display: none;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 300; /* 헤더 안에서도 충분히 위에 있도록 */
}

.btn-area .drawer-opener::before {
  content: "≡";
  font-size: 28px;
  color: rgb(255, 255, 255);
  line-height: 1;
}

/* ===========================
   HERO SECTION
=========================== */
#hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding-left: 80px;

  background: url("https://tistory1.daumcdn.net/tistory/8408743/skin/images/bg_temp.png") center/cover no-repeat;
  /* center → 중앙정렬
     cover  → 꽉 차게
     no-repeat → 반복방지 */
  position: relative;

}

.hero-inner {
  max-width: 600px;
}

#hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  position: relative;
}

.hero-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-svg {
  width: 420px;   /* 원하면 더 키울 수 있음 */
  max-width: 80%;
  height: auto;
  display: block;
}


/* ===========================
   PARTNERS SECTION
=========================== */
#partners {
  padding: 10px 40px;
  background: #ffffff;
  text-align: center;

  /* 애니메이션 초기값 */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 뷰포트에 들어왔을 때 섹션 전체 등장 */
#partners.in-view {
  opacity: 1;
  transform: translateY(0);
}

.partners-inner {
  max-width: 1280px;
  margin: 0 auto;
}

#partners h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.partners-sub {
  font-size: 16px;
  color: #777;
  margin-bottom: 64px;
}

/* 로고 영역: 한 줄 최대 3개 */
.partners-logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
  justify-items: center;
}

/* 각 로고 카드 기본 상태 (애니메이션 전) */
.partner-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 화면에 들어왔을 때 등장 */
.partner-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* 로고 이미지 스타일 */
.partner-item img {
  max-width: 180px;
  height: auto;
  display: block;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: 0.2s ease;
}

.partner-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* 태블릿: 한 줄에 2개 */
@media (max-width: 900px) {
  .partners-logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 모바일: 한 줄에 1개 */
@media (max-width: 600px) {
  .partners-logos {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   FOOTER
=========================== */
#footer {
  padding: 40px 0;
  border-top: 1px solid #eee;
  background: #fff;
}

#footer .inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: left;
}

/* ===========================
   DRAWER (Right Slide 메뉴)
=========================== */
#drawer {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  z-index: 200;               /* 헤더보다 위 */
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* on 클래스 붙었을 때만 보이게 */
#drawer.on {
  opacity: 1;
  pointer-events: auto;
}

/* 실제 흰색 사이드 패널 */
.drawer-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 80%;
  height: 100%;
  background: #ffffff;
  padding: 40px 32px;
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);    /* 기본: 화면 밖 */
  transition: transform 0.4s cubic-bezier(.25, .8, .25, 1);
}

/* 열렸을 때 오른쪽에서 슬라이드 인 */
#drawer.on .drawer-inner {
  transform: translateX(0);
}

/* 닫기 버튼 (X) */
.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  margin-bottom: 24px;
}

/* Drawer 메뉴 텍스트 */
.drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-menu a {
  font-size: 20px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* drawer 켜질 때 위로 부드럽게 올라오도록 */
#drawer.on .drawer-menu a {
  opacity: 1;
  transform: translateY(0);
}

/* 순차 등장 딜레이 */
#drawer.on .drawer-menu a:nth-child(1) { transition-delay: 0.05s; }
#drawer.on .drawer-menu a:nth-child(2) { transition-delay: 0.10s; }
#drawer.on .drawer-menu a:nth-child(3) { transition-delay: 0.15s; }
#drawer.on .drawer-menu a:nth-child(4) { transition-delay: 0.20s; }

/* ===========================
   MOBILE (반응형)
=========================== */
@media (max-width: 768px) {
  /* 상단 메뉴 숨기고 햄버거만 */
  .top-menu {
    display: none;
  }

  .btn-area .drawer-opener {
    display: flex;
    margin-left: auto;
  }

  #header .inner {
    padding: 0 20px;
  }

  /* HERO 여백 줄이기 */
  #hero {
    padding: 40px 24px;
  }



  #hero p {
    font-size: 18px;
  }
}


/* 게시글 영역 */
#article-area {
  padding: 40px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.post-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
}

.post-date {
  color: #777;
  margin-bottom: 30px;
}

.post-content {
  font-size: 18px;
  line-height: 1.7;
}

/* =========================================
   🔥 글 페이지(permalink)에서 HERO/파트너 숨기기
   티스토리는 글 페이지에 body id를 자동 부여함
========================================= */

/* 글 페이지일 때 HERO 숨김 */
body#tt-body-page #hero {
  display: none !important;
}

/* 글 페이지일 때 파트너 섹션 숨김 */
body#tt-body-page #partners {
  display: none !important;
}

/* 글 페이지에서 게시글 영역 위쪽 여백 보정 */
body#tt-body-page #article-area {
  padding-top: 40px !important;
}

/* ==== CATEGORY PAGE ==== */
.category-list {
  max-width: 900px;
  margin: 80px auto 80px auto;
  padding: 0 20px;
}

.category-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #000;
}

.category-item {
  display: block;
  padding: 25px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #000;
}

.category-item-title {
  font-size: 22px;
  font-weight: 600;
}

.category-item-desc {
  margin-top: 8px;
  font-size: 15px;
  color: #666;
  line-height: 1.6;
}


/* 카테고리 페이지에서는 HERO 숨김 */
#tt-body-category #hero {
  display: none !important;
}

/* 카테고리 페이지에서 PARTNERS 숨기기 */
body#tt-body-category #partners {
  display: none !important;
}

/* 태그 페이지에서도 숨기기 (선택사항) */
body#tt-body-tag #partners {
  display: none !important;
}

/* 검색 페이지에서도 숨기기 (선택사항) */
body#tt-body-search #partners {
  display: none !important;
}

/* 홈 화면(tt-body-main)에서 기본 글 리스트 완전 숨기기 */
body#tt-body-main .cont_skin,
body#tt-body-main .list_content,
body#tt-body-main .area_list,
body#tt-body-main #content,
body#tt-body-main #mArticle {
  display: none !important;
}


/* 카테고리 페이지에서 article-area는 안 숨겨도 됨 */

/* ============================
   📌 Portfolio Category Page (Gallery)
============================ */

body#tt-body-category #article-area {
  max-width: 1200px;
}

/* Section */
.portfolio-section {
  margin: 80px auto;
  padding: 0 20px;

  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

/* Title */
.portfolio-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
}

.portfolio-divider {
  width: 120px;
  height: 4px;
  background: #000;
  margin: 0 auto 50px auto;
  border-radius: 2px;
}

/* Grid Layout */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Each Item (Card) */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  display: block;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }

/* Image (3:4 비율 유지) */
.portfolio-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

/* Hover Effects */
.portfolio-item:hover .portfolio-thumb {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  color: #fff;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s ease;
  font-size: 20px;
  font-weight: 600;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* Animation */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-title {
    font-size: 34px;
  }
}


/* 기본적으로 숨김 */
.category-list {
  display: none;
}

/* 카테고리 페이지에서만 표시 */
body#tt-body-category .category-list {
  display: block;
}


/* 전체 Hero */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 6vw;
}

/* 12 그리드 기반 레이아웃 */
.hero-inner-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  width: 100%;
  height: 100%;
}

/* 왼쪽 6칸 */
.hero-left {
  grid-column: span 6;
  display: flex;
  justify-content: flex-start; /* 왼쪽 정렬 */
  align-items: center;
}

/* SVG 스타일 */
.hero-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

/* 오른쪽 6칸 */
.hero-right {
  grid-column: span 6;
}


/* ===========================
    반응형 
=========================== */

/* 1024px 이하 – 12 → 12 (SVG 크기 조금 줄임) */
@media (max-width: 1024px) {
  .hero-left {
    grid-column: span 12;
  }
  .hero-right {
    display: none;
  }
  .hero-svg {
    max-width: 380px;
  }
}

/* 모바일 600px 이하 – 중앙 정렬 */
@media (max-width: 600px) {
  #hero {
    padding: 0 20px;
    height: 100vh;
  }
  .hero-svg {
    max-width: 300px;
    margin: 0 auto;
  }
}

#hero {
  margin-top: -80px; /* 헤더 높이만큼 위로 끌어올리기 */
  padding-top: 0 !important;
}


/* 기본: 내부 페이지용 로고만 보임 */
.logo-main {
  display: none;
}
.logo-sub {
  display: block;
}

/* 메인 화면(tt-body-main)에서는 메인 로고만 보이게 */
body#tt-body-main .logo-main {
  display: block;
}
body#tt-body-main .logo-sub {
  display: none;
}

/* 헤더 배경 전환 */
#header {
  transition: background 0.35s ease;
}

/* 내부 페이지(기본) → 흰색 헤더 */
#header {
  background: rgba(255, 255, 255, 0.9);
}

/* 메인 화면만 → 어두운 투명 헤더 */
body#tt-body-main #header {
  background: rgba(0, 0, 0, 0.35);
}

/* 메인 화면(홈) - 어두운 헤더 적용 */
body#tt-body-main #header,
body#tt-body-index #header {
  background: rgba(0, 0, 0, 0.35) !important;
}

/* 메인 화면에서 메인 로고만 */
body#tt-body-main .logo-main,
body#tt-body-index .logo-main {
  display: block !important;
}
body#tt-body-main .logo-sub,
body#tt-body-index .logo-sub {
  display: none !important;
}

/* 내부 페이지 기본 헤더 (흰색) */
#header {
  background: rgba(255, 255, 255, 0.9);
}

/* 내부 페이지에서 서브 로고 사용 */
.logo-main { display: none; }
.logo-sub { display: block; }

/* 서브 페이지에서 헤더 글씨 색 */
body#tt-body-page #header a,
body#tt-body-category #header a,
body#tt-body-tag #header a,
body#tt-body-search #header a {
  color: #111 !important;
  transition: color 0.3s ease;
}

/* 서브 페이지에서 햄버거 버튼 색 */
body#tt-body-page .drawer-opener::before,
body#tt-body-category .drawer-opener::before,
body#tt-body-tag .drawer-opener::before,
body#tt-body-search .drawer-opener::before {
  color: #111 !important;
}


