/* ===== Kakodeals Blog — shared styles for blog/index.html and article pages ===== */

:root {
  --orange: #FF6B2C;
  --orange-dark: #E5571A;
  --orange-soft: #FFE9DD;
  --yellow: #FFC83D;
  --ink: #0E1116;
  --ink-soft: #1A1F2E;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --bg: #FAF7F2;
  --card: #ffffff;
  --line: #ECE7DF;
  --line-2: #E5E7EB;
  --shadow: 0 6px 24px rgba(14, 17, 22, 0.06);
  --shadow-lg: 0 20px 60px rgba(14, 17, 22, 0.12);
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; height: auto; border-radius: 12px; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--orange);
  background: var(--orange-soft); padding: 6px 14px; border-radius: 999px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 44, 0.35); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 107, 44, 0.45); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-light:hover { border-color: var(--ink); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.header.scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,0.92); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--orange);
  display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(255,107,44,0.35);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  transition: color .15s ease;
  text-decoration: none;
}
.nav-links a:hover { color: var(--orange); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; place-items: center;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ===== Footer ===== */
.footer {
  background: var(--ink);
  color: #B0B5BF;
  padding: 80px 0 32px;
  margin-top: 80px;
}
.footer h4 { color: #fff; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; font-family: 'Inter', sans-serif; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p { font-size: 0.9rem; max-width: 320px; margin: 16px 0 0; }
.footer-brand .logo { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { padding: 6px 0; }
.footer ul a { font-size: 0.9rem; color: #B0B5BF; transition: color .15s; text-decoration: none; }
.footer ul a:hover { color: var(--orange); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 0.82rem; flex-wrap: wrap; gap: 12px;
}
.socials { display: flex; gap: 10px; }
.social {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  color: #B0B5BF; transition: background .15s, color .15s;
}
.social:hover { background: var(--orange); color: #fff; text-decoration: none; }
.social svg { width: 16px; height: 16px; }

/* ===== Blog Index ===== */
.blog-hero {
  padding: 80px 0 56px;
  text-align: center;
  background:
    radial-gradient(60% 40% at 80% 0%, rgba(255,200,61,0.18), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(255,107,44,0.10), transparent 70%);
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.1;
  margin-top: 14px;
}
.blog-hero p {
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
}

.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding: 32px 0 96px;
}
.blog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  color: var(--ink);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.blog-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 130%);
  position: relative;
  display: grid; place-items: center;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  padding: 24px;
  text-align: center;
  letter-spacing: -0.02em;
}
.blog-card-thumb.purple { background: linear-gradient(135deg, #6366F1 0%, #A78BFA 130%); }
.blog-card-thumb.green { background: linear-gradient(135deg, #10B981 0%, #34D399 130%); }
.blog-card-thumb.pink { background: linear-gradient(135deg, #EC4899 0%, #F472B6 130%); }
.blog-card-thumb.blue { background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 130%); }
.blog-card-thumb.dark { background: linear-gradient(135deg, #0E1116 0%, #1F2937 130%); }
.blog-card-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18) 0, transparent 30%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.14) 0, transparent 30%);
}
.blog-card-thumb span { position: relative; }
.blog-card-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.blog-card .tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}
.blog-card h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 10px;
}
.blog-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 18px;
  flex: 1;
}
.blog-card .meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 0.82rem; color: var(--muted-2);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ===== Article Page ===== */
.article-hero {
  padding: 64px 0 32px;
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs span { margin: 0 8px; }

.article-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  max-width: 820px;
  margin-bottom: 24px;
}
.article-meta {
  display: flex; align-items: center; gap: 16px;
  color: var(--muted); font-size: 0.9rem;
  flex-wrap: wrap;
}
.article-meta .author {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 600;
}
.article-meta .author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 0.82rem;
}
.article-meta .dot { width: 4px; height: 4px; background: var(--muted-2); border-radius: 50%; }

.article-cover {
  height: 360px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 130%);
  position: relative;
  margin: 32px 0 56px;
  display: grid; place-items: center;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  padding: 32px;
  overflow: hidden;
}
.article-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18) 0, transparent 30%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.14) 0, transparent 30%);
}
.article-cover span { position: relative; max-width: 820px; }

.article-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  max-width: 1180px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: 0.85rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc h4 {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
  font-family: 'Inter', sans-serif; font-weight: 700;
}
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  line-height: 1.4;
  transition: color .15s, border-color .15s;
}
.toc a:hover, .toc a.active {
  color: var(--orange);
  border-left-color: var(--orange);
}

.prose {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.prose h2 {
  font-size: 1.7rem;
  margin-top: 56px;
  margin-bottom: 18px;
  scroll-margin-top: 90px;
}
.prose h3 {
  font-size: 1.25rem;
  margin-top: 36px;
  margin-bottom: 14px;
  scroll-margin-top: 90px;
}
.prose p { margin: 0 0 22px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose blockquote {
  margin: 28px 0;
  padding: 22px 28px;
  background: #fff;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  font-style: italic;
}
.prose blockquote p:last-child { margin: 0; }
.prose .callout {
  background: var(--orange-soft);
  border: 1px solid #FFD2B5;
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 28px 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.prose .callout strong { color: var(--orange-dark); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}
.prose th {
  background: var(--ink);
  color: #fff;
  text-align: left;
  padding: 14px 18px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
}
.prose td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.prose td:first-child { font-weight: 600; color: var(--ink); }
.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}
.prose a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--orange-dark); }
.prose .cta-inline {
  background: linear-gradient(135deg, var(--orange) 0%, #FF8E5C 60%, var(--yellow) 130%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin: 36px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.prose .cta-inline::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18) 0, transparent 30%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.14) 0, transparent 30%);
}
.prose .cta-inline > * { position: relative; }
.prose .cta-inline h3 { color: #fff; margin-bottom: 8px; }
.prose .cta-inline p { color: rgba(255,255,255,0.92); margin: 0 0 18px; }
.prose .cta-inline .btn { background: #fff; color: var(--orange); }
.prose .cta-inline .btn:hover { background: var(--ink); color: #fff; }

.article-footer {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.article-footer .tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px;
}
.article-footer .tag-chip {
  font-size: 0.82rem;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.related {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
}
.related h3 { margin-bottom: 18px; font-size: 1.2rem; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.related-list li:first-child { border-top: none; padding-top: 0; }
.related-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.related-list a:hover { color: var(--orange); text-decoration: none; }
.related-list svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .menu-toggle { display: grid; }
  .menu-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 24px; gap: 16px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .blog-grid { grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 64px; }
  .article-body { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; max-height: none; }
  .article-cover { height: 240px; margin: 24px 0 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}