/* =====================================================================
   MindWiki Index Page Styles
   홈페이지(index.php) 전용 스타일
   ===================================================================== */

/* === 최근 발행 콘텐츠 영역 === */
.index-latest {
  /* mindwiki_css.css의 .mw-card 스타일 사용 */
}

/* === 주제별 콘텐츠 탭 === */
.category-tabs-section {
  margin-top: 32px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.tab-button {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: #1bb2d3;
  background: #f0f9ff;
}

.tab-button.active {
  color: #1bb2d3;
  border-bottom-color: #1bb2d3;
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.category-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.3s ease;
}

.category-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.category-card h3 a {
  color: #1e293b;
  text-decoration: none;
  transition: color 0.3s ease;
}

.category-card h3 a:hover {
  color: #1bb2d3;
}

.category-card p {
  margin: 0 0 12px 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.category-card .post-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #64748b;
}

.tab-more {
  text-align: center;
  padding: 20px 0;
}

.more-button {
  display: inline-block;
  padding: 10px 24px;
  background: #1bb2d3;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.more-button:hover {
  background: #1595b3;
}

/* === 모바일 반응형 === */
@media (max-width: 768px) {
  .tab-posts {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .category-tabs-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .category-tabs {
    width: 100% !important;
    box-sizing: border-box;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    flex-wrap: nowrap !important;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    /* 스크롤바 스타일링 (웹킷 브라우저용) */
  }
  
  .category-tabs::-webkit-scrollbar {
    height: 4px;
  }
  
  .category-tabs::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .category-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
  }
  
  .category-tabs::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
  }
  
  .tab-button {
    white-space: nowrap !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: fit-content !important;
    text-align: left !important;
  }
}

