@charset "utf-8";
/* board_blog list.css - 말더듬 블로그 전용 목록 스타일 */

/* ===== 컨테이너 ===== */
.container {
  width: 100%;
  max-width: 100%;
  margin: 45px auto 0;
  padding: 0 1rem;
  background: #f8f9fa;
  min-height: 100vh;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* ===== 성공 메시지 ===== */
.success-message {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.success-message .fa {
  color: #28a745;
  font-size: 1.2rem;
}

/* ===== 블로그 헤더 ===== */
.blog-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.blog-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.blog-title .fa {
  font-size: 1.6rem;
  color: #ffd700;
}

.blog-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  margin: 0;
  line-height: 1.5;
}

/* ===== 검색 폼 ===== */
.search-form-board {
  margin-bottom: 1.5rem;
}

.search-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.search-input {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  box-sizing: border-box;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-category {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  box-sizing: border-box;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-category:focus {
  outline: none;
  border-color: #667eea;
  background: white;
}

.search-button {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.search-button:hover {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* ===== 통계 정보 ===== */
.blog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.stat-item {
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #495057;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.stat-item .fa {
  color: #667eea;
}

.stat-item.search-result {
  background: #fff3cd;
  color: #856404;
}

.stat-item.search-result .fa {
  color: #ffc107;
}

.stat-item.category-filter {
  background: #e2e3f7;
  color: #5a6acf;
}

/* ===== 관리자 컨트롤 ===== */
.admin-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
  transform: translateY(-1px);
}

/* ===== 블로그 그리드 ===== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ===== 블로그 카드 ===== */
.blog-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-checkbox {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  padding: 0.25rem;
}

/* ===== 카드 썸네일 ===== */
.card-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .card-thumbnail img {
  transform: scale(1.05);
}

.no-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f1f3f4, #e8eaed);
  color: #9aa0a6;
}

.no-thumbnail .fa {
  font-size: 3rem;
}

/* ===== 미디어 배지 ===== */
.media-badges {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-badge {
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.image-badge { background: rgba(52, 144, 220, 0.9); }
.audio-badge { background: rgba(255, 193, 7, 0.9); }
.video-badge { background: rgba(220, 53, 69, 0.9); }
.youtube-badge { background: rgba(255, 0, 0, 0.9); }

/* ===== 카드 내용 ===== */
.card-content {
  padding: 1.25rem;
}

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.card-title a {
  color: #2d3748;
  text-decoration: none;
  transition: color 0.3s ease;
}

.card-title a:hover {
  color: #667eea;
}

.card-excerpt {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

/* ===== 카드 메타 정보 ===== */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
}

.meta-info {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #6c757d;
}

.meta-info span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.meta-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.meta-stats span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #6c757d;
}

.views .fa { color: #17a2b8; }
.comments .fa { color: #28a745; }
.likes .fa { color: #dc3545; }

/* ===== 관리자 메뉴 ===== */
.card-admin {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.admin-link:hover {
  color: #764ba2;
}

/* ===== 게시글 없음 ===== */
.no-posts {
  text-align: center;
  padding: 3rem 1rem;
  background: white;
  border-radius: 12px;
  color: #6c757d;
}

.no-posts .fa {
  font-size: 4rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.no-posts h3 {
  color: #495057;
  margin-bottom: 0.5rem;
}

.no-posts p {
  margin-bottom: 1.5rem;
}

/* ===== 글쓰기 버튼 ===== */
.write-button-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.write-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.write-button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.write-button span {
  display: none;
}

/* ===== 페이지네이션 ===== */
.pagination {
  margin: 2rem 0;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0.5rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: #495057;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination a:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

.pagination .active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

/* ===== 반응형 디자인 ===== */

/* 태블릿 (600px 이상) */
@media (min-width: 600px) {
  .search-container {
    flex-direction: row;
    align-items: center;
  }
  
  .search-input {
    flex: 1;
  }
  
  .search-category {
    flex: 0 0 200px;
  }
  
  .search-button {
    flex: 0 0 120px;
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .write-button {
    width: auto;
    height: 50px;
    padding: 0 1.5rem;
    border-radius: 25px;
  }
  
  .write-button span {
    display: inline;
  }
}

/* 태블릿 (768px 이상) */
@media (min-width: 768px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }
  
  .blog-header {
    padding: 2rem;
  }
  
  .blog-title {
    font-size: 2.2rem;
  }
  
  .blog-subtitle {
    font-size: 1.1rem;
  }
  
  .card-thumbnail {
    height: 220px;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .card-title {
    font-size: 1.3rem;
  }
}

/* 데스크탑 (1024px 이상) */
@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .card-thumbnail {
    height: 200px;
  }
  
  .meta-info,
  .meta-stats {
    font-size: 0.9rem;
  }
}

/* 대형 데스크탑 (1200px 이상) */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }
  
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .card-thumbnail {
    height: 180px;
  }
}

/* ===== 애니메이션 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  animation: fadeInUp 0.5s ease-out;
}

.blog-card:nth-child(odd) {
  animation-delay: 0.1s;
}

.blog-card:nth-child(even) {
  animation-delay: 0.2s;
}

/* ===== 로딩 상태 ===== */
.loading .blog-grid {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}