/*
Theme Name: Astra Naver Child
Template: astra
Description: 네이버 블로그 스타일의 Astra Child Theme
Version: 1.0.0
Author: Doosoul
*/

/* ============================================
   네이버 블로그 스타일 CSS
   ============================================ */

/* 전체 레이아웃 */
:root {
  --naver-green: #03C75A;
  --naver-mint: #00D9B5;
  --naver-bg: #f5f6f7;
  --naver-white: #ffffff;
  --naver-text: #333333;
  --naver-gray: #808080;
  --naver-border: #e4e8eb;
}

body {
  background: var(--naver-bg) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", "Segoe UI", sans-serif !important;
  color: var(--naver-text) !important;
}

/* 메인 컨테이너 레이아웃 (좌측 프로필 + 중앙 콘텐츠) */
.site-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 20px;
}

/* 좌측 프로필 영역 */
.naver-profile-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  height: fit-content;
}

.naver-profile-card {
  background: var(--naver-white);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.naver-profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid var(--naver-green);
  object-fit: cover;
}

.naver-profile-name {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--naver-text);
  margin-bottom: 8px;
}

.naver-profile-bio {
  text-align: center;
  font-size: 13px;
  color: var(--naver-gray);
  line-height: 1.6;
  margin-bottom: 16px;
}

.naver-profile-stats {
  border-top: 1px solid var(--naver-border);
  padding-top: 16px;
  display: flex;
  justify-content: space-around;
}

.naver-stat-item {
  text-align: center;
}

.naver-stat-label {
  font-size: 12px;
  color: var(--naver-gray);
  display: block;
}

.naver-stat-value {
  font-size: 18px;
  font-weight: bold;
  color: var(--naver-green);
  display: block;
  margin-top: 4px;
}

/* 카테고리 위젯 (네이버 스타일) */
.naver-categories {
  background: var(--naver-white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.naver-categories h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--naver-green);
  color: var(--naver-text);
}

.naver-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.naver-categories li {
  margin-bottom: 8px;
}

.naver-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--naver-text);
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 14px;
}

.naver-categories a:hover {
  background: var(--naver-bg);
  color: var(--naver-green);
  padding-left: 16px;
}

.naver-categories .cat-count {
  font-size: 12px;
  color: var(--naver-gray);
  background: var(--naver-bg);
  padding: 2px 8px;
  border-radius: 10px;
}

/* 메인 콘텐츠 영역 */
.naver-main-content {
  flex: 1;
  min-width: 0;
}

/* 포스트 목록 */
.naver-post-list {
  background: var(--naver-white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.naver-post-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--naver-border);
}

.naver-post-item:last-child {
  border-bottom: none;
}

.naver-post-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 12px;
}

.naver-post-title a {
  color: var(--naver-text);
  text-decoration: none;
  transition: color 0.2s;
}

.naver-post-title a:hover {
  color: var(--naver-green);
}

.naver-post-meta {
  font-size: 13px;
  color: var(--naver-gray);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.naver-post-meta span::before {
  content: "·";
  margin-right: 8px;
  color: var(--naver-border);
}

.naver-post-meta span:first-child::before {
  display: none;
}

.naver-post-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--naver-text);
  margin-bottom: 12px;
}

.naver-post-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--naver-green);
  color: white;
  font-size: 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.naver-post-category:hover {
  background: var(--naver-mint);
  transform: translateY(-1px);
}

/* 포스트 내용 페이지 */
.single-post .entry-content {
  background: var(--naver-white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  line-height: 1.8;
  font-size: 16px;
}

.single-post .entry-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--naver-text);
}

.single-post .entry-meta {
  padding: 16px 0;
  border-top: 1px solid var(--naver-border);
  border-bottom: 1px solid var(--naver-border);
  margin-bottom: 30px;
  font-size: 14px;
  color: var(--naver-gray);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .site-content {
    flex-direction: column;
  }

  .naver-profile-sidebar {
    width: 100%;
    position: static;
  }

  .naver-profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
  }

  .naver-profile-image {
    width: 80px;
    height: 80px;
    margin: 0;
  }

  .naver-profile-name,
  .naver-profile-bio {
    text-align: left;
  }
}

/* 헤더 스타일 조정 */
.site-header {
  background: var(--naver-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.main-navigation a {
  color: var(--naver-text);
  font-weight: 500;
}

.main-navigation a:hover {
  color: var(--naver-green);
}

/* 버튼 스타일 */
.naver-button {
  display: inline-block;
  padding: 10px 24px;
  background: var(--naver-green);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.naver-button:hover {
  background: var(--naver-mint);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(3, 199, 90, 0.3);
}

/* 검색창 스타일 */
.search-form {
  border: 1px solid var(--naver-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
}

.search-form input[type="search"] {
  border: none;
  padding: 8px 16px;
  flex: 1;
}

.search-form button {
  background: var(--naver-green);
  border: none;
  color: white;
  padding: 8px 20px;
  cursor: pointer;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  background: var(--naver-white);
  border: 1px solid var(--naver-border);
  border-radius: 4px;
  color: var(--naver-text);
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--naver-green);
  color: white;
  border-color: var(--naver-green);
}

.pagination .current {
  background: var(--naver-green);
  color: white;
  border-color: var(--naver-green);
}

/* Custom Navigation Menu */
.main-header-bar-navigation {
  display: flex !important;
  align-items: center;
}

#ast-hf-menu-1 .main-header-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#ast-hf-menu-1 .menu-item {
  margin: 0;
}

#ast-hf-menu-1 .menu-link {
  color: var(--ast-global-color-3);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 15px;
  display: block;
  transition: color 0.2s;
}

#ast-hf-menu-1 .menu-link:hover {
  color: var(--naver-green);
}

/* Featured Image Styling - 목록 썸네일 (원래대로) */
.naver-post-thumbnail {
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
}

.naver-post-thumbnail a {
  display: block;
}

.naver-thumbnail-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.naver-post-thumbnail:hover .naver-thumbnail-image {
  transform: scale(1.02);
}

/* Single Post Featured Image */
.naver-post-thumbnail-single {
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}

.naver-post-thumbnail-single a {
  display: inline-block;
  cursor: zoom-in;
}

.naver-thumbnail-image-single {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.naver-post-thumbnail-single a:hover .naver-thumbnail-image-single {
  opacity: 0.9;
}

/* ============================================
   문제 1: 개별 글 페이지 넓게
   ============================================ */
.single-post .naver-profile-sidebar {
  display: none;
}

.single-post .site-content {
  max-width: 960px;
}

.single-post .naver-main-content {
  width: 100%;
}

.single-post .entry-content {
  font-size: 17px;
  line-height: 1.9;
}

/* 개별 글 이미지 */
.single-post .naver-post-thumbnail-single {
  text-align: center;
  margin: 24px 0;
}

.single-post .naver-post-thumbnail-single img {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* ============================================
   문제 2: 카테고리/아카이브 썸네일 (상단 잘라서 보여줌)
   ============================================ */
.ast-blog-featured-section .post-thumb-img-content,
.ast-article-post .post-thumb-img-content {
  height: 300px;
  overflow: hidden;
}

.ast-blog-featured-section img.wp-post-image,
.ast-article-post img.wp-post-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top center;
}
