/* BITE DATA HOME FISHING v2.0
 * Adds only bottom-area layout + member fishing widget styles.
 * Existing style.css, home-widgets.css and main.js stay untouched.
 */
#btd_main .btd_bottom_area {
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap:16px !important;
  align-items:start;
}
#btd_main .btd_bottom_area > .btd_hf { grid-column:span 2; min-width:0; }
#btd_main .btd_bottom_area > .btd_community_section { grid-column:span 1; min-width:0; }

#btd_main .btd_hf {
  --hf-surface:#fff;
  --hf-border:#edf0f2;
  --hf-line:#f0f1f2;
  --hf-heading:#282c32;
  --hf-text:#34383e;
  --hf-muted:#8b949e;
  --hf-accent:#779e35;
  background:var(--hf-surface);
  border:1px solid var(--hf-border);
  border-radius:12px;
  padding:18px 17px 15px;
}
#btd_main .btd_hf .btd_hf_heading {
  display:block !important;
  height:auto !important;
  margin:0 0 9px !important;
  border:0 !important;
}
#btd_main .btd_hf .btd_hf_heading h3 {
  margin:0 0 13px !important;
  padding:0 0 11px;
  border-bottom:1px solid var(--hf-border);
  color:var(--hf-heading) !important;
  font-size:15px !important;
  font-weight:750 !important;
}
#btd_main .btd_hf .btd_hf_tabs {
  display:flex !important;
  flex-wrap:wrap;
  gap:19px !important;
  margin:0 0 9px !important;
  border-bottom:1px solid var(--hf-border);
}
#btd_main .btd_hf .btd_hf_tabs .tab_btn,
body.dark-mode #btd_main .btd_hf .btd_hf_tabs .tab_btn {
  position:relative;
  display:inline-flex;
  min-height:31px;
  height:31px !important;
  padding:0 0 9px !important;
  margin:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  color:var(--hf-muted) !important;
  font-size:12px !important;
  font-weight:500 !important;
  cursor:pointer;
}
#btd_main .btd_hf .btd_hf_tabs .tab_btn.active,
body.dark-mode #btd_main .btd_hf .btd_hf_tabs .tab_btn.active {
  background:transparent !important;
  color:var(--hf-heading) !important;
  border:0 !important;
  font-weight:750 !important;
}
#btd_main .btd_hf .btd_hf_tabs .tab_btn.active::after {
  content:'';
  position:absolute;
  bottom:-1px;
  left:0;
  right:0;
  height:2px;
  background:var(--hf-accent);
}
#btd_main .btd_hf .btd_hf_list { display:flex; flex-direction:column; }
#btd_main .btd_hf .btd_hf_item {
  display:grid;
  grid-template-columns:145px minmax(0,1fr);
  gap:15px;
  align-items:center;
  padding:12px 0;
  min-width:0;
  border-bottom:1px solid var(--hf-line);
}
#btd_main .btd_hf .btd_hf_item:last-child { border-bottom:0; }
#btd_main .btd_hf .btd_hf_image {
  display:flex;
  align-items:center;
  justify-content:center;
  width:145px;
  height:88px;
  background:#f2f3f4;
  color:#9aa0a6;
  border-radius:6px;
  overflow:hidden;
  font-size:10px;
}
#btd_main .btd_hf .btd_hf_image img { width:100%; height:100%; object-fit:cover; display:block; }
#btd_main .btd_hf .btd_hf_content { min-width:0; }
#btd_main .btd_hf .btd_hf_category { display:block; color:var(--hf-muted); font-size:10px; margin-bottom:3px; }
#btd_main .btd_hf .btd_hf_title {
  color:var(--hf-heading);
  display:block;
  font-size:13px;
  font-weight:750;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#btd_main .btd_hf .btd_hf_item:hover .btd_hf_title { color:var(--hf-accent); }
#btd_main .btd_hf .btd_hf_excerpt {
  color:var(--hf-muted);
  margin:4px 0 5px;
  font-size:11px;
  line-height:1.4;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
#btd_main .btd_hf .btd_hf_meta { display:block; color:var(--hf-muted); font-size:10px; }
#btd_main .btd_hf .btd_hf_meta i { font-style:normal; margin:0 3px; }
#btd_main .btd_hf .btd_hf_empty { text-align:center; color:var(--hf-muted); padding:65px 8px; font-size:12px; }
body.dark-mode #btd_main .btd_hf {
  --hf-surface:#1c1e20;
  --hf-border:#303337;
  --hf-line:#2b2e31;
  --hf-heading:#edf0f2;
  --hf-text:#d2d7dc;
  --hf-muted:#949ca5;
  --hf-accent:#a7cc65;
}
body.dark-mode #btd_main .btd_hf .btd_hf_image { background:#282b2f; color:#88919b; }




/* =========================================================
   BITE DATA HOME FISHING v2.1 — 게시글 2열 x 2행
   기존 상단/사이드 위젯, PHP, JS 변경 없음
   ========================================================= */
#btd_main .btd_hf .btd_hf_list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 16px;
    row-gap: 0;
    align-items: stretch;
}

#btd_main .btd_hf .btd_hf_item {
    display: grid !important;
    grid-template-columns: 106px minmax(0, 1fr) !important;
    gap: 11px !important;
    align-items: center;
    padding: 12px 0 !important;
    min-width: 0;
    border-bottom: 1px solid var(--hf-line) !important;
}

#btd_main .btd_hf .btd_hf_item:first-child {
    padding-top: 12px !important;
}

/* 4개가 2x2로 놓였을 때, 마지막 줄 아래 구분선은 제외 */
#btd_main .btd_hf .btd_hf_item:nth-last-child(-n+2) {
    border-bottom: 0 !important;
}

#btd_main .btd_hf .btd_hf_image {
    width: 106px !important;
    height: 78px !important;
}

#btd_main .btd_hf .btd_hf_content {
    min-width: 0;
    overflow: hidden;
}

#btd_main .btd_hf .btd_hf_title {
    font-size: 12px !important;
    line-height: 1.4;
}

#btd_main .btd_hf .btd_hf_excerpt {
    font-size: 11px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
}

#btd_main .btd_hf .btd_hf_meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 중간 화면에서 두 칸이 너무 좁아지지 않도록 */



/* BITE DATA PC-only: only lure/fresh/salt are six items in a 2-column x 3-row grid.
   Popular fishing remains untouched.  Intentionally NO media queries. */
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_list {
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    grid-template-rows:repeat(3, 100px) !important;
    gap:0 14px !important;
    align-items:stretch !important;
}
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child {
    position:static !important;
    display:grid !important;
    grid-column:auto !important;
    grid-row:auto !important;
    grid-template-columns:92px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:center !important;
    min-height:100px !important;
    height:100px !important;
    box-sizing:border-box !important;
    margin:0 !important;
    padding:5px 0 !important;
    border:0 !important;
    border-bottom:1px solid var(--hf-line) !important;
    border-radius:0 !important;
    background:transparent !important;
    overflow:hidden !important;
}
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:nth-child(n+2) { grid-column:auto !important; }
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:nth-last-child(-n+2) { border-bottom:0 !important; }
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item .btd_hf_image,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_image {
    position:relative !important;
    inset:auto !important;
    width:92px !important;
    height:66px !important;
    border-radius:5px !important;
    overflow:hidden !important;
}
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_image::after { content:none !important; display:none !important; }
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item .btd_hf_content,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_content {
    position:static !important;
    inset:auto !important;
    z-index:auto !important;
    min-width:0 !important;
    overflow:hidden !important;
}
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item .btd_hf_category,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_category {
    display:block !important;
    margin:0 0 2px !important;
    padding:0 !important;
    background:transparent !important;
    color:var(--hf-muted) !important;
    font-size:10px !important;
    font-weight:600 !important;
}
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item .btd_hf_title,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_title {
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    white-space:normal !important;
    color:var(--hf-heading) !important;
    font-size:12px !important;
    line-height:1.3 !important;
    margin:0 !important;
}
/* The PHP already provides a cleaned excerpt. Only the three species tabs show it. */
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item .btd_hf_excerpt,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_excerpt {
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    overflow:hidden !important;
    max-height:27px !important;
    margin:2px 0 2px !important;
    color:var(--hf-muted) !important;
    font-size:10.5px !important;
    line-height:1.28 !important;
    white-space:normal !important;
}
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item .btd_hf_meta,
#btd_main .btd_hf .btd_hf_panel.btd_hf_panel--grid .btd_hf_item:first-child .btd_hf_meta {
    display:block !important;
    margin:2px 0 0 !important;
    font-size:10px !important;
    color:var(--hf-muted) !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
}


/* =========================================================
   BITE DATA HOME FISHING — popular tab ONLY: 1 large + 4 small
   Outer widget width remains unchanged. No viewport breakpoints.
   Lure / fresh / salt tabs keep their existing 2 x 3 list grid.
   ========================================================= */
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_list {
    display: grid !important;
    grid-template-columns: minmax(0, 1.95fr) repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    align-items: stretch !important;
    overflow: hidden;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child {
    display: block !important;
    position: relative !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #202324;
    overflow: hidden !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
}
/* Existing home-redesign.css sends non-leading items to column 2;
   reset that rule so the small images occupy columns 2 and 3. */
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:nth-child(n+2) {
    grid-column: auto !important;
    grid-row: auto !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_image,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_image {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    background: #25282b;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_image img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_image::after,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_image::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    background: linear-gradient(to top,rgba(0,0,0,.9) 0%,rgba(0,0,0,.4) 33%,rgba(0,0,0,0) 75%) !important;
    pointer-events: none !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_content,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_content {
    position: absolute !important;
    inset: auto 10px 10px !important;
    z-index: 2 !important;
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_category,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_category {
    display: inline-block !important;
    margin: 0 0 5px !important;
    padding: 3px 6px !important;
    border-radius: 3px !important;
    background: var(--btd-home-lime,#9bcc38) !important;
    color: #172111 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_title,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    white-space: normal !important;
    overflow: hidden !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_title {
    font-size: 18px !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_excerpt,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_excerpt {
    display: none !important;
}
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item .btd_hf_meta,
#btd_main .btd_hf .btd_hf_panel--popular .btd_hf_item:first-child .btd_hf_meta {
    display: block !important;
    margin: 5px 0 0 !important;
    color: #d2d7db !important;
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
