/* ============================================
   AIN BLOGGER — Global Stylesheet
   ============================================ */

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

:root {
  --color-primary: #0f172a;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-bg: #ffffff;
  --color-bg-soft: #f8fafc;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;

  --cat-health: #16a34a;
  --cat-ai: #7c3aed;
  --cat-korea: #dc2626;
  --cat-nomad: #d97706;
  --cat-football: #0284c7;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  --max-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
#site-header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

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

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.site-logo span { color: #60a5fa; }

.main-nav { display: flex; gap: 4px; }

.main-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active { color: #fff; background: rgba(255,255,255,0.1); }

.main-nav a.active { color: #60a5fa; }

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 0 12px;
  gap: 8px;
  height: 36px;
  flex-shrink: 0;
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.875rem;
  width: 180px;
}

.header-search input::placeholder { color: rgba(255,255,255,0.4); }

.search-icon { color: rgba(255,255,255,0.4); font-size: 14px; }

/* --- Category pills --- */
.cat-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: #fff;
}

.cat-pill.health   { background: var(--cat-health); }
.cat-pill.ai-tech  { background: var(--cat-ai); }
.cat-pill.korea-re { background: var(--cat-korea); }
.cat-pill.digital-nomad { background: var(--cat-nomad); }
.cat-pill.football { background: var(--cat-football); }

/* --- Card base --- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--color-bg-soft);
}

.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--color-bg-soft);
}

.card-body { padding: 16px; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-date {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 8px;
}

.card-title:hover { color: var(--color-accent); }

.card-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* --- Hero card (featured) --- */
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-primary);
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}

.hero-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-card-bg-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  opacity: 0.15;
}

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.hero-card-body {
  position: relative;
  z-index: 1;
  padding: 32px;
  color: #fff;
  width: 100%;
}

.hero-card-body .card-meta { margin-bottom: 12px; }

.hero-card-body .card-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-card-body .card-excerpt {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  -webkit-line-clamp: 2;
}

/* --- Section headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-bar {
  width: 4px;
  height: 18px;
  border-radius: 2px;
}

.section-title-bar.health   { background: var(--cat-health); }
.section-title-bar.ai-tech  { background: var(--cat-ai); }
.section-title-bar.korea-re { background: var(--cat-korea); }
.section-title-bar.digital-nomad { background: var(--cat-nomad); }
.section-title-bar.football { background: var(--cat-football); }

.section-view-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
}

.section-view-all:hover { text-decoration: underline; }

/* --- Grids --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* --- Ad zones --- */
.ad-zone {
  background: var(--color-bg-soft);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-zone-banner { height: 90px; width: 100%; }
.ad-zone-side { height: 250px; width: 300px; }

/* --- Footer --- */
#site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.6);
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 32px;
}

.footer-brand .site-logo {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 14px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
}

.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .hero-card { min-height: 320px; }
  .hero-card-body .card-title { font-size: 1.3rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* --- Utilities --- */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.text-center { text-align: center; }

/* ============================================
   Ad Zones
   ============================================ */
.ad-label-wrap { text-align: center; margin-bottom: 4px; }
.ad-label { font-family: var(--font-sans); font-size: 10px; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 1px; }
.ad-top-banner { background: var(--color-bg-soft); padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.ad-before-footer { background: var(--color-bg-soft); padding: 24px 0; border-top: 1px solid var(--color-border); }
.ad-in-content { margin: 36px 0; padding: 16px; background: var(--color-bg-soft); border-radius: var(--radius-md); text-align: center; }
.ad-sidebar-slot { margin-bottom: 20px; }

/* Amazon 공시 문구 */
.amazon-disclosure { font-size: 0.75rem !important; color: rgba(255,255,255,0.4) !important; line-height: 1.5 !important; margin-top: 12px !important; }

/* 광고 최소 높이 (로딩 전 레이아웃 흔들림 방지) */
.adsbygoogle { min-height: 90px; }
