/*
Theme Name: AdSense Beginner Blog Pro KR
Theme URI: https://example.com/
Author: OpenAI
Author URI: https://openai.com/
Description: A clean Korean-style WordPress blog theme optimized for readability, AdSense placement, and beginner-friendly setup.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adsense-beginner-blog
Tags: blog, two-columns, right-sidebar, custom-logo, featured-images, responsive-layout, custom-menu
*/

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --max: 1160px;
  --radius: 20px;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f8faff 0%, #f5f7fb 100%);
  color: var(--text);
  line-height: 1.78;
  word-break: keep-all;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; }

.wrap {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.topbar {
  background: #111827;
  color: #fff;
  font-size: 0.92rem;
}

.topbar-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar p { margin: 0; opacity: 0.92; }

.top-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.top-links a { color: rgba(255,255,255,.88); }
.top-links a:hover { color: #fff; }

.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-branding h1,
.site-branding p,
.site-branding .custom-logo-link { margin: 0; }

.custom-logo {
  max-height: 54px;
  width: auto;
}

.site-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-title a { color: var(--text); }
.site-description {
  font-size: 0.93rem;
  color: var(--muted);
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  font-weight: 700;
  padding: 10px 0;
  display: inline-block;
}

.main-nav .current-menu-item a,
.main-nav a:hover {
  color: var(--accent);
}

.hero {
  padding: 28px 0 16px;
}

.hero-box {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 62%, #f9fbff 100%);
  border: 1px solid #dbeafe;
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #dbeafe;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.hero-box h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.hero-box p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.home-chips {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-chip {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 24px 0 56px;
}

.content-area, .widget-area { min-width: 0; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.section-title span {
  color: var(--muted);
  font-size: 0.95rem;
}

.card,
.widget,
.ad-box,
.post-navigation,
.comments-area,
.footer-card,
.author-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-card {
  padding: 28px;
  margin-bottom: 22px;
}

.featured-thumb {
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 16px;
  background: #f3f4f6;
}

.featured-thumb img {
  width: 100%;
  transition: transform .35s ease;
}

.post-card:hover .featured-thumb img {
  transform: scale(1.02);
}

.post-card h2,
.entry-title {
  margin: 0 0 12px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.post-card h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
.entry-title { font-size: clamp(1.7rem, 3vw, 2.3rem); }

.entry-meta {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 14px;
}

.entry-summary, .entry-content { color: #374151; }

.category-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #dbeafe;
  padding: 6px 10px;
  font-size: 0.83rem;
  font-weight: 800;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 800;
}

.post-list-sep {
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}

.article-single {
  padding: 34px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 30px;
  margin-bottom: 12px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
  margin: 0 0 18px;
}

.entry-content ul,
.entry-content ol { padding-left: 22px; }

.entry-content blockquote {
  border-left: 4px solid var(--accent);
  background: #f8fbff;
  padding: 16px 18px;
  border-radius: 12px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 12px;
}

.entry-content th { background: #f8fafc; }

.ad-box {
  padding: 18px;
  margin: 0 0 22px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.ad-box.ad-inline {
  margin: 24px 0;
}

.ad-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.notice-box {
  padding: 16px 18px;
  border: 1px dashed #bfdbfe;
  background: #f8fbff;
  color: #334155;
  border-radius: 16px;
  margin-bottom: 22px;
}

.widget-area .widget,
.footer-card {
  padding: 22px;
  margin-bottom: 22px;
}

.widget-title {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.widget ul {
  margin: 0;
  padding-left: 18px;
}

.widget li + li { margin-top: 8px; }

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-field {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.search-form button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.author-box {
  padding: 20px 22px;
  margin-top: 22px;
}

.author-box h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.post-navigation {
  padding: 18px 22px;
  margin-top: 22px;
}

.post-navigation .nav-links {
  display: grid;
  gap: 10px;
}

.pagination {
  margin-top: 28px;
}

.pagination .nav-links,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.site-footer {
  padding: 12px 0 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
}

.footer-card p,
.footer-card li { color: var(--muted); }
.footer-card ul { margin: 0; padding-left: 18px; }
.footer-card h3 { margin-top: 0; }

.footer-bottom {
  margin-top: 14px;
  padding: 18px 6px 0;
  color: var(--muted);
  font-size: 0.94rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 980px) {
  .layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 0;
  }

  .main-nav ul {
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 20px, var(--max));
  }

  .hero-box,
  .post-card,
  .article-single,
  .widget-area .widget,
  .footer-card {
    padding: 20px;
  }

  .site-title { font-size: 1.3rem; }
  .entry-title { font-size: 1.7rem; }
  .search-form { grid-template-columns: 1fr; }
}
