/* ===========================
   Cropick — blog.css
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800;900&family=Nunito:wght@700;800;900&display=swap');

:root {
  --primary:       #3A9E2F;
  --primary-light: #5BBD50;
  --primary-dark:  #2D7D24;
  --brown:         #3D2B1F;
  --yellow:        #F5C518;
  --text-dark:     #1A1A1A;
  --text-mid:      #444;
  --text-light:    #888;
  --border:        #E8E8E8;
  --bg:            #FFFFFF;
  --bg-soft:       #F6FAF5;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --shadow-card:   0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover:  0 8px 28px rgba(0,0,0,0.14);
  --nav-h:         100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans KR', sans-serif; color: var(--text-dark); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── NAVBAR ── */
.navbar { position: sticky; top: 0; z-index: 1000; height: var(--nav-h); background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 40px; }
.navbar__logo { display: flex; align-items: center; gap: 10px; margin-right: 48px; flex-shrink: 0; }
.navbar__logo img { height: 40px; width: auto; object-fit: contain; }
.navbar__nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.navbar__nav a { font-size: 20px; font-weight: 500; color: #777; padding: 7px 16px; border-radius: 8px; letter-spacing: -0.2px; transition: color .2s, background .2s; position: relative; }
.navbar__nav a:hover { color: var(--text-dark); background: var(--bg-soft); }
.navbar__nav a.active { color: var(--primary); font-weight: 700; }
.navbar__nav a.active::after { content: ''; position: absolute; bottom: -2px; left: 16px; right: 16px; height: 2px; border-radius: 2px; background: var(--primary); }
.navbar__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.navbar__actions .link-sm { font-size: 13px; font-weight: 500; color: #888; padding: 6px 10px; border-radius: 6px; letter-spacing: -0.1px; transition: color .2s, background .2s; }
.navbar__actions .link-sm:hover { color: var(--text-dark); background: var(--bg-soft); }
.navbar__icon-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: transparent; color: #888; cursor: pointer; transition: background .2s, color .2s; border: 1.5px solid var(--border); }
.navbar__icon-btn:hover { background: var(--bg-soft); color: var(--text-dark); }

/* ── PAGE HEADER ── */
.page-header { padding: 40px 40px 0; }
.page-header h1 { font-size: 26px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.5px; margin-bottom: 24px; }

/* ── 지역 필터 드롭다운 ── */
.filter-row { display: flex; gap: 12px; margin-bottom: 28px; }
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 40px 10px 16px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-mid);
  cursor: pointer;
  min-width: 140px;
  transition: border-color .2s;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ── 탭 바 ── */
.tab-bar { display: flex; align-items: center; border-bottom: 1.5px solid var(--border); padding: 0 40px; gap: 0; background: #fff; }
.tab-bar__tabs { display: flex; gap: 0; flex: 1; }
.tab-bar__tab { font-size: 14px; font-weight: 500; color: var(--text-light); padding: 14px 18px; cursor: pointer; border: none; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; background: none; transition: color .2s, border-color .2s; white-space: nowrap; outline: none; }
.tab-bar__tab:hover { color: var(--text-dark); }
.tab-bar__tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.tab-bar__right { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 0; }

/* 블로그 / 인스타 필터 버튼 */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  background: #fff;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { border-color: var(--primary); color: var(--primary); background: #f0fbee; }
.filter-btn--insta.active { border-color: #e1306c; color: #e1306c; background: #fff0f5; }
.filter-btn__badge { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; }
.filter-btn__badge--b { background: var(--primary); }
.filter-btn__badge--insta {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3CradialGradient id='ig' cx='30%25' cy='107%25' r='150%25'%3E%3Cstop offset='0%25' stop-color='%23fdf497'/%3E%3Cstop offset='5%25' stop-color='%23fdf497'/%3E%3Cstop offset='45%25' stop-color='%23fd5949'/%3E%3Cstop offset='60%25' stop-color='%23d6249f'/%3E%3Cstop offset='90%25' stop-color='%23285AEB'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect x='2' y='2' width='20' height='20' rx='6' fill='url(%23ig)'/%3E%3Ccircle cx='12' cy='12' r='4.5' fill='none' stroke='white' stroke-width='1.8'/%3E%3Ccircle cx='17.2' cy='6.8' r='1.2' fill='white'/%3E%3C/svg%3E") center/cover no-repeat;
  border-radius: 4px;
}

/* 정렬 드롭다운 */
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 30px 6px 12px;
  font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-mid);
  cursor: pointer;
}
.sort-select:focus { outline: none; }

/* ── 캠페인 그리드 ── */
.campaign-wrap { padding: 32px 40px 60px; }
.campaign-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
@media (max-width: 1400px) { .campaign-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1100px) { .campaign-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .campaign-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .campaign-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── 카드 ── */
.card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card__thumb { width: 100%; aspect-ratio: 1 / 0.75; border-radius: var(--radius-md); overflow: hidden; background: #eee; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card__thumb img { transform: scale(1.04); }
.card__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 50px; }
.badge--b     { background: var(--primary); color: #fff; }
.badge--relay { background: var(--brown); color: #fff; }
.badge--insta {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3CradialGradient id='ig' cx='30%25' cy='107%25' r='150%25'%3E%3Cstop offset='0%25' stop-color='%23fdf497'/%3E%3Cstop offset='5%25' stop-color='%23fdf497'/%3E%3Cstop offset='45%25' stop-color='%23fd5949'/%3E%3Cstop offset='60%25' stop-color='%23d6249f'/%3E%3Cstop offset='90%25' stop-color='%23285AEB'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect x='2' y='2' width='20' height='20' rx='6' fill='url(%23ig)'/%3E%3Ccircle cx='12' cy='12' r='4.5' fill='none' stroke='white' stroke-width='1.8'/%3E%3Ccircle cx='17.2' cy='6.8' r='1.2' fill='white'/%3E%3C/svg%3E") center/cover no-repeat;
  color: transparent;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  flex-shrink: 0;
}
.badge--clip  { background: #3F51B5; color: #fff; }
.card__location { font-size: 11px; color: var(--text-light); }
.card__title { font-size: 14px; font-weight: 700; color: var(--text-dark); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__desc { font-size: 12px; color: var(--text-mid); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.tag-dday { font-size: 11px; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-mid); padding: 3px 8px; border-radius: 4px; }
.tag-dday--today { background: #EBF7E9; border-color: var(--primary-light); color: var(--primary-dark); }
.card__count { font-size: 11px; color: var(--text-light); }

/* ── 빈 상태 ── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-light); }
.empty-state__icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* ── FOOTER ── */
.footer-cs { background: var(--brown); padding: 64px 40px; display: flex; align-items: center; gap: 40px; }
.footer-cs__mascot { flex-shrink: 0; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-cs__mascot-placeholder { width: 100px; height: 100px; background: rgba(255,255,255,.08); border: none; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.footer-cs__mascot-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.65); text-align: center; }
.footer-cs__cards { display: flex; gap: 16px; flex: 1; justify-content: flex-end; }
.footer-cs__card { flex: 0 1 320px; background: #fff; border-radius: var(--radius-md); padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.footer-cs__card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.footer-cs__card-text .label { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.footer-cs__card-text .desc { font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text-dark); }
.footer-cs__card-icon { font-size: 36px; flex-shrink: 0; }
.footer-main { padding: 60px 40px; border-top: 1px solid var(--border); }
.footer-main__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.footer-main__logo img { height: 28px; width: auto; object-fit: contain; }
.footer-main__info { font-size: 14px; color: var(--text-light); line-height: 1.8; }
.footer-main__links { display: flex; gap: 16px; margin-top: 16px; }
.footer-main__links a { font-size: 13px; color: var(--text-light); transition: color .2s; }
.footer-main__links a:hover { color: var(--text-dark); }
.footer-main__copy { font-size: 12px; color: #bbb; margin-top: 8px; }

/* ── FADE-UP ── */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── BACK TO TOP ── */
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; background: #fff; border: 1px solid var(--border); border-radius: 50%; box-shadow: 0 4px 16px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; color: var(--text-mid); z-index: 999; opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ── 인스타그램 아이콘 (CSS로 로고 구현) ── */
.insta-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(135deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.insta-icon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  position: absolute;
}
.insta-icon::after {
  content: "";
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  right: 2px;
}


/* ════════════════════════════════
   MOBILE — @media (max-width: 768px)
════════════════════════════════ */
@media (max-width: 768px) {

  /* ── NAVBAR ── */
  :root { --nav-h: 60px; }
  .navbar { height: var(--nav-h); padding: 0 16px; }
  .navbar__logo { margin-right: 0; }
  .navbar__logo img { height: 30px; }
  .navbar__nav { display: none; }
  .navbar__actions .link-sm { display: none; }
  .navbar__icon-btn { width: 32px; height: 32px; }

  /* ── 탭바 가로 스크롤 ── */
  .tab-bar { padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-bar__tab { padding: 12px 14px; font-size: 13px; }
  .tab-bar__right { gap: 6px; flex-shrink: 0; }
  .filter-btn { padding: 5px 10px; font-size: 12px; }
  .sort-select { font-size: 12px; padding: 5px 24px 5px 10px; }

  /* ── 페이지 헤더 ── */
  .page-header { padding: 24px 16px 0; }
  .page-header h1 { font-size: 20px; margin-bottom: 16px; }
  .filter-row { flex-wrap: wrap; }
  .filter-select { min-width: unset; flex: 1; }

  /* ── 캠페인 그리드 ── */
  .campaign-wrap { padding: 20px 16px 40px; }
  .campaign-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }

  /* ── 푸터 ── */
  .footer-cs { flex-direction: column; padding: 40px 16px; gap: 24px; }
  .footer-cs__mascot { width: auto; flex-direction: row; gap: 12px; }
  .footer-cs__cards { flex-direction: column; }
  .footer-cs__card { flex: unset; }
  .footer-main { padding: 32px 16px; }
  .footer-main__info { font-size: 12px; }
}


/* ════════════════════════════════
   HAMBURGER + DRAWER
════════════════════════════════ */

/* 햄버거 버튼 — PC에서는 숨김 */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  border-radius: 8px;
  transition: background .2s;
}
.navbar__hamburger:hover { background: var(--bg-soft, #F6FAF5); }
.navbar__hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: #555;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

/* 드로어 오버레이 */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1100;
}
.drawer-overlay.open { display: block; }

/* 드로어 패널 */
.drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 100%;
  background: #fff;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
.drawer.open { transform: translateX(0); }

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E8E8E8;
  flex-shrink: 0;
}
.drawer__header img { height: 28px; width: auto; object-fit: contain; }
.drawer__close {
  width: 32px; height: 32px;
  background: none; border: none;
  font-size: 18px; color: #888;
  cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.drawer__close:hover { background: #f5f5f5; }

.drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
}
.drawer__nav a {
  font-size: 16px;
  font-weight: 500;
  color: #444;
  padding: 14px 24px;
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.drawer__nav a:hover { background: #F6FAF5; color: #1A1A1A; }
.drawer__nav a.active {
  color: var(--primary, #3A9E2F);
  font-weight: 700;
  border-left-color: var(--primary, #3A9E2F);
  background: rgba(58,158,47,.05);
}

.drawer__actions {
  padding: 16px 24px 32px;
  border-top: 1px solid #E8E8E8;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer__actions a {
  font-size: 14px;
  font-weight: 500;
  color: #888;
  text-decoration: none;
  padding: 8px 0;
  transition: color .2s;
}
.drawer__actions a:hover { color: #1A1A1A; }
.drawer__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary, #3A9E2F);
  color: #fff !important;
  border-radius: 8px;
  padding: 12px 0 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: background .2s;
}
.drawer__login:hover { background: var(--primary-dark, #2D7D24); }

/* 모바일에서만 햄버거 표시 */
@media (max-width: 768px) {
  .navbar__hamburger { display: flex; }
}

