/*
Theme Name: Ningning Guide
Theme URI: https://ningning-ai.kr
Author: Ningning AI
Description: Creator Lab Magazine style theme for guidebook articles, learning paths, and AdSense-ready layouts.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: ningning-guide
*/

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --teal: #147c7b;
  --teal-dark: #0f6262;
  --coral: #ee6958;
  --amber: #e9b949;
  --green: #67b783;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.header-inner {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  min-height: 92px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: 26px;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a {
  color: #1f2937;
  font-size: 0.95rem;
}

.main-nav a:first-child {
  color: var(--teal);
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 14px;
}

.search-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.subscribe-button {
  background: var(--coral);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  padding: 12px 20px;
  box-shadow: 0 12px 26px rgba(238, 105, 88, 0.22);
}

.sponsor-slot {
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  display: flex;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0;
}

.top-sponsor {
  height: 90px;
  margin: 24px auto 12px;
  max-width: 728px;
}

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

.hero-card {
  background: #0f172a;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.1fr);
  min-height: 374px;
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.eyebrow {
  align-self: flex-start;
  background: rgba(20, 124, 123, 0.95);
  border-radius: 6px;
  color: #d7fffb;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 20px;
  padding: 5px 10px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0;
}

.hero-copy p {
  color: #dbe7ee;
  font-size: 1.04rem;
  margin: 20px 0 0;
  max-width: 520px;
}

.hero-meta {
  color: #dbe7ee;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}

.meta-item {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  font-size: 0.92rem;
}

.cta-button {
  align-self: flex-start;
  background: var(--coral);
  border-radius: 7px;
  color: #fff;
  font-weight: 850;
  margin-top: 28px;
  padding: 12px 20px;
}

.slider-dots {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.slider-dots span {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  height: 7px;
  width: 7px;
}

.slider-dots span:first-child {
  background: var(--coral);
  width: 18px;
}

.hero-visual {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1200&q=85") center / cover;
  min-height: 100%;
  position: relative;
}

.hero-visual::after {
  background: rgba(20, 124, 123, 0.9);
  bottom: 44px;
  color: #fff;
  content: "롱폼 → 쇼츠\A 자동 변환 AI 툴";
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 900;
  left: 56px;
  line-height: 1.24;
  padding: 18px 26px;
  position: absolute;
  white-space: pre;
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.04);
  margin-top: 16px;
  padding: 24px;
}

.section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h2,
.widget h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
}

.section-link {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 800;
}

.guide-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.guide-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.guide-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #123, #456);
  position: relative;
}

.guide-thumb.one {
  background: linear-gradient(rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.2)), url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=85") center / cover;
}

.guide-thumb.two {
  background: linear-gradient(rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.2)), url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=80") center / cover;
}

.guide-thumb.three {
  background: linear-gradient(rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.2)), url("https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=900&q=80") center / cover;
}

.badge {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 5px;
  bottom: 12px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 850;
  left: 12px;
  padding: 3px 7px;
  position: absolute;
}

.guide-body {
  padding: 14px 16px 16px;
}

.guide-body h3 {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0 0 12px;
}

.card-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
}

.level {
  background: #ecfdf5;
  border-radius: 5px;
  color: #047857;
  font-weight: 800;
  padding: 2px 7px;
}

.level.mid {
  background: #fff7ed;
  color: #c2410c;
}

.paths {
  background: linear-gradient(90deg, #fff7ed, #f8fff8);
}

.path-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.path-item {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.path-icon {
  align-items: center;
  border-radius: 50%;
  display: flex;
  flex: 0 0 42px;
  font-size: 1.15rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.path-icon.teal {
  background: #ccfbf1;
}

.path-icon.coral {
  background: #fee2e2;
}

.path-icon.amber {
  background: #fef3c7;
}

.path-icon.green {
  background: #dcfce7;
}

.path-item h3 {
  font-size: 0.98rem;
  margin: 0 0 3px;
}

.path-item p {
  color: var(--muted);
  font-size: 0.84rem;
  margin: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.newsletter p,
.profile p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 12px 0 16px;
}

.newsletter-form {
  display: grid;
  gap: 8px;
}

.newsletter-form input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  padding: 10px 12px;
}

.newsletter-form button {
  background: var(--teal);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 12px;
}

.profile-row {
  align-items: center;
  display: flex;
  gap: 14px;
}

.avatar {
  background: linear-gradient(135deg, #fde68a, #fca5a5);
  border-radius: 50%;
  display: grid;
  flex: 0 0 70px;
  font-size: 2rem;
  height: 70px;
  place-items: center;
  width: 70px;
}

.creator-tag {
  background: #d1fae5;
  border-radius: 999px;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 3px 8px;
}

.socials {
  display: flex;
  gap: 8px;
}

.socials a {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.side-sponsor {
  height: 250px;
}

.popular-list {
  display: grid;
  gap: 16px;
}

.popular-item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 74px 1fr;
}

.rank {
  background: #fef3c7;
  border-radius: 6px;
  color: #92400e;
  font-weight: 900;
  padding: 3px 0;
  text-align: center;
}

.mini-thumb {
  aspect-ratio: 4 / 3;
  background: url("https://img.youtube.com/vi/sORoHYP7HRU/hqdefault.jpg") center / cover;
  border-radius: 6px;
}

.popular-item h3 {
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0 0 2px;
}

.popular-item p {
  color: var(--muted);
  font-size: 0.76rem;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 36px 0;
}

.footer-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.entry-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 32px auto 56px;
  max-width: 880px;
  padding: clamp(28px, 5vw, 60px);
}

.entry-page h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
}

@media (max-width: 1100px) {
  .header-inner,
  .layout,
  .hero-card {
    grid-template-columns: 1fr;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 28px, 1400px);
  }

  .header-inner {
    gap: 16px;
    padding: 18px 0;
  }

  .main-nav {
    gap: 14px;
  }

  .subscribe-button {
    padding: 10px 14px;
  }

  .hero-copy {
    padding: 28px;
  }

  .hero-visual {
    min-height: 260px;
  }

  .hero-visual::after {
    bottom: 24px;
    left: 24px;
    padding: 12px 16px;
  }

  .guide-grid,
  .path-grid,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
