/*
Theme Name: Alanova Blog
Theme URI: https://alanova.id/blog
Author: Alanova
Author URI: https://alanova.id
Description: Custom blog theme matching Alanova landing page design. Clean, modern with green accents.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: alanova-blog
Tags: blog, clean, green, modern, responsive
*/

/* ── Variables (same as landing page) ──────────────────────────────────────── */
:root {
  --white:     #ffffff;
  --bg:        #f8fafc;
  --bg2:       #f1f5f9;
  --border:    #e2e8f0;
  --border2:   #cbd5e1;
  --green:     #16a34a;
  --green-lt:  #dcfce7;
  --green-md:  #86efac;
  --green-dk:  #15803d;
  --text:      #0f172a;
  --text2:     #334155;
  --muted:     #64748b;
  --muted2:    #94a3b8;
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
  --radius:    12px;
  --radius-lg: 16px;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dk); }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 0 24px; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.nav-logo-text { font-size: 15px; font-weight: 700; color: var(--text); }
.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0; flex: 1;
}
.nav-links a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 6px;
  border-radius: 6px; transition: background 0.2s;
}
.nav-hamburger:hover { background: var(--bg); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; flex-direction: column; gap: 0;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile ul { list-style: none; padding: 8px 24px; }
.nav-mobile ul li a {
  display: block; padding: 12px 0;
  color: var(--text); font-size: 15px; font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-cta {
  display: flex; gap: 8px; padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.22s ease; white-space: nowrap; font-family: inherit;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dk); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(22,163,74,0.35); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--border2); color: var(--text); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Page wrapper ────────────────────────────────────────────────────────── */
.page-wrapper { padding-top: 64px; min-height: 100vh; }

/* ── Blog hero ───────────────────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 30%, #ffffff 65%);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(22,163,74,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,163,74,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.blog-hero-inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }
.blog-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 24px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border: 1px solid var(--green-md);
  color: var(--green-dk); font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.blog-hero h1 {
  font-size: clamp(28px, 5vw, 48px); font-weight: 800;
  letter-spacing: -1.5px; line-height: 1.1; color: var(--text);
  margin-bottom: 16px;
}
.blog-hero h1 .accent {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 40%, #22c55e 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero p {
  color: var(--muted); font-size: 16px; max-width: 480px; margin: 0 auto;
}

/* ── Container ───────────────────────────────────────────────────────────── */
.blog-container {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
}

/* ── Featured post ───────────────────────────────────────────────────────── */
.featured-post {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; margin: 48px 0 56px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.3s, transform 0.3s;
}
.featured-post:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.12); transform: translateY(-2px); }
.featured-img-wrap {
  display: block; position: relative; overflow: hidden; min-height: 320px;
}
.featured-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.featured-post:hover .featured-img-wrap img { transform: scale(1.03); }
.featured-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.featured-content {
  padding: 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.featured-title {
  font-size: clamp(20px, 2.5vw, 28px); font-weight: 800;
  letter-spacing: -0.5px; line-height: 1.25;
}
.featured-title a { color: var(--text); text-decoration: none; }
.featured-title a:hover { color: var(--green); }
.featured-excerpt { color: var(--muted); font-size: 15px; line-height: 1.65; }
.featured-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ── Post meta ───────────────────────────────────────────────────────────── */
.post-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.post-meta.light { color: rgba(255,255,255,0.85); }
.post-cat {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: var(--green-lt); color: var(--green-dk);
  font-size: 12px; font-weight: 600; text-decoration: none;
}
.post-cat:hover { background: var(--green-md); color: var(--green-dk); }
.post-cat.light {
  background: rgba(255,255,255,0.2); color: #fff;
}
.meta-sep { color: var(--border2); }

/* ── Post author ─────────────────────────────────────────────────────────── */
.post-author {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text2);
}
.author-avatar { width: 28px !important; height: 28px !important; border-radius: 50%; }

/* ── Posts grid ──────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px; margin-bottom: 48px;
}
.post-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-img-wrap {
  display: block; overflow: hidden; aspect-ratio: 16/9;
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.post-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-body {
  padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.card-title {
  font-size: 18px; font-weight: 700; line-height: 1.3;
  letter-spacing: -0.3px;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--green); }
.card-excerpt { color: var(--muted); font-size: 14px; line-height: 1.6; flex: 1; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  margin-top: auto;
}
.reading-time { font-size: 12px; color: var(--muted2); }
.read-more { font-size: 13px; font-weight: 600; color: var(--green); }
.read-more:hover { color: var(--green-dk); }

/* ── Single post hero ────────────────────────────────────────────────────── */
.single-hero {
  position: relative; height: 520px; overflow: hidden;
}
.single-hero-img {
  width: 100%; height: 100%; object-fit: cover;
}
.single-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.1) 100%);
}
.single-hero-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 48px 0;
}
.single-title {
  font-size: clamp(24px, 4vw, 44px); font-weight: 800;
  letter-spacing: -1px; line-height: 1.15;
  margin: 16px 0; color: #fff;
}
.single-title.dark { color: var(--text); }
.single-author {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px;
}
.single-author .author-avatar { width: 40px !important; height: 40px !important; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); }
.author-name { font-size: 14px; font-weight: 600; color: #fff; }
.author-date { font-size: 12px; color: rgba(255,255,255,0.7); }

.single-header-simple {
  background: linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 40%, #ffffff 70%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
}
.single-header-simple .single-title { color: var(--text); margin-bottom: 0; }
.single-header-simple .author-name { color: var(--text2); }
.single-header-simple .author-date { color: var(--muted); }
.single-header-simple .single-author .author-avatar { border: 2px solid var(--border2); }

/* ── Single layout ───────────────────────────────────────────────────────── */
.single-layout {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 48px; padding: 56px 0 80px; align-items: start;
}
.single-content { min-width: 0; }

/* ── Entry content typography ────────────────────────────────────────────── */
.entry-content {
  font-size: 17px; line-height: 1.8; color: var(--text2);
}
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  color: var(--text); font-weight: 700; letter-spacing: -0.5px;
  margin: 2em 0 0.75em; line-height: 1.2;
}
.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 21px; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content ul, .entry-content ol {
  padding-left: 1.5em; margin-bottom: 1.5em;
}
.entry-content li { margin-bottom: 0.5em; }
.entry-content a { color: var(--green); font-weight: 500; }
.entry-content a:hover { color: var(--green-dk); text-decoration: underline; }
.entry-content blockquote {
  border-left: 4px solid var(--green); margin: 2em 0;
  padding: 16px 24px; background: var(--green-lt);
  border-radius: 0 8px 8px 0; color: var(--text2);
  font-style: italic; font-size: 18px;
}
.entry-content code {
  background: var(--bg2); padding: 2px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 14px;
  color: var(--green-dk);
}
.entry-content pre {
  background: var(--text); color: #e2e8f0;
  border-radius: 10px; padding: 20px; margin: 1.5em 0;
  overflow-x: auto;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content img { border-radius: 10px; margin: 1.5em 0; }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; }
.entry-content th { background: var(--bg2); padding: 10px 14px; text-align: left; font-weight: 600; border: 1px solid var(--border); }
.entry-content td { padding: 10px 14px; border: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--bg); }

/* ── Post tags ───────────────────────────────────────────────────────────── */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border);
}
.tag-pill {
  padding: 5px 14px; border-radius: 24px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.tag-pill:hover { background: var(--green-lt); border-color: var(--green-md); color: var(--green-dk); }

/* ── Post navigation ─────────────────────────────────────────────────────── */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 48px; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.post-nav-item { display: flex; flex-direction: column; gap: 6px; }
.post-nav-item.next { text-align: right; }
.nav-label { font-size: 12px; color: var(--muted2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.nav-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.nav-title:hover { color: var(--green); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.single-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 80px; }
.sidebar-cta {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dk) 100%);
  border-radius: var(--radius-lg); padding: 28px;
  color: #fff; text-align: center;
}
.sidebar-cta-icon { font-size: 32px; margin-bottom: 12px; }
.sidebar-cta h4 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.sidebar-cta p { font-size: 14px; opacity: 0.85; margin-bottom: 20px; line-height: 1.6; }
.sidebar-widget {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.widget-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.recent-post {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none;
}
.recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.recent-thumb { width: 60px !important; height: 52px !important; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.recent-info { display: flex; flex-direction: column; gap: 4px; }
.recent-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.recent-post:hover .recent-title { color: var(--green); }
.recent-date { font-size: 12px; color: var(--muted2); }
.cat-list { list-style: none; padding: 0; }
.cat-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cat-list li:last-child { border-bottom: none; }
.cat-list a { color: var(--text2); font-weight: 500; }
.cat-list a:hover { color: var(--green); }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination-wrap { margin: 0 0 64px; display: flex; justify-content: center; }
.pagination-wrap ul { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination-wrap ul li a,
.pagination-wrap ul li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text2);
  text-decoration: none; transition: all 0.2s;
}
.pagination-wrap ul li a:hover { background: var(--bg); color: var(--green); border-color: var(--green); }
.pagination-wrap ul li span.current { background: var(--green); color: #fff; border-color: var(--green); }

/* ── No posts ────────────────────────────────────────────────────────────── */
.no-posts { text-align: center; padding: 80px 0; }
.no-posts-icon { font-size: 56px; margin-bottom: 20px; }
.no-posts h2 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.no-posts p { color: var(--muted); margin-bottom: 24px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--text); color: #fff;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 56px 24px 40px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: start;
}
.footer-brand .nav-logo-text { color: #fff; }
.footer-brand p { color: var(--muted2); font-size: 14px; margin-top: 12px; max-width: 280px; line-height: 1.7; }
.footer-links { display: flex; gap: 48px; }
.footer-col h5 { font-size: 13px; font-weight: 600; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px; text-align: center;
  color: var(--muted); font-size: 13px; max-width: 1160px; margin: 0 auto;
}

/* ── Comments ────────────────────────────────────────────────────────────── */
.comments-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment-author { font-weight: 600; font-size: 14px; color: var(--text); }
.comment-metadata { font-size: 12px; color: var(--muted2); }
.comment-content p { font-size: 15px; color: var(--text2); margin-top: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: var(--bg); color: var(--text);
  transition: border-color 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--green); background: #fff;
}
.comment-form .submit {
  background: var(--green); color: #fff; border: none;
  padding: 10px 24px; border-radius: 8px; font-weight: 600;
  font-size: 14px; cursor: pointer; font-family: inherit;
  transition: background 0.2s;
}
.comment-form .submit:hover { background: var(--green-dk); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .single-layout { grid-template-columns: 1fr; }
  .single-sidebar { position: static; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-img-wrap { min-height: 220px; }
  .featured-content { padding: 24px; }
  .posts-grid { grid-template-columns: 1fr; }
  .single-hero { height: 340px; }
  .single-title { font-size: 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
}
@media (max-width: 480px) {
  .blog-container { padding: 0 16px; }
  .blog-hero { padding: 48px 16px 40px; }
  .single-hero { height: 260px; }
  .featured-content { padding: 20px; }
  .featured-title { font-size: 20px; }
}
