
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-badge {
  font-size: 0.75rem;
  background: #eff6ff;
  color: var(--primary);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.search-box-wrap {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.92rem;
  background: #f1f5f9;
  transition: all 0.2s;
  outline: none;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Nav Menu */
.nav-scroll {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Layout */
.main-wrapper {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.25rem;
  min-height: 70vh;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
  padding: 2.2rem 2rem;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 25px -5px rgba(37,99,235,0.25);
  text-align: center;
}

.hero-banner h1 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.5px;
}

.hero-banner p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Grid & Cards */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -5px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.card-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .card-thumb {
  transform: scale(1.04);
}

.card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.card-category {
  color: var(--primary);
  font-weight: 700;
  background: #eff6ff;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.8rem;
  flex: 1;
}

.card-footer {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

/* Post Detail Page */
.post-detail-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
  max-width: 890px;
  margin: 0 auto 3rem auto;
}

.post-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.post-header-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.8rem;
}

.post-header-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.4;
  color: #0f172a;
  margin-bottom: 1rem;
  word-break: keep-all;
}

.post-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Ad Slot Box */
.ads-slot-wrap {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.ads-label {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Post Content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #334155;
  word-break: break-word;
}

.post-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.2rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  color: #0f172a;
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.8rem 0 0.8rem 0;
  color: #1e293b;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px;
  margin: 1.5rem auto;
  display: block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 1.8rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
}

/* Comments Section */
.comments-section {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.comments-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.comment-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.comment-author {
  font-weight: 700;
  color: #1e293b;
}

.comment-date {
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.95rem;
  color: #334155;
  white-space: pre-line;
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.25rem 2rem 1.25rem;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .hero-banner h1 { font-size: 1.5rem; }
  .post-detail-wrap { padding: 1.5rem 1.1rem; }
  .post-header-title { font-size: 1.45rem; }
  .posts-grid { grid-template-columns: 1fr; }
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
