/* modules/blog.css */

/* 1. 블로그 레이아웃 공통 */
.blog-detail-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* 2. 블로그 목록 페이지 컨트롤러 */
.blog-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
  .blog-controls-panel {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
  }
  .blog-search-wrapper {
    max-width: 380px;
  }
  .blog-filter-tabs {
    margin-top: 0;
  }
}


.blog-search-wrapper {
  position: relative;
  width: 100%;
}

.blog-search-wrapper .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
}

#blog-search-input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

#blog-search-input:focus {
  border-color: #00a896;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 195, 154, 0.15);
}

/* 필터 탭 */
.blog-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.filter-tab.active {
  background: #00a896;
  border-color: #00a896;
  color: #ffffff;
}

/* 3. 블로그 목록 그리드 및 카드 */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: #02c39a;
  box-shadow: 0 20px 35px -5px rgba(2, 195, 154, 0.1), 0 10px 10px -5px rgba(2, 195, 154, 0.03);
}

.blog-card-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #f1f5f9;
}

.blog-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  opacity: 0.95;
}

.blog-card:hover .blog-card-thumb {
  transform: scale(1.05);
  opacity: 1;
}

.blog-card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-date {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 8px;
}

.blog-card-title {
  font-size: 1.15rem;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.4;
  font-weight: 600;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
  color: #00a896;
}

.blog-card-summary {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.blog-card-tag {
  font-size: 0.75rem;
  color: #00a896;
  background: rgba(2, 195, 154, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

.blog-card-footer {
  padding: 16px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #00a896;
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-card-footer i {
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-footer i {
  transform: translateX(4px);
}

/* 4. 블로그 상세 보기 페이지 */
.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.blog-back-link:hover {
  color: #00a896;
}

.blog-detail-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .blog-detail-card {
    padding: 24px;
  }
}

.post-header {
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.post-meta-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.post-detail-category {
  background: rgba(2, 195, 154, 0.08);
  color: #00a896;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.post-detail-date {
  font-size: 0.85rem;
  color: #64748b;
}

.post-detail-title {
  font-size: 1.85rem;
  color: #0f172a;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 16px;
}

.post-detail-tags .post-tag {
  font-size: 0.85rem;
  color: #64748b;
}

/* 5. 마크다운 상세 타이포그래피 스타일 (.markdown-body) */
.markdown-body {
  color: #334155;
  font-size: 1rem;
  line-height: 1.75;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 28px auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.markdown-body h2 {
  font-size: 1.35rem;
  color: #0f172a;
  margin-top: 36px;
  margin-bottom: 16px;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.markdown-body h3 {
  font-size: 1.15rem;
  color: #0f172a;
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 600;
}

.markdown-body p {
  margin-bottom: 16px;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.markdown-body li {
  margin-bottom: 8px;
}

.markdown-body blockquote {
  border-left: 4px solid #00a896;
  background: #f8fafc;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: italic;
}

.markdown-body blockquote p {
  margin: 0;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.markdown-body th, .markdown-body td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  text-align: left;
}

.markdown-body th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
}

/* 코드 블록 스타일 */
.markdown-body pre {
  margin: 20px 0;
  border-radius: 8px;
  overflow: auto;
  background: #1e293b !important;
  padding: 16px !important;
}

.markdown-body code {
  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
}

.markdown-body pre code {
  background: transparent;
  color: #f8fafc;
  padding: 0;
  border-radius: 0;
}

/* 6. B2B 교육문의 CTA 판별 */
.blog-cta-panel {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
}

.cta-glow-effect {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(2, 195, 154, 0.15) 0%, rgba(2, 195, 154, 0) 70%);
  z-index: 1;
  pointer-events: none;
}

.blog-cta-content {
  position: relative;
  z-index: 2;
}

.blog-cta-content h3 {
  font-size: 1.35rem;
  color: #0f172a;
  margin-bottom: 12px;
  font-weight: 600;
}

.blog-cta-content p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 24px;
}

.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #00a896 !important;
  border-color: #00a896 !important;
  color: #ffffff !important;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(2, 195, 154, 0.15);
}

.blog-cta-btn:hover {
  background: #02c39a !important;
  border-color: #02c39a !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 195, 154, 0.3);
}

/* 로딩, 오류, 빈 상태 공통 */
.blog-loading, .blog-empty-state, .blog-error-state {
  grid-column: span 2;
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.blog-loading i {
  color: #00a896;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.blog-error-state i {
  color: #f87171;
  font-size: 2rem;
  margin-bottom: 16px;
}

.blog-empty-state i {
  color: #94a3b8;
  font-size: 2rem;
  margin-bottom: 16px;
}

/* ==========================================
   Light Theme (.rpa-light-theme) Overrides
   ========================================== */
.rpa-light-theme {
  background-color: #ffffff !important;
  background-image: none !important;
  color: #1e293b !important;
}

.rpa-light-theme #bg-canvas-container {
  opacity: 0.03 !important;
}

/* 헤더 및 네비게이션 가독성 보장 */
.rpa-light-theme header {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

.rpa-light-theme header.scrolled {
  background: #ffffff !important;
  height: 70px !important;
}

.rpa-light-theme .logo span {
  color: #0f172a !important;
}

.rpa-light-theme .logo span strong {
  background: linear-gradient(135deg, #02c39a, #00a896) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 800 !important;
}

.rpa-light-theme .logo img {
  filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.15)) !important;
}

.rpa-light-theme .nav-link {
  color: #334155 !important;
}

.rpa-light-theme .nav-link:hover,
.rpa-light-theme .nav-link.active {
  color: #02c39a !important;
}

.rpa-light-theme .nav-link::after {
  background-color: #02c39a !important;
}

.rpa-light-theme .menu-toggle i {
  color: #0f172a !important;
}

/* 푸터 가독성 보장 */
.rpa-light-theme footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

.rpa-light-theme footer p {
  color: #64748b !important;
}

.rpa-light-theme footer .footer-logo span {
  color: #0f172a !important;
}

.rpa-light-theme footer a {
  color: #475569 !important;
}

.rpa-light-theme footer a:hover {
  color: #00a896 !important;
}

/* 블로그 컨트롤 및 타이틀 오버라이드 */
.rpa-light-theme .converter-title-area h1.section-title {
  color: #0f172a !important;
}

.rpa-light-theme .converter-title-area h1.section-title span {
  background: linear-gradient(135deg, #02c39a, #00a896) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.rpa-light-theme .converter-title-area p {
  color: #475569 !important;
}

/* 뒤로 가기 링크 버튼형 업그레이드 */
.rpa-light-theme .blog-back-link {
  color: #334155 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  transition: all 0.25s ease !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

.rpa-light-theme .blog-back-link:hover {
  color: #00a896 !important;
  border-color: #00a896 !important;
  transform: translateX(-4px) !important;
  box-shadow: 0 4px 12px rgba(2, 195, 154, 0.15) !important;
}

/* 블로그 카드 & 상세 카드 타이포그래피 선명화 */
.rpa-light-theme .blog-card-title {
  color: #0f172a !important;
}

.rpa-light-theme .blog-card-tag {
  color: #00a896 !important;
  background: rgba(2, 195, 154, 0.06) !important;
}

.rpa-light-theme .post-detail-title {
  color: #0f172a !important;
}

.rpa-light-theme .post-detail-tags .post-tag {
  color: #475569 !important;
  background: #f1f5f9 !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  margin-right: 6px !important;
  display: inline-block !important;
  border: 1px solid #e2e8f0 !important;
}

.rpa-light-theme .post-detail-date {
  color: #64748b !important;
}

.rpa-light-theme .markdown-body {
  color: #334155 !important;
}

.rpa-light-theme .markdown-body h2,
.rpa-light-theme .markdown-body h3 {
  color: #0f172a !important;
}

/* ==========================================
   7. 블로그 홈 레이아웃 너비 제한 및 기존 랜딩페이지와 동일하게 설정
   ========================================== */
.converter-section {
  padding: 120px 0 80px 0 !important;
  min-height: 100vh !important;
  position: relative !important;
  z-index: 10 !important;
}

.converter-container {
  max-width: var(--max-width, 1200px) !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

