/* ===== VARIABLES ===== */
:root {
  --primary: #1a2744;
  --primary-light: #2a3a5c;
  --accent: #28a745;
  --accent-dark: #1e7e34;
  --bg: #f8f9fc;
  --card-bg: #fff;
  --text: #1a1a2e;
  --text-light: #5a6275;
  --border: #e8eaef;
  --shadow: 0 2px 12px rgba(26,39,68,0.08);
  --shadow-hover: 0 8px 28px rgba(26,39,68,0.14);
  --radius: 10px;
  --max-w: 1100px;
  --max-w-article: 760px;
  --header-h: 64px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
.site-header { background: var(--primary); position: sticky; top: 0; z-index: 1000; box-shadow: 0 1px 0 rgba(255,255,255,0.06); }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; flex-shrink: 0; }
.logo:hover { color: #fff; opacity: 0.9; }
.logo img { height: 34px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.header-nav a { color: rgba(255,255,255,0.8); font-size: 0.875rem; font-weight: 500; white-space: nowrap; transition: color 0.2s; }
.header-nav a:hover { color: #fff; }
.header-nav .btn-primary { background: var(--accent); color: #fff; padding: 7px 18px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; transition: all 0.25s; box-shadow: 0 2px 8px rgba(40,167,69,0.3); }
.header-nav .btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 4px 16px rgba(40,167,69,0.4); transform: translateY(-1px); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; background: none; border: none; cursor: pointer; padding: 4px; border-radius: 6px; }
.hamburger span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; transition: all .3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--primary); z-index: 999; padding: 24px 20px; flex-direction: column; overflow-y: auto; }
.mobile-menu.active { display: flex; }
.mobile-menu a { color: #fff; font-size: 1.1rem; font-weight: 500; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1); display: block; }
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .btn-primary { background: var(--accent); color: #fff; padding: 14px 20px; border-radius: 8px; font-size: 1rem; font-weight: 600; text-align: center; margin-top: 20px; display: block; }

/* ===== HERO ===== */
.hero { background: var(--primary); color: #fff; padding: 40px 20px 36px; text-align: center; border-bottom: 3px solid var(--accent); }
.hero h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.hero p { font-size: 0.9rem; opacity: 0.75; max-width: 480px; margin: 0 auto; line-height: 1.5; }

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

/* ===== BLOG CONTROLS ===== */
.blog-controls { margin-bottom: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-tags .tag { background: var(--card-bg); border: 1.5px solid var(--border); color: var(--text-light); padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.filter-tags .tag:hover, .filter-tags .tag.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-wrap label { font-size: 0.82rem; color: var(--text-light); font-weight: 500; }
.sort-wrap select { background: var(--card-bg); border: 1.5px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 8px; font-size: 0.82rem; font-family: inherit; cursor: pointer; outline: none; }
.sort-wrap select:focus { border-color: var(--primary); }

/* ===== BLOG GRID ===== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: box-shadow 0.25s, transform 0.25s; display: flex; flex-direction: column; }
.blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.blog-card-img-wrap { aspect-ratio: 16/9; overflow: hidden; background: var(--border); }
.blog-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-card:hover .blog-card-img-wrap img { transform: scale(1.04); }
.blog-card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card-category { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 8px; }
.blog-card-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-title a { color: inherit; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { font-size: 0.85rem; color: var(--text-light); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; margin-bottom: 14px; }
.blog-card-meta { display: flex; align-items: center; gap: 14px; font-size: 0.78rem; color: var(--text-light); margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.blog-card-meta span { display: flex; align-items: center; gap: 4px; }

/* Tags inside cards - minimal */
.blog-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 0; }
.blog-tags .tag { background: #f0f2f7; color: var(--text-light); padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 500; }


/* ===== RESULT COUNT ===== */
.result-count { font-size: 0.82rem; color: var(--text-light); margin-top: 8px; width: 100%; }
/* ===== NO RESULTS ===== */
.no-results { text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 0.95rem; }
.no-results p { margin-bottom: 8px; }

/* ===== ARTICLE PAGE ===== */
.article-page { max-width: var(--max-w-article); margin: 0 auto; padding: 0 20px; width: 100%; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-light); margin: 24px 0 20px; font-weight: 500; transition: color 0.2s; }
.back-link:hover { color: var(--primary); }
.article-header { padding-top: 28px; }
.article-category { display: inline-block; background: var(--primary); color: #fff; padding: 4px 12px; border-radius: 5px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.article-title { font-size: 1.75rem; font-weight: 800; line-height: 1.25; color: var(--text); margin-bottom: 12px; letter-spacing: -0.02em; }
.article-meta { font-size: 0.83rem; color: var(--text-light); margin-bottom: 12px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
.article-tags .tag { background: #f0f2f7; color: var(--text-light); padding: 4px 12px; border-radius: 14px; font-size: 0.75rem; font-weight: 500; }
.article-featured-img { width: 100%; margin: 20px 0 28px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
.article-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.article-content { padding-bottom: 40px; }
.article-content h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 28px 0 12px; letter-spacing: -0.01em; border-left: 3px solid var(--accent); padding-left: 12px; }
.article-content h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 20px 0 8px; }
.article-content p { font-size: 0.95rem; line-height: 1.75; color: #3a3f4e; margin-bottom: 14px; }
.article-content ul { padding-left: 20px; margin-bottom: 14px; }
.article-content ul li { font-size: 0.95rem; line-height: 1.7; color: #3a3f4e; list-style: disc; margin-bottom: 6px; }
.article-content strong { color: var(--text); font-weight: 600; }

/* ===== CTA BOX ===== */

/* CTA 3-buttons row */
.cta-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.cta-buttons .cta-btn { padding: 11px 22px; font-size: 0.85rem; }
.cta-box { background: var(--primary); color: #fff; padding: 28px 24px; border-radius: var(--radius); text-align: center; margin: 40px 0; }
.cta-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.cta-box p { font-size: 0.88rem; opacity: 0.8; margin-bottom: 18px; }
.cta-btn { display: inline-block; background: var(--accent); color: #fff; padding: 13px 28px; border-radius: 50px; font-weight: 700; font-size: 0.92rem; transition: all 0.25s; box-shadow: 0 4px 14px rgba(40,167,69,0.35); letter-spacing: 0.01em; }
.cta-btn:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 6px 22px rgba(40,167,69,0.45); transform: translateY(-2px); }

/* ===== FOOTER ===== */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.6); padding: 28px 20px; text-align: center; font-size: 0.83rem; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.7); font-weight: 500; }
.footer-links a:hover { color: #fff; }
.site-footer p { color: rgba(255,255,255,0.5); }
.site-footer strong { color: rgba(255,255,255,0.85); font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .header-nav { display: none; }
  .hero { padding: 32px 20px 28px; }
  .hero h1 { font-size: 1.4rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 18px; }
  .filter-sort { flex-direction: column; align-items: flex-start; }
  .sort-wrap { width: 100%; justify-content: space-between; }
  .article-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  :root { --header-h: 56px; }
  .logo img { height: 28px; }
  .hero h1 { font-size: 1.2rem; }
  .hero p { font-size: 0.85rem; }
  .container { padding: 20px 14px; }
  .blog-card-body { padding: 16px 18px 18px; }
}
