/* ========================================
   AliciaBlog Pro Tutor Skin
   과외 선생님 블로그 전문 스킨
   ======================================== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #f8f9fa;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

a:hover {
  color: #4a90d9;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */
#wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
}

.container-inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

/* ========================================
   Header
   ======================================== */
.header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

.logo-desc {
  font-size: 0.75rem;
  color: #868e96;
}

/* Navigation */
.gnb {
  display: flex;
  gap: 5px;
}

.gnb a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #495057;
  transition: all 0.2s;
}

.gnb a:hover {
  background: #f1f3f5;
  color: #4a90d9;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 6px 12px;
}

.search-icon {
  font-size: 0.9rem;
  margin-right: 8px;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 150px;
}

.search-btn {
  display: none;
}

.btn-consult {
  background: linear-gradient(135deg, #fee500 0%, #ffd900 100%);
  color: #3c1e1e;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-consult:hover {
  transform: translateY(-2px);
  color: #3c1e1e;
}

/* Mobile Menu Button */
.btn-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.btn-mobile-menu span {
  width: 24px;
  height: 2px;
  background: #333;
  transition: all 0.3s;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  flex: 1;
  min-width: 0;
}

/* List Header */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #4a90d9;
}

.list-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
}

.list-count {
  font-size: 0.9rem;
  color: #868e96;
}

/* Article List - 2열 그리드 카드 */
.article-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(74,144,217,0.15);
}

.article-link {
  display: block;
  color: inherit;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #f1f3f5;
}

.article-thumb.no-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #ccfbf1 100%);
  color: #4a90d9;
}

.article-info {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #495057;
  overflow: hidden;
}

.article-category {
  flex-shrink: 0;
  font-weight: 600;
  color: #4a90d9;
}

.article-category::after {
  content: "·";
  margin-left: 0.5rem;
  color: #adb5bd;
}

.article-title {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-title::after {
  content: "·";
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  color: #adb5bd;
  font-weight: 400;
}

.article-summary {
  display: none;
}

.article-date {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: #adb5bd;
}

/* Empty List */
.empty-list {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 12px;
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.empty-list p {
  font-size: 1.1rem;
  color: #495057;
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 0.9rem;
  color: #868e96;
}

/* ========================================
   Article View
   ======================================== */
.article-view {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.view-category {
  display: inline-block;
  font-size: 0.85rem;
  color: #4a90d9;
  font-weight: 600;
  margin-bottom: 10px;
}

.view-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
  margin-bottom: 15px;
}

.view-meta {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: #868e96;
}

/* Ad Container */
.ad-container {
  margin: 25px 0;
  text-align: center;
}

/* Article Body */
.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #333;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a90d9;
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin: 30px 0 15px;
}

.article-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin: 25px 0 12px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body img {
  border-radius: 8px;
  margin: 20px 0;
}

.article-body ul, .article-body ol {
  margin: 15px 0;
  padding-left: 25px;
}

.article-body ul {
  list-style: disc;
}

.article-body ol {
  list-style: decimal;
}

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

.article-body blockquote {
  background: #f8f9fa;
  border-left: 4px solid #4a90d9;
  padding: 20px 25px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #495057;
}

.article-body code {
  background: #f1f3f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
}

.article-body pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.article-body th, .article-body td {
  border: 1px solid #e9ecef;
  padding: 12px 15px;
  text-align: left;
}

.article-body th {
  background: #f8f9fa;
  font-weight: 600;
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.tag-label {
  font-size: 1rem;
}

.article-tags a {
  display: inline-block;
  padding: 6px 12px;
  background: #f1f3f5;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.2s;
}

.article-tags a:hover {
  background: #4a90d9;
  color: #fff;
}

/* Article Navigation */
.article-nav {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  transition: all 0.2s;
}

.nav-item:hover {
  background: #e9ecef;
}

.nav-prev {
  text-align: left;
}

.nav-next {
  text-align: right;
}

.nav-label {
  font-size: 0.8rem;
  color: #868e96;
  margin-bottom: 5px;
}

.nav-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Comments */
.article-comments {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e9ecef;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-box {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a90d9;
}

/* Profile Box */
.profile-box {
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 15px;
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.profile-desc {
  font-size: 0.85rem;
  color: #868e96;
  line-height: 1.5;
  margin-bottom: 15px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 15px;
  padding: 15px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #4a90d9;
}

.stat-label {
  font-size: 0.8rem;
  color: #868e96;
}

.btn-kakao {
  display: block;
  background: linear-gradient(135deg, #fee500 0%, #ffd900 100%);
  color: #3c1e1e;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-kakao:hover {
  transform: translateY(-2px);
  color: #3c1e1e;
}

/* Category Box */
.category-box .category {
  font-size: 0.9rem;
}

.category-box .category > li {
  margin-bottom: 5px;
}

.category-box .category a {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.category-box .category a:hover {
  background: #f1f3f5;
}

.category-box .category .c_cnt {
  color: #868e96;
  font-size: 0.85rem;
}

.category-box .sub_category_list {
  padding-left: 15px;
  margin-top: 5px;
}

.category-box .sub_category_list a {
  font-size: 0.85rem;
  color: #868e96;
}

/* Tab Buttons */
.tab-buttons {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.tab-btn {
  flex: 1;
  padding: 8px;
  background: #f1f3f5;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #868e96;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: #4a90d9;
  color: #fff;
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: block;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #495057;
  transition: all 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-item:hover {
  background: #e9ecef;
}

/* Tag Box */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: inline-block;
  padding: 6px 12px;
  background: #f1f3f5;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.2s;
}

.tag-item:hover {
  background: #4a90d9;
  color: #fff;
}

/* ========================================
   Guestbook
   ======================================== */
.guestbook {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.guestbook-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #4a90d9;
}

/* ========================================
   Tag Page
   ======================================== */
.tag-page {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tag-page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #4a90d9;
}

.tag-page-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-page-item {
  display: inline-block;
  padding: 8px 16px;
  background: #f1f3f5;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #495057;
  transition: all 0.2s;
}

.tag-page-item:hover {
  background: #4a90d9;
  color: #fff;
}

.tag-count {
  color: #868e96;
  font-size: 0.85rem;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #495057;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  transition: all 0.2s;
}

.page-link:hover {
  background: #4a90d9;
  color: #fff;
}

.page-link.selected {
  background: #4a90d9;
  color: #fff;
  font-weight: 600;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: #fff;
  border-top: 1px solid #e9ecef;
  padding: 30px 0;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #333;
}

.footer-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-size: 0.9rem;
  color: #868e96;
}

.footer-nav a:hover {
  color: #4a90d9;
}

.copyright {
  font-size: 0.85rem;
  color: #adb5bd;
}

/* ========================================
   Mobile Sidebar
   ======================================== */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #fff;
  z-index: 200;
  transition: right 0.3s;
  overflow-y: auto;
}

.mobile-sidebar.active {
  right: 0;
}

.mobile-sidebar-inner {
  padding: 20px;
}

.btn-close-sidebar {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #868e96;
}

.mobile-profile {
  text-align: center;
  padding: 30px 0 20px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 20px;
}

.mobile-search {
  margin-bottom: 20px;
}

.mobile-search .search-input {
  width: 100%;
  padding: 12px 15px;
  background: #f1f3f5;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
}

.mobile-nav {
  margin-bottom: 20px;
}

.mobile-nav a {
  display: block;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #495057;
}

.mobile-nav a:hover {
  background: #f1f3f5;
}

.mobile-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #868e96;
  margin-bottom: 10px;
  padding: 0 15px;
}

.mobile-category {
  margin-bottom: 20px;
}

.mobile-category .category a {
  display: block;
  padding: 10px 15px;
  font-size: 0.9rem;
  color: #495057;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Responsive Design
   ======================================== */
/* 태블릿은 900px에서 처리 */

@media (max-width: 900px) {
  .container-inner {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .gnb {
    display: none;
  }

  .btn-mobile-menu {
    display: flex;
  }

  .header-right {
    display: none;
  }

  .article-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .article-view {
    padding: 25px;
  }

  .view-title {
    font-size: 1.4rem;
  }

  .article-nav {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  #container {
    padding: 20px 15px;
  }

  .article-view {
    padding: 20px;
  }

  .view-title {
    font-size: 1.2rem;
  }

  .article-body {
    font-size: 1rem;
  }

  .profile-stats {
    gap: 20px;
  }
}
